summaryrefslogtreecommitdiff
path: root/npc/030-2/bedding_helper.txt
blob: 224632517bfe8bb1f53af1e602a924b945396986 (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
95
96
97
030-2,37,77,0	script	Osmo	NPC328,{
    callfunc "XmasStates";

    if($@xmas_time)
        goto L_XmasMain;
    goto L_OffSeason;

L_OffSeason:
    mes "[Osmo]";
    mes "\"It's nice to relax and not have to worry about Xmas.\"";
    mes "\"All that rush to gather those furs kills me every year.\"";
    goto L_close;

L_XmasMain:
    if (XMASTIME & $@xmas_helper_bit_bed_ends) goto L_Done;
    if (XMASTIME & $@xmas_helper_bit_bed_starts) goto L_Bedding;
    if (@xmas_helper_bit) goto L_Helping;

    mes "[Osmo]";
    mes "\"What? Uh, excuse me, I have some work to do.\"";
    goto L_close;

L_Helping:
    mes "[Osmo]";
    mes "\"You came in at just the right moment. I was informed that our bedding material for fragile presents is nearly depleted.";
    mes "Could you bring me " + $@xmas_bedding_amount + " White Furs?\"";
    next;
    mes "[Osmo]";
    mes "\"Take care that it's real White Fur.";
    mes "Other materials tend to go out of place in the present box, leaving the fragile content unprotected from any pushes.\"";
    XMASTIME = XMASTIME | $@xmas_helper_bit_bed_starts;
    goto L_close;

L_Bedding:
    mes "[Osmo]";
    mes "\"Ah, you're back. Do you have the " + $@xmas_bedding_amount + " White Fur needed as bedding for fragile presents?\"";
    if ((countitem("WhiteFur") >= $@xmas_bedding_amount) && (countitem("CottonCloth") >= $@xmas_bedding_amount))
        menu
            "Yeah, here it is. (Give the White Fur.)",L_Fur,
            "Sure, here it is. (Give the Cotton Cloth.)",L_Cloth,
            "No, I'm still working on that.",L_close;
    if (countitem("WhiteFur") >= $@xmas_bedding_amount)
        menu
            "Yeah, here it is. (Give the White Fur.)",L_Fur,
            "No, I'm still working on that.",L_close;
    if (countitem("CottonCloth") >= $@xmas_bedding_amount)
        menu
            "Sure, here it is. (Give the Cotton Cloth.)",L_Cloth,
            "No, I'm still working on that.",L_close;
    if ((countitem("WhiteFur") < $@xmas_bedding_amount) && (countitem("CottonCloth") < $@xmas_bedding_amount))
        menu
            "No.", L_close;
    goto L_close;

L_Fur:
    if (countitem("WhiteFur") < $@xmas_bedding_amount)
        goto L_NoItems;
    delitem "WhiteFur", $@xmas_bedding_amount;
    XMASTIME = XMASTIME | $@xmas_helper_bit_bed_ends;
    @karma_bonus = $@xmas_karma_bonus;
    callfunc "XmasNice";
    callfunc "XmasXpReward";
    mes "[Osmo]";
    mes "\"Wonderful! Thanks for your effort.\"";
    goto L_close;

L_Cloth:
    if (countitem("CottonCloth") < $@xmas_bedding_amount)
        goto L_NoItems;
    delitem "CottonCloth", $@xmas_bedding_amount;
    XMASTIME = XMASTIME &~ $@xmas_helper_bit_bed_starts;
    XMASTIME = XMASTIME | $@xmas_helper_bit_bed_ends;
    @karma_bonus = $@xmas_karma_bonus;
    callfunc "XmasNaughty";
    callfunc "XmasXpReward";
    mes "He doesn't notice that you're giving him Cotton Cloth.";
    mes "[Osmo]";
    mes "\"Wonderful! Thanks for your effort.\"";
    goto L_close;

L_Done:
    mes "[Osmo]";
    if (!(@xmas_helper_bedding))
        mes "\"The Fur you brought me isn't working very well.\"";
    if (@xmas_helper_bedding)
        mes "\"Thanks for helping out with the bedding material.\"";
    goto L_close;

L_NoItems:
    mes "[Osmo]";
    mes "\"Where do you have it? Is this a joke?\"";
    goto L_close;

L_close:
    close;
}