//===== eAthena Script =======================================
//= Advent Calander
//===== By: ==================================================
//= GM-Pandora
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
//= She hands out freebies daily
//============================================================
prontera,155,185,5 script Pandelina 91,{
//que_god01,154,111,5 script Pandelina 91,{
cutin "katsua01",2;
mes "[Pandelina]";
if (gettime(6) != 12) { //not december yet
mes "Come back on December 1st for the Advent Calendar. I'll have free rewards daily!";
goto L_End;
}
if (#Advent2016Tot > 100){ //done altogether
mes "Happy Holidays!";
goto L_End;
}
if (BaseLevel < 70){ //too low
mes "Sorry, you need to be level 70+ to qualify for freebies.";
goto L_End;
}
set @TodayDay,gettime(5);
set @UntilXmas,25 - @TodayDay;
if (#Advent2016Last == @TodayDay){ //collected today
mes "Come back tomorrow!";
goto L_End;
}
if (#Advent2016Tot == 0){ //starting quest
mes "Hello,";
mes "We've got something special going on, an Advent Calendar!";
mes "Talk to me each day until Christmas for free rewards.";
next;
mes "[Pandelina]";
}
if (@TodayDay<25) mes "Days until Christmas: " + @UntilXmas;
if (@TodayDay == 25) mes "Merry Christmas!";
if (@TodayDay > 25) goto AfterXmas;
mes "Here's your daily freebie!";
set #Advent2016Last,@TodayDay;
set #Advent2016Tot, #Advent2016Tot + 1;
if(@TodayDay == 1) getitem 969,1; //gold
if(@TodayDay == 2) getitem 10900,1; //delicious candy
if(@TodayDay == 3) getitem 617,5; //opb
if(@TodayDay == 4) getitem 10860,1; //rough enriched ore
if(@TodayDay == 5) getitem 10232,1; //holly pin
if(@TodayDay == 6) getitem 12105,2; //taming giftset
if(@TodayDay == 7) getitem 10860,1; //rough enriched ore
if(@TodayDay == 8) getitem 10900,1; //delicious candy
if(@TodayDay == 9) getitem 10131,1; //haircut coupon
if(@TodayDay == 10) getitem 10103,1; //santa jester
if(@TodayDay == 11) getitem 10860,1; //rough enriched ore
if(@TodayDay == 12) getitem 12187,3; //3 old green box
if(@TodayDay == 13) getitem 12107,1; //wrapped mask
if(@TodayDay == 14) getitem 10860,1; //rough enriched ore
if(@TodayDay == 15) getitem 10104,1; //snow cap
if(@TodayDay == 16) getitem 12209,5; //life insurance
if(@TodayDay == 17) getitem 12106,1; //jewel box
if(@TodayDay == 18) getitem 10183,1; //bg key
if(@TodayDay == 19) getitem 12103,1; //bb
if(@TodayDay == 20) { //random scarf
set @WinterScarf,rand(1,5);
if (@WinterScarf == 1) getitem 10635,1; //brown
if (@WinterScarf == 2) getitem 10637,1; //green red
if (@WinterScarf == 3) getitem 10638,1; //purple
if (@WinterScarf == 4) getitem 10636,1; //red white
if (@WinterScarf == 5) getitem 10639,1; //yellow red
}
if(@TodayDay == 21) getitem 10682,1; //Santa Poring Balloon
if(@TodayDay == 22) getitem 10860,1; //rough enriched ore
if(@TodayDay == 23) getitem 10803,1; //event bag
if(@TodayDay == 24) { //random upper
set @WinterHat,rand(1,6);
if (@WinterHat == 1) getitem 5742,1; //Rudolph Santa Hat
if (@WinterHat == 2) getitem 10640,1; //Snowman Hat
if (@WinterHat == 3) getitem 5738,1; //Snowman Hat [1]
if (@WinterHat == 4) getitem 10659,1; //Xmas Tree Hat
if (@WinterHat == 5) getitem 19686,1; //Costume Santa Doll Headband
if (@WinterHat == 6) getitem 18671,1; //Rudolph Hairband
}
if(@TodayDay == 25) { //random upper
set @WinterHat,rand(1,4);
if (@WinterHat == 1) getitem 5382,1; //bell ribbon
if (@WinterHat == 2) getitem 10685,1; //Candy Cane Cap
if (@WinterHat == 3) getitem 10297,1; //Green Christmas Jester
if (@WinterHat == 4) getitem 10296,1; //Red Christmas Jester
mes "Today was the last day.";
next;
mes "[Pandelina]";
goto AfterXmas;
}
L_End:
close2;
cutin "",255;
end;
AfterXmas:
mes "I hope you enjoyed the Advent Calendar!";
mes "You collected your freebies " + #Advent2016Tot + " times.";
if (#Advent2016Tot < 10) {
mes "Thanks for visiting me, here is 1 last reward for you: a Poring Card.";
getitem 4001,1;
set #Advent2016Tot, #Advent2016Tot + 100;
goto L_End;
}
if (#Advent2016Tot < 20) {
mes "Thanks for visting me so often, here is 1 last reward for you: a Damp Card Album.";
getitem 12246,1;
set #Advent2016Tot, #Advent2016Tot + 100;
goto L_End;
}
mes "Thanks for visting me so often, here is 1 last reward for you: an Old Card Album.";
getitem 616,1;
set #Advent2016Tot, #Advent2016Tot + 100;
goto L_End;
}