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
|
// This file is part of Christmas Event 2011
// author: Jenalya
// Santa's room is open after Christmas
// gives rewards depending on how much the player helped
030-2.gat,197,62,0|script|Santa|105,{
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;
if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
mes "[Santa]";
mes "\"Oh, how did you come in? I'm very sorry, but I have to ask you to leave my room.";
mes "I'll have time for you after Christmas.\"";
warp "030-2.gat", 78, 88;
goto L_Close;
L_Helping:
mes "[Santa]";
mes "\"Hello. I see you're helping with the preparations for Christmas. That's very kind of you.";
mes "But I have to ask you to leave my room, I'll have time for you after Christmas.\"";
warp "030-2.gat", 78, 88;
goto L_Close;
L_NoEvent:
mes "[Santa]";
mes "\"I'm sorry, no visitors this time of the year.\"";
warp "030-1.gat", 99, 55;
goto L_Close;
L_RewardTime:
callfunc "xmas2011points";
if (xmas11 & $@xmas11_SantaReward) goto L_Done;
mes "[Santa]";
mes "\"Welcome to my house!\"";
if (@helppoints == 0)
goto L_NoHelp;
getinventorylist;
if (@inventorylist_count > 80)
goto L_Full_Inv;
mes "[Santa]";
mes "\"I see you've been helping with the preparations for Christmas.\"";
if (@sabotagepoints > 0)
mes "A sad look crosses his face.";
next;
if (@helppoints < $@xmas2011_main_rewardcost)
goto L_NoMainReward;
getitem "ElfNightcap", 1;
set @helppoints, @helppoints - $@xmas2011_main_rewardcost;
mes "\"Things would've been a disaster without your help! Please have this.";
mes "Something a helper of mine really needs after the work is done.\"";
next;
L_NoMainReward:
if (@helppoints < $@xmas2011_toy_rewardcost)
goto L_NoToyReward;
L_ToyAgain:
set @toy_reward, rand(4);
if (@toy_reward == 0)
getitem "PlushMouboo", 1;
if (@toy_reward == 1)
getitem "StickReinboo", 1;
if (@toy_reward == 2)
getitem "Doll", 1;
if (@toy_reward == 3)
getitem "LeatherBall", 1;
set @helppoints, @helppoints - $@xmas2011_toy_rewardcost;
if (@helppoints >= $@xmas2011_toy_rewardcost)
goto L_ToyAgain;
mes "\"I have some toys for you.\"";
next;
L_NoToyReward:
if (@helppoints < $@xmas2011_gloves_rewardcost)
goto L_NoGlovesReward;
set @gloves, $@xmas2011_glove_id + rand(10);
getitem @gloves, 1;
set @helppoints, @helppoints - $@xmas2011_gloves_rewardcost;
mes "\"This will keep your hands warm.\"";
next;
L_NoGlovesReward:
if (@helppoints == 0)
goto L_Done;
mes "\"Have some candy.\"";
next;
if (@helppoints < $@xmas2011_gingerbreadman_rewardcost)
goto L_NoGBMReward;
set @candy_amount, @helppoints/$@xmas2011_gingerbreadman_rewardcost;
getitem "GingerBreadMan", @candy_amount;
set @helppoints, @helppoints - @candy_amount*$@xmas2011_gingerbreadman_rewardcost;
L_NoGBMReward:
if (@helppoints < $@xmas2011_xmascake_rewardcost)
goto L_NoXmasCakeReward;
set @candy_amount, @helppoints/$@xmas2011_xmascake_rewardcost;
getitem "XmasCake", @candy_amount;
set @helppoints, @helppoints - @candy_amount*$@xmas2011_xmascake_rewardcost;
L_NoXmasCakeReward:
if (@helppoints < $@xmas2011_candy_rewardcost)
goto L_Done;
set @candy_amount, @helppoints/$@xmas2011_candy_rewardcost;
getitem "Candy", @candy_amount;
set @helppoints, @helppoints - @candy_amount*$@xmas2011_candy_rewardcost;
L_Done:
mes "[Santa]";
mes "\"Merry Christmas!\"";
set xmas11, xmas11 | $@xmas11_SantaReward;
goto L_Close;
L_Full_Inv:
mes "[Santa]";
mes "\"Ho, you carry a lot of things with you. Please come back later.\"";
goto L_Close;
L_NoHelp:
mes "[Santa]";
if (@sabotagepoints > 0)
mes "\"You weren't a good kid this year...\"";
if (@sabotagepoints > 0)
mes "He looks very disappointed.";
if (@sabotagepoints == 0)
mes "\"Please enjoy your time in my house! Merry Christmas!\"";
goto L_Close;
L_Close:
set @menu, 0;
set @inventorylist_count, 0;
set @toy_reward, 0;
set @gloves, 0;
set @candy_amount, 0;
set @sabotagepoints, 0;
set @helppoints, 0;
close;
}
|