summaryrefslogtreecommitdiff
path: root/npc/001-4
diff options
context:
space:
mode:
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