summaryrefslogtreecommitdiff
path: root/npc/custom/etc/rpsroulette.txt
blob: 8e3d04a3e3091cafc0ce456a5a0a6ad104752fa3 (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
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
//===== rAthena Script =======================================
//= Rock Scissors Roulette
//===== By: ==================================================
//= acky
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Plays a hybrid Russian Roulette Rock Scissors Paper game.
//===== Additional Comments: =================================
//= Prizes customizable, Added emotions.
//= 1.2 Fixes by Blackthunder and me [Poki#3]
//============================================================

cmd_in02,182,126,2	script	Crazy Boris	85,{
	mes "Crazy Boris";
	set @counter,1;
	mes "Hey you! Up for Rock Scissors Roulette?";
	next;
	menu "Let me play.",PLAY,"Explain the rules.",RULES,"Leave",LEAVE;
	SAME:
	mes "Draw! Again!";
	next;
	goto PLAY;

WIN:
	mes "Damnit, You Win!";
	emotion 19;
	next;
	goto OPPPULL;

LOSE:
	emotion 18;
	mes "Boorah! You Lose!";
	next;
	goto YOUPULL;

PLAY:
	mes "Rock... Paper...";
	set @opp,rand (1,3);
	menu "^0000FFROCK!",ROCK,"^FF0000SCISSORS!",SCISSORS,"^00FF00PAPER!^000000",PAPER;

ROCK:
  	if (@lastchoice == 1) set @opp,rand (1,3);
  	if (@opp == 1) emotion 11;
  	if (@opp == 2) emotion 10;
  	if (@opp == 3) emotion 12;
  	set @lastchoice,1;
	if (@opp == 1) goto SAME;
	if (@opp == 2) goto WIN;
	if (@opp == 3) goto LOSE;

SCISSORS:
	if (@lastchoice == 2) set @opp,rand (1,2);
  	if (@opp == 1) emotion 11;
  	if (@opp == 2) emotion 10;
  	if (@opp == 3) emotion 12;
  	set @lastchoice,2;
	if (@opp == 1) goto LOSE;
	if (@opp == 2) goto SAME;
	if (@opp == 3) goto WIN;

PAPER:
	if (@lastchoice == 3) set @opp,rand (2,3);
  	if (@opp == 1) emotion 11;
  	if (@opp == 2) emotion 10;
  	if (@opp == 3) emotion 12;
  	set @lastchoice,3;
	if (@opp == 1) goto WIN;
	if (@opp == 2) goto LOSE;
	if (@opp == 3) goto SAME;

YOUPULL:
	if (@counter == 1) goto ONE;
	if (@counter == 2) goto TWO;
	if (@counter == 3) goto THREE;
	if (@counter == 4) goto FOUR;
	if (@counter == 5) goto FIVE;
	if (@counter == 6) goto SIX;

OPPPULL:
	if (@counter == 1) goto ONEa;
	if (@counter == 2) goto TWOa;
	if (@counter == 3) goto THREEa;
	if (@counter == 4) goto FOURa;
	if (@counter == 5) goto FIVEa;
	if (@counter == 6) goto SIXa;

ONE:
	set @counter,2;
	mes "1 of 6";
	set @pull,rand (1,6);
	next;
	if (@pull == 1) goto DIE;
	if (@pull != 1) goto SAFE;

TWO:
	set @counter,3;
	mes "2 of 6";
	set @pull,rand (1,5);
	next;
	if (@pull == 1) goto DIE;
	if (@pull != 1) goto SAFE;

THREE:
	set @counter,4;
	mes "3 of 6";
	set @pull,rand (1,4);
	next;
	if (@pull == 1) goto DIE;
	if (@pull != 1) goto SAFE;

FOUR:
	set @counter,5;
	mes "4 of 6";
	set @pull,rand (1,3);
	next;
	if (@pull == 1) goto DIE;
	if (@pull != 1) goto SAFE;

FIVE:
	set @counter,6;
	mes "5 of 6";
	set @pull,rand (1,2);
	if (@pull == 1) set @pull,rand (1,2);
	next;
	if (@pull == 1) goto DIE;
	if (@pull != 1) goto SAFE;

SIX:
	mes "6 of 6";
	mes "Say your prayers";
	set @pull,1;
	next;
	if (@pull == 1) goto DIE;
	if (@pull != 1) goto SAFE;

ONEa:
	set @counter,2;
	mes "1 of 6";
	set @pull,rand (1,6);
	next;
	if (@pull == 1) goto KILL;
	if (@pull != 1) goto SAFE;

TWOa:
	set @counter,3;
	mes "2 of 6";
	set @pull,rand (1,5);
	next;
	if (@pull == 1) goto KILL;
	if (@pull != 1) goto SAFE;

THREEa:
	set @counter,4;
	mes "3 of 6";
	set @pull,rand (1,4);
	next;
	if (@pull == 1) goto KILL;
	if (@pull != 1) goto SAFE;

FOURa:
	set @counter,5;
	mes "4 of 6";
	set @pull,rand (1,3);
	next;
	if (@pull == 1) goto KILL;
	if (@pull != 1) goto SAFE;

FIVEa:
	set @counter,6;
	mes "5 of 6";
	set @pull,rand (1,2);
	next;
	if (@pull == 1) goto KILL;
	if (@pull != 1) goto SAFE;

SIXa:
	mes "6 of 6";
	mes "Say your prayers";
	set @pull,1;
	next;
	if (@pull == 1) goto KILL;
	if (@pull != 1) goto SAFE;

SAFE:
	emotion 32;
	mes "*^0000FFClick^000000* whew...";
	goto PLAY;

DIE:
	specialeffect2 183;
	emotion 29;
	percentheal -100,-100;
	mes "*^0000FFClick^000000* *^FF0000BANG^000000*";
	mes "You're dead!";
	close;

KILL:
	specialeffect 183;
	emotion 23;
	mes "*^0000FFClick^000000* *^FF0000BANG^000000*";
	mes "OWWW @#$%^!! THAT HURT LIKE HELL!!";
	next;
	goto PRIZE;

RULES:
	mes "Ok here are the rules:";
	mes "I have with me a ^FF00006^000000 chamber pistol with ^FF00001^000000 round. First we play ^FF0000Scissors ^00FF00Paper ^0000FFRock^000000. The loser pulls the trigger. The winner is whoever comes out best.";
	mes "Beat me to win a prize.";
	menu "Let me play.",CONT,"No thanks.",LEAVE;

CONT:
	mes "Ok here we go...";
	next;
	goto PLAY;

PRIZE:
	mes "Congratulations! You have won...";
	set @prize,rand (1,10);
	if (@prize == 1) goto P1;
	if (@prize == 2) goto P2;
	if (@prize == 3) goto P3;
	if (@prize == 4) goto P4;
	if (@prize == 5) goto P5;
	if (@prize == 6) goto P6;
	if (@prize == 7) goto P7;
	if (@prize == 8) goto P8;
	if (@prize == 9) goto P9;
	if (@prize == 10) goto P10;

P1:
	mes "10x Oridicon!";
	getitem 984,10;
	close;

P2:
	mes "10x Elunium!";
	getitem 985,10;
	close;

P3:
	mes "100x Fly Wings!";
	getitem 601,100;
	close;

P4:
	mes "8x Old Blue Box!";
	getitem 603,8;
	close;

P5:
	mes "4x Old Violet Box!";
	getitem 617,4;
	close;

P6:
	mes "1x Old Card Album!";
	getitem 616,1;
	close;

P7:
	mes "10x Dead Branch!";
	getitem 604,10;
	close;

P8:
	mes "3x Gold!";
	getitem 969,3;
	close;

P9:
	mes "10x Elunium!";
	getitem 985,10;
	close;

P10:
	mes "20x Blue Potion!";
	getitem 505,20;
	close;

LEAVE:
	mes "Pansy.";
	close;
}