View Single Post
  #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