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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
-|script|#xmas2011config|-1,{
OnInit:
set $@xmas2011_start_day, 10;
set $@xmas2011_reward_start_day, 25;
set $@xmas2011_year, 2011;
set $@glove_id, 2160;
set $@xmas11_talkedToChief, 0x1;
set $@xmas11_talkedToBadGuy, 0x2;
set $@xmas11_startedReinbooSearch, 0x4;
set $@xmas11_firstReinboo, 0x8;
set $@xmas11_firstReinbooDone, 0x10;
set $@xmas11_secondReinboo, 0x20;
set $@xmas11_secondReinbooDone, 0x40;
set $@xmas11_thirdReinboo, 0x80;
set $@xmas11_thirdReinbooDone, 0x100;
set $@xmas11_fourthReinboo, 0x200;
set $@xmas11_fourthReinbooDone, 0x400;
set $@xmas11_Decoration, 0x800;
set $@xmas11_DecorationDone, 0x1000;
set $@xmas11_Bedding, 0x2000;
set $@xmas11_BeddingDone, 0x4000;
set $@xmas11_Potion, 0x8000;
set $@xmas11_PotionDone, 0x10000;
set $@xmas11_PlushMoubooMask, 0xE0000;
set $@xmas11_PlushMoubooShift, 17;
set $@xmas11_StickReinbooMask, 0x700000;
set $@xmas11_StickReinbooShift, 20;
set $@xmas11_DollMask, 0x3800000;
set $@xmas11_DollShift, 23;
set $@xmas11_BallMask, 0x1C000000;
set $@xmas11_BallShift, 26;
set $@xmas11_BadGuyReward, 0x20000000;
set $@xmas11_SantaReward, 0x40000000;
// 0x80000000
set $@xmas2011_reinboopoints, 10;
set $@xmas2011_beddingpoints, 10;
set $@xmas2011_glitterpoints, 10;
set $@xmas2011_potionpoints, 10;
set $@xmas2011_plushmouboopoints, 10;
set $@xmas2011_stickreinboopoints, 10;
set $@xmas2011_ballpoints, 10;
set $@xmas2011_dollpoints, 10;
set $@xmas2011_totalpoints, 4*$@xmas2011_reinboopoints + $@xmas2011_beddingpoints + $@xmas2011_glitterpoints + $@xmas2011_potionpoints + $@xmas2011_plushmouboopoints + $@xmas2011_stickreinboopoints + $@xmas2011_ballpoints + $@xmas2011_dollpoints;
set $@xmas2011_main_rewardcost, 70;
set $@xmas2011_toy_rewardcost, 30;
set $@xmas2011_gloves_rewardcost, 8;
set $@xmas2011_gingerbreadman_rewardcost, 5;
set $@xmas2011_xmascake_rewardcost, 3;
set $@xmas2011_candy_rewardcost, 1;
}
// calculates the points for helping and sabotating
function|script|xmas2011points|{
set @plushmouboo, (xmas11 & $@xmas11_PlushMoubooMask) >> $@xmas11_PlushMoubooShift;
set @stickreinboo, (xmas11 & $@xmas11_StickReinbooMask) >> $@xmas11_StickReinbooShift;
set @ball, (xmas11 & $@xmas11_BallMask) >> $@xmas11_BallShift;
set @doll, (xmas11 & $@xmas11_DollMask) >> $@xmas11_DollShift;
set @helppoints, 0;
set @sabotagepoints, 0;
if ((xmas11 & $@xmas11_firstReinbooDone) && !(xmas11 & $@xmas11_firstReinboo))
set @helppoints, @helppoints + $@xmas2011_reinboopoints;
if ((xmas11 & $@xmas11_firstReinbooDone) && (xmas11 & $@xmas11_firstReinboo))
set @sabotagepoints, @sabotagepoints + $@xmas2011_reinboopoints;
if ((xmas11 & $@xmas11_secondReinbooDone) && !(xmas11 & $@xmas11_secondReinboo))
set @helppoints, @helppoints + $@xmas2011_reinboopoints;
if ((xmas11 & $@xmas11_secondReinbooDone) && (xmas11 & $@xmas11_secondReinboo))
set @sabotagepoints, @sabotagepoints + $@xmas2011_reinboopoints;
if ((xmas11 & $@xmas11_thirdReinbooDone) && !(xmas11 & $@xmas11_thirdReinboo))
set @helppoints, @helppoints + $@xmas2011_reinboopoints;
if ((xmas11 & $@xmas11_thirdReinbooDone) && (xmas11 & $@xmas11_thirdReinboo))
set @sabotagepoints, @sabotagepoints + $@xmas2011_reinboopoints;
if ((xmas11 & $@xmas11_fourthReinbooDone) && !(xmas11 & $@xmas11_fourthReinboo))
set @helppoints, @helppoints + $@xmas2011_reinboopoints;
if ((xmas11 & $@xmas11_fourthReinbooDone) && (xmas11 & $@xmas11_fourthReinboo))
set @sabotagepoints, @sabotagepoints + $@xmas2011_reinboopoints;
if ((xmas11 & $@xmas11_PotionDone) && !(xmas11 & $@xmas11_Potion))
set @helppoints, @helppoints + $@xmas2011_potionpoints;
if ((xmas11 & $@xmas11_PotionDone) && (xmas11 & $@xmas11_Potion))
set @sabotagepoints, @sabotagepoints + $@xmas2011_potionpoints;
if ((xmas11 & $@xmas11_BeddingDone) && !(xmas11 & $@xmas11_Bedding))
set @helppoints, @helppoints + $@xmas2011_beddingpoints;
if ((xmas11 & $@xmas11_BeddingDone) && (xmas11 & $@xmas11_Bedding))
set @sabotagepoints, @sabotagepoints + $@xmas2011_beddingpoints;
if ((xmas11 & $@xmas11_DecorationDone) && !(xmas11 & $@xmas11_Decoration))
set @helppoints, @helppoints + $@xmas2011_glitterpoints;
if ((xmas11 & $@xmas11_DecorationDone) && (xmas11 & $@xmas11_Decoration))
set @sabotagepoints, @sabotagepoints + $@xmas2011_glitterpoints;
if (@plushmouboo == 5)
set @helppoints, @helppoints + $@xmas2011_plushmouboopoints;
if (@plushmouboo == 6)
set @sabotagepoints, @sabotagepoints + $@xmas2011_plushmouboopoints;
if (@stickreinboo == 5)
set @helppoints, @helppoints + $@xmas2011_stickreinboopoints;
if (@stickreinboo == 6)
set @sabotagepoints, @sabotagepoints + $@xmas2011_stickreinboopoints;
if (@ball == 5)
set @helppoints, @helppoints + $@xmas2011_ballpoints;
if (@ball == 6)
set @sabotagepoints, @sabotagepoints + $@xmas2011_ballpoints;
if (@doll == 5)
set @helppoints, @helppoints + $@xmas2011_dollpoints;
if (@doll == 6)
set @sabotagepoints, @sabotagepoints + $@xmas2011_dollpoints;
set @plushmouboo, 0;
set @stickreinboo, 0;
set @ball, 0;
set @doll, 0;
return;
}
function|script|xmas2011debug|{
menu
"i'm fine",L_Close,
"show my points",L_Points,
"show variable",L_Var,
"restart",L_Restart,
"reset",-;
set xmas11, 0;
close;
L_Restart:
set xmas11, 0;
set xmas11, xmas11 | $@xmas11_talkedToChief;
close;
L_Points:
callfunc "xmas2011points";
mes "Good points: " + @helppoints;
mes "Bad points: " + @sabotagepoints;
close;
L_Var:
mes "Talked to Chief: " + ((xmas11 & 0x1));
mes "Talked to Bad Guy: " + ((xmas11 & 0x2) >> 1);
mes "Started Reinboo: " + ((xmas11 & 0x4) >> 2);
mes "R1 Bit 0: " + ((xmas11 & 0x8) >> 3);
mes "R1 Bit 1: " + ((xmas11 & 0x10) >> 4);
mes "R2 Bit 0: " + ((xmas11 & 0x20) >> 5);
mes "R2 Bit 1: " + ((xmas11 & 0x40) >> 6);
mes "R3 Bit 0: " + ((xmas11 & 0x80) >> 7);
mes "R3 Bit 1: " + ((xmas11 & 0x100) >> 8);
mes "R4 Bit 0: " + ((xmas11 & 0x200) >> 9);
mes "R4 Bit 1: " + ((xmas11 & 0x400) >> 10);
mes "Dec Bit 0: " + ((xmas11 & 0x800) >> 11);
mes "Dec Bit 1: " + ((xmas11 & 0x1000) >> 12);
mes "Bed Bit 0: " + ((xmas11 & 0x2000) >> 13);
mes "Bed Bit 1: " + ((xmas11 & 0x4000) >> 14);
mes "Pot Bit 0: " + ((xmas11 & 0x8000) >> 15);
mes "Pot Bit 1" + ((xmas11 & 0x10000) >> 16);
mes "plushmouboo b0: " + ((xmas11 & 0x20000) >> 17);
mes "plushmouboo b1: " + ((xmas11 & 0x40000) >> 18);
mes "plushmouboo b2: " + ((xmas11 & 0x80000) >> 19);
mes "stickreinboo b0: " + ((xmas11 & 0x100000) >> 20);
mes "stickreinboo b1: " + ((xmas11 & 0x200000) >> 21);
mes "stickreinboo b1: " + ((xmas11 & 0x400000) >> 22);
mes "doll b0: " + ((xmas11 & 0x800000) >> 23);
mes "doll b1: " + ((xmas11 & 0x1000000) >> 24);
mes "doll b2: " + ((xmas11 & 0x2000000) >> 25);
mes "ball b0: " + ((xmas11 & 0x4000000) >> 26);
mes "ball b1: " + ((xmas11 & 0x8000000) >> 27);
mes "ball b2: " + ((xmas11 & 0x10000000) >> 28);
mes "bad guy reward: " + ((xmas11 & 0x20000000) >> 29);
mes "santa reward: " + ((xmas11 & 0x40000000) >> 30);
mes "not used: " + ((xmas11 & 0x80000000) >> 31);
close;
L_Close:
set @helppoints, 0;
set @sabotagepoints, 0;
close;
}
|