From 2ef1fd30751136d66b336e888027e7365d3bc724 Mon Sep 17 00:00:00 2001 From: gumi Date: Sun, 28 Jul 2019 22:37:03 -0400 Subject: fix miriam expiration --- world/map/npc/functions/miriam.txt | 23 +++++++++++------------ world/map/npc/functions/travelers.txt | 8 +------- 2 files changed, 12 insertions(+), 19 deletions(-) (limited to 'world/map/npc/functions') diff --git a/world/map/npc/functions/miriam.txt b/world/map/npc/functions/miriam.txt index f458784d..b76efcc5 100644 --- a/world/map/npc/functions/miriam.txt +++ b/world/map/npc/functions/miriam.txt @@ -1,21 +1,20 @@ -function|script|MiriamExpire +function|script|MiriamGoal { - 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; + if (QUEST_MIRIAM_run > 0) + set QUEST_MIRIAM_run, 0 - (gettimetick(2) - QUEST_MIRIAM_run); + return; +} -L_Return: +function|script|MiriamExpire +{ + if (QUEST_MIRIAM_run > 0) + set QUEST_MIRIAM_run, 0 - 2; // force failute (expired) return; } function|script|MiriamCheat { - if (QUEST_MIRIAM_start == 0) goto L_Return; - set QUEST_MIRIAM_cheat, 1; - callfunc "MiriamExpire"; - goto L_Return; - -L_Return: + if (QUEST_MIRIAM_run > 0) + set QUEST_MIRIAM_run, 0 - 1; // force failure (cheating) return; } diff --git a/world/map/npc/functions/travelers.txt b/world/map/npc/functions/travelers.txt index c1b7f3fd..30116ecb 100644 --- a/world/map/npc/functions/travelers.txt +++ b/world/map/npc/functions/travelers.txt @@ -180,13 +180,7 @@ L_TravelPachua: set @NextLocationMap$, "006-1"; set @NextLocationX, 28; set @NextLocationY, 97; - if(QUEST_MIRIAM_start != 0) goto L_Cheat; - goto L_TravelChecks; - -L_Cheat: - set QUEST_MIRIAM_cheat, 1; - set QUEST_MIRIAM_run, gettimetick(2) - QUEST_MIRIAM_start; - set QUEST_MIRIAM_start, 0; + callfunc "MiriamCheat"; goto L_TravelChecks; L_TravelBarbarians: -- cgit v1.2.3-70-g09d2