diff options
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/hub.txt | 4 | ||||
-rw-r--r-- | npc/functions/main.txt | 11 | ||||
-rw-r--r-- | npc/functions/refine.txt | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index cdaf28ab8..8328b8b77 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -41,9 +41,9 @@ function script HUB_Logout { donpcevent("Cindy#Outside::OnReckless"); recovery(getcharid(3)); warp any("010-1", "010-2"), 0, 0; - percentheal -100, -100; sc_start2 SC_POISON, 1, 90, 10000; - heal -1, -1; + die(); + if (!$HARDCORE) heal -1, -1; } else if (.@mapa$ == "021-4") { .@pl = getmapusers("021-4")-1; if (.@pl < 1) diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 808820aef..9bb9caa44 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -294,6 +294,17 @@ function script any_of { return getelementofarray(getarg(0), getarrayindex(getarg(0)) + rand2(getarraysize(getarg(0)) - getarrayindex(getarg(0)))); } +function script die { + if ($HARDCORE) { + setparam(Hp, 1); + warp "000-1", 22, 22; + end; // MUST be end; to mimic official behavior + } else { + percentheal -100, -100; + } + return; +} + // TMW2 Custom Functions ///////////////////////////////////////////// diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt index fb1cfb57e..e5c835070 100644 --- a/npc/functions/refine.txt +++ b/npc/functions/refine.txt @@ -115,14 +115,14 @@ function script refineMaster { if (getequipisequiped(.@it) == 0) { mesn; mesc l("All cheaters must die."), 1; - percentheal -100, -100; + die(); close; } // Item changed if (getequiprefinerycnt(.@it) != .@rlv || getequipid(.@it) != .@item) { mesn; mesc l("All cheaters must die."), 1; - percentheal -100, -100; + die(); close; } ///// This should cover most of Crazyfefe tricks ¬.¬ I hope ¬.¬ |