Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 01-15-2018, 05:10 AM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default Remove mounts when zoning

This is to kick players off their mounts when zoning to indoor zones. As is, they can stay on them but not re-summon when in an zone that forbids them.

In quests/global/global_player.pl

Code:
sub EVENT_ENTERZONE {
  foreach my $zone_in (18, 31, 32, 36, 39, 40 .. 42, 44, 64 .. 66){
    if($zoneid == $zone_in){
      $client->BuffFadeByEffect(113);
    }
  }
}
There are probably more elegant ways to do it, but this keeps from having to call it out in each player.pl for the affected zones.
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #2  
Old 01-15-2018, 05:40 AM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

And thanks to Akkadius for a much smarter way! This method pulls the 'cancastoutdoor' field from the zone table and removes the mount buff when you enter a zone that disallows outdoor spells.

This will use the MySQL plugins (be sure to get the new one and read about the new JSON loader http://www.eqemulator.org/forums/showthread.php?t=41690)

Code:
sub EVENT_ENTERZONE {
#::: Dismount on indoor zone
  $ex = plugin::LoadMysql()->prepare("SELECT `castoutdoor` from `zone` WHERE `zoneidnumber` = ? AND `castoutdoor` = 0");
  $ex->execute($zoneid);
  while (@row = $ex->fetchrow_array()) {
    quest::debug("[horse_mount] We have zoned into a indoor zone, dismounting...");
    $client->BuffFadeByEffect(113);
  }
}
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #3  
Old 01-15-2018, 02:56 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Not all zones on live strip mounts, even if you can't cast a mount in that zone.
Reply With Quote
  #4  
Old 01-15-2018, 03:06 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

Then the first option - excluding those zones - would be the way to go.
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #5  
Old 02-22-2018, 04:23 PM
jimrocken
Fire Beetle
 
Join Date: Aug 2010
Posts: 14
Default

Code:
sub EVENT_ENTERZONE {
	%ZoneDB = (
	#	ZoneID		
		253 => {"AllowMount" => "FALSE"}, #Nexus
		287 => {"AllowMount" => "TRUE"}, #Plane of Knowledge
		999 => {"AllowMount" => "FALSE"} #don't put any zones past this one.
	);
	if($ZoneDB{$id}{"AllowMount"} eq "FALSE") $client->BuffFadeByEffect(113);
}
bit more of a elegent way to do the first version
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:02 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3