diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-06-03 10:46:20 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-06-03 10:46:20 -0300 |
commit | aa9f4167edf59b60a4a58e43eb7bed3a2cd91c4e (patch) | |
tree | 96bd629bb8a62d3087fdfbef55f5f31de2be85e5 /npc | |
parent | 46ab229818db5c5e00fc56b0f3bf0e0c2f0a720f (diff) | |
download | serverdata-aa9f4167edf59b60a4a58e43eb7bed3a2cd91c4e.tar.gz serverdata-aa9f4167edf59b60a4a58e43eb7bed3a2cd91c4e.tar.bz2 serverdata-aa9f4167edf59b60a4a58e43eb7bed3a2cd91c4e.tar.xz serverdata-aa9f4167edf59b60a4a58e43eb7bed3a2cd91c4e.zip |
Make SteelTrap flexible
Diffstat (limited to 'npc')
-rw-r--r-- | npc/001-4/traps.txt | 12 |
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. |