From 0dedc25b2795f359db3937b3b340d3eaeec8dbff Mon Sep 17 00:00:00 2001 From: Vincent Petithory Date: Sun, 24 Mar 2013 15:18:23 +0100 Subject: Easter: add standard waiting time on first interaction with the eggs * This fixes the problem that players could log off to circumvent the waiting time --- world/map/npc/008-1/annualeaster.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/world/map/npc/008-1/annualeaster.txt b/world/map/npc/008-1/annualeaster.txt index 3a97a9ea..ded3058b 100644 --- a/world/map/npc/008-1/annualeaster.txt +++ b/world/map/npc/008-1/annualeaster.txt @@ -15,6 +15,8 @@ function|script|AnnualEasterEvent|{ if (BaseLevel < 20) goto L_EndTooYoung; + if (@eastertimepenalty == 0) + goto L_WarmUp; // prevent clicking multiple times: if (gettimetick(2) < @eastertimepenalty + $@EASTER_FOUND_WAIT_TIME) goto L_End2; @@ -85,6 +87,11 @@ L_EndTooYoung: message strcharinfo(0), "The nest is empty."; goto L_End1; +L_WarmUp: + set @eastertimepenalty, gettimetick(2); + message strcharinfo(0), "Hmmm eggs! Maybe you can find something nice there!"; + goto L_End1; + L_End2: message strcharinfo(0), "Don't be greedy! You just found something a moment ago."; set @eastertimepenalty, @eastertimepenalty + 5; -- cgit v1.2.3-60-g2f50 From b4f2729423390b14e14460ca4ee2814185128259 Mon Sep 17 00:00:00 2001 From: Vincent Petithory Date: Sun, 24 Mar 2013 17:04:06 +0100 Subject: Add FX_GETITEM particle effect --- world/map/db/const.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/world/map/db/const.txt b/world/map/db/const.txt index 6bed62d2..f6c3ccde 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -390,6 +390,7 @@ FX_BLUE_MAGIC_CAST 40 FX_MAGIC_BLUE_TELEPORT 41 FX_MAGIC_DARK_EXPLOSION 42 FX_PUMPKIN_EXPLOSION 43 +FX_GETITEM 44 FX_MAGIC_SHIELD_ENDS 111 FX_ELECTRICITY_RED 114 FX_ELECTRICITY_BLUE 115 -- cgit v1.2.3-60-g2f50 From b47e08baad485dd388ecf8537a06e06848fce440 Mon Sep 17 00:00:00 2001 From: Vincent Petithory Date: Sun, 24 Mar 2013 17:06:22 +0100 Subject: Easter fix: give a Green Apple for the first interaction with the eggs --- world/map/npc/008-1/annualeaster.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/world/map/npc/008-1/annualeaster.txt b/world/map/npc/008-1/annualeaster.txt index ded3058b..bbd11759 100644 --- a/world/map/npc/008-1/annualeaster.txt +++ b/world/map/npc/008-1/annualeaster.txt @@ -89,6 +89,7 @@ L_EndTooYoung: L_WarmUp: set @eastertimepenalty, gettimetick(2); + getitem "GreenApple", 1; message strcharinfo(0), "Hmmm eggs! Maybe you can find something nice there!"; goto L_End1; -- cgit v1.2.3-60-g2f50 From b915c9809e69f6300d1a878988c08fdb94ee04bb Mon Sep 17 00:00:00 2001 From: Vincent Petithory Date: Sun, 24 Mar 2013 17:07:02 +0100 Subject: Easter fix: play the FX_GETITEM particle effect whenever the player receives an object --- world/map/npc/008-1/annualeaster.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/world/map/npc/008-1/annualeaster.txt b/world/map/npc/008-1/annualeaster.txt index bbd11759..fa0a0aa1 100644 --- a/world/map/npc/008-1/annualeaster.txt +++ b/world/map/npc/008-1/annualeaster.txt @@ -34,6 +34,7 @@ function|script|AnnualEasterEvent|{ if (@random < @tmp) getitem $@SmallAnnualEasterItems$[@random], rand(1, 2); if (@random == @tmp) getexp rand(200), 0; if (@random == @tmp + 1) set Zeny, Zeny + rand(50); + misceffect FX_GETITEM, strcharinfo(0); // give out a better reward occasionally: // standard case is branch taken, so only if rand yields 0, medium rewarding. @@ -42,6 +43,7 @@ function|script|AnnualEasterEvent|{ set @random, rand(getarraysize($@MediumAnnualEasterRewards$)); getitem $@MediumAnnualEasterRewards$[@random], 1; + misceffect FX_GETITEM, strcharinfo(0); NoEasterEgg: @@ -72,6 +74,7 @@ NoEasterEgg: // now hand out the specific item: set @rewardindex, @rewardindex % getarraysize($@FinalAnnualEasterReward$); getitem $@FinalAnnualEasterReward$[@rewardindex], 1; + misceffect FX_GETITEM, strcharinfo(0); message strcharinfo(0), "This is really special. You won't find anything like this again."; goto L_End1; @@ -90,6 +93,7 @@ L_EndTooYoung: L_WarmUp: set @eastertimepenalty, gettimetick(2); getitem "GreenApple", 1; + misceffect FX_GETITEM, strcharinfo(0); message strcharinfo(0), "Hmmm eggs! Maybe you can find something nice there!"; goto L_End1; -- cgit v1.2.3-60-g2f50