summaryrefslogtreecommitdiff
path: root/world/map/npc/xmas/2011/stickReinboo.txt
blob: 23a6356dbfa3430a9bba52bdfcdc2c333d732f38 (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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
// This file is part of Christmas Event 2011
// author: Jenalya
// Stick Reinboo states:
// 1: got order from Akseli
// 2: Kalevi said that he needs more material
// 3: Kalevi created the Stick Reinboo
// 4: gave Stick Reinboo to the bad guy
// 5: delivered the Stick Reinboo without giving it to the bad guy
// 6: delivered fake present instead of Stick Reinboo

030-2.gat,31,85,0|script|Akseli|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 @stickreinboo, (xmas11 & $@xmas11_StickReinbooMask) >> $@xmas11_StickReinbooShift;

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

    mes "[Busy Helper]";
    mes "\"Hello. Are you doing a sightseeing of Santa's house? That's very nice for you.";
    mes "We're currently very busy with the preparations for Christmas, so please don't interrupt.\"";
    goto L_Close;

L_Helping:
    mes "[Akseli]";
    mes "\"Ah, hello. Could you do me a small favor?";
    mes "I have this order for a Stick Reinboo, can you bring it to Kalevi?\"";
    mes "He gives you some piece of paper.";
    next;
    mes "It seems to be some kind of form, but you can't really identify anything on it. It contains a lot of boxes with some numbers scrabbled in and some hard to read words.";
    set @stickreinboo, 1;
    set xmas11, (xmas11 & ~($@xmas11_StickReinbooMask) | (@stickreinboo << $@xmas11_StickReinbooShift));
    menu
        "Alright, will do that.",L_Close,
        "Erm, what is this?",-;
    mes "[Akseli]";
    mes "\"Not important for you to know. Just bring it to Kalevi.\"";
    mes "He's already busy with his paperworks again.";
    goto L_Close;

L_Ordered:
    mes "[Akseli]";
    mes "\"Oh, hello again. Did you already give Kalevi the order?\"";
    goto L_Close;

L_NoEvent:
    mes "[Akseli]";
    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 "[Akseli]";
    mes "\"I'm so tired now.\"";
    goto L_Close;

L_Close:
    set @stickreinboo, 0;
    close;
}

030-2.gat,147,23,0|script|Kalevi|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 @stickreinboo, (xmas11 & $@xmas11_StickReinbooMask) >> $@xmas11_StickReinbooShift;

    set @log_amount, 2;
    set @leather_amount, 1;

    if (@stickreinboo >= 3) goto L_StickReinbooDone;
    if (@stickreinboo == 2) goto L_StickReinboo;
    if (@stickreinboo == 1) goto L_Order;
    if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;

    mes "This helper seems quite happy, humming a happy melody.";
    mes "[Busy Helper]";
    mes "\"Hello there. I can't work at the moment, because we're only allowed to create toys that are explicitly ordered.\"";
    goto L_Close;

L_Helping:
    mes "Kalevi gets droopy as he sees you coming near.";
    mes "[Kalevi]";
    mes "\"Oh, hello. Do you want anything?\"";
    menu
        "Why aren't you working? Everyone else is busy!",-,
        "No, I'm fine.",L_Close;
    mes "[Kalevi]";
    mes "\"I'm not allowed! We're only allowed to create toys that are ordered. Because of the shortage of material, you know.\"";
    if (@stickreinboo == 0)
        goto L_Close;
L_Order:
    mes "Kalevi doesn't seem motivated.";
    menu
        "Akseli gave me this order here for you!",-,
        "Nevermind.",L_Close;
    mes "[Kalevi]";
    mes "\"He did? Ah, well, ok.\"";
    mes "He sighs and takes the paper.";
    next;
    mes "[Kalevi]";
    mes "\"Ha, but I don't have the material needed for the Stick Reinboo!";
    mes "\"I'd need " + @log_amount + " Raw Log and " + @leather_amount + " leather patch. That's hard to get.\"";
    next;
    mes "\"So I can't work I guess.\"";
    set @stickreinboo, 2;
    callsub S_Update_Var;
    goto L_Close;

L_StickReinboo:
    mes "[Kalevi]";
    mes "\"You're back. As I told you I can't work without the material.\"";
    menu
        "Ok, nevermind.",L_Close,
        "I can get it for you. What do you need again?",-;
    mes "Kalevi doesn't look pleased.";
    mes "[Kalevi]";
    mes "\"I need " + @log_amount + " Raw Log and " + @leather_amount + " leather patch. That's hard to get.\"";
    menu
        "I have it!",-,
        "Ok, I'll bring those.",L_Close;
    if ((countitem("RawLog") < @log_amount) || (countitem("LeatherPatch") < @leather_amount))
        goto L_NoItems;
    delitem "RawLog", @log_amount;
    delitem "LeatherPatch", @leather_amount;
    set @stickreinboo, 3;
    callsub S_Update_Var;
    getitem "StickReinboo", 1;
    mes "[Kalevi]";
    mes "\"Ok, ok, you got me. Let's start.\"";
    next;
    mes "He takes the Raw Logs and starts carving and polishing, forming one long stick and a shorter one. Then he takes the Leather Patch and cuts it into certain shaped pieces.";
    mes "He sews them together, stuffs it and leaves one hole on the bottom and one on each side. There he attaches the sticks he carved. The short one is covered by the ears.";
    next;
    mes "After that he adds some details to make it have a face.";
    mes "[Kalevi]";
    mes "\"Alright, done. Do me a favor and bring it to Aaron, ok?\"";
    goto L_Close;

L_StickReinbooDone:
    mes "[Kalevi]";
    mes "\"Ok, now I can relax again. Unless you're bringing another order for me?\"";
    mes "He seems worried that you could bring him more work to do.";
    goto L_Close;

L_NoEvent:
    mes "[Kalevi]";
    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 "[Kalevi]";
    mes "\"You know, everyone is complaining how stressful it was this year.";
    mes "But I don't think it was that bad at all.\"";
    goto L_Close;

L_NoItems:
    mes "[Kalevi]";
    mes "\"Ha, don't speak nonsense. You don't have it, so I don't have to start working.\"";
    goto L_Close;

L_Close:
    set @log_amount, 0;
    set @leather_amount, 0;
    set @stickreinboo, 0;
    close;

S_Update_Var:
    set xmas11, (xmas11 & ~($@xmas11_StickReinbooMask) | (@stickreinboo << $@xmas11_StickReinbooShift));
    return;
}