// This file is part of Christmas Event 2011
// author: Jenalya
// Eljas 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
// Coding of Decoration:
// 00 not talked
// 10 asked for Decoration
// 01 done in good way
// 11 done in bad way
030-2.gat,31,81,0|script|Eljas|328,{
if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
goto L_NoEvent;
if ((gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_reward_start_day))
goto L_RewardTime;
set @red_amount, 5;
set @yellow_amount, 5;
if (xmas11 & $@xmas11_DecorationDone) goto L_Done;
if (xmas11 & $@xmas11_Decoration) goto L_Powder;
if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
mes "[Busy Helper]";
mes "\"Mh? Excuse me, I'm very busy right now.\"";
goto L_Close;
L_Helping:
mes "[Eljas]";
mes "\"Hello. We have some problem here. Something went wrong with the shipment of the ingredients of our decoration glitter.";
mes "Could you bring me " + @red_amount + " Ruby Powders and " + @yellow_amount + " Topaz Powders?\"";
next;
mes "[Eljas]";
mes "\"But make sure it is really gempowder and not some kind of cheap replacement.";
mes "You know, our decoration glitter is intensified by some magic, and that only works with real gempowders. Otherwise it'll loose its effect after a while.\"";
set xmas11, xmas11 | $@xmas11_Decoration;
goto L_Close;
L_Powder:
mes "[Eljas]";
mes "\"Welcome back. Do you have the " + @red_amount + " Ruby Powders and " + @yellow_amount + " Topaz Powders needed for the decoration glitter?\"";
if ((countitem("RubyPowder") >= @red_amount) && (countitem("TopazPowder") >= @yellow_amount) && (countitem("RedPowder") >= @red_amount) && (countitem("YellowPowder") >= @yellow_amount))
menu
"Yeah, here it is. (Give the gem powders.)",L_GemPowders,
"Sure, here it is. (Give the fake powders.)",L_FakePowders,
"No, I'm still working on that.",L_Close;
if ((countitem("RubyPowder") >= @red_amount) && (countitem("TopazPowder") >= @yellow_amount))
menu
"Yeah, here it is. (Give the gem powders.)",L_GemPowders,
"No, I'm still working on that.",L_Close;
if ((countitem("RedPowder") >= @red_amount) && (countitem("YellowPowder") >= @yellow_amount))
menu
"Sure, here it is. (Give the fake powders.)",L_FakePowders,
"No, I'm still working on that.",L_Close;
goto L_Close;
L_GemPowders:
if ((countitem("RubyPowder") < @red_amount) || (countitem("TopazPowder") < @yellow_amount))
goto L_NoItems;
delitem "RubyPowder", @red_amount;
delitem "TopazPowder", @yellow_amount;
set xmas11, xmas11 & ~$@xmas11_Decoration;
set xmas11, xmas11 | $@xmas11_DecorationDone;
mes "[Eljas]";
mes "\"Excellent! Thank you very much.\"";
goto L_Close;
L_FakePowders:
if ((countitem("RedPowder") < @red_amount) || (countitem("YellowPowder") < @yellow_amount))
goto L_NoItems;
delitem "RedPowder", @red_amount;
delitem "YellowPowder", @yellow_amount;
set xmas11, xmas11 | $@xmas11_DecorationDone;
mes "He doesn't notice that you're giving him faked powders.";
mes "[Eljas]";
mes "\"Excellent! Thank you very much.\"";
goto L_Close;
L_Done:
mes "[Eljas]";
if (xmas11 & $@xmas11_Decoration)
mes "\"The powders you gave me seem to be of poor quality.\"";
if (!(xmas11 & $@xmas11_Decoration))
mes "\"Thanks for bringing the powders.\"";
goto L_Close;
L_NoEvent:
mes "[Eljas]";
mes "\"How did you come in? At this time of the year the door should be locked!\"";
warp "030-1.gat", 99, 55;
goto L_Close;
L_RewardTime:
mes "[Eljas]";
mes "\"I need vacation.\"";
goto L_Close;
L_NoItems:
mes "[Eljas]";
mes "\"Eh? Are you kidding?\"";
goto L_Close;
L_Close:
set @red_amount, 0;
set @yellow_amount, 0;
close;
}