summaryrefslogtreecommitdiff
path: root/world/map/npc/xmas/2011/leatherBall.txt
blob: 1397adc5a82b8b8557693e2189679c57f96c3dbd (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// This file is part of Christmas Event 2011
// author: Jenalya
// Leather Ball states:
// 1: got order from Tarmo
// 2: Iivo said that he needs more material
// 3: Iivo created the Leather Ball
// 4: gave Leather Ball to the bad guy
// 5: delivered the Leather Ball without giving it to the bad guy
// 6: delivered fake present instead of Leather Ball

030-2.gat,37,81,0|script|Tarmo|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 @ball, (xmas11 & $@xmas11_BallMask) >> $@xmas11_BallShift;

    if (@ball > 0) goto L_Ordered;
    if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;

    mes "[Busy Helper]";
    mes "\"Oh, hello. I'm very sorry, I can't help you. I need to work on all these papers here.\"";
    goto L_Close;

L_Helping:
    mes "[Tarmo]";
    mes "\"Mh? Oh, are you new? Well, but I suppose it's a good idea to hire more helpers.";
    mes "Listen, I have this ordering form. Can you bring it to Iivo for me?\"";
    set @ball, 1;
    set xmas11, (xmas11 & ~($@xmas11_BallMask) | (@ball << $@xmas11_BallShift));
    menu
        "Sure, I'll do that.",L_Close,
        "What is it?",-;
    mes "[Tarmo]";
    mes "\"The form? It's an order for a toy. We have a shortage on material this year. Some things went wrong with the delivery of it.";
    mes "That's why we produce only explicitely ordered toys this year.\"";
    goto L_Close;

L_Ordered:
    mes "[Tarmo]";
    mes "\"Ah, hello. Please bring the order to Iivo.";
    mes "I don't have anything else for you to do.\"";
    goto L_Close;

L_NoEvent:
    mes "[Tarmo]";
    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 "[Tarmo]";
    mes "\"Given all the adversities we did a pretty good job I think.\"";
    goto L_Close;

L_Close:
    set @ball, 0;
    close;
}

030-2.gat,154,33,0|script|Iivo|329,{

    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 @ball, (xmas11 & $@xmas11_BallMask) >> $@xmas11_BallShift;
    set @leather_amount, 1;
    set @maggotslime_amount, 10;

    if (@ball >= 3) goto L_LeatherBallDone;
    if (@ball == 2) goto L_LeatherBall;
    if (@ball == 1) goto L_Order;
    if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;

    mes "[Busy Helper]";
    mes "\"Hello there. I hope you have a good time visiting Santa's home.";
    mes "We're usually more hospitable, but this year... I don't know why, but everything goes wrong.\"";
    goto L_Close;

L_Helping:
    mes "[Iivo]";
    mes "\"Hi there. I'm a bit bored because we're nearly out of material.";
    mes "I need an order to make some toys.\"";
    if (@ball == 0)
        goto L_Close;
L_Order:
    mes "[Iivo]";
    mes "\"I wish the guys up there in the office would send me something to do.\"";
    menu
        "Tarmo gave me an order for a Leather Ball.",-,
        "Yeah, it's a shame.", L_Close;
    mes "[Iivo]";
    mes "\"Really? That's great! Let me see.";
    mes "Ah, there are some things missing. I need " + @leather_amount + " Leather Patch?";
    mes "I need also about " + @maggotslime_amount + " Maggot Slimes. It's an ingredient for the lotion that is used to imbue the leather.\"";
    set @ball, 2;
    callsub S_Update_Var;
    goto L_Close;

L_LeatherBall:
    mes "[Iivo]";
    mes "\"I need " + @leather_amount + " Leather Patch and " + @maggotslime_amount + " Maggot Slimes for the Leather Ball.\"";
    menu
        "Here it is.",-,
        "I don't have it yet.",L_Close;
    if ((countitem("LeatherPatch") < @leather_amount) || (countitem("MaggotSlime") < @maggotslime_amount))
        goto L_NoItems;
    delitem "LeatherPatch", @leather_amount;
    delitem "MaggotSlime", @maggotslime_amount;
    set @ball, 3;
    callsub S_Update_Var;
    getitem "LeatherBall", 1;
    mes "[Iivo]";
    mes "\"Great!\"";
    mes "He takes the material and starts to cut the leather in pieces and seam them together.";
    mes "It seems to be hard to stitch the leather and takes a while.";
    next;
    mes "You get distracted and start daydreaming.";
    mes "[Iivo]";
    mes "\"Alright! Now the impregnation.\"";
    mes "You startle.";
    next;
    mes "Iivo mixes the maggot slimes with some other ingredients you can't exactly identify and rubs the ball with it.";
    mes "[Iivo]";
    mes "\"Very good. It's done. Can you take it to Aaron to get it packed?\"";
    goto L_Close;

L_LeatherBallDone:
    mes "[Iivo]";
    mes "\"I hope the kids will have fun with the ball I made. Did you already bring it to Aaron?\"";
    goto L_Close;

L_NoEvent:
    mes "[Iivo]";
    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 "[Iivo]";
    mes "\"This year's Christmas prepations really were a huddle. I hope we'll do better next year.\"";
    goto L_Close;

L_NoItems:
    mes "[Iivo]";
    mes "\"You don't have it!\"";
    goto L_Close;

L_Close:
    set @cotton_amount, 0;
    set @fur_amount, 0;
    set @ball, 0;
    close;

S_Update_Var:
    set xmas11, (xmas11 & ~($@xmas11_BallMask) | (@ball << $@xmas11_BallShift));
    return;
}