Log in

View Full Version : Spiroc Isle Trash Respawn


chrsschb
02-07-2012, 07:51 PM
So I decided to add the scripts for the trash on Spiroc Isle. All the scripts fire and the vanquishers get the signals, but only the Arbiter and the Banisher actually respawn. I have verified all names and npcids are correct. Anyone have any idea why this isn't working 100%?

sub EVENT_SPAWN {

quest::shout("Yes this PL works!");
}


sub EVENT_SIGNAL {

#a_spiroc_banisher
if ($signal eq 1){
quest::shout("I got signal 1 (banisher)!");
quest::unique_spawn(71007,0,0,1051,-829,436,0);
}

#a_spiroc_arbiter
elsif ($signal eq 2){
quest::shout("I got signal 2 (arbiter)!");
quest::unique_spawn(71008,0,0,1072,-750,448,67);
}

#a_spiroc_revolter
elsif ($signal eq 3){
quest::shout("I got signal 3 (revolter)!");
quest::unique_spawn(71010,0,0,787,-568,459,0);
}

#a_spiroc_expulser
elsif ($signal eq 4){
quest::shout("I got signal 4 (expulser)!");
quest::unique_spawn(71011,0,0,683,491,443,89);
}

#The_Spiroc_Guardian
elsif ($signal eq 5){
quest::shout("I got signal 5 (guardian)!");
quest::unique_spawn(71013,0,0,766,-868,424,68);
}

#a_spiroc_walker
elsif ($signal eq 6){
quest::shout("I got signal 6 (walker)!");
quest::unique_spawn(71014,0,0,956,-584,461,35);
}

#a_spiroc_caller
elsif ($signal eq 7){
quest::shout("I got signal 7 (caller)!");
quest::unique_spawn(71015,0,0,1125,-467,470,190);
}

}

joligario
02-07-2012, 07:58 PM
When using numbers in if statements, use ==.
When using strings in if statements, use eq.

chrsschb
02-07-2012, 09:12 PM
I've already tried that, doesn't make any difference.

joligario
02-07-2012, 09:53 PM
Where's the script for the signaling NPC?

chrsschb
02-07-2012, 09:59 PM
All the signals work. Already stated this.

joligario
02-07-2012, 10:29 PM
Then good luck!

trevius
02-09-2012, 04:31 AM
As joligario already said, it won't work without using the correct operators. If you aren't going to quote the numbers in your $signal comparison, then don't use "eq".

I would suggest changing your shout lines all to be like this:

quest::shout("I got signal $signal (expulser)!");

That will tell you if they got the actual signal you expected. In the case of your script, I suspect you will see all of the signals come in, but fall into the same if statements due to your incorrect operator use.

Also, I find elsif a bit flaky sometimes, unless there is an else at the end of it (even if the else has nothing in it). You might try switching those all to if instead of elsif and see if that makes any difference.

chrsschb
02-09-2012, 05:05 PM
As joligario already said, it won't work without using the correct operators. If you aren't going to quote the numbers in your $signal comparison, then don't use "eq".

I would suggest changing your shout lines all to be like this:

quest::shout("I got signal $signal (expulser)!");

That will tell you if they got the actual signal you expected. In the case of your script, I suspect you will see all of the signals come in, but fall into the same if statements due to your incorrect operator use.

Also, I find elsif a bit flaky sometimes, unless there is an else at the end of it (even if the else has nothing in it). You might try switching those all to if instead of elsif and see if that makes any difference.

elsif and else were tried and failed.

I tried =='s and it made no difference.

There are 3 vanquishers and all 3 get every signal they are supposed to get.

The mobs just won't spawn.

Actually I take that back, I switched the unique_spawns to spawn2 and they spawned, but I got 3 instead of 1 (obviously), which wasn't ideal.

I tried separating the vanquishers into their own entities, using different names and npcids, then dividing the trash spawns between them, and still received the same results.

At this point I just trashed the idea. Some trash spawns aren't worth this much damn headache.