From 0aa6ccc6001d25b39664f387cf1cd211a1a50659 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 13 May 2020 06:57:22 -0300 Subject: Gumi's automatic absolve --- npc/functions/hub.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index cd2e40656..54ae09349 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -29,12 +29,24 @@ function script HUB_Login { function script HUB_Logout { .@dead=getarg(0, false); getmapxy(.@mapa$, .@a,.@b, 0); + .@zone$=getmapinfo(MAPINFO_ZONE, .@mapa$); // Hardcore Server if ($HARDCORE && .@dead) { if (@grace) { + // Grace is upon you (ie. script death) @grace=false; - // pass + } else if (.@zone$ == "MMO" && ABSOLVE_CNT <= 3) { + // Absolve (limited attempts) + if (ABSOLVE_DAY != gettimeparam(GETTIME_DAYOFMONTH)) { + ABSOLVE_DAY=gettimeparam(GETTIME_DAYOFMONTH); + ABSOLVE_CNT=0; + } + ABSOLVE_CNT+=1; + dispbottom l("This is a special map so your death is not counted."); + dispbottom b(l("You have %d non-counting deaths remaining today.", 3-ABSOLVE_CNT)); + if (ABSOLVE_CNT == 3) + dispbottom col(l("WARNING: if you die again today in a special map it will be PERMANENT."), 1); } else { // TODO: Misc penalties (drop all items, etc) atcommand("@dropall"); -- cgit v1.2.3-60-g2f50