diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-05-13 00:57:23 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-05-13 00:57:23 -0300 |
commit | eca038e00b9937d6c177bd8cddc8b5b1a2e9c5a9 (patch) | |
tree | bd7cc4caca79d1663f3c4f1088e203bb87706a53 /npc/functions/main.txt | |
parent | 2c73977e32827d85b99a62fcf2d4663278da74a1 (diff) | |
download | serverdata-eca038e00b9937d6c177bd8cddc8b5b1a2e9c5a9.tar.gz serverdata-eca038e00b9937d6c177bd8cddc8b5b1a2e9c5a9.tar.bz2 serverdata-eca038e00b9937d6c177bd8cddc8b5b1a2e9c5a9.tar.xz serverdata-eca038e00b9937d6c177bd8cddc8b5b1a2e9c5a9.zip |
Replace our script-induced deaths with new, custom, die() command
This will fix one of the HardCore Server bugs.
Diffstat (limited to 'npc/functions/main.txt')
-rw-r--r-- | npc/functions/main.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 808820aef..9bb9caa44 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -294,6 +294,17 @@ function script any_of { return getelementofarray(getarg(0), getarrayindex(getarg(0)) + rand2(getarraysize(getarg(0)) - getarrayindex(getarg(0)))); } +function script die { + if ($HARDCORE) { + setparam(Hp, 1); + warp "000-1", 22, 22; + end; // MUST be end; to mimic official behavior + } else { + percentheal -100, -100; + } + return; +} + // TMW2 Custom Functions ///////////////////////////////////////////// |