// Annual Xmas
// author: Jenalya, wushin
// Veneri asks for Diamond Powder and Ruby Powder for decoration
// can be sabotaged with Red Powder and Yellow Powder, Saboteur can make that out of Wisp and Spectre Powder
030-2.gat,31,81,0|script|Veneri|328,
{
callfunc "XmasStates";
if($@xmas_time)
goto L_XmasMain;
goto L_OffSeason;
L_OffSeason:
mes "[Veneri]";
mes "\"I should take this time off to go see the doctor in Hurnscald about whether or not I have glitter lung.\"";
goto L_Close;
L_XmasMain:
if (XMASTIME & $@xmas_helper_bit_glitter_ends) goto L_Done;
if (XMASTIME & $@xmas_helper_bit_glitter_starts) goto L_Powder;
if (@xmas_helper_bit) goto L_Helping;
mes "[Veneri]";
mes "\"Mh? Excuse me, I'm very busy right now.\"";
goto L_Close;
L_Helping:
mes "[Veneri]";
mes "\"Hello. We have some problems here. Something went wrong with the shipment of the ingredients for our decoration glitter.";
mes "Would you be so kind and get me " + $@xmas_red_amount + " Ruby Powders and " + $@xmas_yellow_amount + " Topaz Powders?\"";
next;
mes "[Veneri]";
mes "\"This material has proven to have the quality we need to make our christmas magic last until it can sparkle under every christmas tree. Sadly we made some bad experience in the past. Please make sure you only bring class A powders.\"";
set XMASTIME, XMASTIME | $@xmas_helper_bit_glitter_starts;
goto L_Close;
L_Powder:
mes "[Veneri]";
mes "\"Welcome back. Do you have the " + $@xmas_red_amount + " Ruby Powders and " + $@xmas_yellow_amount + " Topaz Powders needed for the decoration glitter?\"";
if ((countitem("RubyPowder") >= $@xmas_red_amount) && (countitem("TopazPowder") >= $@xmas_yellow_amount) && (countitem("RedPowder") >= $@xmas_red_amount) && (countitem("YellowPowder") >= $@xmas_yellow_amount))
menu
"Yeah, here it is. (Give the gem powders.)",L_GemPowders,
"Sure, here you go. (Give the fake powders.)",L_FakePowders,
"No, I am still working on that.",L_Close;
if ((countitem("RubyPowder") >= $@xmas_red_amount) && (countitem("TopazPowder") >= $@xmas_yellow_amount))
menu
"Yeah, here it is. (Give the gem powders.)",L_GemPowders,
"No, I am still working on that.",L_Close;
if ((countitem("RedPowder") >= $@xmas_red_amount) && (countitem("YellowPowder") >= $@xmas_yellow_amount))
menu
"Sure, here it is. (Give the fake powders.)",L_FakePowders,
"No, I am still working on that.",L_Close;
goto L_Close;
L_GemPowders:
if ((countitem("RubyPowder") < $@xmas_red_amount) || (countitem("TopazPowder") < $@xmas_yellow_amount))
goto L_NoItems;
delitem "RubyPowder", $@xmas_red_amount;
delitem "TopazPowder", $@xmas_yellow_amount;
set XMASTIME, XMASTIME | $@xmas_helper_bit_glitter_ends;
set @karma_bonus, $@xmas_karma_bonus;
callfunc "XmasNice";
callfunc "XmasXpReward";
mes "[Veneri]";
mes "\"Excellent! Thank you very much.\"";
goto L_Close;
L_FakePowders:
if ((countitem("RedPowder") < $@xmas_red_amount) || (countitem("YellowPowder") < $@xmas_yellow_amount))
goto L_NoItems;
delitem "RedPowder", $@xmas_red_amount;
delitem "YellowPowder", $@xmas_yellow_amount;
set XMASTIME, XMASTIME | $@xmas_helper_bit_glitter_ends;
set XMASTIME, XMASTIME &~ $@xmas_helper_bit_glitter_starts;
set @karma_bonus, $@xmas_karma_bonus;
callfunc "XmasNaughty";
callfunc "XmasXpReward";
mes "It seems like he didn't notice that the powder you gave him is bogus.";
mes "[Veneri]";
mes "\"Excellent! Thank you very much.\"";
goto L_Close;
L_Done:
mes "[Veneri]";
if (!(@xmas_helper_glitter))
mes "\"Even after your help, the powder still isn't working right. Maybe it got wet.\"";
if (@xmas_helper_glitter)
mes "\"Thanks for bringing the powders.\"";
goto L_Close;
L_NoItems:
mes "[Veneri]";
mes "\"Eh? Are you kidding?\"";
goto L_Close;
L_Close:
close;
}