summaryrefslogtreecommitdiff
path: root/world/map/npc/008-1/annualeaster.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/008-1/annualeaster.txt')
-rw-r--r--world/map/npc/008-1/annualeaster.txt33
1 files changed, 24 insertions, 9 deletions
diff --git a/world/map/npc/008-1/annualeaster.txt b/world/map/npc/008-1/annualeaster.txt
index 510ee9d3..66c1c746 100644
--- a/world/map/npc/008-1/annualeaster.txt
+++ b/world/map/npc/008-1/annualeaster.txt
@@ -9,8 +9,8 @@
// the event in these days.
-function|script|AnnualEasterEvent|{
-
+function|script|AnnualEasterEvent|,
+{
if ((gettimetick(2)-TUT_var < 5*7*86400) || (BaseLevel < 40)) //player must be created at least 5 weeks ago
goto L_EndTooYoung;
@@ -110,26 +110,30 @@ L_End1:
return;
}
-008-1.gat,65,40,0|script|#TestEgg0|375,{
+008-1.gat,65,40,0|script|#TestEgg0|375,
+{
set @EasterEggID, 0;
callfunc("AnnualEasterEvent");
}
-008-1.gat,65,40,0|script|#TestEgg1|375,{
+008-1.gat,65,40,0|script|#TestEgg1|375,
+{
set @EasterEggID, 1;
callfunc("AnnualEasterEvent");
}
-008-1.gat,65,40,0|script|#TestEgg2|375,{
+008-1.gat,65,40,0|script|#TestEgg2|375,
+{
set @EasterEggID, 2;
callfunc("AnnualEasterEvent");
}
-008-1.gat,59,38,0|script|#AnnualEaster|-1,{
+008-1.gat,59,38,0|script|#AnnualEaster|-1,
+{
end;
-onInit:
+OnInit:
set $@EASTER_FOUND_WAIT_TIME, 15;
set $@EASTER_FINAL_REW_INV_CHANCE, 70;
set $@EASTER_EGG_INV_CHANCE, 750;
@@ -148,6 +152,7 @@ onInit:
setarray $@FinalAnnualEasterReward$, "RedEggshellHat", "BlueEggshellHat", "YellowEggshellHat", "GreenEggshellHat", "OrangeEggshellHat", "DarkEggshellHat";
callsub S_disableEggs;
+ if (debug >= 2) end;
initnpctimer;
end;
@@ -167,10 +172,20 @@ OnTimer1000:
set $@isEaster, 1;
if (!$@wasEaster && $@isEaster)
- callsub S_enableEggs;
+ goto L_do_update_enable;
if ($@wasEaster && !$@isEaster)
- callsub S_disableEggs;
+ goto L_do_update_disable;
+ goto L_done_update;
+
+L_do_update_enable:
+ callsub S_enableEggs;
+ goto L_done_update;
+
+L_do_update_disable:
+ callsub S_disableEggs;
+ goto L_done_update;
+L_done_update:
set $@wasEaster, $@isEaster;
if (!$@isEaster)