From 22c00753de1e821fd41323de4e335e7a89042495 Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Wed, 20 Mar 2013 20:37:25 +0100 Subject: Introduce a non-permanent counter of tries. The counter gets reset on log out. The probability to get the final reward depending on the counter. --- world/map/npc/008-1/annualeaster.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'world/map/npc') diff --git a/world/map/npc/008-1/annualeaster.txt b/world/map/npc/008-1/annualeaster.txt index eedd5b9d..c857326c 100644 --- a/world/map/npc/008-1/annualeaster.txt +++ b/world/map/npc/008-1/annualeaster.txt @@ -23,6 +23,8 @@ function|script|AnnualEasterEvent|{ // global counter to determine reshuffle times of the eggs. set $@peopleFoundEggs[@EasterEggID], $@peopleFoundEggs[@EasterEggID]+1; + set @AnnualEasterTries, @AnnualEasterTries + 1; + // give a small reward: message strcharinfo(0), "You found something!"; set @tmp, getarraysize($@SmallAnnualEasterItems$); @@ -45,7 +47,10 @@ NoEasterEgg: // so only pass on a small chance iff you don't have the item yet. // Usually the journey ends here because @random != 0 -> end callsub S_Read_Annual_Quest; - set @random, rand($@EASTER_FINAL_REW_INV_CHANCE); + + if (@AnnualEasterTries > $@EASTER_FINAL_REW_INV_CHANCE) + set @AnnualEasterTries, $@EASTER_FINAL_REW_INV_CHANCE; + set @random, rand($@EASTER_FINAL_REW_INV_CHANCE - @AnnualEasterTries + 1); if (@random || @easter_year > gettime(7) - 2000) goto L_End1; @@ -115,7 +120,7 @@ L_End1: onInit: set $@EASTER_FOUND_WAIT_TIME, 15; - set $@EASTER_FINAL_REW_INV_CHANCE, 35; + set $@EASTER_FINAL_REW_INV_CHANCE, 70; set $@EASTER_EGG_INV_CHANCE, 750; setarray $@easteregg_posx, 41, 45, 50, 57, 60, 64, 67, 65, 59, 72, 70, 82, 81, 93, 97, 101, 88, 108, 115, 122, 122, 129, 129, 130, 135, 123, 132, 132, 127, 124, 121, 107, 100, 101, 109, 104, 88, 84, 92, 59, 71, 65, 53, 55, 74, 59, 53, 46, 44, 44, 38, 43, 40, 43, 37; -- cgit v1.2.3-60-g2f50