summaryrefslogtreecommitdiff
path: root/npc/functions/event.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-10-28 00:50:09 -0300
committerJesusaves <cpntb1@ymail.com>2019-10-28 00:50:09 -0300
commitee2ec41a30c4575d037f20c0a9e2a4d642a08122 (patch)
treedf4158589de81db5741775f0f01eac65b5de235d /npc/functions/event.txt
parentd8370fe103747984ce941b30c10e6221ecd029c5 (diff)
downloadserverdata-ee2ec41a30c4575d037f20c0a9e2a4d642a08122.tar.gz
serverdata-ee2ec41a30c4575d037f20c0a9e2a4d642a08122.tar.bz2
serverdata-ee2ec41a30c4575d037f20c0a9e2a4d642a08122.tar.xz
serverdata-ee2ec41a30c4575d037f20c0a9e2a4d642a08122.zip
Handle rewards and fix a typo (untested)
Diffstat (limited to 'npc/functions/event.txt')
-rw-r--r--npc/functions/event.txt95
1 files changed, 89 insertions, 6 deletions
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 4e4a30c81..e77f8409c 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -94,8 +94,8 @@ function script sThanksgiving {
// Your prize is saved in .@luck. Rigged against fruits
.@luck=rand2(0,11);
.@luck=(.@luck == 10 ? rand2(0,11) : .@luck);
- // A fruit before 7 days: rig to Arcmage or to blueprint
- if (.@luck == 10 && #THANKS_STREAK < 7)
+ // A fruit before 10 days: rig to Arcmage or to blueprint
+ if (.@luck == 10 && #THANKS_STREAK < 10)
.@luck+=any(-1,1);
// Extra spins
.@extra=rand2(1,3);
@@ -109,12 +109,95 @@ function script sThanksgiving {
sleep2(60);
}
mes l(".:: Congratulations ::.");
- //#THANKS_DAY = gettime(5)
- mes l("You got a %d", .@luck);
- mesf "Spins: %d/%d (cur %d extra %d)", .@i, .@spins, .@cur, .@extra;
- next;
+ //#THANKS_DAY = gettime(5);
+ #THANKS_STREAK+=1;
+ if (debug || $@GM_OVERRIDE) {
+ mes l("You got a %d", .@luck);
+ mesf "Spins: %d/%d (cur %d extra %d)", .@i, .@spins, .@cur, .@extra;
+ next;
+ }
+
+ // Switch the reward
+ switch (.@luck) {
+ case 0: // EXP
+ .@p=BaseLevel*#THANKS_STREAK;
+ .@p*=2;
+ getexp .@p, 0;
+ mes l("You got %d EXP!", .@p);
+ break;
+ case 1: // JEXP
+ .@p=BaseLevel*#THANKS_STREAK;
+ getexp 0, .@p;
+ mes l("You got %d JEXP!", .@p);
+ break;
+ case 2: // GP
+ .@p=BaseLevel*#THANKS_STREAK;
+ Zeny+=.@p;
+ mes l("You got %d GP!", .@p);
+ break;
+ case 3: // MOBPT
+ .@p=BaseLevel*#THANKS_STREAK;
+ Mobpt+=.@p;
+ mes l("You got %d Monster Points!", .@p);
+ break;
+ case 4: // RES
+ .@p=BaseLevel*#THANKS_STREAK;
+ .@p*=3;
+ REAL_ESTATE_CREDITS+=.@p;
+ mes l("You got %d Real Estate Credits!", .@p);
+ break;
+ case 5: // GIFT
+ .@p=BronzeGift;
+ .@p=(#THANKS_STREAK > 7 ? SilverGift : .@p);
+ .@p=(#THANKS_STREAK > 14 ? GoldenGift : .@p);
+ .@p=(#THANKS_STREAK > 21 ? PrismGift : .@p);
+ .@p=(#THANKS_STREAK > 27 ? SupremeGift : .@p);
+ mes l("You got a(n) %s gift!", getitemlink(.@p));
+ break;
+ case 6: // STR C
+ .@p=#THANKS_STREAK;
+ getitem StrangeCoin, .@p;
+ mes l("You got %d %s!", .@p, getitemlink(StrangeCoin));
+ break;
+ case 7: // HERO C
+ .@p=#THANKS_STREAK;
+ .@p+=1;
+ getitem HeroCoin, .@p;
+ mes l("You got %d %s!", .@p, getitemlink(HeroCoin));
+ break;
+ case 8: // MERC
+ .@p=any(MercCard_GonzoDark, MercCard_Rosa, MercCard_Soren, MercCard_Apane);
+ .@p=(#THANKS_STREAK > 7 ? any(MercCard_EarthWitch, MercCard_Demure, MercCard_Jesusalva, MercCard_Pookie) : .@p);
+ .@p=(#THANKS_STREAK > 14 ? any(MercCard_Arthur, MercCard_LawnCable, MercCard_Crazyfefe, MercCard_Saulc) : .@p);
+ .@p=(#THANKS_STREAK > 21 ? any(MercCard_Swezanne, MercCard_DragonStar, MercCard_Msawis, MercCard_Aisen) : .@p);
+ .@p=(#THANKS_STREAK > 27 ? any(MercCard_Xanthem, MercCard_Woody, MercCard_Lilanna) : .@p);
+ getitem .@p, 1;
+ mes l("You got a %s!", getitemlink(.@p));
+ break;
+ case 9: // CARD
+ .@p=any(NatureCard, NinjaCard, MageCard, DruidCard, ClericCard, KnightCard, HeroCard, NecromancerCard);
+ .@p=(#THANKS_STREAK > 24 ? any(SpeedCard, ReflectCard, PowerCard, WallCard) : .@p);
+ getitem .@p, 1;
+ mes l("You got a %s!", getitemlink(.@p));
+ break;
+ case 10: // FRUIT
+ .@p=MysteriousFruit;
+ getitem .@p, 1;
+ mes l("You got a %s!", getitemlink(.@p));
+ break;
+ case 11: // BLUE
+ .@p=any(EquipmentBlueprintA, AlchemyBlueprintA);
+ .@p=(#THANKS_STREAK > 7 ? any(EquipmentBlueprintB, AlchemyBlueprintB) : .@p);
+ .@p=(#THANKS_STREAK > 14 ? any(EquipmentBlueprintC, AlchemyBlueprintC) : .@p);
+ .@p=(#THANKS_STREAK > 21 ? any(EquipmentBlueprintD, AlchemyBlueprintD) : .@p);
+ .@p=(#THANKS_STREAK > 27 ? any(EquipmentBlueprintE, AlchemyBlueprintE) : .@p);
+ getitem .@p, 1;
+ mes l("You got a %s!", getitemlink(.@p));
+ break;
+ }
// Close
+ next;
setskin "";
closeclientdialog;
return;