From 932b551de8edaed5edc0c6e416588c04c72b5643 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 24 Jun 2020 00:21:17 -0300 Subject: Switches: Prevent running functions when already switched --- npc/008-2/_config.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'npc/008-2') diff --git a/npc/008-2/_config.txt b/npc/008-2/_config.txt index ce9c7ad2b..1da640c7d 100644 --- a/npc/008-2/_config.txt +++ b/npc/008-2/_config.txt @@ -10,9 +10,9 @@ OnInit: setcells "008-2", 80, 208, 88, 208, 3, "008-2_80_208"; } -// FIXME: Either let flip/unflip, or only run once. -// This could be done with a new attribute and checking NPC display when only run once. 008-2,106,237,0 script #008-2_106_237 NPC_SWITCH_ONLINE,{ + if (getnpcclass() == NPC_SWITCH_OFFLINE) + end; callfunc "massprovoke", 12; setnpcdisplay "#008-2_106_237", NPC_SWITCH_OFFLINE; end; @@ -20,9 +20,9 @@ OnInit: .distance=2; } -// FIXME: Either let flip/unflip, or only run once. -// This could be done with a new attribute and checking NPC display when only run once. 008-2,66,143,0 script #008-2_66_143 NPC_SWITCH_OFFLINE,{ + if (getnpcclass() == NPC_SWITCH_ONLINE) + end; callfunc "grenade", 12, 10000; setnpcdisplay "#008-2_66_143", NPC_SWITCH_ONLINE; end; @@ -30,9 +30,9 @@ OnInit: .distance=2; } -// FIXME: Either let flip/unflip, or only run once. -// This could be done with a new attribute and checking NPC display when only run once. 008-2,111,166,0 script #008-2_111_166 NPC_SWITCH_ONLINE,{ + if (getnpcclass() == NPC_SWITCH_OFFLINE) + end; callfunc "ALCReset"; setnpcdisplay "#008-2_111_166", NPC_SWITCH_OFFLINE; end; -- cgit v1.2.3-60-g2f50