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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
|
// Author: alastrim, Jenalya
function|script|Debug|{
L_Begin:
set @debug_mask, 65535;
set @debug_shift, 0;
set @mexp, ((MAGIC_EXPERIENCE & @debug_mask) >> @debug_shift);
mes "What do you want to do?";
menu
"Change base level", L_Level,
"Reset status points", L_Status,
"Change my skills", L_Skills,
"Change my magic skills", L_Magic,
"Close", -;
close;
L_Level:
mes "Which level do you want to be? (min: 1 - max: 255)";
next;
input @lvl;
if (@lvl > 255)
goto L_Leveltoohigh;
if (@lvl < 1)
goto L_Leveltoolow;
if (BaseLevel == @lvl)
goto L_Samelvl;
set BaseLevel, @lvl;
resetstatus;
message strcharinfo(0), "New level: " + BaseLevel;
goto L_Begin;
L_Samelvl:
mes "You are already level " + @lvl;
next;
goto L_Level;
L_Leveltoolow:
mes "Bad choice. Minimum level is 1.";
next;
goto L_Level;
L_Leveltoohigh:
mes "Bad choice. Maximum level is 255.";
next;
goto L_Level;
L_Skills:
set @mallard, getskilllv(SKILL_MALLARDS_EYE);
set @brawling, getskilllv(SKILL_BRAWLING);
set @speed, getskilllv(SKILL_SPEED);
set @poison, getskilllv(SKILL_RESIST_POISON);
set @astralsoul, getskilllv(SKILL_ASTRAL_SOUL);
set @raging, getskilllv(SKILL_WARRIOR_RAGING);
menu
"Overview of my skills", L_Seeskills,
"Focus/Unfocus", L_Unfocus,
"Add skills", L_Changeskills,
"Reset skills", L_Resetskills,
"Back to main menu", L_Begin,
"Close", -;
close;
L_Unfocus:
cleararray @skilllist_name$[0], "", 8;
cleararray @skilllist_id[0], 0, 8;
cleararray @skilllist_count[0], 0, 8;
if (getskilllv(SKILL_POOL) == 0)
setskill SKILL_POOL, 1;
getactivatedpoolskilllist;
if (@skilllist_count == 0)
goto L_Focus;
getactivatedpoolskilllist;
if (@skilllist_count != 0)
goto L_Askunfocus;
mes "You aren't focused on a skill at the moment";
goto L_Skills;
L_Askunfocus:
mes "Unfocus " + @skilllist_name$[@skilllist_count-1] + "?";
menu
"Yes", -,
"No", L_Skills;
unpoolskill @skilllist_id[@skilllist_count-1];
goto L_Skills;
L_Focus:
cleararray @skilllist_name$[0], "", 8;
cleararray @skilllist_id[0], 0, 8;
cleararray @skilllist_count[0], 0, 8;
getunactivatedpoolskilllist;
if (@skilllist_count == 0)
goto L_Noskills;
set @skilllist_id[@skilllist_count], 0;
set @skilllist_name$[@skilllist_count], "Back to skills menu";
mes "You don't have any skill focused right now. Which one do you want to focus?";
menu
@skilllist_name$[0], -,
@skilllist_name$[1], -,
@skilllist_name$[2], -,
@skilllist_name$[3], -,
@skilllist_name$[4], -,
@skilllist_name$[5], -,
@skilllist_name$[6], -,
@skilllist_name$[7], -;
set @menu, @menu - 1;
poolskill @skilllist_id[@menu];
goto L_Skills;
L_Noskills:
mes "You have no skills to focus/unfocus.";
goto L_Skills;
L_Seeskills:
cleararray @skilllist_name$[0], "", 8;
cleararray @skilllist_id[0], 0, 8;
cleararray @skilllist_count[0], 0, 8;
getactivatedpoolskilllist;
if (@skilllist_count == 0)
goto L_Focusmessage;
if (@skilllist_count != 0)
mes "You are focused on " + @skilllist_name$[@skilllist_count-1] + " skill.";
L_Skillsoverview:
mes "You level in mallards eye skill is " + @mallard;
mes "You level in brawling skill is " + @brawling;
mes "You level in speed skill is " + @speed;
mes "You level in resist poison skill is " + @poison;
mes "You level in astral soul skill is " + @astralsoul;
mes "You level in raging skill is " + @raging;
next;
goto L_Skills;
L_Focusmessage:
mes "You don't have any skill focused right now.";
goto L_Skillsoverview;
L_Changeskills:
menu
"Mallards eye", L_Changemallard,
"Brawling", L_Changebrawling,
"Speed", L_Changespeed,
"Resist Poison", L_Changepoison,
"Astral Soul", L_Changeastralsoul,
"Raging", LChangeraging,
"All skills level 9", L_AllSkills,
"Back to skills menu", L_Skills,
"Close", -;
close;
L_Badskilllvl:
mes "Invalid skill lvl. Try again.";
next;
goto L_Changeskills;
L_Changemallard:
mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):";
input @lvl;
if (@lvl < 1 || @lvl > 9)
goto L_Badskilllvl;
setskill SKILL_MALLARDS_EYE, @lvl;
goto L_Skills;
L_Changebrawling:
mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):";
input @lvl;
if (@lvl < 1 || @lvl > 9)
goto L_Badskilllvl;
setskill SKILL_BRAWLING, @lvl;
goto L_Skills;
L_Changespeed:
mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):";
input @lvl;
if (@lvl < 1 || @lvl > 9)
goto L_Badskilllvl;
setskill SKILL_SPEED, @lvl;
goto L_Skills;
L_Changepoison:
mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):";
input @lvl;
if (@lvl < 1 || @lvl > 9)
goto L_Badskilllvl;
setskill SKILL_RESIST_POISON, @lvl;
goto L_Skills;
L_Changeastralsoul:
mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):";
input @lvl;
if (@lvl < 1 || @lvl > 9)
goto L_Badskilllvl;
setskill SKILL_ASTRAL_SOUL, @lvl;
goto L_Skills;
L_Changeraging:
mes "Enter the lvl you want to be in this skill(min: 1 - max: 9):";
input @lvl;
if (@lvl < 1 || @lvl > 9)
goto L_Badskilllvl;
setskill SKILL_WARRIOR_RAGING, @lvl;
goto L_Skills;
L_AllSkills:
setskill SKILL_MALLARDS_EYE, 9;
setskill SKILL_BRAWLING, 9;
setskill SKILL_SPEED, 9;
setskill SKILL_RESIST_POISON, 9;
setskill SKILL_ASTRAL_SOUL, 9;
setskill SKILL_WARRIOR_RAGING, 9;
goto L_Skills;
L_Resetskills:
setskill SKILL_MALLARDS_EYE, 0;
setskill SKILL_BRAWLING, 0;
setskill SKILL_SPEED, 0;
setskill SKILL_RESIST_POISON, 0;
setskill SKILL_ASTRAL_SOUL, 0;
setskill SKILL_WARRIOR_RAGING, 0;
goto L_Skills;
L_Magic:
set @general, getskilllv(SKILL_MAGIC);
set @life, getskilllv(SKILL_MAGIC_LIFE);
set @war, getskilllv(SKILL_MAGIC_WAR);
set @trans, getskilllv(SKILL_MAGIC_TRANSMUTE);
set @nature, getskilllv(SKILL_MAGIC_NATURE);
set @astral, getskilllv(SKILL_MAGIC_ASTRAL);
menu
"Overview of my magical skills", L_Seemagic,
"Get magic skills", L_Changemagic,
"Get magic experience", L_Magicexp,
"Get all magic skills lvl2 and max exp", L_GetAllMagic,
"Reset magic", L_Resetmagic,
"Back to main menu", L_Begin,
"Close", -;
close;
L_Nomagicskills:
mes "You can't have magic experience, since you have no magic skills.";
goto L_Magic;
L_GetAllMagic:
setskill SKILL_MAGIC, 2;
setskill SKILL_MAGIC_LIFE, 2;
setskill SKILL_MAGIC_WAR, 2;
setskill SKILL_MAGIC_TRANSMUTE, 2;
setskill SKILL_MAGIC_NATURE, 2;
setskill SKILL_MAGIC_ASTRAL, 2;
set @mexp, 1200;
callsub S_Update_Mask;
goto L_Magic;
L_Resetmagic:
setskill SKILL_MAGIC, 0;
setskill SKILL_MAGIC_LIFE, 0;
setskill SKILL_MAGIC_WAR, 0;
setskill SKILL_MAGIC_TRANSMUTE, 0;
setskill SKILL_MAGIC_NATURE, 0;
setskill SKILL_MAGIC_ASTRAL, 0;
set @mexp, 0;
callsub S_Update_Mask;
goto L_Magic;
L_Wrongexp:
mes "Wrong value informed. Try again.";
L_Magicexp:
mes "Your current magic experience is " + @mexp;
if (@general == 0
&& @life == 0
&& @war == 0
&& @trans == 0
&& @nature == 0
&& @astral == 0)
goto L_Nomagicskills;
if (@general == 2
|| @life == 2
|| @war == 2
|| @trans == 2
|| @nature == 2
|| @astral == 2)
goto L_Magicexp2;
L_Magicexp1:
mes "Set the desired magic experience (min: 1 - max: 100)";
input @value;
if (@value < 1 || @value > 100)
goto L_Wrongexp;
set @mexp, @value;
callsub S_Update_Mask;
goto L_Magic;
L_Magicexp2:
mes "Set the desired magic experience (min: 100 - max: 1200)";
input @value;
if (@value < 100 || @value > 1200)
goto L_Wrongexp;
set @mexp, @value;
callsub S_Update_Mask;
goto L_Magic;
L_Changemagic:
menu
"General Magic", L_Changegeneral,
"Life Magic", L_Changelife,
"War Magic", L_Changewar,
"Transmutation Magic", L_Changetrans,
"Nature Magic", L_Changenature,
"Astral Magic", L_Changeastral,
"Back to magic menu", L_Magic,
"Close", -;
close;
L_Seemagic:
mes "Your current magic experience is " + @mexp;
mes "You level in general magic is " + @general;
mes "You level in life magic is " + @life;
mes "You level in war magic is " + @war;
mes "You level in transmutation magic is " + @trans;
mes "You level in nature magic is " + @nature;
mes "You level in astral magic is " + @astral;
next;
goto L_Magic;
L_Changegeneral:
mes "You level in general magic is " + @general + ". What do you want to do?";
menu
"Get Level one", -,
"Get Level two", L_Generallvl2,
"Back to magic menu", L_Magic;
if (@menu == 1)
setskill SKILL_MAGIC, 1;
goto L_Magic;
L_Generallvl2:
setskill SKILL_MAGIC, 2;
if (@mexp < 100)
set @mexp, 100;
callsub S_Update_Mask;
goto L_Magic;
L_Changelife:
mes "You level in life magic is " + @war + ". What do you want to do?";
menu
"Get Level one", -,
"Get Level two", L_Lifelvl2,
"Back to magic menu", L_Magic;
if (@menu == 1)
setskill SKILL_MAGIC_LIFE, 1;
goto L_Magic;
L_Lifelvl2:
setskill SKILL_MAGIC_LIFE, 2;
if (@mexp < 100)
set @mexp, 100;
callsub S_Update_Mask;
goto L_Magic;
L_Changewar:
mes "You level in war magic is " + @war + ". What do you want to do?";
menu
"Get Level one", -,
"Get Level two", L_Warlvl2,
"Back to magic menu", L_Magic;
if (@menu == 1)
setskill SKILL_MAGIC_WAR, 1;
goto L_Magic;
L_Warlvl2:
setskill SKILL_MAGIC_WAR, 2;
if (@mexp < 100)
set @mexp, 100;
callsub S_Update_Mask;
goto L_Magic;
L_Changetrans:
mes "You level in transmutation magic is " + @trans + ". What do you want to do?";
menu
"Get Level one", -,
"Get Level two", L_Translvl2,
"Back to magic menu", L_Magic;
if (@menu == 1)
setskill SKILL_MAGIC_TRANSMUTE, 1;
goto L_Magic;
L_Translvl2:
setskill SKILL_MAGIC_TRANSMUTE, 2;
if (@mexp < 100)
set @mexp, 100;
callsub S_Update_Mask;
goto L_Magic;
L_Changenature:
mes "You level in nature magic is " + @nature + ". What do you want to do?";
menu
"Get Level one", -,
"Get Level two", L_Naturelvl2,
"Back to magic menu", L_Magic;
if (@menu == 1)
setskill SKILL_MAGIC_NATURE, 1;
goto L_Magic;
L_Naturelvl2:
setskill SKILL_MAGIC_NATURE, 2;
if (@mexp < 100)
set @mexp, 100;
callsub S_Update_Mask;
close;
L_Changeastral:
mes "You level in astral magic is " + @astral + ". What do you want to do?";
menu
"Get Level one", -,
"Get Level two", L_Astrallvl2,
"Back to magic menu", L_Magic;
if (@menu == 1)
setskill SKILL_MAGIC_ASTAL, 1;
goto L_Magic;
L_Astrallvl2:
setskill SKILL_MAGIC_ASTRAL, 2;
if (@mexp < 100)
set @mexp, 100;
callsub S_Update_Mask;
goto L_Magic;
L_Status:
resetstatus;
goto L_Begin;
S_Update_Mask:
set MAGIC_EXPERIENCE,
(MAGIC_EXPERIENCE & ~(@debug_mask))
| (@mexp << @debug_shift);
return;
}
|