summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/001-8/hub.txt30
-rw-r--r--npc/011-1/manastone.txt6
2 files changed, 25 insertions, 11 deletions
diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt
index 51abfc258..9abec0abe 100644
--- a/npc/001-8/hub.txt
+++ b/npc/001-8/hub.txt
@@ -416,11 +416,16 @@ OnPCLogoutEvent:
if (!is_staff())
atcommand "@jail "+strcharinfo(0);
}
-
-
- // I want to know if it is already safe to read your current exp
- // to implement a no-death-penalty and a halved-penalty system
- if (is_staff() && @qhub_died) {
+ // Death at terranite cave
+ if (.@mapa$ ~= "015-6")
+ @deathpenalty_override=2;
+
+ // This allows code to override death penalty, just once:
+ // @deathpenalty_override
+ // Valid values: 1- No penalty. 2- Halved penalty.
+ if (@deathpenalty_override && @qhub_died) {
+ @deathpenalty_realvalue=readparam(BaseExp);
+ @deathpenalty_realvaljob=readparam(JobExp);
addtimer(200, "#QuirinoHUB::OnNoPenaltyCommand");
}
@@ -434,8 +439,19 @@ OnCancel:
end;
OnNoPenaltyCommand:
- dispbottom l("Exp: @@", readparam(BaseExp));
- dispbottom l("JExp: @@", readparam(JobExp));
+ .@realvalue=readparam(BaseExp)-@deathpenalty_realvalue;
+ .@realvaljob=readparam(JobExp)-@deathpenalty_realvaljob;
+ if (@deathpenalty_override == 1)
+ getexp .@realvalue, .@realvaljob;
+ else if (@deathpenalty_override == 2)
+ getexp .@realvalue/2, .@realvaljob/2;
+ else
+ dispbottom l("BUG, REPORT ME: QHUB PENALTY OVERRIDE INVALID SIGNAL @@", @deathpenalty_override);
+
+ // Clear temporary variables
+ @deathpenalty_override=0;
+ @deathpenalty_realvalue=0;
+ @deathpenalty_realvaljob=0;
end;
}
diff --git a/npc/011-1/manastone.txt b/npc/011-1/manastone.txt
index ba3e07f9c..a90de1c99 100644
--- a/npc/011-1/manastone.txt
+++ b/npc/011-1/manastone.txt
@@ -72,10 +72,8 @@ L_LevelUp:
if (!MAGIC_LVL) mes l("Magic Power is granted to you, but you die from it.");
if (MAGIC_LVL) mes l("More Magic Power is granted to you, but you die from it.");
MAGIC_LVL = MAGIC_LVL+1;
- // Magic Numbers work better
- getexp readparam(NextBaseExp)*771/1000, readparam(NextJobExp)*400/1000;
- // Non-magic numbers work bad
- //getexp readparam(NextBaseExp)*getbattleflag(death_penalty_base)/1000, readparam(NextJobExp)*getbattleflag(death_penalty_job)/1000;
+ // No penalty for death provoked by Mana Stone, see npc/001-8/hub.txt for more info
+ @deathpenalty_override=1;
percentheal -100, -100;
close;