summaryrefslogtreecommitdiff
path: root/npc/001-4
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-03 16:16:45 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-03 16:16:45 -0300
commit45ca4be7791975f0e008a8fb60aeadabec2a21c7 (patch)
tree87cbc26c00ea19a955cddd27580df3f9756d4f83 /npc/001-4
parentbfafc9f6b0d9cf8b02088a914a1e3680cea92957 (diff)
downloadserverdata-45ca4be7791975f0e008a8fb60aeadabec2a21c7.tar.gz
serverdata-45ca4be7791975f0e008a8fb60aeadabec2a21c7.tar.bz2
serverdata-45ca4be7791975f0e008a8fb60aeadabec2a21c7.tar.xz
serverdata-45ca4be7791975f0e008a8fb60aeadabec2a21c7.zip
Make traps more flexible, bugfix
Diffstat (limited to 'npc/001-4')
-rw-r--r--npc/001-4/traps.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/npc/001-4/traps.txt b/npc/001-4/traps.txt
index 0c00263ef..3d50f34fe 100644
--- a/npc/001-4/traps.txt
+++ b/npc/001-4/traps.txt
@@ -4,23 +4,24 @@
// Description:
// Traps.
-// SteelTrap( {damage=80%}, {delay=15s}, {stun=3s} )
+// SteelTrap( {damage=80%}, {delay=15s}, {stun=3s}, {npcname=auto} )
function script SteelTrap {
.@dmg=getarg(0, 80);
.@delay=getarg(1, 15);
.@stun=getarg(2, 3);
+ .@n$=getarg(3, strnpcinfo(0));
// It was disarmed
if (getnpctimer(0) == 0)
{
initnpctimer;
- setnpcdisplay strnpcinfo(0), NPC_TRAP_ONLINE;
+ setnpcdisplay .@n$, NPC_TRAP_ONLINE;
return;
}
// Fire!!
setnpctimer 9000;
- setnpcdisplay strnpcinfo(0), NPC_TRAP_TRIGGERED;
+ setnpcdisplay .@n$, NPC_TRAP_TRIGGERED;
// Boom - Hurt players and/or stun monsters
// This means you can - and SHOULD - lead Forains into these traps