Ok I found this stuff here. It is probably what I'm looking for.
quest::spawn_condition(zone_short, condition_id, value) - uses variables in the spawn_conditions∞ table for spawning, despawning chosen npc's in a given zone. See SampleQuests.
quest::get_spawn_condition(zone_short, condition_id) - Get the value of a spawn condition
quest::toggle_spawn_event(event_id,enable,reset_ba se) - Toggle a spawn event. See the SpawnConditions page for details on usage.
I see in the DB under spawn_conditions and each condition has:
"zone" "ID" "value" "onchange" "name"
I'm assuming from what I'm reading you can make a quest of an NPC check the value and if is "x" value then that is the condition to make NPC "A" spawn in say "freporte". I have a quest written for the npc in freporte that when it reaches ($wp eq 4) it quest::depop() and this works. (tested by repoping the zone and watched it's follow through, zone is static)
looks like the conditions are linked to the spawn2 table so fixing to take a look at it and see how it's set up.
If I can figure out how to write it it looks like all I have to do is do a:
"code for OOT NPC"
Code:
sub EVENT_WAYPOINT_ARRIVE {
if ($wp eq 35)
{
#what ever is suppose to be here to check and spawn the NPC in freporte then reset the condition value???
quest::spawn_condition(zone_short, condition_id, value)????
}
}
"code for freporte NPC"
Code:
sub EVENT_WAYPOINT_ARRIVE {
if ($wp eq 5)
{
#once spawned will continue on it's grid it's assigned to untill....
quest::depop();
#maybe change value of the spawn condition here?
}
}
I'm assuming that is sorta how it works. There are other things I will add to the scripts but they are alot easier then this part considering I'm trying to figure out how this works.