summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-13 06:57:22 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-13 06:57:22 -0300
commit0aa6ccc6001d25b39664f387cf1cd211a1a50659 (patch)
tree46c1f705c84cef2c28aa58c8d1230422853ee040
parente16ec68c6b8ee77a53fe24ce74cd3dee281b0cca (diff)
downloadserverdata-0aa6ccc6001d25b39664f387cf1cd211a1a50659.tar.gz
serverdata-0aa6ccc6001d25b39664f387cf1cd211a1a50659.tar.bz2
serverdata-0aa6ccc6001d25b39664f387cf1cd211a1a50659.tar.xz
serverdata-0aa6ccc6001d25b39664f387cf1cd211a1a50659.zip
Gumi's automatic absolve
-rw-r--r--npc/functions/hub.txt14
1 files changed, 13 insertions, 1 deletions
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");