summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-07-09 15:41:42 -0300
committerJesusaves <cpntb1@ymail.com>2021-07-09 15:41:42 -0300
commit85f6f317c6f086c1155eb5a45c93781f4cf95943 (patch)
tree47b12bf54aa08f6661b68ce565263502a0b64c22
parenta853b2fe2e99f389d7e4d68d5ca58bef856fc459 (diff)
downloadserverdata-85f6f317c6f086c1155eb5a45c93781f4cf95943.tar.gz
serverdata-85f6f317c6f086c1155eb5a45c93781f4cf95943.tar.bz2
serverdata-85f6f317c6f086c1155eb5a45c93781f4cf95943.tar.xz
serverdata-85f6f317c6f086c1155eb5a45c93781f4cf95943.zip
Do not kill instantly on scripted death; And honor $HARDCORE flag if set
-rw-r--r--npc/002-5/sema.txt2
-rw-r--r--npc/007-2/witch.txt2
-rw-r--r--npc/009-2/nurse.txt4
-rw-r--r--npc/009-4/torches.txt2
-rw-r--r--npc/009-8/celestia.txt2
-rw-r--r--npc/011-1/oscar.txt2
-rw-r--r--npc/011-6/crastur.txt2
-rw-r--r--npc/013-2/notes.txt2
-rw-r--r--npc/017-4/waric.txt2
-rw-r--r--npc/018-2/caul.txt2
-rw-r--r--npc/025-4/battlecaves.txt22
-rw-r--r--npc/029-1/hasan.txt2
-rw-r--r--npc/033-1/kimarr.txt2
-rw-r--r--npc/034-1/yetiSpawn.txt2
-rw-r--r--npc/048-2/slimes.txt14
-rw-r--r--npc/051-1/desert.txt2
-rw-r--r--npc/051-1/forest.txt4
-rw-r--r--npc/051-3/ambush.txt6
-rw-r--r--npc/051-3/reinforcements.txt4
-rw-r--r--npc/052-1/channelling.txt8
-rw-r--r--npc/052-2/chest.txt2
-rw-r--r--npc/052-2/partyroom.txt6
-rw-r--r--npc/052-2/storage.txt4
-rw-r--r--npc/055-1/pumpkins.txt2
-rw-r--r--npc/056-2/mirak.txt2
-rw-r--r--npc/functions/global_event_handler.txt4
-rw-r--r--npc/functions/main.txt4
27 files changed, 58 insertions, 54 deletions
diff --git a/npc/002-5/sema.txt b/npc/002-5/sema.txt
index 689d3ec0..c70be728 100644
--- a/npc/002-5/sema.txt
+++ b/npc/002-5/sema.txt
@@ -48,7 +48,7 @@ L_Sema_TooMany:
L_Sema_Not_Happy:
QL_MINEALL = 26;
- heal -Hp, 0;
+ die();
mes "A stone falls on your head.";
goto L_close;
diff --git a/npc/007-2/witch.txt b/npc/007-2/witch.txt
index 254fa4ea..55c31e5f 100644
--- a/npc/007-2/witch.txt
+++ b/npc/007-2/witch.txt
@@ -646,7 +646,7 @@ OnTimer300000:
goto L_EndQuest;
L_KillHero:
- heal -Hp, 0;
+ die();
goto L_EndQuest;
}
diff --git a/npc/009-2/nurse.txt b/npc/009-2/nurse.txt
index d534f64d..6741b2fb 100644
--- a/npc/009-2/nurse.txt
+++ b/npc/009-2/nurse.txt
@@ -64,7 +64,7 @@ L_Heal:
mes "[Nurse]";
mes "\"Here, let me heal you.\"";
next;
- heal 10000, 10000;
+ percentheal 100, 100;
goto L_close;
L_NoHeal:
@@ -367,7 +367,7 @@ L_hl_m_vn:
next;
mes ".......";
// bye bye player!
- heal -Hp, 0;
+ die();
// close instead of telling how much stabilizer is needed
goto L_close;
// goto L_check_st;
diff --git a/npc/009-4/torches.txt b/npc/009-4/torches.txt
index fe1fc187..8cf053d0 100644
--- a/npc/009-4/torches.txt
+++ b/npc/009-4/torches.txt
@@ -247,7 +247,7 @@ L_Failed:
misceffect 16;
@TorchIntensity = 0;
callfunc "SetTorchIntensity";
- heal -Hp, 0;
+ die();
close2;
return;
}
diff --git a/npc/009-8/celestia.txt b/npc/009-8/celestia.txt
index e4ef6f2d..52d26e33 100644
--- a/npc/009-8/celestia.txt
+++ b/npc/009-8/celestia.txt
@@ -23,7 +23,7 @@ L_YetiMask:
mes "You catch a glimpse of a black bow while some kind of dark mist quickly overcomes you.";
next;
mes "You feel a sharp pain in your heart and everything fades into darkness.";
- heal -Hp, 0; // set the current hp to 0 (kill the player)
+ die(); // set the current hp to 0 (kill the player)
set @scared_celestia, 1; // set a temporary variable (resets on log out) in the player scope (variable is stored in the player, not in the npc)
close; // terminate the script and require the player to press the "close" button
diff --git a/npc/011-1/oscar.txt b/npc/011-1/oscar.txt
index e6780ff3..f0be3b4b 100644
--- a/npc/011-1/oscar.txt
+++ b/npc/011-1/oscar.txt
@@ -379,7 +379,7 @@ OnPDP:
L_KillBadHunter:
misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0);
- heal -Hp, 0;
+ die();
end;
L_PumpkinsRuined:
diff --git a/npc/011-6/crastur.txt b/npc/011-6/crastur.txt
index e178fcab..ea18d138 100644
--- a/npc/011-6/crastur.txt
+++ b/npc/011-6/crastur.txt
@@ -150,7 +150,7 @@ L_Regular:
L_Insult:
npctalk "Crastur : Die " + strcharinfo(0) + "!";
- heal -10000, 0;
+ die();
emotion EMOTE_VICIOUS;
mes "[Crastur]";
mes "";
diff --git a/npc/013-2/notes.txt b/npc/013-2/notes.txt
index 8c2cf9fa..5fba597b 100644
--- a/npc/013-2/notes.txt
+++ b/npc/013-2/notes.txt
@@ -190,7 +190,7 @@ L_close:
next;
mes "You're losing control of your body... everything turns black... while slipping to the floor, you hear a faraway scream... suddenly, you see THE LIGHT!";
next;
- heal -Hp, 0;
+ die();
close;
}
diff --git a/npc/017-4/waric.txt b/npc/017-4/waric.txt
index f58eda6c..eead477f 100644
--- a/npc/017-4/waric.txt
+++ b/npc/017-4/waric.txt
@@ -353,7 +353,7 @@ L_Banished:
mesc l("The wizard looks at you with despise.");
mesn;
mesq l("How did you...");
- heal -Hp, 0;
+ die();
goto L_close;
L_NoItem:
diff --git a/npc/018-2/caul.txt b/npc/018-2/caul.txt
index e5c3626f..a77e63c0 100644
--- a/npc/018-2/caul.txt
+++ b/npc/018-2/caul.txt
@@ -1016,7 +1016,7 @@ L_check_exp_nof:
heal -(Hp/2), 0;
misceffect 5;
misceffect 16;
- heal -Hp, 0;
+ die();
end;
L_calc_dempo_color:
diff --git a/npc/025-4/battlecaves.txt b/npc/025-4/battlecaves.txt
index 16b8d6d4..b5746027 100644
--- a/npc/025-4/battlecaves.txt
+++ b/npc/025-4/battlecaves.txt
@@ -13,7 +13,7 @@
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -99,7 +99,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -183,7 +183,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -268,7 +268,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -356,7 +356,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -444,7 +444,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -532,7 +532,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -622,7 +622,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -712,7 +712,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -797,7 +797,7 @@ L_Done:
if ($@battlecave10 == 1 && cavefights & BATTLE_CAVE1 && cavefights & BATTLE_CAVE2 && cavefights & BATTLE_CAVE3 && cavefights & BATTLE_CAVE4 && cavefights & BATTLE_CAVE5 && cavefights & BATTLE_CAVE6 && cavefights & BATTLE_CAVE7 && cavefights & BATTLE_CAVE8 && cavefights & BATTLE_CAVE9 && Rossy_Quest == 15)
goto L_Start;
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Start:
@@ -938,7 +938,7 @@ L_Done:
L_Cheat:
message strcharinfo(0), "You shouldn't be here, you cheater.";
- heal -Hp, 0;
+ die();
end;
L_Done:
diff --git a/npc/029-1/hasan.txt b/npc/029-1/hasan.txt
index 7cf89db7..d769560a 100644
--- a/npc/029-1/hasan.txt
+++ b/npc/029-1/hasan.txt
@@ -159,7 +159,7 @@ L_SummonAgain:
goto L_Summon;
OnKillYou:
- heal -Hp, 0;
+ die();
end;
OnTimer5000:
diff --git a/npc/033-1/kimarr.txt b/npc/033-1/kimarr.txt
index cc76ce97..15e2db81 100644
--- a/npc/033-1/kimarr.txt
+++ b/npc/033-1/kimarr.txt
@@ -292,7 +292,7 @@ L_Punish:
areamonster "033-1", 79, 29, 88, 42, "", 1072, 1, "Kimarr::OnYetiDeath";
npctalk strcharinfo(0) + "! This hunt is for " + $@Fluffy_Fighter$ + " alone!";
- heal -Hp, 0;
+ die();
@mobId = 0;
end;
diff --git a/npc/034-1/yetiSpawn.txt b/npc/034-1/yetiSpawn.txt
index c8668101..cd4f2b7a 100644
--- a/npc/034-1/yetiSpawn.txt
+++ b/npc/034-1/yetiSpawn.txt
@@ -47,7 +47,7 @@ L_End:
L_NonQuestKill:
message strcharinfo(0), "The dying Yeti takes you along to the other side.";
- heal -Hp, 0;
+ die();
goto L_End;
S_Update_Mask:
diff --git a/npc/048-2/slimes.txt b/npc/048-2/slimes.txt
index f9733871..7c8a0844 100644
--- a/npc/048-2/slimes.txt
+++ b/npc/048-2/slimes.txt
@@ -23,7 +23,7 @@
goto L_End;
L_BlowUp:
- heal -Hp, 0;
+ die();
message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt.";
goto L_End;
@@ -109,7 +109,7 @@ L_ClearedPoint:
goto L_End;
L_BlowUp:
- heal -Hp, 0;
+ die();
message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt.";
goto L_End;
@@ -195,7 +195,7 @@ L_ClearedPoint:
goto L_End;
L_BlowUp:
- heal -Hp, 0;
+ die();
message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt.";
goto L_End;
@@ -281,7 +281,7 @@ L_ClearedPoint:
goto L_End;
L_BlowUp:
- heal -Hp, 0;
+ die();
message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt.";
goto L_End;
@@ -367,7 +367,7 @@ L_ClearedPoint:
goto L_End;
L_BlowUp:
- heal -Hp, 0;
+ die();
message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt.";
goto L_End;
@@ -453,7 +453,7 @@ L_ClearedPoint:
goto L_End;
L_BlowUp:
- heal -Hp, 0;
+ die();
message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt.";
goto L_End;
@@ -539,7 +539,7 @@ L_ClearedPoint:
goto L_End;
L_BlowUp:
- heal -Hp, 0;
+ die();
message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt.";
goto L_End;
diff --git a/npc/051-1/desert.txt b/npc/051-1/desert.txt
index 07b84eb6..8d68837c 100644
--- a/npc/051-1/desert.txt
+++ b/npc/051-1/desert.txt
@@ -39,7 +39,7 @@ OnTimer6500:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
L_HintToHelpers:
diff --git a/npc/051-1/forest.txt b/npc/051-1/forest.txt
index d9c21625..a363d7c4 100644
--- a/npc/051-1/forest.txt
+++ b/npc/051-1/forest.txt
@@ -11,7 +11,7 @@
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
L_HandleHelper:
@@ -58,7 +58,7 @@ L_TaskComplete:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
L_Blocked:
diff --git a/npc/051-3/ambush.txt b/npc/051-3/ambush.txt
index 82252521..d596984e 100644
--- a/npc/051-3/ambush.txt
+++ b/npc/051-3/ambush.txt
@@ -16,7 +16,7 @@ L_PrepareAmbush:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
}
@@ -33,7 +33,7 @@ L_MakeAmbush:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
message strcharinfo(0), "Your throat got cut by a sneaky bandit!";
end;
}
@@ -77,7 +77,7 @@ OnA:
if (strcharinfo(0) == $@iLLIA_HELPER3$)
goto L_CaptureHelper3;
// kill that player otherwise, since not part of the quest.
- heal -Hp, 0;
+ die();
end;
L_CaptureHero:
diff --git a/npc/051-3/reinforcements.txt b/npc/051-3/reinforcements.txt
index b56b6271..b29624a8 100644
--- a/npc/051-3/reinforcements.txt
+++ b/npc/051-3/reinforcements.txt
@@ -9,7 +9,7 @@ L_CallReinforcements:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
}
@@ -22,7 +22,7 @@ L_ShouldNotBeHere:
"Do nothing", L_close;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
L_TryOpen:
diff --git a/npc/052-1/channelling.txt b/npc/052-1/channelling.txt
index 143a1225..c705c869 100644
--- a/npc/052-1/channelling.txt
+++ b/npc/052-1/channelling.txt
@@ -11,7 +11,7 @@ L_EnchantDoor:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
}
@@ -284,14 +284,14 @@ L_ChannellingMoved:
// and does not need being killed)
if (isin("052-1",1,1,100,80) == 0)
goto L_ChannellingFail;
- heal -Hp, 0;
+ die();
misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0);
message strcharinfo(0), "You moved out of the power circle. The magic power you accumulated backfires at you!";
goto L_ChannellingFail;
L_ChPwrVanish:
// kill the player as part of the process: the magic process drained his life.
- heal -Hp, 0;
+ die();
misceffect FX_MAGIC_DARK_EXPLOSION, strcharinfo(0);
message strcharinfo(0), "The magic power vanished, and your spell backfires at you!";
goto L_ChannellingFail;
@@ -310,7 +310,7 @@ L_ChannellingFail:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
OnInit:
diff --git a/npc/052-2/chest.txt b/npc/052-2/chest.txt
index a54fa144..64341c7a 100644
--- a/npc/052-2/chest.txt
+++ b/npc/052-2/chest.txt
@@ -12,7 +12,7 @@
goto L_Pick;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
OnInit:
diff --git a/npc/052-2/partyroom.txt b/npc/052-2/partyroom.txt
index dfd0613e..12d5b119 100644
--- a/npc/052-2/partyroom.txt
+++ b/npc/052-2/partyroom.txt
@@ -11,7 +11,7 @@ L_SpawnLuvia:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
}
@@ -44,7 +44,7 @@ L_Start:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
OnTimer1000:
@@ -262,6 +262,6 @@ OnW00t:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
}
diff --git a/npc/052-2/storage.txt b/npc/052-2/storage.txt
index 8dfcdfaf..b56314e2 100644
--- a/npc/052-2/storage.txt
+++ b/npc/052-2/storage.txt
@@ -7,7 +7,7 @@
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
L_StartItemInvoker:
@@ -173,7 +173,7 @@ L_Warp:
end;
L_ShouldNotBeHere:
- heal -Hp, 0;
+ die();
end;
}
diff --git a/npc/055-1/pumpkins.txt b/npc/055-1/pumpkins.txt
index d008d389..474667f5 100644
--- a/npc/055-1/pumpkins.txt
+++ b/npc/055-1/pumpkins.txt
@@ -56,7 +56,7 @@ L_HeavyPoison1:
L_HeavyPoison2:
@discover_poisonous_pumpkin = @discover_poisonous_pumpkin + 1;
misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0);
- heal -Hp, 0;
+ die();
goto L_Destroy;
OnAppear:
diff --git a/npc/056-2/mirak.txt b/npc/056-2/mirak.txt
index d24b3ec1..28635162 100644
--- a/npc/056-2/mirak.txt
+++ b/npc/056-2/mirak.txt
@@ -91,7 +91,7 @@ L_TooSoon:
L_Kill:
misceffect sfx_magic_war, strcharinfo(0);
- heal -Hp, 0;
+ die();
@annoy = 0;
callsub S_Update_Mask_Annoy;
Mirak_Bantime = gettimetick(2) + 86400;
diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt
index 69972292..f611e997 100644
--- a/npc/functions/global_event_handler.txt
+++ b/npc/functions/global_event_handler.txt
@@ -46,4 +46,8 @@ OnClock1700:
OnInit:
MOTD(); // set the MOTD array
end;
+
+OnDie:
+ percentheal -100, -100;
+ end;
}
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index d072ff60..4a0c9c22 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -294,12 +294,12 @@ function script any_of {
function script die {
if ($HARDCORE) {
@grace=true;
- percentheal -100, -100;
+ addtimer 10, "#GlobalHandler::OnDie"; // Wait script execution to finish
//setparam(Hp, 1);
//warp "000-1", 22, 22;
//end; // MUST be end; to mimic official behavior
} else {
- percentheal -100, -100;
+ addtimer 10, "#GlobalHandler::OnDie"; // Wait script execution to finish
}
return;
}