summaryrefslogtreecommitdiff
path: root/world/map/npc/008-1/annualeaster.txt
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2013-07-07 12:51:32 +0200
committerJessica Tölke <jtoelke@mail.upb.de>2013-07-07 12:51:32 +0200
commit0dd134db3f6f67bb5e4401f1ba7bf3e97f201505 (patch)
tree4a200c1eeb684039390959107a6f413e065384fd /world/map/npc/008-1/annualeaster.txt
parenta89882b69d9f12499404ca9d471d5a735bc63988 (diff)
parent135f0fe12564decad0d3e2ff8af8f798b0a7f4cf (diff)
downloadserverdata-0dd134db3f6f67bb5e4401f1ba7bf3e97f201505.tar.gz
serverdata-0dd134db3f6f67bb5e4401f1ba7bf3e97f201505.tar.bz2
serverdata-0dd134db3f6f67bb5e4401f1ba7bf3e97f201505.tar.xz
serverdata-0dd134db3f6f67bb5e4401f1ba7bf3e97f201505.zip
Merge remote-tracking branch 'origin/master' into waric
Conflicts: world/map/db/mob_db.txt
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)