summaryrefslogtreecommitdiff
path: root/npc/001-4
diff options
context:
space:
mode:
Diffstat (limited to 'npc/001-4')
-rw-r--r--npc/001-4/traps.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/npc/001-4/traps.txt b/npc/001-4/traps.txt
index c30553c59..0c00263ef 100644
--- a/npc/001-4/traps.txt
+++ b/npc/001-4/traps.txt
@@ -4,7 +4,12 @@
// Description:
// Traps.
+// SteelTrap( {damage=80%}, {delay=15s}, {stun=3s} )
function script SteelTrap {
+ .@dmg=getarg(0, 80);
+ .@delay=getarg(1, 15);
+ .@stun=getarg(2, 3);
+
// It was disarmed
if (getnpctimer(0) == 0)
{
@@ -21,12 +26,13 @@ function script SteelTrap {
// This means you can - and SHOULD - lead Forains into these traps
if (playerattached())
{
- percentheal -80, 0;
+ percentheal -(.@dmg), 0;
}
else
{
- sc_start SC_WALKSPEED,15000,60;
- sc_start SC_STUN,rand(3000,8000),0;
+ .@stun*=1000;
+ sc_start SC_WALKSPEED,(.@delay*1000),60;
+ sc_start SC_STUN,rand(.@stun,.@stun*3),0;
}
// A minor special effect and we're done.