summaryrefslogtreecommitdiff
path: root/npc/030-2/glitter_helper.txt
blob: a36ad93e1bf9347798e173fd13a27fc1909d47db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
030-2,31,81,0	script	Veneri	NPC328,{
    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.\"";
    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;
    XMASTIME = XMASTIME | $@xmas_helper_bit_glitter_ends;
    @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;
    XMASTIME = XMASTIME | $@xmas_helper_bit_glitter_ends;
    XMASTIME = XMASTIME &~ $@xmas_helper_bit_glitter_starts;
    @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;
}