View Single Post
  #13  
Old 10-06-2008, 12:40 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by ChaosSlayer View Post
hmm so you teling me if i want to make a randomly roaming npc, this thing will essentialy substitute the need of making a grid for random area roamers?

wouldn't this require a whole new table in DB? and it should also store a zone id somewhere no?
1)Yes, it will. No more grids for wide open areas.
2) No, it doesn't require a new table in the DB.
The spawngroup is loaded on a repop or zone bootup with this code, and because of this, the zone ID is stored in spawn2 rather than spawngroup.

Also, roamboxes are stored in spawngroup so a random NPC can spawn each time.

If no roambox is specified, the NPC finds a grid. If no grid is specifed, the NPC stays static and does nothing. Pretty easy system.
Reply With Quote