root/npc/custom/mvm.txt @ 1

Revision 1, 25.8 kB (checked in by jinshiro, 17 years ago)
RevLine 
[1]1//===== eAthena Script =======================================
2//= Monster vs Monster
3//===== By: ==================================================
4//= acky - god@acky.com
5//===== Current Version: =====================================
6//= 1.1.5
7//===== Compatible With: =====================================
8//= eAthena SVN
9//===== Description: =========================================
10//= Players train monsters and battle other players.
11//= Experience can be earned and monsters upgraded.
12//===== Additional Comments: =================================
13//= To add monsters, add lines after the commends labled:
14//= '// #. ---Change to Add Monsters--- //'
15//= There are 6 steps to add a monster at the moment.
16//= Added Duel Room
17//= ---------------------------------------------------------
18//= Script is messy! Be careful!
19//= 1.1.2 Changed all gmcommand to atcommand as Poki#3 suggested. [Vicious]
20//= 1.1.3 Removed Duplicate Names [Silent]
21//= 1.1.4 Fixed SummonPad syntax. [KarLaeda]
22//= 1.1.5 Some cleanup & optimization [KarLaeda]
23//============================================================
24
25// Entrance //
26prontera,158,193,6      script  Monster Arena   702,{
27mes "[Monster Arena]";
28mes "Would you like to enter the Monster Arena?";
29mes "Currently ^FF0000" + getmapusers("gon_test") + "^000000 players";
30mes "^FF0000Note:^000000 Pecos, Falcons and Carts will be lost on entry.";
31L_Menu:
32next;
33menu "Enter",-,"Information",L_Info,"Cancel",L_Exit;
34
35set @marena,1;
36savepoint "gon_test",56,99;
37set @battle,0;
38warp "gon_test",57,99;
39close;
40
41L_Exit:
42mes "[Monster Arena]";
43mes "Come back any time.";
44close;
45
46L_Info:
47mes "[Monster Arena]";
48mes "You must purchase a pet from the Monster Tamer to start fighting.";
49next;
50mes "[Monster Arena]";
51mes "Then talk to the Usher and tell him you would like to compete.";
52next;
53mes "[Monster Arena]";
54mes "Talk to the referee to summon your monster.";
55mes "Once your monster has fought, you must talk to the Usher again and choose to spectate.";
56next;
57mes "[Monster Arena]";
58mes "Talk to the Monster Trainer, he will ask you to heal your pet.";
59next;
60mes "[Monster Arena]";
61mes "To do this, click the Nurse repearedly until it says your pet is healed.";
62next;
63mes "[Monster Arena]";
64mes "The more monsters you kill, the more exp you get and the quicker you can upgrade.";
65next;
66mes "[Monster Arena]";
67mes "The stronger your monster is, the longer it will take to summon again.";
68
69goto L_Menu;
70}
71
72// Monster Summon Function //
73function        script  monstersummon   {
74// 1. ---Change to Add Monsters--- //
75if (#monster == 10) summon strcharinfo(0) + "'s Poring",1002, "OnPoringKilled";
76if (#monster == 20) summon strcharinfo(0) + "'s Fabre",1007, "OnFaberKilled";
77if (#monster == 30) summon strcharinfo(0) + "'s Lunatic",1063, "OnLunaticKilled";
78if (#monster == 31) summon strcharinfo(0) + "'s Drops",1113, "OnDropsKilled";
79if (#monster == 32) summon strcharinfo(0) + "'s Picky",1049, "OnPickyKilled";
80if (#monster == 40) summon strcharinfo(0) + "'s ChonChon",1011, "OnChonChonKilled";
81if (#monster == 41) summon strcharinfo(0) + "'s Super Picky",1050, "OnSPickyKilled";
82if (#monster == 42) summon strcharinfo(0) + "'s Willow",1010, "OnWillowKilled";
83if (#monster == 50) summon strcharinfo(0) + "'s Roda Frog",1012, "OnRodaKilled";
84if (#monster == 51) summon strcharinfo(0) + "'s Condor",1009, "OnCondorKilled";
85if (#monster == 60) summon strcharinfo(0) + "'s Thief Bug Larva",1051, "OnThiefKilled";
86if (#monster == 70) summon strcharinfo(0) + "'s Savage Babe",1167, "OnSavageKilled";
87if (#monster == 80) summon strcharinfo(0) + "'s Familiar",1005, "OnFamiliarKilled";
88if (#monster == 81) summon strcharinfo(0) + "'s Hornet",1004, "OnHornetKilled";
89if (#monster == 90) summon strcharinfo(0) + "'s Desert Wolf Puppy",1107, "OnPuppyKilled";
90if (#monster == 91) summon strcharinfo(0) + "'s Spore",1014, "OnSporeKilled";
91if (#monster == 92) summon strcharinfo(0) + "'s Rocker",1052, "OnRockerKilled";
92if (#monster == 100) summon strcharinfo(0) + "'s Skeleton",1076, "OnSkeletonKilled";
93if (#monster == 101) summon strcharinfo(0) + "'s Plankton",1161, "OnPlanktonKilled";
94if (#monster == 102) summon strcharinfo(0) + "'s Antonio",1247, "OnAntonioKilled";
95if (#monster == 103) summon strcharinfo(0) + "'s Thief Bug Female",1053, "OnThiefFemaleKilled";
96close;
97}
98
99// Referee //
100-       script  monsterreferee  61,{
101if (@fighting == 1) end;
102if (@battle == 1) goto L_Start;
103end;
104
105L_Start:
106mes "[Referee]";
107mes "Your monster is:";
108
109// 2. ---Change to Add Monsters--- //
110if (#monster == 10) mes "Poring";
111if (#monster == 20) mes "Faber";
112if (#monster == 30) mes "Lunatic";
113if (#monster == 31) mes "Drops";
114if (#monster == 32) mes "Picky";
115if (#monster == 40) mes "ChonChon";
116if (#monster == 41) mes "Super Picky";
117if (#monster == 42) mes "Willow";
118if (#monster == 50) mes "Roda Frog";
119if (#monster == 51) mes "Condor";
120if (#monster == 60) mes "Thief Bug Larva";
121if (#monster == 70) mes "Savage Babe";
122if (#monster == 80) mes "Familiar";
123if (#monster == 81) mes "Hornet";
124if (#monster == 90) mes "Desert Wolf Puppy";
125if (#monster == 91) mes "Spore";
126if (#monster == 92) mes "Rocker";
127if (#monster == 100) mes "Skeleton";
128if (#monster == 101) mes "Plankton";
129if (#monster == 102) mes "Antonio";
130if (#monster == 103) mes "Thief Bug Female";
131
132mes "Would you like to fight?";
133next;
134menu "Fight",-,"Cancel",L_Exit;
135
136set @fighting,1;
137set #heal,1;
138set @special,rand (100); // Chance of special summon
139if (@special == 1) goto Special1;
140if (@special == 2) goto Special2;
141if (@special == 3) goto Special3;
142if (@special == 4) goto Special4;
143if (@special == 5) goto Special5;
144
145callfunc "monstersummon";
146close;
147
148// Special Summons //
149Special1:
150summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
151summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
152summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
153summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
154summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
155summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
156summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
157summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
158summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
159summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
160summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
161summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
162summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
163summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
164summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
165summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
166summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
167summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
168summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
169summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
170summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
171summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
172summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
173summon strcharinfo(0) + "'s Assault Team",1002, "OnPoringKilled";
174close;
175
176Special2:
177summon strcharinfo(0) + "'s Mastering",1090, "OnSpecialKilled";
178close;
179
180Special3:
181summon strcharinfo(0) + "'s Eclipse",1093, "OnSpecialKilled";
182close;
183
184Special4:
185summon strcharinfo(0) + "'s Dragon Fly",1091, "OnSpecialKilled";
186close;
187
188Special5:
189summon strcharinfo(0) + "'s Toad",1089, "OnSpecialKilled";
190close;
191
192L_Exit:
193mes "[Referee]";
194mes "Alright";
195close;
196}
197gon_test,56,91,6        duplicate(monsterreferee)       Referee#01      61
198
199
200// Usher //
201gon_test,58,94,6        script  Usher   86,{
202set @marena,1;
203mes "[Usher]";
204mes "What would you like to do?";
205next;
206menu "^0000FFSpectate",L_Spec,"^FF0000Compete^000000",-,"Return to Town",L_Exit,"Cancel",L_Cancel;
207
208if (#monster == 0) goto L_NoMon;
209if (#heal == 1) goto L_Heal;
210
211if (#monster < 40) goto L_Low;
212if (#monster > 30 && #monster < 80) goto L_Med;
213if (#monster > 70) goto L_High;
214
215L_Low:
216menu "Level 1-3",L_1to3,"^FF0000All Levels",L_High;
217close;
218
219L_Med:
220menu "Level 4-7",L_4to6,"^FF0000All Levels",L_High;
221close;
222
223L_High:
224close2;
225savepoint "gon_test",56,99;
226set @battle,1;
227atcommand strcharinfo(0) + "@option 64 0 64";
228warp "gon_test",72,87;
229end;
230
231L_4to6:
232close2;
233savepoint "gon_test",56,99;
234set @battle,1;
235atcommand strcharinfo(0) + "@option 64 0 64";
236warp "gon_test",57,86;
237end;
238
239L_1to3:
240close2;
241savepoint "gon_test",56,99;
242set @battle,1;
243atcommand strcharinfo(0) + "@option 64 0 64";
244warp "gon_test",43,87;
245end;
246
247L_Exit:
248close2;
249savepoint "prontera",149,186;
250set @battle,0;
251atcommand strcharinfo(0) + "@option 0 0 0";
252warp "prontera",149,186;
253end;
254
255L_Spec:
256close2;
257savepoint "gon_test",56,99;
258set @battle,0;
259atcommand strcharinfo(0) + "@option 0 0 0";
260warp "gon_test",57,99;
261end;
262
263L_NoMon:
264mes "[Usher]";
265mes "You haven't got a monster, you can only spectate.";
266close;
267
268L_Heal:
269mes "[Usher]";
270mes "You have to heal your monster before you can fight again.";
271close;
272
273L_Cancel:
274close;
275}
276
277// Monster Trainer //
278gon_test,52,103,6       script  Monster Trainer 87,{
279mes "[Monster Trainer]";
280if (#monster != 0) goto L_Mon;
281
282mes "Welcome to the monster arena, would you like to start training?";
283next;
284menu "Yes",-,"No",L_Exit;
285
286mes "[Monster Trainer]";
287mes "New trainers may only start with Porings.";
288mes "They cost 1000z, Would you like to buy one?";
289next;
290menu "Yes",-,"No",L_Exit;
291
292if (zeny < 1000) goto L_NoZeny;
293set zeny,zeny-1000;
294set #monster,10;
295mes "[Monster Trainer]";
296mes "Congratulations!";
297mes "When your Poring earns enough experience, talk to me to upgrade.";
298close;
299
300L_Mon:
301mes "Welcome back, " + strcharinfo(0) + ".";
302mes "Your monster has " + #monpoints + " exp points.";
303next;
304if (@fighting == 1) goto L_Heal;
305menu "Upgrade Monster",L_Upgrade,"Sell Experience",L_Sell,"^FF0000Abandon Monster^000000",L_Abandon,"Cancel",L_Exit;
306
307L_Abandon:
308mes "[Monster Trainer]";
309mes "Are you sure you want to abandon your monster?";
310next;
311menu "Yes",-,"No",L_Exit;
312set #monster,0;
313set #monpoints,0;
314mes "[Monster Trainer]";
315mes "Monster released into the wild.";
316close;
317
318L_Sell:
319mes "[Monster Trainer]";
320mes "You can sell your monster's experience for 100z each.";
321next;
322menu "Sell",-,"Cancel",L_Exit;
323mes "[Monster Trainer]";
324mes "You have: ^FF0000" + #monpoints + "^000000 experience points";
325mes "How many would you like to sell?";
326next;
327input @sellexp;
328if (@sellexp > #monpoints) goto L_NoExp;
329set #monpoints,#monpoints-@sellexp;
330set @sellearn,100*@sellexp; // Price of exp
331set zeny,zeny+@sellearn;
332mes "[Monster Trainer]";
333mes "You earned ^0000FF" + @sellearn + "^000000z.";
334close;
335
336
337L_NoExp:
338mes "[Monster Trainer]";
339mes "You do not have enough experience.";
340next;
341goto L_Exit;
342
343// Monster Upgrades //
344L_Upgrade:
345mes "[Monster Trainer]";
346// 3. ---Change to Add Monsters - May not be required--- //
347if (#monster > 1 && #monster < 20) mes "You need 10 exp points to upgrade your monster.";
348if (#monster > 19 && #monster < 30) mes "You need 20 exp points to upgrade your monster.";
349if (#monster > 29 && #monster < 40) mes "You need 40 exp points to upgrade your monster.";
350if (#monster > 39 && #monster < 50) mes "You need 80 exp points to upgrade your monster.";
351if (#monster > 49 && #monster < 60) mes "You need 160 exp points to upgrade your monster.";
352if (#monster > 59 && #monster < 70) mes "You need 320 exp points to upgrade your monster.";
353if (#monster > 69 && #monster < 80) mes "You need 640 exp points to upgrade your monster.";
354if (#monster > 79 && #monster < 90) mes "You need 1280 exp points to upgrade your monster.";
355if (#monster > 89 && #monster < 100) mes "You need 2560 exp points to upgrade your monster.";
356next;
357menu "Continue",-,"Cancel",L_Exit;
358mes "[Monster Trainer]";
359
360// 4. ---Change to Add Monsters - May not be required--- //
361if (#monster > 1 && #monster < 20 && #monpoints > 9) goto L_Up1;
362if (#monster > 19 && #monster < 30 && #monpoints > 19) goto L_Up2;
363if (#monster > 29 && #monster < 40 && #monpoints > 39) goto L_Up3;
364if (#monster > 39 && #monster < 50 && #monpoints > 79) goto L_Up4;
365if (#monster > 49 && #monster < 60 && #monpoints > 159) goto L_Up5;
366if (#monster > 59 && #monster < 70 && #monpoints > 319) goto L_Up6;
367if (#monster > 69 && #monster < 80 && #monpoints > 639) goto L_Up7;
368if (#monster > 79 && #monster < 90 && #monpoints > 1279) goto L_Up8;
369if (#monster > 89 && #monster < 100 && #monpoints > 2559) goto L_Up9;
370
371mes "Unable to upgrade.";
372close;
373
374// 5. ---Change to Add Monsters--- //
375        L_Up1:
376        set #monster,20;
377        set #monpoints,#monpoints-10;
378        mes "Upgraded to Fabre!";
379        close;
380
381        L_Up2:
382        mes "Which monster would you like to upgrade to?";
383        next;
384        menu "Lunatic",U_Lunatic,"Drops",U_Drops,"Picky",U_Picky;
385
386                U_Drops:
387                set #monster,31;
388                set #monpoints,#monpoints-20;
389                mes "[Monster Trainer]";
390                mes "Upgraded to Drops!";
391                close;
392
393                U_Picky:
394                set #monster,32;
395                set #monpoints,#monpoints-20;
396                mes "[Monster Trainer]";
397                mes "Upgraded to Picky!";
398                close;
399
400                U_Lunatic:
401                set #monster,30;
402                set #monpoints,#monpoints-20;
403                mes "[Monster Trainer]";
404                mes "Upgraded to Lunatic!";
405                close;
406
407        L_Up3:
408        mes "Which monster would you like to upgrade to?";
409        next;
410        menu "ChonChon",U_ChonChon,"Super Picky",U_SPicky,"Willow",U_Willow;
411
412                U_ChonChon:
413                set #monster,40;
414                set #monpoints,#monpoints-40;
415                mes "[Monster Trainer]";
416                mes "Upgraded to ChonChon!";
417                close;
418
419                U_SPicky:
420                set #monster,41;
421                set #monpoints,#monpoints-40;
422                mes "[Monster Trainer]";
423                mes "Upgraded to Super Picky!";
424                close;
425
426                U_Willow:
427                set #monster,42;
428                set #monpoints,#monpoints-40;
429                mes "[Monster Trainer]";
430                mes "Upgraded to Willow!";
431                close;
432
433        L_Up4:
434        mes "Which monster would you like to upgrade to?";
435        next;
436        menu "Condor",U_Condor,"Roda Frog",U_Roda;
437
438                U_Condor:
439                set #monster,51;
440                set #monpoints,#monpoints-80;
441                mes "[Monster Trainer]";
442                mes "Upgraded to Condor!";
443                close;
444
445                U_Roda:
446                set #monster,50;
447                set #monpoints,#monpoints-80;
448                mes "[Monster Trainer]";
449                mes "Upgraded to Roda Frog!";
450                close;
451
452        L_Up5:
453        set #monster,60;
454        set #monpoints,#monpoints-160;
455        mes "Upgraded to Thief Bug Larva!";
456        close;
457
458        L_Up6:
459        set #monster,70;
460        set #monpoints,#monpoints-320;
461        mes "Upgraded to Savage Babe!";
462        close;
463
464        L_Up7:
465        mes "Which monster would you like to upgrade to?";
466        next;
467        menu "Familiar",U_Familiar,"Hornet",U_Hornet;
468
469                U_Hornet:
470                set #monster,81;
471                set #monpoints,#monpoints-640;
472                mes "[Monster Trainer]";
473                mes "Upgraded to Hornet!";
474                close;
475
476                U_Familiar:
477                set #monster,80;
478                set #monpoints,#monpoints-640;
479                mes "[Monster Trainer]";
480                mes "Upgraded to Familiar!";
481                close;
482
483        L_Up8:
484        mes "[Monster Trainer]";
485        mes "Which monster would you like to upgrade to?";
486        next;
487        menu "Desert Wolf Puppy",U_Puppy,"Spore",U_Spore,"Rocker",U_Rocker;
488
489                U_Spore:
490                set #monster,91;
491                set #monpoints,#monpoints-1280;
492                mes "[Monster Trainer]";
493                mes "Upgraded to Spore!";
494                close;
495
496                U_Rocker:
497                set #monster,92;
498                set #monpoints,#monpoints-1280;
499                mes "[Monster Trainer]";
500                mes "Upgraded to Rocker!";
501                close;
502
503                U_Puppy:
504                set #monster,90;
505                set #monpoints,#monpoints-1280;
506                mes "[Monster Trainer]";
507                mes "Upgraded to Desert Wolf Puppy!";
508                close;
509
510        L_Up9:
511        mes "Which monster would you like to upgrade to?";
512        next;
513        menu "Skeleton",U_Skeleton,"Antonio",U_Antonio,"Plankton",U_Plankton,"Thief Bug Female",U_ThiefFemale;
514
515                U_Plankton:
516                set #monster,101;
517                set #monpoints,#monpoints-2560;
518                mes "[Monster Trainer]";
519                mes "Upgraded to Plankton!";
520                close;
521
522                U_Antonio:
523                set #monster,102;
524                set #monpoints,#monpoints-2560;
525                mes "[Monster Trainer]";
526                mes "Upgraded to Antonio!";
527                close;
528
529                U_ThiefFemale:
530                set #monster,103;
531                set #monpoints,#monpoints-2560;
532                mes "[Monster Trainer]";
533                mes "Upgraded to Thief Bug Female!";
534                close;
535
536                U_Skeleton:
537                set #monster,100;
538                set #monpoints,#monpoints-2560;
539                mes "[Monster Trainer]";
540                mes "Upgraded to Skeleton!";
541                close;
542
543L_NoZeny:
544mes "[Monster Trainer]";
545mes "You don't have enough zeny!";
546close;
547
548L_Exit:
549mes "[Monster Trainer]";
550mes "Goodbye.";
551close;
552
553L_Heal:
554mes "[Monster Trainer]";
555mes "Your monster needs to heal.";
556mes "It will heal faster if you click the nurse faster.";
557set #heal,1;
558close;
559}
560
561// Kill Trigger //
562// 6/Final. ---Change to Add Monsters--- //
563gon_test,56,91,6        script  OnPoringKilled  -1,{
564        if (@marena == 0) callfunc "illegalkill";
565        set #monpoints,#monpoints+1;
566        announce "You killed a Poring - Gained 1 exp",19;
567        callfunc "duelkill";
568}
569
570gon_test,56,91,6        script  OnFaberKilled   -1,{
571        if (@marena == 0) callfunc "illegalkill";
572        set #monpoints,#monpoints+2;
573        announce "You killed a Faber - Gained 2 exp",19;
574        callfunc "duelkill";
575}
576
577gon_test,56,91,6        script  OnLunaticKilled -1,{
578        if (@marena == 0) callfunc "illegalkill";
579        set #monpoints,#monpoints+4;
580        announce "You killed a Lunatic - Gained 4 exp",19;
581        callfunc "duelkill";
582}
583
584gon_test,56,91,6        script  OnDropsKilled   -1,{
585        if (@marena == 0) callfunc "illegalkill";
586        set #monpoints,#monpoints+4;
587        announce "You killed a Drops - Gained 4 exp",19;
588        callfunc "duelkill";
589}
590
591gon_test,56,91,6        script  OnPickyKilled   -1,{
592        if (@marena == 0) callfunc "illegalkill";
593        set #monpoints,#monpoints+4;
594        announce "You killed a Picky - Gained 4 exp",19;
595        callfunc "duelkill";
596}
597
598gon_test,56,91,6        script  OnChonChonKilled        -1,{
599        if (@marena == 0) callfunc "illegalkill";
600        set #monpoints,#monpoints+8;
601        announce "You killed a ChonChon - Gained 8 exp",19;
602        callfunc "duelkill";
603}
604
605gon_test,56,91,6        script  OnSPickyKilled  -1,{
606        if (@marena == 0) callfunc "illegalkill";
607        set #monpoints,#monpoints+8;
608        announce "You killed a Super Picky - Gained 8 exp",19;
609        callfunc "duelkill";
610}
611
612gon_test,56,91,6        script  OnWillowKilled  -1,{
613        if (@marena == 0) callfunc "illegalkill";
614        set #monpoints,#monpoints+8;
615        announce "You killed a Willow - Gained 8 exp",19;
616        callfunc "duelkill";
617}
618
619gon_test,56,91,6        script  OnRodaKilled    -1,{
620        if (@marena == 0) callfunc "illegalkill";
621        set #monpoints,#monpoints+16;
622        announce "You killed a Roda Frog - Gained 16 exp",19;
623        callfunc "duelkill";
624}
625
626gon_test,56,91,6        script  OnCondorKilled  -1,{
627        if (@marena == 0) callfunc "illegalkill";
628        set #monpoints,#monpoints+16;
629        announce "You killed a Condor - Gained 16 exp",19;
630        callfunc "duelkill";
631}
632
633gon_test,56,91,6        script  OnThiefKilled   -1,{
634        if (@marena == 0) callfunc "illegalkill";
635        set #monpoints,#monpoints+32;
636        announce "You killed a Theif Bug Larva - Gained 32 exp",19;
637        callfunc "duelkill";
638}
639
640gon_test,56,91,6        script  OnSavageKilled  -1,{
641        if (@marena == 0) callfunc "illegalkill";
642        set #monpoints,#monpoints+64;
643        announce "You killed a Savage Babe - Gained 64 exp",19;
644        callfunc "duelkill";
645}
646
647gon_test,56,91,6        script  OnFamiliarKilled        -1,{
648        if (@marena == 0) callfunc "illegalkill";
649        set #monpoints,#monpoints+128;
650        announce "You killed a Familiar - Gained 128 exp",19;
651        callfunc "duelkill";
652}
653
654gon_test,56,91,6        script  OnHornetKilled  -1,{
655        if (@marena == 0) callfunc "illegalkill";
656        set #monpoints,#monpoints+128;
657        announce "You killed a Hornet - Gained 128 exp",19;
658        callfunc "duelkill";
659}
660
661gon_test,56,91,6        script  OnPuppyKilled   -1,{
662        if (@marena == 0) callfunc "illegalkill";
663        set #monpoints,#monpoints+256;
664        announce "You killed a Desert Wolf Puppy - Gained 256 exp",19;
665        callfunc "duelkill";
666}
667
668gon_test,56,91,6        script  OnRockerKilled  -1,{
669        if (@marena == 0) callfunc "illegalkill";
670        set #monpoints,#monpoints+256;
671        announce "You killed a Rocker - Gained 256 exp",19;
672        callfunc "duelkill";
673}
674
675gon_test,56,91,6        script  OnSporeKilled   -1,{
676        if (@marena == 0) callfunc "illegalkill";
677        set #monpoints,#monpoints+256;
678        announce "You killed a Spore - Gained 256 exp",19;
679        callfunc "duelkill";
680}
681
682gon_test,56,91,6        script  OnSkeletonKilled        -1,{
683        if (@marena == 0) callfunc "illegalkill";
684        set #monpoints,#monpoints+512;
685        announce "You killed a Skeleton - Gained 512 exp",19;
686        callfunc "duelkill";
687}
688
689gon_test,56,91,6        script  OnPlanktonKilled        -1,{
690        if (@marena == 0) callfunc "illegalkill";
691        set #monpoints,#monpoints+512;
692        announce "You killed a Plankton - Gained 512 exp",19;
693        callfunc "duelkill";
694}
695
696gon_test,56,91,6        script  OnAntonioKilled -1,{
697        if (@marena == 0) callfunc "illegalkill";
698        set #monpoints,#monpoints+512;
699        announce "You killed an Antonio - Gained 512 exp",19;
700        callfunc "duelkill";
701}
702
703gon_test,56,91,6        script  OnThiefFemaleKilled     -1,{
704        if (@marena == 0) callfunc "illegalkill";
705        set #monpoints,#monpoints+512;
706        announce "You killed a Thief Bug Female - Gained 512 exp",19;
707        callfunc "duelkill";
708}
709
710gon_test,56,91,6        script  OnSpecialKilled -1,{
711        if (@marena == 0) callfunc "illegalkill";
712        set #monpoints,#monpoints+512;
713        announce "You killed a Special Monster - Gained 1024 exp",19;
714        callfunc "duelkill";
715}
716
717function        script  duelkill        {
718if (strcharinfo(0) == $@duelist1$ || strcharinfo(0) == $@duelist2$) goto L_Heal;
719end;
720        L_Heal:
721        announce strcharinfo(0) + " won the Duel",1;
722        set @fighting,0;
723        set #heal,0;
724        set @healing,0;
725        end;
726}
727
728function        script  illegalkill     {
729announce "Illegal Kill by " + strcharinfo(0) + " Detected",1;
730percentheal -100,-100;
731end;
732}
733
734// Healer //
735gon_test,55,103,6       script  Nurse   90,{
736if (@battle == 1 || #heal == 0) goto L_NoHeal;
737if (#heal == 1 && @healing < 100) goto L_Heal; //Total healing required
738set @fighting,0;
739set #heal,0;
740set @healing,0;
741specialeffect2 364;
742announce "Your monster has healed.",19;
743end;
744
745        L_Heal:
746        set @healrate,140 / #monster; //Rate of heal per click
747        set @healing,@healing + @healrate;
748        end;
749
750        L_NoHeal:
751        announce "Your monster does not need healing yet.",19;
752        end;
753}
754
755// Warps players //
756gon_test,57,86,5        script  Summon Pad 1::SummonPad 111,2,2,{
757end;
758OnTouch:
759set @marena,1;
760warp "gon_test",57,99;
761}
762gon_test,43,87,5        duplicate(SummonPad)    Summon Pad 2    111,2,2
763gon_test,72,87,5        duplicate(SummonPad)    Summon Pad 3    111,2,2
764
765
766
767// Skill Disabler //
768gon_test,57,99,5        script  Skill Disable   111,3,3,{
769atcommand strcharinfo(0) + "@skilloff";
770disablenpc "Skill Disable";
771end;
772}
773
774// Duel Arena //
775gon_test,58,103,5       script  Duel Master#01  92,{
776if ($@duelist1$ == "") set @duel,0;
777if ($@monster1 == "") set @duel,0;
778set @marena,1;
779if (#monster == 0) goto L_NoMon;
780mes "[Duel Master]";
781if ($@duel == 1) goto L_Waiting;
782if ($@duel == 2) goto L_Dueling;
783
784mes "There are currently no players dueling.";
785next;
786menu "Join",-,"Spectate",L_Spec,"Cancel",L_Exit;
787
788// Player 1 Enters Duel Area //
789if (#heal == 1) goto L_NeedHeal;
790if ($@duel == 1) goto L_Duel2;
791set $@duel,1;
792if (#monster > 1 && #monster < 20) set $@monster1,1;
793if (#monster > 19 && #monster < 30) set $@monster1,2;
794if (#monster > 29 && #monster < 40) set $@monster1,3;
795if (#monster > 39 && #monster < 50) set $@monster1,4;
796if (#monster > 49 && #monster < 60) set $@monster1,5;
797if (#monster > 59 && #monster < 70) set $@monster1,6;
798if (#monster > 69 && #monster < 80) set $@monster1,7;
799if (#monster > 79 && #monster < 90) set $@monster1,8;
800if (#monster > 89 && #monster < 100) set $@monster1,9;
801if (#monster > 99 && #monster < 110) set $@monster1,10;
802set $@duelist1$,strcharinfo(0);
803set @battle,1;
804announce strcharinfo(0) + " [Monster Level: " + $@monster1 + "] is waiting for a duel",1;
805atcommand strcharinfo(0) + "@option 64 0 64";
806warp "gon_test",49,5;
807close;
808
809L_Waiting:
810mes "^0000FF " + $@duelist1$ + "^000000 [Monster Level: ^FF0000" + $@monster1 + "^000000]";
811mes "Is waiting for an opponent";
812next;
813menu "Join",-,"Spectate",L_Spec,"Cancel",L_Exit;
814
815// Player 2 Enters Duel Area //
816if (#heal == 1) goto L_NeedHeal;
817L_Duel2:
818if ($@duel == 2) goto L_Spec;
819set $@duel,2;
820if (#monster > 1 && #monster < 20) set $@monster2,1;
821if (#monster > 19 && #monster < 30) set $@monster2,2;
822if (#monster > 29 && #monster < 40) set $@monster2,3;
823if (#monster > 39 && #monster < 50) set $@monster2,4;
824if (#monster > 49 && #monster < 60) set $@monster2,5;
825if (#monster > 59 && #monster < 70) set $@monster2,6;
826if (#monster > 69 && #monster < 80) set $@monster2,7;
827if (#monster > 79 && #monster < 90) set $@monster2,8;
828if (#monster > 89 && #monster < 100) set $@monster2,9;
829if (#monster > 99 && #monster < 110) set $@monster2,10;
830set $@duelist2$,strcharinfo(0);
831set @battle,1;
832announce strcharinfo(0) + " [Monster Level: " + $@monster2 + "] has joined the duel",1;
833atcommand strcharinfo(0) + "@option 64 0 64";
834warp "gon_test",49,5;
835close;
836
837        L_Dueling:
838        mes "^0000FF" + $@duelist1$ + "^000000 [Monster Level: ^0000FF" + $@monster1 + "^000000]";
839        mes "           VS.";
840        mes "^FF0000" + $@duelist2$ + "^000000 [Monster Level: ^FF0000" + $@monster2 + "^000000]";
841        next;
842        menu "Spectate",L_Spec,"Cancel",L_Exit;
843
844        L_Spec:
845        set @battle,0;
846        atcommand strcharinfo(0) + "@option 64 0 64";
847        warp "gon_test",49,5;
848        close;
849
850        L_Exit:
851        mes "[Duel Master]";
852        mes "Goodbye.";
853        close;
854
855        L_NoMon:
856        mes "[Duel Master]";
857        mes "You haven't got a monster, you can't participate.";
858        close;
859
860        L_NeedHeal:
861        mes "[Duel Master]";
862        mes "You need to heal before you can join.";
863        close;
864}
865
866// Duel Exit //
867gon_test,42,8,5 script  Duel Master#02  92,{
868mes "[Duel Master]";
869mes "Would you like to return?";
870menu "Yes",L_Leave,"No",-;
871mes "Alright";
872close;
873
874        L_Leave:
875        if ($@duelist1$ == strcharinfo(0)) goto L_Leave1;
876        if ($@duelist2$ == strcharinfo(0)) goto L_Leave2;
877
878                L_Leave3:
879                atcommand strcharinfo(0) + "@option 0 0 0";
880                set @battle,0;
881                warp "gon_test",57,99;
882                close;
883
884                L_Leave1:
885                set $@duelist1$,$@duelist2$;
886                set $@monster1,$@monster2;
887                set $@duel,$@duel-1;
888                announce strcharinfo(0) + " stopped dueling",1;
889                goto L_Leave3;
890
891                L_Leave2:
892                set $@duelist2$,"";
893                set $@monster2,0;
894                set $@duel,$@duel-1;
895                announce strcharinfo(0) + " stopped dueling",1;
896                goto L_Leave3;
897}
898
899gon_test,49,5,5 duplicate(SummonPad)    Summon Pad 4    111,2,2
900gon_test,55,8,6 duplicate(monsterreferee)       Referee#02      61
Note: See TracBrowser for help on using the browser.