Ok, been working on this a couple of days now. played with different things. perl is so picky. Seems you make one little mistake or misplace one thing and it won't work. I'm assuming that is what is wrong in my case.
The set up:
I have the boat on a grid in freporte npc_type 10183
I have an npc in freporte that is on a timer to check the global
I have the waypoint set in OOT that when that boat reaches waypoint 3 that it sets a global.
I have inserted things to help me know what is and isn't working.
The waypoint seems to be working.
The timer is working in freporte but the global part isn't.
I have tried to follow the examples and write it in a way that makes sence.
I have played around with different parts of the global, options, value, duration.
I have used setglobal to change the value and tried delglobal (I figured that would del the global once the boat in freporte spawned since setglobal didn't seem to work and the boat in OOT would just set a new global each time it hits the waypoint).
This is what I have:
Freeport Harbor Authority (NPC in freporte)
Code:
sub EVENT_SPAWN {
quest::settimer("spawnship",2);
}
sub EVENT_TIMER {
if ($timer == "spawnship") {
quest::say("timer is working"); # this part works
if (defined($qglobals{shipspawna}) && ($qglobals{shipspawna} == 1)) { # this part doesn't work
quest::respawn(10183,30); # this part isn't working
quest::delglobal("shipspawna");
quest::shout("it works"); # this part isn't working
}
}
}
Ship in OOT:
Code:
sub EVENT_WAYPOINT_ARRIVE {
if($wp == 3) {
quest::setglobal("shipspawna",1,5,"F"); # not sure if this is right
quest::say("I am here"); # this part seems to work
}
}
Help?
I figure I'll eventualy figure this out but I'm sure it's probably just a simple mistake.
Thanks