From 2e450c8b476ed9950b52b2c5889f8717bbb71507 Mon Sep 17 00:00:00 2001 From: gumi Date: Tue, 4 Jun 2019 11:54:03 -0400 Subject: force the speed skill timer to expire on death or logout --- world/map/npc/functions/global_event_handler.txt | 2 ++ world/map/npc/functions/miriam.txt | 21 +++++++++++++++++++++ world/map/npc/scripts.conf | 3 ++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 world/map/npc/functions/miriam.txt (limited to 'world/map/npc') diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index 987845bb..fe87b380 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -15,6 +15,7 @@ OnPCLoginEvent: callfunc "getBroadcast"; // get the scheduled broadcast, if any addtimer 0, "Magic Timer::OnLogin"; // prevent cast rate abuse callfunc "MaybeGiveBirthday"; + callfunc "MiriamExpire"; // force the speed skill quest to expire // add more here set @login_event, 2; end; @@ -31,6 +32,7 @@ OnPCDieEvent: set @necromancer, 0; addtimer 0, "Magic Timer::OnClear"; // reset magic block on death callfunc "SpawnGhost"; + callfunc "MiriamExpire"; // force the speed skill quest to expire set @killerrid, 0; // reset killer rid end; diff --git a/world/map/npc/functions/miriam.txt b/world/map/npc/functions/miriam.txt new file mode 100644 index 00000000..f458784d --- /dev/null +++ b/world/map/npc/functions/miriam.txt @@ -0,0 +1,21 @@ +function|script|MiriamExpire +{ + if (QUEST_MIRIAM_start == 0) goto L_Return; + set QUEST_MIRIAM_run, gettimetick(2) - QUEST_MIRIAM_start; + set QUEST_MIRIAM_start, 0; + goto L_Return; + +L_Return: + return; +} + +function|script|MiriamCheat +{ + if (QUEST_MIRIAM_start == 0) goto L_Return; + set QUEST_MIRIAM_cheat, 1; + callfunc "MiriamExpire"; + goto L_Return; + +L_Return: + return; +} diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index 5a850bb6..b83692aa 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -22,7 +22,6 @@ npc: npc/functions/lockpicking.txt npc: npc/functions/default_npc_checks.txt npc: npc/functions/undead_debug.txt npc: npc/functions/headstyles.txt -npc: npc/functions/global_event_handler.txt npc: npc/functions/stat_reset.txt npc: npc/functions/quiz.txt npc: npc/functions/dynamic_menu.txt @@ -30,6 +29,8 @@ npc: npc/functions/DyeConfig.txt npc: npc/functions/motd.txt npc: npc/functions/motdconfig.txt npc: npc/functions/ghost.txt +npc: npc/functions/miriam.txt +npc: npc/functions/global_event_handler.txt // Item Functions npc: npc/items/purification_potion.txt -- cgit v1.2.3-60-g2f50