summaryrefslogblamecommitdiff
path: root/world/map/npc/xmas/2011/glitterHelper.txt
blob: 79a401466011f42d7cad6f89cd5067644bb64f38 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                                            

                                                                                                                
                       

                                                                                                               














                                                        
                                                                                                                                     



                                                                                                          
                                                                                                                                                                    





































                                                                                                                                                                                             
                                                                 






                                              
                                                                                                











                                                                                       
                                 











                                   
// 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)
        && !(gettime(7) == ($@xmas2011_year + 1) && gettime(6) == 1 && gettime(5) <= $@xmas2011_reward_end_day))
        goto L_NoEvent;
    if ((gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_reward_start_day)
        || (gettime(7) == ($@xmas2011_year + 1) && gettime(6) == 1 && gettime(5) <= $@xmas2011_reward_end_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 problems here. Something went wrong with the shipment of the ingredients for 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 lose 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 fake powders.";
    mes "[Eljas]";
    mes "\"Excellent! Thank you very much.\"";
    goto L_Close;

L_Done:
    mes "[Eljas]";
    if (xmas11 & $@xmas11_Decoration)
        mes "\"Even after your help, the powder still isn't working right. Maybe it got wet.\"";
    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 a 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;
}