summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-07-09 15:41:42 -0300
committerJesusaves <cpntb1@ymail.com>2021-07-09 15:41:42 -0300
commit85f6f317c6f086c1155eb5a45c93781f4cf95943 (patch)
tree47b12bf54aa08f6661b68ce565263502a0b64c22 /npc/functions
parenta853b2fe2e99f389d7e4d68d5ca58bef856fc459 (diff)
downloadserverdata-85f6f317c6f086c1155eb5a45c93781f4cf95943.tar.gz
serverdata-85f6f317c6f086c1155eb5a45c93781f4cf95943.tar.bz2
serverdata-85f6f317c6f086c1155eb5a45c93781f4cf95943.tar.xz
serverdata-85f6f317c6f086c1155eb5a45c93781f4cf95943.zip
Do not kill instantly on scripted death; And honor $HARDCORE flag if set
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/global_event_handler.txt4
-rw-r--r--npc/functions/main.txt4
2 files changed, 6 insertions, 2 deletions
diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt
index 69972292..f611e997 100644
--- a/npc/functions/global_event_handler.txt
+++ b/npc/functions/global_event_handler.txt
@@ -46,4 +46,8 @@ OnClock1700:
OnInit:
MOTD(); // set the MOTD array
end;
+
+OnDie:
+ percentheal -100, -100;
+ end;
}
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index d072ff60..4a0c9c22 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -294,12 +294,12 @@ function script any_of {
function script die {
if ($HARDCORE) {
@grace=true;
- percentheal -100, -100;
+ addtimer 10, "#GlobalHandler::OnDie"; // Wait script execution to finish
//setparam(Hp, 1);
//warp "000-1", 22, 22;
//end; // MUST be end; to mimic official behavior
} else {
- percentheal -100, -100;
+ addtimer 10, "#GlobalHandler::OnDie"; // Wait script execution to finish
}
return;
}