forked from johnl0l/AdobeRO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCrystal Chaos Mini-Game.txt
226 lines (184 loc) · 5.86 KB
/
Crystal Chaos Mini-Game.txt
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
//===== rAthena Script =======================================
//= Crystal Chaos Mini-Game Script
//===== By: ==================================================
//= Nova http://www.novaragnarok.com
//============================================================
prontera,152,175,6 script Crystal Chaos#summ 762,{
.@n$ = "[ ^FF0000Crystal Chaos^000000 ]";
mes .@n$;
mes "You must think you have good eyes.";
mes "When the shadow stops moving, select which shadow you think it stopped on.";
mes "Playing costs ^3355FF"+.costqty+"x "+getitemname(.costid)+"^000000. If you win, you will get ^3355FF"+.rewardqty+"x "+getitemname(.rewardid)+"^000000.";
next;
switch(select("Play Crystal Chaos:Leave")){
case 1:
if(.start == 0) {
if (@NovaCrystal > gettimetick(2)) {
.@t = @NovaCrystal - gettimetick(2);
dispbottom "Crystal Chaos: You must wait "+.@t+" seconds before playing Crystal Chaos again.";
end;
}
if(countitem(.costid) < .costqty) {
mes .@n$;
mes "You don't have enough "+getitemname(.rewardid)+".";
end;
}
delitem .costid,.costqty;
@NovaCrystal = gettimetick(2) + 60;
.start = 1;
initnpctimer;
mes .@n$;
mes "Press next to start the game.";
mes "Pay close attention to the Crystal's shadow,";
mes "When the shadow stops moving, select which shadow you think it stopped on.";
next;
mes .@n$;
mes "- Round 1 -";
donpcevent "Crystal#summshufreal::OnRound1";
donpcevent "Crystal#summshufreal::OnEnable";
mes "Which Crystal did the shadow stop on?";
next;
.@choice = .x[select("Left Crystal:Middle Crystal:Right Crystal") - 1];
if(getvariableofnpc(.shadow, "Crystal#summshufreal") != .@choice ) {
showscript "You lose",.pchaos$;
.start = 0;
@NovaCrystal = gettimetick(2) + 60;
end;
}
mes .@n$;
mes "Congratulations, now for round 2!";
showscript "Round 2",.pchaos$;
next;
mes .@n$;
mes "- Round 2 -";
donpcevent "Crystal#summshufreal::OnRound2";
donpcevent "Crystal#summshufreal::OnEnable";
mes "Which Crystal did the shadow stop on?";
next;
.@choice = .x[select("Left Crystal:Middle Crystal:Right Crystal") - 1];
if(getvariableofnpc(.shadow, "Crystal#summshufreal") != .@choice ) {
showscript "You lose",.pchaos$;
.start = 0;
@NovaCrystal = gettimetick(2) + 60;
end;
}
mes .@n$;
mes "Congratulations, now for round 3!";
showscript "Round 3",.pchaos$;
next;
mes .@n$;
mes "- Round 3 -";
donpcevent "Crystal#summshufreal::OnRound3";
donpcevent "Crystal#summshufreal::OnEnable";
mes "Which Crystal did the shadow stop on?";
next;
.@choice = .x[select("Left Crystal:Middle Crystal:Right Crystal") - 1];
if(getvariableofnpc(.shadow, "Crystal#summshufreal") != .@choice ) {
showscript "You lose",.pchaos$;
.start = 0;
@NovaCrystal = gettimetick(2) + 60;
end;
}
mes .@n$;
mes "Congratulations, now for the final round!";
showscript "Final Round!",.pchaos$;
next;
mes .@n$;
mes "- Final Round -";
donpcevent "Crystal#summshufreal::OnRound4";
donpcevent "Crystal#summshufreal::OnEnable";
mes "Which Crystal did the shadow stop on?";
next;
.@choice = .x[select("Left Crystal:Middle Crystal:Right Crystal") - 1];
if(getvariableofnpc(.shadow, "Crystal#summshufreal") != .@choice ) {
showscript "You lose",.pchaos$;
.start = 0;
@NovaCrystal = gettimetick(2) + 60;
end;
}
showscript "You win!",.pchaos$;
getitem .rewardid,.rewardqty;
.start = 0;
@NovaCrystal = gettimetick(2) + 60;
end;
} else {
mes .@n$;
mes "Somebody is already playing Crystal Chaos! Please wait until they finish.";
}
end;
case 2:
mes .@n$;
mes "Come back when you're ready to play.";
end;
}
OnTimer60000:
.start = 0;
stopnpctimer;
end;
OnInit:
.start = 0;
.pchaos$ = getnpcid(0);
//Configure the cost of playing as well as the reward.
.costid = 6767;
.costqty = 2;
.rewardid = 6767;
.rewardqty = 30;
//Set the following array to be the X Coordinates of the 3 following NPCs
setarray .x,158,156,154;
end;
}
//Make sure these NPCs are spaced apart by 2 cells on the X axis. (104, 102, 100)
//The Coordinates of the last Crystal should be the same as that of the middle one.
//If you change the Y coordinate (174) Make sure you also change it below inside Crystal#summshufreal
prontera,158,174,4 script Right Crystal#summshuf1 1914,{
end;
}
prontera,156,174,4 script Middle Crystal#summshuf2 1914,{
end;
}
prontera,154,174,4 script Left Crystal#summshuf3 1914,{
end;
}
prontera,156,174,4 script Crystal#summshufreal 1914,{
end;
OnInit:
npcspeed 20;
//Set the following array to be the X Coordinate of the 3 previous NPCs (Same as above)
setarray .x,158,156,154;
disablenpc "Crystal#summshufreal";
.y = 174; //Set to be the Y coordinate of the previous NPCs
end;
OnEnable:
enablenpc "Crystal#summshufreal";
.r1 = rand(0,2);
movenpc "Crystal#summshufreal",.x[.r1],.y;
sleep .round;
for (.@i = 0; .@i < 15; .@i++){
.r2 = rand(0,2);
while (.r2 == .r1)
.r2 = rand(0,2);
movenpc "Crystal#summshufreal",.x[.r2],.y;
sleep .round;
.r1 = rand(0,2);
while (.r1 == .r2)
.r1 = rand(0,2);
movenpc "Crystal#summshufreal",.x[.r1],.y;
.shadow = .x[.r1];
sleep .round;
}
disablenpc "Crystal#summshufreal";
end;
// Speed Configuration, change at will.
OnRound1:
.round = 150;
end;
OnRound2:
.round = 100;
end;
OnRound3:
.round = 70;
end;
OnRound4:
.round = 45;
end;
}