From e16ec68c6b8ee77a53fe24ce74cd3dee281b0cca Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 13 May 2020 01:05:53 -0300 Subject: Rewrite how death will be handled on Hardcore. Instead, it'll set a variable called grace, and this variable will exempt you. --- npc/functions/hub.txt | 13 +++++++++---- npc/functions/main.txt | 8 +++++--- 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 8328b8b77..cd2e40656 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -32,10 +32,15 @@ function script HUB_Logout { // Hardcore Server if ($HARDCORE && .@dead) { - // TODO: Misc penalties (drop all items, etc) - atcommand("@dropall"); - // TODO: It could be @jail, but it is buggy - atcommand("@jailfor 1d "+strcharinfo(0)); + if (@grace) { + @grace=false; + // pass + } else { + // TODO: Misc penalties (drop all items, etc) + atcommand("@dropall"); + // TODO: It could be @jail, but it is buggy + atcommand("@jailfor 1d "+strcharinfo(0)); + } // Vanished on Cindy Cave } else if (.@mapa$ == "021-4" && strcharinfo(0) == $@CINDY_HERO$) { donpcevent("Cindy#Outside::OnReckless"); diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 9bb9caa44..282da5cde 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -296,9 +296,11 @@ function script any_of { function script die { if ($HARDCORE) { - setparam(Hp, 1); - warp "000-1", 22, 22; - end; // MUST be end; to mimic official behavior + @grace=true; + percentheal -100, -100; + //setparam(Hp, 1); + //warp "000-1", 22, 22; + //end; // MUST be end; to mimic official behavior } else { percentheal -100, -100; } -- cgit v1.2.3-70-g09d2