OnPoringKilled:
set $PoringKilled,$PoringKilled+1;
if ($PoringKilled==1) goto L_AllDead;
end;
You're using a global variable. If you've run this before, your variable might be greater than 1 already.
Also instead of goto use donpcevent
*donpcevent "{NPC NAME}::<event label>";
This command invokes the event label code within an another NPC or NPCs. If
event label has the form "NpcName::OnLabel", then only given NPC's event label
will be invoked (much like 'goto' into another NPC). If the form is "::OnLabel"
(NpcName omitted), the event code of all NPCs with given label will be invoked,
one after another. In both cases the invoked script will run without an attached
RID, whether or not the invoking script was attached to a player. The event
label name is required to start with On.
This command can be used to make other NPCs act, as if they were responding to
the invoking NPC's actions, such as using an emotion or talking.
place,100,100,1%TAB%script%TAB%NPC%TAB%53,{
mes "Hey NPC2 copy what I do";
close2;
set .@emote, rand(1,30);
donpcevent "NPC2::OnEmote";
OnEmote:
emotion .@emote;
end;
}
place,102,100,1%TAB%script%TAB%NPC2%TAB%53,{
mes "Hey NPC copy what I do";
close2;
set .@emote, rand(1,30);
donpcevent "NPC::OnEmote";
OnEmote:
emotion .@emote;
end;
}
Whichever of the both NPCs is talked to, both will show a random emotion at the
same time.