View Single Post
  #2  
Old 08-01-2009, 01:14 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

How about this:

Add the NPC to all zones using the spawn point at where it would enter the zone. In EVENT_SPAWN, have it check if the global is set to a number associated with the current zone. If it is not, then depop(). If it is, do a start() and when it reaches a specific x/y, have it stop(). Set the global for the next zone, and run a depop().

Other things to consider if using this method:
Designate 1 "start" zone. When that NPC spawns, have it set its own zone number in the global if the global does not exist. If killed, ensure the global is deleted in EVENT_DEATH. If a zone crashes, no big deal, because the global is already set for that specific zone, so it will just start over at the beginning of its path only in that zone.
Reply With Quote