diff options
author | Kisuka <Kisuka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-04-05 06:00:20 +0000 |
---|---|---|
committer | Kisuka <Kisuka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-04-05 06:00:20 +0000 |
commit | d841fc529949f361e915b73a073d1fa9d4ec60f7 (patch) | |
tree | 6a9a34b176f00c6178700a46c01d1c752821d40e | |
parent | 1bea10f578d4e8119659a0373c0a9213fdaab4d4 (diff) | |
download | hercules-d841fc529949f361e915b73a073d1fa9d4ec60f7.tar.gz hercules-d841fc529949f361e915b73a073d1fa9d4ec60f7.tar.bz2 hercules-d841fc529949f361e915b73a073d1fa9d4ec60f7.tar.xz hercules-d841fc529949f361e915b73a073d1fa9d4ec60f7.zip |
- Completed L0ne's 2007 request for 'waitingroom' to support required zeny and level.
- Updated NPC files which required the waitingroom update.
- Added Poring War script.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14765 54d463be-8e91-2dee-dedb-b68131a5f0ec
27 files changed, 1906 insertions, 91 deletions
diff --git a/conf/mapflag/nobranch.txt b/conf/mapflag/nobranch.txt index 3e91263da..0684fbe74 100644 --- a/conf/mapflag/nobranch.txt +++ b/conf/mapflag/nobranch.txt @@ -335,4 +335,8 @@ jupe_core2 mapflag nobranch brasilis mapflag nobranch bra_in01 mapflag nobranch -//evt_zombie mapflag nobranch
\ No newline at end of file +//evt_zombie mapflag nobranch + +// Poring War ================== +poring_w01 mapflag nobranch +poring_w02 mapflag nobranch
\ No newline at end of file diff --git a/conf/mapflag/noicewall.txt b/conf/mapflag/noicewall.txt index 13af8e2f4..ae64cc3c0 100644 --- a/conf/mapflag/noicewall.txt +++ b/conf/mapflag/noicewall.txt @@ -141,3 +141,7 @@ nguild_prt mapflag noicewall 4@tower mapflag noicewall 5@tower mapflag noicewall 6@tower mapflag noicewall + +// Poring War ==================== +poring_w01 mapflag noicewall +poring_w02 mapflag noicewall diff --git a/conf/mapflag/nomemo.txt b/conf/mapflag/nomemo.txt index 6e57620c9..e7aea26b6 100644 --- a/conf/mapflag/nomemo.txt +++ b/conf/mapflag/nomemo.txt @@ -681,3 +681,7 @@ spl_in01 mapflag nomemo 2@nyd mapflag nomemo //evt_zombie mapflag nomemo + +// Poring War ==================== +poring_w01 mapflag nomemo +poring_w02 mapflag nomemo
\ No newline at end of file diff --git a/conf/mapflag/nopenalty.txt b/conf/mapflag/nopenalty.txt index 0d22861aa..3c7d781a4 100644 --- a/conf/mapflag/nopenalty.txt +++ b/conf/mapflag/nopenalty.txt @@ -251,3 +251,6 @@ bat_a01 mapflag nopenalty bat_a02 mapflag nopenalty //evt_zombie mapflag nopenalty + +// Poring War ================== +poring_w02 mapflag nopenalty
\ No newline at end of file diff --git a/conf/mapflag/nosave.txt b/conf/mapflag/nosave.txt index 7c254eee2..5296b049a 100644 --- a/conf/mapflag/nosave.txt +++ b/conf/mapflag/nosave.txt @@ -269,3 +269,7 @@ arug_dun01 mapflag nosave SavePoint schg_dun01 mapflag nosave SavePoint //evt_zombie mapflag nosave SavePoint + +// Poring War ==================== +poring_w01 mapflag nosave SavePoint +poring_w02 mapflag nosave SavePoint
\ No newline at end of file diff --git a/conf/mapflag/noteleport.txt b/conf/mapflag/noteleport.txt index 10672aea9..15bd644f0 100644 --- a/conf/mapflag/noteleport.txt +++ b/conf/mapflag/noteleport.txt @@ -391,3 +391,8 @@ nyd_dun02 mapflag noteleport 2@nyd mapflag monster_noteleport //evt_zombie mapflag noteleport + +// Poring War ==================== +poring_w01 mapflag noteleport +poring_w02 mapflag noteleport +poring_w02 mapflag monster_noteleport
\ No newline at end of file diff --git a/conf/mapflag/nowarp.txt b/conf/mapflag/nowarp.txt index 63c9aaaae..853dcf586 100644 --- a/conf/mapflag/nowarp.txt +++ b/conf/mapflag/nowarp.txt @@ -65,3 +65,7 @@ bat_b01 mapflag nowarp bat_b02 mapflag nowarp bat_a01 mapflag nowarp bat_a02 mapflag nowarp + +// Poring War ================== +poring_w01 mapflag nowarp +poring_w02 mapflag nowarp
\ No newline at end of file diff --git a/conf/mapflag/nowarpto.txt b/conf/mapflag/nowarpto.txt index ca81f6d35..3fc30624b 100644 --- a/conf/mapflag/nowarpto.txt +++ b/conf/mapflag/nowarpto.txt @@ -139,3 +139,7 @@ spl_in01 mapflag nowarpto // Nidhoggr's Instance =========== 1@nyd mapflag nowarpto 2@nyd mapflag nowarpto + +// Poring War ==================== +poring_w01 mapflag nowarpto +poring_w02 mapflag nowarpto
\ No newline at end of file diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 2c8662cca..978e48183 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -166,6 +166,8 @@ //= Added 'bg_getareausers' and 'bg_get_data' commands. [Ai4rei] //= Updated description of 'waitingroom2bg_single' command. //= Documented optional parameter 'npc name' of 'waitingroom2bg' command. +//= 3.40.20110404 +//= Updated description of 'waitingroom' command to include required zeny/lvl. [Kisuka] //========================================================= This document is a reference manual for all the scripting commands and functions @@ -5708,7 +5710,7 @@ The function returns 0 if the shop was not found, 1 otherwise. --------------------------------------- -*waitingroom "<chatroom name>",<limit>{,<event label>,<trigger>}; +*waitingroom "<chatroom name>",<limit>{,<event label>,<trigger>,<required zeny>,<min lvl>,<max lvl>}; This command will create a chat room, owned by the NPC object running this script and displayed above the NPC sprite. @@ -5719,9 +5721,6 @@ optional event and trigger parameters are given, the event label ("<NPC object name>::<label name>") will be invoked as if with a 'doevent' upon the number of people in the chat room reaching the given triggering amount. -It's funny, but for compatibility with jAthena, you can swap the event label and -the trigger parameters, and it will still work. - // The NPC will just show a box above its head that says "Hello World", clicking // it will do nothing, since the limit is zero. waitingroom "Hello World",0; @@ -5733,6 +5732,14 @@ the trigger parameters, and it will still work. waitingroom "Disco - Waiting Room",8,"Bouncer::OnStart",8; +// The NPC will have a box above its head, it will say "Party - Waiting Room" +// and will have 8 waiting slots. Clicking this will allow a player who has +// 5000 zeny and lvl 50~99 to enter the chat room, where the player will be +// able to wait until 8 people accumulate. Once this happens, it will cause +// the NPC "Bouncer" run the label "OnStart" + + waitingroom "Party - Waiting Room",5,"Bouncer::OnStart",8,5000,50,99; + Creating a waiting room does not stop the execution of the script and it will continue to the next line. diff --git a/npc/battleground/flavius/flavius01.txt b/npc/battleground/flavius/flavius01.txt index 33a8e7997..8825db8b3 100644 --- a/npc/battleground/flavius/flavius01.txt +++ b/npc/battleground/flavius/flavius01.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.1 +//= 1.2 //===== Compatible With: ===================================== //= eAthena 1.0 //===== Description: ========================================= @@ -14,6 +14,7 @@ //===== Additional Comments: ================================= //= 1.0 First Version. //= 1.1 Fixed pink crystal spawning as blue. [L0ne_W0lf] +//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ // Waiting Room NPCs @@ -21,7 +22,7 @@ bat_room,86,227,4 script Lieutenant Ator 418,{ end; OnInit: - waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1; + waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80,99; end; OnEnterBG: set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit",""); @@ -31,7 +32,7 @@ OnEnterBG: bat_room,85,204,0 script Lieutenant Thelokus 414,{ end; OnInit: - waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1; + waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80,99; end; OnEnterBG: set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit",""); diff --git a/npc/battleground/flavius/flavius02.txt b/npc/battleground/flavius/flavius02.txt index 0fa8cc9b9..e31223226 100644 --- a/npc/battleground/flavius/flavius02.txt +++ b/npc/battleground/flavius/flavius02.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.2 +//= 1.3 //===== Compatible With: ===================================== //= eAthena 1.0 //===== Description: ========================================= @@ -15,6 +15,7 @@ //= 1.0 First Version. //= 1.1 Fixed NPCs being called for waiting rooms. (bugreport:4395) //= 1.2 Fixed pink crystal spawning as blue. [L0ne_W0lf] +//= 1.3 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ // Waiting Room NPCs @@ -22,7 +23,7 @@ bat_room,142,227,4 script Lieutenant Huvas 418,{ end; OnInit: - waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1; + waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80,99; end; OnEnterBG: set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit",""); @@ -32,7 +33,7 @@ OnEnterBG: bat_room,142,204,0 script Lieutenant Yukon 414,{ end; OnInit: - waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1; + waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80,99; end; OnEnterBG: set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit",""); diff --git a/npc/battleground/tierra/tierra01.txt b/npc/battleground/tierra/tierra01.txt index 5c911605d..9037c4eee 100644 --- a/npc/battleground/tierra/tierra01.txt +++ b/npc/battleground/tierra/tierra01.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.1 +//= 1.2 //===== Compatible With: ===================================== //= eAthena 1.0 //===== Description: ========================================= @@ -14,6 +14,7 @@ //===== Additional Comments: ================================= //= 1.0 First Version. //= 1.1 Corrected setwalls for barricades. [L0ne_W0lf] +//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ // Waiting Room NPCs @@ -22,7 +23,7 @@ bat_room,57,227,5 script Lieutenant Kalos 418,{ end; OnInit: - waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1; + waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80,99; end; OnEnterBG: @@ -34,7 +35,7 @@ bat_room,58,204,1 script Lieutenant Eyor 414,{ end; OnInit: - waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1; + waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80,99; end; OnEnterBG: diff --git a/npc/battleground/tierra/tierra02.txt b/npc/battleground/tierra/tierra02.txt index 0fb3c631e..b498cab6e 100644 --- a/npc/battleground/tierra/tierra02.txt +++ b/npc/battleground/tierra/tierra02.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.0 +//= 1.1 //===== Compatible With: ===================================== //= eAthena 1.0 //===== Description: ========================================= @@ -13,6 +13,7 @@ //= - Losing Team: 1 badge //===== Additional Comments: ================================= //= 1.0 First Version. +//= 1.1 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ // Waiting Room NPCs @@ -21,7 +22,7 @@ bat_room,114,227,5 script Lieutenant Rundel 418,{ end; OnInit: - waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1; + waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80,99; end; OnEnterBG: @@ -33,7 +34,7 @@ bat_room,114,204,1 script Lieutenant Guerrit 414,{ end; OnInit: - waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1; + waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80,99; end; OnEnterBG: diff --git a/npc/other/arena/arena_aco.txt b/npc/other/arena/arena_aco.txt index 4a81bd6b3..588143d32 100644 --- a/npc/other/arena/arena_aco.txt +++ b/npc/other/arena/arena_aco.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.1 +//= 1.2 //===== Compatible With: ===================================== //= Any Athena Version //===== Description: ========================================= @@ -11,6 +11,7 @@ //===== Additional Comments: ================================= //= 1.0 First version. //= 1.1 Corrected variable typos. (bugreport:4374) [L0ne_w0lf] +//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ arena_room,114,102,0 script onlyaco#arena 45,1,1,{ @@ -31,10 +32,7 @@ arena_room,136,138,3 script Acolyte Waiting Room 124,{ end; OnInit: - //setarenaeventsize 1 - waitingroom "Personal Force, Acolyte Class",50,"Acolyte Waiting Room::OnStartArena",1; - //SetReqLevel 10 99 - //SetFeeZeny 1000 + waitingroom "Personal Force, Acolyte Class",50,"Acolyte Waiting Room::OnStartArena",1,1000,10,99; enablewaitingroomevent; end; diff --git a/npc/other/hugel_bingo.txt b/npc/other/hugel_bingo.txt index 0f824b48f..4ab5c923a 100644 --- a/npc/other/hugel_bingo.txt +++ b/npc/other/hugel_bingo.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= SinSloth //===== Current Version: ===================================== -//= 1.7 +//= 1.8 //===== Compatible With: ===================================== //= Any eAthena Version //===== Description: ========================================= @@ -18,6 +18,7 @@ //= 1.5 - Applied a fix to players locations which were not rotating properly. [SinSloth] //= 1.6 - Removed nescesity to win to proceed with quest [Yommy] //= 1.7 - Replaced effect numerics with constants. [Samuray22] +//= 1.8 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ que_bingo,48,84,5 script Bingo Waiting Room 124,{ @@ -26,7 +27,7 @@ que_bingo,48,84,5 script Bingo Waiting Room 124,{ OnInit: set $hu_bingoa,0; set $hu_bingob,0; - waitingroom "Bingo Waiting Room - 5 People",50,"Bingo Waiting Room::OnWarp",5; + waitingroom "Bingo Waiting Room - 5 People",50,"Bingo Waiting Room::OnWarp",5,1000; end; OnWarp: diff --git a/npc/other/poring_war.txt b/npc/other/poring_war.txt new file mode 100644 index 000000000..54c5fcf7e --- /dev/null +++ b/npc/other/poring_war.txt @@ -0,0 +1,1767 @@ +//===== eAthena Script ======================================= +//= Poring War +//===== By: ================================================== +//= Kisuka +//===== Current Version: ===================================== +//= 1.0 +//===== Compatible With: ===================================== +//= eAthena SVN +//===== Description: ========================================= +//= [Aegis Conversion] +//= Poring War +//===== Additional Comments: ================================= +//= 1.0 First version. [Kisuka] +//============================================================ + +// Poring War Recruiter +//============================================================ +prt_fild08,159,371,3 script Poring War Recruiter#wop 909,{ + mes "[Poring]"; + mes "!!!!!"; + mes "Whoa-! Humans, ring~!!"; + mes "Gotta hide, hide, right~!"; + mes "They're tempting us with Jellopy! Don't be fooled!"; + next; + mes "[Poring]"; + mes "Hwak!!"; + mes "Ring, Ring~ What's wrong with you people..?"; + mes "Hey.. Hey, there. Hu.. Humans..."; + mes "Poring.."; + next; + mes "[Poring]"; + mes "I.. I've got some interesting work for ya.. Would you be interested?"; + mes "We.. we porings need lots and lots of brave human worriers, ring~."; + next; + switch(select("Alright, I'm with you!:What's that?:Ignore")) { + case 1: + if (Zeny > 499) { + mes "[Poring]"; + mes "Oh, and there's an entrance fee of 500 zeny, ring."; + mes "Have a good time, ring."; + delitem 7773,countitem(7773); + set Zeny,Zeny-500; + close2; + warp "poring_w01",112,138; + end; + }else{ + mes "[Poring]"; + mes "Oh, and there's an entrance fee of 500 zeny, ring."; + mes "..........."; + mes "Hey, that's life, ring. We need zeny too you know~!"; + close; + } + case 2: + mes "[Poring]"; + mes "That's.. because there's been a.. slight confliction in our.. Ring Society.."; + mes "So we've got to.............have a battle to settle this problem.."; + mes "You'll see when you get there!"; + close; + case 3: + mes "[Poring]"; + mes "Huhhhh! Hu.. Humans are so cold and cruel!!!"; + close; + } +} + +// Poring Vending Machine +//============================================================ +poring_w01,100,97,3 script Poring Vending Machine#w 909,{ + if (checkweight(714,3) == 0) { + mes "- Your are carrying too much items in order to use the Vending Machine. -"; + close; + } + mes "It's a vending machine. You can use Poring Coints to purchase."; + next; + if(select("Purchase.:Read the descriptions of goods.") == 1) { + mes "You need Poring Coins to purchase items."; + mes "You cannot use any zeny."; + mes "Item name - Price Poring Coin(P.Co)"; + next; + switch(select("Marvelous Medal - 4 P.Co:Union of Tribe - 20 P.Co:Poring Box - 30 P.Co:Next")) { + case 1: + callsub S_PoringVending,7515,4; + case 2: + callsub S_PoringVending,658,20; + case 3: + callsub S_PoringVending,12109,30; + case 4: + mes "This is a special item."; + mes "Item name - Poring Coin(P.Co)"; + next; + switch(select("Wild Rose - 15 P.Co:Doppelganger - 20 P.Co:Egnigem Cenia - 20 P.Co:Collection Item")) { + case 1: + callsub S_PoringVending,12300,15; + case 2: + callsub S_PoringVending,12301,20; + case 3: + callsub S_PoringVending,12302,20; + case 4: + mes "Figures of 1st Job Class Characters including Novice are finally on sale!"; + mes "Figures except for Novice are all ^4d4dffCharacter bound items^000000."; + mes "Please be aware before you make a purchase~"; + mes "Item name - Poring Coin(P.Co)"; + next; + switch(select("Novice Figure - 50 P.Co:Swordman Figure - 100 P.Co:Thief Figure - 100 P.Co:Merchant Figure - 100 P.Co:Acolyte Figure - 100 P.Co:Mage Figure - 100 P.Co:Archer Figure - 100 P.Co:Random Draw - 50 P.Co:Cancel")) { + case 1: + callsub S_PoringVending,2765,50; + case 2: + callsub S_PoringVending,2766,100; + case 3: + callsub S_PoringVending,2770,100; + case 4: + callsub S_PoringVending,2771,100; + case 5: + callsub S_PoringVending,2767,100; + case 6: + callsub S_PoringVending,2768,100; + case 7: + callsub S_PoringVending,2769,100; + case 8: + mes "You have chosen Random Draw."; + mes "1 of 7 diffeent kinds of figures will be selected."; + next; + if(select("Draw:Cancel") == 1) { + if(countitem(7539) >= 50) { + mes "Insert the Poring coin and pull the lever."; + mes "Click~ The item came out of the mouth of the Poring with a rumbling sound."; + mes "What could it be?"; + next; + switch(rand(1,17)) { + case 5: set .@Random_Figure,2766; break; // Swordman_Figure + case 6: set .@Random_Figure,2767; break; // Acolyte_Figure + case 8: set .@Random_Figure,2770; break; // Thief_Figure + case 11: set .@Random_Figure,2771; break; // Merchant_Figure + case 13: set .@Random_Figure,2769; break; // Archer_Figure + case 14: set .@Random_Figure,2768; break; // Mage_Figure + default: set .@Random_Figure,2765; break; // Novice_Figure + } + mes "A nice " + getitemname(.@Random_Figure) + "."; + delitem 7539,50; // Poring_Coin + getitem .@Random_Figure,1; + close; + }else{ + mes "Not enough coins."; + close; + } + } + mes "["+strcharinfo(0)+"]"; + mes "... Maybe next time..."; + close; + case 9: + mes "["+strcharinfo(0)+"]"; + mes "... Maybe next time..."; + close; + } + } + } + } + mes "Selling Item List"; + mes "===================="; + mes "[Marvelous Medal]"; + mes " : A medal made of special metal only produced in Hugel."; + mes " "; + mes "[Union of Tribe]"; + mes " : A statue with the image of a strong union of Tribes. People believe watching this statue actually helps strengthen the relationships between Tribes."; + mes " "; + mes "[Poring Box]"; + mes " : A box wrapped with Poring patterned wrapping paper. Something's inside."; + mes " "; + mes "[Wild Rose]"; + mes " : Your friend Wild Rose will come and help you."; + mes " "; + mes "[Mr. Doppel]"; + mes " : A young nobe, Doppelganger will come and help you."; + mes " "; + mes "[Egnigem Cenia]"; + mes " : A beautiful girl, Egnigem Cenia from Somatology Laboratory, is going to come and help you."; + mes " "; + mes "[Novice Figure]"; + mes " : A fine figure of a Novice. Can be equiped as an '^4d4dffaccessory^000000'."; + mes " HP + 70, extra effect of HP + 30 when equipped by a Novices."; + mes " "; + mes "[Swordman Figure]"; + mes " : A nice figure of a Swordman. Can be equipped as an '^4d4dffaccessory^000000'."; + mes " VIT + 1, extra effect of DEF + 2 when equipped by Swordman classes."; + mes " "; + mes "[Merchant Figure]"; + mes " : A fine figure of a Merchant. Can be equipped as an '^4d4dffaccessory^000000'."; + mes " STR + 1, extra effect of CRI + 5 when equipped by Merchant classes."; + mes " "; + mes "[Thief Figure]"; + mes " : A fine Figure of a Thief. Can be equipped as an '^4d4dffaccessory^000000'."; + mes " AGI + 1, extra effectASPD + 3% when equipped by Thief classes."; + mes " "; + mes "[Mage Figure]"; + mes " : A fine figure of a Mage. Can be equipped as an '^4d4dffaccessory^000000'."; + mes " INT + 1, an extra SP Recovery increase by 5% when equipped by Mage classes."; + mes " "; + mes "[Acolyte Figure]"; + mes " : A fine figure of an Acolyte. Can be equipped as an '^4d4dffaccessory^000000'."; + mes " INT + 1, extra effct of SP + 50 when equipped by Acolyte classes."; + mes " "; + mes "[Archer Figure]"; + mes " : A fine figure of an Archer. Can be equipped as an '^4d4dffaccessory^000000'."; + mes " DEX + 1, extra effct of ATK + 10 when equipped by Archer classes."; + close; + end; + +S_PoringVending: + if(countitem(7539) >= getarg(1)) { + mes "Click~ The item came out of the mouth of the Poring with a rumbling sound."; + delitem 7539,getarg(1); // Poring_Coin + getitem getarg(0),1; + }else{ + mes "Not enough coins."; + } + close; +} + +// Information +//============================================================ +poring_w01,96,97,3 script Sweet Devi#wop 738,{ + if (MaxWeight-Weight < 2000 || checkweight(1201,1) == 0) { + mes "- Wait a minute !! -"; + mes "- Currently you're carrying -"; + mes "- too many items with you. -"; + mes "- Please try again -"; + mes "- after you loose some weight. -"; + close; + } + mes "[Deviruchi]"; + mes "Oh, Another Human Warrior!"; + mes "How come so many humans want to join our Poring War these days?"; + next; + mes "[Deviruchi]"; + mes "Well, whatever, as long as I make money out of it~"; + mes "Ok, Warriors-! Hahaha How badly have I wanted to shout it out~!!"; + next; + mes "[Deviruchi]"; + mes "You, brave warrior, are you ready to join the holy battle of Angeling and Deviling?"; + next; + mes "[Deviruchi]"; + mes "Hehehee, I feel kinda shy now."; + mes "Anyway, human. Do you want to join our Poring War?"; + next; + switch(select("Am I qualified to join?:How do I join the war?:Cancel:Let me out of here, please!")) { + case 1: + mes "[Deviruchi]"; + mes "No racial discrimination! Anyone can join if they're willing to fight."; + mes "But the weird thing is that you humans who used to be our greatest enemies are now our participants."; + next; + mes "[Deviruchi]"; + mes "If you really want to fight in the war or whatever.. the Team recruiter's right there."; + mes "Also, it's totally up to you which team you want to fight for~"; + close; + case 2: + mes "[Deviruchi]"; + mes "It's simple. You see that Team recruiting room?"; + mes "Each team is composed of 5 people. As soon as 5 members are collected, the battle starts."; + mes "You win if you kill the other team's Porings."; + next; + mes "[Deviruchi]"; + mes "This also means that the battle needs the total of 10 members."; + next; + mes "[Deviruchi]"; + mes "When all 10 members are collected, those participants get to choose a team. Each team then should have 5 members who are in the SAME party."; + next; + mes "[Deviruchi]"; + mes "So, finally, half of the members joins the Angeling Team"; + mes "and the other half joins the Deviling Team."; + next; + mes "[Deviruchi]"; + mes "If you're a member of the Angeling Team, your goal is to kill the Devilings at the other team's base and vice versa."; + next; + mes "[Deviruchi]"; + mes "Each team should try killing both Porings in the other team's base. After killing one Poring, you have a limited time to kill the other Poring. Otherwise, the one you killed will come back alive."; + next; + mes "[Deviruchi]"; + mes "It's sort of like a capture the flag game but with Porings instead. Understood?"; + mes "And you need to make sure you know who's in which party."; + close; + case 3: + mes "[" + strcharinfo(0) + "]"; + mes "hmm, I see."; + close; + case 4: + mes "[Deviruchi]"; + mes "Oh, Alright. I can help."; + mes "I'll send you back to your savepoint."; + close2; + if(WoP_SaveMap$ != "") { + savepoint WoP_SaveMap$,WoP_SaveMap_X,WoP_SaveMap_Y; + set WoP_SaveMap$,""; + set WoP_SaveMap_X,0; + set WoP_SaveMap_Y,0; + } + warp getsavepoint(0), getsavepoint(1), getsavepoint(2); + end; + } + +OnPCLogoutEvent: + getmapxy .@map$,.@x,.@y,0; + if (.@map$ == "poring_w02") { + if(WoP_SaveMap$ != "") { + savepoint WoP_SaveMap$,WoP_SaveMap_X,WoP_SaveMap_Y; + set WoP_SaveMap$,""; + set WoP_SaveMap_X,0; + set WoP_SaveMap_Y,0; + } + delitem 7773,countitem(7773); + set wop_team,0; + } + end; + +OnPCDieEvent: + getmapxy .@map$,.@x,.@y,0; + if (.@map$ == "poring_w02" && wop_team) { + if(getsavepoint(0) != "poring_w02" && WoP_SaveMap$ == "") { + set WoP_SaveMap$,getsavepoint(0); + set WoP_SaveMap_X,getsavepoint(1); + set WoP_SaveMap_Y,getsavepoint(2); + } + if (wop_team == 1) { + savepoint "poring_w02",rand(44,51),rand(76,87); + } + if (wop_team == 2) { + savepoint "poring_w02",rand(146,153),rand(76,87); + } + } + end; + +OnPCKillEvent: + getmapxy .@map$,.@x,.@y,0; + if (.@map$ == "poring_w02" && wop_team) { + getnameditem 7773,rid2name(killedrid); + } + end; + +OnInit: + removemapflag "poring_w02",mf_partylock; + removemapflag "poring_w02",mf_pvp; + removemapflag "poring_w02",mf_pvp_noguild; + removemapflag "poring_w02",mf_pvp_nocalcrank; + set $@wop_teamcount,0; + set $@wop_deadcount_a,0; + set $@wop_deadcount_d,0; + set $@wop_team_a,0; + set $@wop_team_d,0; + set $@wop_doorcount_a,0; + set $@wop_doorcount_d,0; + end; +} + +// Poring Registers +//============================================================ +poring_w01,91,97,3 script Poring#wop_door_all 1002,{ + end; + +OnInit: + waitingroom "[Recruiting 10 Battle Participants]",10,"Poring#wop_door_all::OnStartArena",10,500,9,99; + enablewaitingroomevent; + end; + +OnStartArena: + warpwaitingpc "poring_w01",101,70; + donpcevent "#wop_warp_rtry::OnReady"; + disablewaitingroomevent; + end; + +OnEnable: + enablewaitingroomevent; + end; + +OnDisable: + disablewaitingroomevent; + end; +} + +poring_w01,91,68,5 script Poring#wop_door_a 1002,{ + end; + +OnInit: + waitingroom "[Angeling Team Recruiter]",5,"Poring#wop_door_a::OnStartArena",5,0,9,99; + enablewaitingroomevent; + end; + +OnStartArena: + warpwaitingpc "poring_w02",26,175; + disablewaitingroomevent; + if($@wop_teamcount == 0) { + set $@wop_teamcount,1; + donpcevent "Poring#wop_door_d::OnDevilingStart"; + donpcevent "#wop_warp_rtry::OnStop"; + } + else if($@wop_teamcount == 1) { + donpcevent "#wop_master::OnStart"; + donpcevent "Poring#wop_door_d::OnStop"; + stopnpctimer; + } + end; + +OnEnable: + enablewaitingroomevent; + end; + +OnDisable: + disablewaitingroomevent; + end; + +OnAngelingStart: + initnpctimer; + end; + +OnStop: + stopnpctimer; + end; + +OnTimer1000: + mapannounce "poring_w01","The greatest battle of all time, the recruitment for the Deviling Team is over, ring!",0,0xf08080; + end; + +OnTimer4000: + mapannounce "poring_w01","Join the proud Angeling Team with angel wings!!",0,0xf08080; + end; + +OnTimer8000: + mapannounce "poring_w01","You got one minute to join the Angeling Team. The battle will be cancelled in 1 minute if not ready!!",0,0xf08080; + donpcevent "#wop_master::OnAngelingWarn"; + end; + +OnTimer13000: + mapannounce "poring_w01","This is the time to join the great Angeling Team, ring!",0,0xf08080; + end; + +OnTimer20000: + mapannounce "poring_w01","This battle is the proud of the porings! Ring! Join the Angeling Team!!",0,0xf08080; + end; + +OnTimer30000: + mapannounce "poring_w01","We don't have much time, ring. Don't let the Devilings contaminate you!",0,0xf08080; + end; + +OnTimer40000: + mapannounce "poring_w01","Come! Join us!",0,0xf08080; + end; + +OnTimer50000: + mapannounce "poring_w01","What a pitty! I can't believe that brave warriors are missing!",0,0xf08080; + end; + +OnTimer55000: + mapannounce "poring_w01","Deviling: You can't leave us waiting for ever!! We're going to cancel the battle, ring!",0,0x33FF66; + end; + +OnTimer55100: + donpcevent "Poring#wop_door_a::OnDisable"; + donpcevent "Poring#wop_door_d::OnDisable"; + donpcevent "Poring#wop_door_all::OnDisable"; + set $@wop_teamcount,0; + donpcevent "#wop_master::OnAngelingEnd"; + donpcevent "#wop_warp_rtry::OnEnable"; + end; + +OnTimer58000: + mapannounce "poring_w01","...There is nothing we can do, ring... Lets cheer for the next one, ring.",0,0xf08080; + donpcevent "#wop_master::OnReset"; + stopnpctimer; + end; +} + +poring_w01,112,68,3 script Poring#wop_door_d 1002,{ + end; + +OnInit: + waitingroom "[Deviling Team Recruiter]",5,"Poring#wop_door_d::OnStartArena",5,0,9,99; + enablewaitingroomevent; + end; + +OnStartArena: + warpwaitingpc "poring_w02",170,175; + disablewaitingroomevent; + if($@wop_teamcount == 0) { + set $@wop_teamcount,1; + donpcevent "Poring#wop_door_a::OnAngelingStart"; + donpcevent "#wop_warp_rtry::OnStop"; + } + else if($@wop_teamcount == 1) { + donpcevent "#wop_master::OnStart"; + donpcevent "Poring#wop_door_a::OnStop"; + stopnpctimer; + } + end; + +OnEnable: + enablewaitingroomevent; + end; + +OnDisable: + disablewaitingroomevent; + end; + +OnAngelingStart: + initnpctimer; + end; + +OnStop: + stopnpctimer; + end; + +OnTimer1000: + mapannounce "poring_w01","No more good people, the recruitment for the Angeling Team is over, ring!",0,0x33FF66; + end; + +OnTimer4000: + mapannounce "poring_w01","Nice members of the Deviling Team! Lets gather, ring!!",0,0x33FF66; + end; + +OnTimer8000: + mapannounce "poring_w01","The battle will be cancelled if the members aren't recruited in one minute!!",0,0x33FF66; + donpcevent "#wop_master::OnDevilingWarn"; + end; + +OnTimer13000: + mapannounce "poring_w01","This is the time to join the brave Deviling Team, ring!",0,0x33FF66; + end; + +OnTimer20000: + mapannounce "poring_w01","D,E,V,I,L,I,N,G! Deviling Team! Come and join us!",0,0x33FF66; + end; + +OnTimer30000: + mapannounce "poring_w01","There ain't much time left, ring! If you wish to became a member of Deviling Team, Come and Join!",0,0x33FF66; + end; + +OnTimer40000: + mapannounce "poring_w01","D,E,V,I,L,I,N,G! Deviling Team! Come and Join us!!",0,0x33FF66; + end; + +OnTimer50000: + mapannounce "poring_w01","What a pitty! I can't believe there aren't enough players!",0,0x33FF66; + end; + +OnTimer55000: + mapannounce "poring_w01","Angeling: We got no time to wait, stupid Deviling! The battle has been cancelled, ring!",0,0xf08080; + end; + +OnTimer55100: + donpcevent "Poring#wop_door_a::OnDisable"; + donpcevent "Poring#wop_door_d::OnDisable"; + donpcevent "Poring#wop_door_all::OnDisable"; + + set $@wop_teamcount,0; + donpcevent "#wop_master::OnDevilingEnd"; + donpcevent "#wop_warp_rtry::OnEnable"; + end; + +OnTimer58000: + mapannounce "poring_w01","...Ughhhhhh... Tell me that isn't happening, ring! Right, Be ready for the next one, ring!!",0,0x33FF66; + donpcevent "#wop_master::OnReset"; + stopnpctimer; + end; +} + +poring_w01,103,70,0 script #wop_warp_rtry 139,13,13,{ + end; + +OnInit: + disablenpc "#wop_warp_rtry"; + end; + +OnEnable: + enablenpc "#wop_warp_rtry"; + end; + +OnDisable: + disablenpc "#wop_warp_rtry"; + end; + +OnReady: + initnpctimer; + end; + +OnStop: + stopnpctimer; + end; + +OnTouch: + warp "poring_w01",112,138; + end; + +OnTimer3000: + mapannounce "poring_w01","Porings: I am giving you 1 minute. Choose your team, ring!",0,0xf08080; + end; + +OnTimer33000: + mapannounce "poring_w01","Porings: 30 seconds left! Come on, Choose a team now, ring?!!",0,0xf08080; + end; + +OnTimer58000: + mapannounce "poring_w01","Porings: You sure you're a warrior?!!! I'm disappointed, ring!",0,0xf08080; + end; + +OnTimer60000: + mapannounce "poring_w01","The battle has been canceled since not all teams are full!!",0,0xf08080; + end; + +OnTimer61000: + enablenpc "#wop_warp_rtry"; + end; + +OnTimer65000: + disablenpc "#wop_warp_rtry"; + donpcevent "#wop_master::OnReset"; + stopnpctimer; + end; +} + +// Mr. Doppel +//============================================================ +poring_w02,26,181,3 script Mr. Doppel#wop_team_a 739,{ + if (checkweight(714,3) == 0) { + mes "- Wait a minute !! -"; + mes "- Currently you're carrying -"; + mes "- too many items with you. -"; + mes "- Please try again -"; + mes "- after you loose some weight. -"; + close; + } + set .@a_tname$,getpartyname($@wop_team_a); + set .@pname$,getpartyname(getcharid(1)); + if($@wop_team_a != 0 && $@wop_team_a == getcharid(1)) { + mes "[Mr. Doppel]"; + mes "So, everyone joined the party?"; + mes "The name of the party is... " + .@pname$ + ", right?"; + mes "I'll transfer you to the battle staging area."; + next; + switch(select("No! Wait!:Go to the staging area.")) { + case 1: + mes "[Mr. Doppel]"; + mes "What is it now?"; + mes "Can't you have a little more consideration?"; + mes "You don't have much time. Decide now!"; + next; + mes "[Mr. Doppel]"; + mes "If you don't get there in time, you won't make it to the battle."; + close; + case 2: + if((getpartyleader(getcharid(1),2) == getcharid(0))) { + mes "[Mr. Doppel]"; + mes "So, you are the leader. Before going to the battlefield, you should check all your members."; + next; + switch(select("Very well. I'll be the last.:I am the last. Send me to the battlefield.")) { + case 1: + mes "[Mr. Doppel]"; + mes "First, make sure all the members are in your party."; + close; + case 2: + mes "[Mr. Doppel]"; + mes "Very well. Nice you have done everything on time."; + delitem 7773,countitem(7773); + close2; + set wop_team,0; + warp "poring_w02",44,82; + end; + } + } + else { + mes "[Mr. Doppel]"; + mes "Right. I'm gonna send you to the battle staging area."; + mes "Wait for all the other party members there."; + delitem 7773,countitem(7773); + close2; + set wop_team,0; + warp "poring_w02",44,82; + end; + } + } + } + else { + if((getpartyleader(getcharid(1),2) == getcharid(0))) { + if($@wop_team_a == 0) { + mes "[Mr. Doppel]"; + mes "So, you are the party leader of Angeling Team."; + mes "Are you sure all the members are in your party?"; + mes "First, lets register your party name, after, we'll check the members."; + next; + mes "[Mr. Doppel]"; + mes "Lets see... The name of the party is..."; + mes " "; + mes "^4d4dff " + .@pname$ + " ^000000"; + mes " "; + mes "Right? That is the name you wish?"; + next; + switch(select("No! You're wrong.:Yes. I would like to register that name.:Cancel")) { + case 1: + mes "[Mr. Doppel]"; + mes "Hey, I don't have all day! Make your mind and register as fast as you can."; + mes "Don't forget to let all the members join the party. Only the members of a registered party can join the battle."; + close; + case 2: + mes "[Mr. Doppel]"; + mes "So, I'll register your party name as - " +.@pname$ + " -."; + mes "Now, Tell your ^4d4dffmembers to confirm your party^000000."; + mes "I'll send you to the battlefield as soon as I confirm your party."; + set $@wop_team_a,getcharid(1); + mapannounce "poring_w02","The registration of the Angeling Team has been confirmed. The party members must confirm their team with Mr. Doppel.",0,0x33FF66; + close; + case 3: + mes "[Mr. Doppel]"; + mes "The clock is ticking. Make up your mind and register as soon as you can."; + close; + } + } + else { + mes "[Mr. Doppel]"; + mes "So, you are the leader of the party."; + mes "Haven't you finished the party registration yet?"; + mes "You must stay on the one that has been registered!"; + next; + mes "[Mr. Doppel]"; + mes "The name of the party is "; + mes " " + .@a_tname$ + " "; + mes "Please, confirm."; + close; + } + } + else { + mes "[Mr. Doppel]"; + mes "If you aren't a registered member of the party, you can't join the battle."; + next; + mes "[Mr. Doppel]"; + mes "I'll check again and, after the registeration of the party name, you'll be sent to the battlefield."; + mes "We must stay together as a party, since this is a team game. Otherwise, we'll have problems."; + close; + } + } + +OnInit: + disablenpc "Mr. Doppel#wop_team_a"; + end; + +OnEnable: + enablenpc "Mr. Doppel#wop_team_a"; + end; + +OnDisable: + disablenpc "Mr. Doppel#wop_team_a"; + end; +} + +poring_w02,170,181,3 script Mr. Doppel#wop_team_d 739,{ + if (checkweight(714,3) == 0) { + mes "- Wait a minute !! -"; + mes "- Currently you're carrying -"; + mes "- too many items with you. -"; + mes "- Please try again -"; + mes "- after you loose some weight. -"; + close; + } + set .@d_tname$,getpartyname($@wop_team_d); + set .@pname$,getpartyname(getcharid(1)); + if($@wop_team_d != 0 && $@wop_team_d == getcharid(1)) { + mes "[Mr. Doppel]"; + mes "So, everyone joined the party?"; + mes "The name of the party is... " + .@pname$ + ", right?"; + mes "I'll transfer you to the battle staging area."; + next; + switch(select("No! Wait!:Go to the staging area.")) { + case 1: + mes "[Mr. Doppel]"; + mes "What is it now?"; + mes "Can't you have a little more consideration?"; + mes "You don't have much time. Decide now!"; + next; + mes "[Mr. Doppel]"; + mes "If you don't get there in time, you won't make it to the battle."; + close; + case 2: + if((getpartyleader(getcharid(1),2) == getcharid(0))) { + mes "[Mr. Doppel]"; + mes "So, you are the leader. Before going to the battlefield, you should check all your members."; + next; + switch(select("Very well. I'll be the last.:I am the last. Send me to the battlefield.")) { + case 1: + mes "[Mr. Doppel]"; + mes "First, make sure all the members are in your party."; + close; + case 2: + mes "[Mr. Doppel]"; + mes "Very well. Nice you have done everything on time."; + delitem 7773,countitem(7773); + close2; + set wop_team,0; + warp "poring_w02",153,82; + end; + } + }else{ + mes "[Mr. Doppel]"; + mes "Right. I'm gonna send you to the battle staging area."; + mes "Wait for all the other party members there."; + delitem 7773,countitem(7773); + close2; + set wop_team,0; + warp "poring_w02",153,82; + end; + } + } + }else{ + if((getpartyleader(getcharid(1),2) == getcharid(0))) { + if($@wop_team_d == 0) { + mes "[Mr. Doppel]"; + mes "So, you are the party leader of Deviling Team."; + mes "Are you sure all the members are in your party?"; + mes "First, lets register your party name, after, we'll check the members."; + next; + mes "[Mr. Doppel]"; + mes "Lets see... The name of the party is..."; + mes " "; + mes "^4d4dff " + .@pname$ + " ^000000"; + mes " "; + mes "Right? That is the name you wish?"; + next; + switch(select("No! You're wrong.:Yes. I would like to register that name.:Cancel")) { + case 1: + mes "[Mr. Doppel]"; + mes "Hey, I don't have all day! Make your mind and register as fast as you can."; + mes "Don't forget to let all the members join the party. Only the members of a registered party can join the battle."; + close; + case 2: + mes "[Mr. Doppel]"; + mes "So, I'll register your party name as - " + .@pname$ + " -."; + mes "Now, Tell your ^4d4dffmembers to confirm your party^000000."; + mes "I'll send you to the battlefield as soon as I confirm your party."; + set $@wop_team_d,getcharid(1); + mapannounce "poring_w02","The registration of the Deviling Team has been confirmed. The party members must confirm their team with Mr. Doppel.",0,0x33FF66; + close; + case 3: + mes "[Mr. Doppel]"; + mes "The clock is ticking. Make up your mind and register as soon as you can."; + close; + } + }else{ + mes "[Mr. Doppel]"; + mes "So, you are the leader of the party."; + mes "Haven't you finished the party registration yet?"; + mes "You must stay on the one that has been registered!"; + next; + mes "[Mr. Doppel]"; + mes "The name of the party is "; + mes " " + .@d_tname$ + " "; + mes "Please, confirm."; + close; + } + }else{ + mes "[Mr. Doppel]"; + mes "If you aren't a registered member of the party, you can't join the battle."; + next; + mes "[Mr. Doppel]"; + mes "I'll check again and, after the registeration of the party name, you'll be sent to the battlefield."; + mes "We must stay together as a party, since this is a team game. Otherwise, we'll have problems."; + close; + } + } + +OnInit: + disablenpc "Mr. Doppel#wop_team_d"; + end; + +OnEnable: + enablenpc "Mr. Doppel#wop_team_d"; + end; + +OnDisable: + disablenpc "Mr. Doppel#wop_team_d"; + end; +} + +poring_w02,1,1,0 script #wop_master -1,{ + end; + +OnReset: + removemapflag "poring_w02",mf_partylock; + removemapflag "poring_w02",mf_pvp; + removemapflag "poring_w02",mf_pvp_noguild; + removemapflag "poring_w02",mf_pvp_nocalcrank; + mapwarp "poring_w02","poring_w01",112,138; + donpcevent "#wop_angellium1::OnReset"; + donpcevent "#wop_angellium2::OnReset"; + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + set $@wop_team_a,0; + set $@wop_team_d,0; + set $@wop_deadcount_a,0; + set $@wop_deadcount_d,0; + set $@wop_teamcount,0; + set $@wop_doorcount_a,0; + set $@wop_doorcount_d,0; + donpcevent "#wop_warp_a::OnDisable"; + donpcevent "#wop_warp_d::OnDisable"; + donpcevent "#wop_warp_rtry::OnDisable"; + donpcevent "Poring#wop_door_a::OnEnable"; + donpcevent "Poring#wop_door_d::OnEnable"; + donpcevent "Poring#wop_door_all::OnEnable"; + stopnpctimer; + end; + +Onstart: + initnpctimer; + end; + +OnAngelingWarn: + mapannounce "poring_w02","Deviling Team Recruitment is complete. The battle will be canceled automatically if the Angeling Team Recruitment isn't ready in 1 minute.",0,0xf08080; + end; + +OnDevilingWarn: + mapannounce "poring_w02","Angeling Team Recruitment is complete. The battle will be canceled automatically if the Deviling Team Recruitment isn't ready in 1 minute.",0,0xf08080; + end; + +OnDevilingEnd: + mapannounce "poring_w02","Deviling Team Recruitment failed. The battle will be canceled shortly.",0,0xf08080; + end; + +OnAngelingEnd: + mapannounce "poring_w02","Angeling Team Recruitment failed. The battle will be canceled shortly.",0,0xf08080; + end; + +OnStop: + stopnpctimer; + end; + +OnAngelingWin: + removemapflag "poring_w02",mf_partylock; + removemapflag "poring_w02",mf_pvp; + removemapflag "poring_w02",mf_pvp_noguild; + removemapflag "poring_w02",mf_pvp_nocalcrank; + mapannounce "poring_w02","Mr. Doppel: Angeling Team of party " + getpartyname($@wop_team_a) + " won the battle!",0,0xf08080; + donpcevent "Deviruchi#wop_endmaster::OnEnable"; + stopnpctimer; + end; + +OnDevilingWin: + removemapflag "poring_w02",mf_partylock; + removemapflag "poring_w02",mf_pvp; + removemapflag "poring_w02",mf_pvp_noguild; + removemapflag "poring_w02",mf_pvp_nocalcrank; + mapannounce "poring_w02","Mr. Doppel: Deviling Team of party " + getpartyname($@wop_team_d) + " won the battle!",0,0xf08080; + donpcevent "Deviruchi#wop_endmaster::OnEnable"; + stopnpctimer; + end; + +OnTimer5000: + mapannounce "poring_w02","Mr. Doppel: Welcome to all the warriors that have come to fight the battle.",0,0xf08080; + donpcevent "Mr. Doppel#wop_team_a::OnEnable"; + donpcevent "Mr. Doppel#wop_team_d::OnEnable"; + end; + +OnTimer8000: + mapannounce "poring_w02","Mr. Doppel: Each member of the team must join the group, and the leader will register their team name.",0,0xf08080; + end; + +OnTimer12000: + mapannounce "poring_w02","Mr. Doppel: You have 50 seconds. Join the group, register it's name and go to the battlefield.",0,0xf08080; + end; + +OnTimer32000: + mapannounce "poring_w02","Mr. Doppel: You still have 30 seconds. Join the group, register it's name and go to the battlefield.",0,0xf08080; + end; + +OnTimer62000: + mapannounce "poring_w02","Mr. Doppel: Time is up. The rules will be explained shortly before the battle.",0,0xf08080; + end; + +OnTimer70000: + mapannounce "poring_w02","Mr. Doppel: All ready? Let me explain the battle rules.",0,0xf08080; + end; + +OnTimer75000: + mapannounce "poring_w02","Mr. Doppel: The Angeling Team has to protect 2 Angelings on their bases and, at the same time, eliminate the Devilings on their Deviling Team bases, and vice-versa.",0,0xf08080; + end; + +OnTimer80000: + mapannounce "poring_w02","Mr. Doppel: Your team wins if you eliminate the 2 monsters of the enemy team. The rules are as simple as that.",0,0xf08080; + end; + +OnTimer85000: + mapannounce "poring_w02","Mr. Doppel: But the Angelings or the Devilings return to life after a certain period of time, so it's important to eliminate the other Poring quickly, after you have eliminated the first.",0,0xf08080; + end; + +OnTimer90000: + mapannounce "poring_w02","Mr. Doppel: Also know that those Porings are furious and will attack everybody, it doesnt matter to what team they belong.",0,0xf08080; + end; + +OnTimer95000: + mapannounce "poring_w02","Mr. Doppel: Basically, the Porings are natural enemies of the humans, so the attack is innevitable, even if both are on the same team.",0,0xf08080; + end; + +OnTimer100000: + mapannounce "poring_w02","Mr. Doppel: In certain areas, you will need War Badges that are obtained by eliminating members of the other team. Alright, lets begin!",0,0xf08080; + setmapflag "poring_w02",mf_partylock; + setmapflag "poring_w02",mf_pvp; + setmapflag "poring_w02",mf_pvp_noguild; + setmapflag "poring_w02",mf_pvp_nocalcrank; + donpcevent "#wop_warp_a::OnEnable"; + donpcevent "#wop_warp_d::OnEnable"; + donpcevent "#wop_angellium1::OnAngelingSpawn"; + donpcevent "#wop_angellium2::OnAngelingSpawn"; + donpcevent "#wop_devillium1::OnDevilingSpawn"; + donpcevent "#wop_devillium2::OnDevilingSpawn"; + end; + +OnTimer700000: + mapannounce "poring_w02","Mr. Doppel: Time is up. Soon, you will be teleported to the Winners Stage.",0,0xf08080; + removemapflag "poring_w02",mf_partylock; + removemapflag "poring_w02",mf_pvp; + removemapflag "poring_w02",mf_pvp_noguild; + removemapflag "poring_w02",mf_pvp_nocalcrank; + donpcevent "#wop_angellium1::OnReset"; + donpcevent "#wop_angellium2::OnReset"; + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + end; + +OnTimer703000: + donpcevent "Deviruchi#wop_endmaster::OnEnable"; + stopnpctimer; + end; +} + +poring_w02,51,82,0 script #wop_warp_a 139,1,1,{ + end; + +OnInit: + disablenpc "#wop_warp_a"; + end; + +OnEnable: + enablenpc "#wop_warp_a"; + specialeffect EF_MAPPILLAR2,AREA,"#wop_warp_a"; + end; + +OnDisable: + disablenpc "#wop_warp_a"; + end; + +OnTouch: + set wop_team,1; + warp "poring_w02",57,82; + end; +} + +poring_w02,146,82,0 script #wop_warp_d 139,1,1,{ + end; + +OnInit: + disablenpc "#wop_warp_d"; + end; + +OnEnable: + enablenpc "#wop_warp_d"; + specialeffect EF_MAPPILLAR2,AREA,"#wop_warp_d"; + end; + +OnDisable: + disablenpc "#wop_warp_d"; + end; + +OnTouch: + set wop_team,2; + warp "poring_w02",140,82; + end; +} + +// Poring Spawn +//============================================================ +poring_w02,80,82,0 script #wop_angellium1 -1,{ + end; + +OnReset: + killmonster "poring_w02","#wop_angellium1::OnMyMobDead"; + stopnpctimer; + end; + +OnAngelingSpawn: + monster "poring_w02",80,82,"Angeling",1766,1,"#wop_angellium1::OnMyMobDead"; + end; + +OnMyMobDead: + set $@wop_deadcount_a,$@wop_deadcount_a + 1; + if($@wop_deadcount_a == 1) { + mapannounce "poring_w02","Mr. Doppel: The Angeling on the 1st base has been killed! 1 point lost!!",0,0x00ff00; + initnpctimer; + } + else { + donpcevent "#wop_angellium1::OnReset"; + donpcevent "#wop_angellium2::OnReset"; + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + donpcevent "#wop_master::OnDevilingWin"; + } + end; + +OnTimer120000: + set $@wop_deadcount_a,$@wop_deadcount_a - 1; + donpcevent "#wop_angellium1::OnAngelingSpawn"; + mapannounce "poring_w02","Mr. Doppel: The Angeling on the 1st base has been revived! 1 point gained!!",0,0x00ff00; + stopnpctimer; +} + +poring_w02,98,41,0 script #wop_angellium2 -1,{ + end; + +OnReset: + killmonster "poring_w02","#wop_angellium2::OnMyMobDead"; + stopnpctimer; + end; + +OnAngelingSpawn: + monster "poring_w02",98,41,"Angeling",1766,1,"#wop_angellium2::OnMyMobDead"; + end; + +OnMyMobDead: + set $@wop_deadcount_a,$@wop_deadcount_a + 1; + if($@wop_deadcount_a == 1) { + mapannounce "poring_w02","Mr. Doppel: The Angeling on the 2nd base has been killed! 1 point lost!!",0,0x00ff00; + initnpctimer; + } + else { + donpcevent "#wop_angellium1::OnReset"; + donpcevent "#wop_angellium2::OnReset"; + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + donpcevent "#wop_master::OnDevilingWin"; + } + end; + +OnTimer120000: + set $@wop_deadcount_a,$@wop_deadcount_a - 1; + donpcevent "#wop_angellium2::OnAngelingSpawn"; + mapannounce "poring_w02","Mr. Doppel: The Angeling on the 2nd base has been revived! 1 point gained!!",0,0x00ff00; + stopnpctimer; + end; +} + +poring_w02,116,82,0 script #wop_devillium1 -1,{ + end; + +OnReset: + killmonster "poring_w02","#wop_devillium1::OnMyMobDead"; + stopnpctimer; + end; + +OnDevilingSpawn: + monster "poring_w02",116,82,"Deviling",1767,1,"#wop_devillium1::OnMyMobDead"; + end; + +OnMyMobDead: + set $@wop_deadcount_d,$@wop_deadcount_d + 1; + if($@wop_deadcount_d == 1) { + mapannounce "poring_w02","Mr. Doppel: The Deviling on the 1st base has been killed! 1 point lost!!",0,0x00ff00; + initnpctimer; + } + else { + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + donpcevent "#wop_master::OnAngelingWin"; + } + end; + +OnTimer120000: + set $@wop_deadcount_d,$@wop_deadcount_d - 1; + donpcevent "#wop_devillium1::OndevilingSpawn"; + mapannounce "poring_w02","Mr. Doppel: The Deviling on the 1st base has been revived! 1 point gained!!",0,0x00ff00; + stopnpctimer; + end; +} + +poring_w02,98,124,0 script #wop_devillium2 -1,{ + end; + +OnReset: + killmonster "poring_w02","#wop_devillium2::OnMyMobDead"; + stopnpctimer; + end; + +OndevilingSpawn: + monster "poring_w02",98,124,"Deviling",1767,1,"#wop_devillium2::OnMyMobDead"; + end; + +OnMyMobDead: + set $@wop_deadcount_d,$@wop_deadcount_d + 1; + if($@wop_deadcount_d == 1) { + mapannounce "poring_w02","Mr. Doppel: The deviling on the 2nd base has been killed! 1 point lost!!",0,0x00ff00; + initnpctimer; + } + else { + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + donpcevent "#wop_master::OnAngelingWin"; + } + end; + +OnTimer120000: + set $@wop_deadcount_d,$@wop_deadcount_d - 1; + donpcevent "#wop_devillium2::OndevilingSpawn"; + mapannounce "poring_w02","Mr. Doppel: The deviling on the 2nd base has been revived! 1 point gained!!",0,0x00ff00; + stopnpctimer; +} + +// Deviruchi +//============================================================ +poring_w02,99,201,3 script Deviruchi#wop_endmaster 738,{ + if (MaxWeight-Weight < 2000 || checkweight(1201,1) == 0) { + mes "- Wait a minute !! -"; + mes "- Currently you're carrying -"; + mes "- too many items with you. -"; + mes "- Please try again -"; + mes "- after you loose some weight. -"; + close; + } + set .@a_point,$@wop_deadcount_a; + set .@d_point,$@wop_deadcount_d; + if(getcharid(1) == $@wop_team_a) { + if(.@a_point < .@d_point) { + mes "[Devi]"; + mes "Good work!"; + mes "Thanks to you, we increased our chances of victory."; + mes "Please, accept these Poring Coins as a sign of our appreciation."; + next; + if(wop_team == 1) { + mes "[Devi]"; + mes "Goodbye, my human friend."; + close2; + getitem 7539,3; // Poring_Coin + warp "prt_fild08",150,370; + end; + } + else { + mes "[Devi]"; + mes "Wait a minute, you look suspicious!!"; + mes "Ah, I got it! You are on the side of the Devilings?!"; + mes "You are spying on us!"; + mes "I will never forgive you!"; + close2; + percentheal 99,0; + warp "prt_fild08",150,370; + end; + } + } + else if(.@a_point == .@d_point) { + mes "[Devi]"; + mes "You did the best you could."; + mes "I' ts a shame the battle was tied..."; + mes "Even so, thanks for coming to fight for us. Please, accept this Poring Coin."; + next; + if(wop_team == 1) { + mes "[Devi]"; + mes "Goodbye, my human friend."; + close2; + getitem 7539,1; // Poring_Coin + warp "prt_fild08",150,370; + end; + } + else { + mes "[Devi]"; + mes "Wait a minute, you look suspicious!!"; + mes "Ah, I got it! You are on the side of the Devilings?!"; + mes "You are spying on us!"; + mes "It must have been you that made us tie the battle!!"; + mes "I will never forgive you!"; + close2; + percentheal 99,0; + warp "prt_fild08",150,370; + end; + } + } + else { + if(wop_team == 1) { + mes "[Devi]"; + mes "Well, I guess we had bad luck..."; + mes "I cant give you anything, since we lost and everything..."; + next; + mes "[Devi]"; + mes "Goodbye, my human friend."; + close2; + warp "prt_fild08",150,370; + end; + } + else { + mes "[Devi]"; + mes "Wait a minute... There is a traitor here!"; + mes "Ah, I got it! You are on the side of the Devilings?!"; + mes "You are spying on us, Angelings!"; + next; + mes "[Devi]"; + mes "You should be ashamed!"; + close2; + percentheal 99,0; + warp "prt_fild08",150,370; + end; + } + } + } + else if(getcharid(1) == $@wop_team_d) { + if (.@a_point > .@d_point) { + mes "[Devi]"; + mes "Good work!"; + mes "Thanks to you, we increased our chances of victory."; + mes "Please, accept these Poring Coins as a sign of our appreciation."; + next; + if (wop_team == 2) { + mes "[Devi]"; + mes "Goodbye, my human friend."; + close2; + getitem 7539,3; // Poring_Coin + warp "prt_fild08",150,370; + end; + } + else { + mes "[Devi]"; + mes "Wait a minute, you look suspicious!!"; + mes "Ah, I got it! You are on the side of the Angelings?!"; + mes "You are spying on us!!"; + mes "I will never forgive you!"; + close2; + percentheal 99,0; + warp "prt_fild08",150,370; + end; + } + } + else if(.@a_point == .@d_point) { + mes "[Devi]"; + mes "You did the best you could."; + mes "It's a shame the battle was tied..."; + mes "Even so, thanks for coming to fight for us. Please, accept this Poring Coin."; + next; + if(wop_team == 2) { + mes "[Devi]"; + mes "Goodbye, my human friend."; + close2; + getitem 7539,1; // Poring_Coin + warp "prt_fild08",150,370; + end; + } + else { + mes "[Devi]"; + mes "Wait a minute, you look suspicious!!"; + mes "Ah, I got it! You are on the side of the Angelings?!"; + mes "You are spying on us!"; + mes "It must have been you that made us tie the battle!!"; + mes "I will never forgive you!"; + close2; + percentheal 99,0; + warp "prt_fild08",150,370; + end; + } + } + else { + if(wop_team == 2) { + mes "[Devi]"; + mes "Well, I guess we had bad luck..."; + mes "I cant give you anything, since we lost and everything..."; + next; + mes "[Devi]"; + mes "I will allow you to return to your human world."; + close2; + warp "prt_fild08",150,370; + end; + } + else { + mes "[Devi]"; + mes "Wait a minute, you look suspicious!!"; + mes "Ah, I got it! You are on the side of the Angelings?!"; + mes "You are spying on us, Devilings!"; + next; + mes "[Devi]"; + mes "You should be ashamed!"; + close2; + percentheal 99,0; + warp "prt_fild08",150,370; + end; + } + } + } + else { + mes "[Devi]"; + mes "This is weird...Your party name ain't registered."; + mes "Im sorry, but rules are rules. I can't help you if your party ain't registered."; + close; + } +OnInit: + disablenpc "Deviruchi#wop_endmaster"; + end; + +OnEnable: + enablenpc "Deviruchi#wop_endmaster"; + initnpctimer; + end; + +OnDisable: + disablenpc "Deviruchi#wop_endmaster"; + end; + +OnTimer3000: + mapwarp "poring_w02","poring_w02",99,196; + end; + +OnTimer5000: + mapannounce "poring_w02","Mr. Doppel: Allow me to offer a souvenir to the humans that fought bravely for the Porings! Please, speak to Devi.",0,0x00ff00; + end; + +OnTimer65000: + mapannounce "poring_w02","Mr. Doppel: Time is up! Let me teleport you.",0,0x00ff00; + end; + +OnTimer68000: + mapwarp "poring_w02","poring_w01",112,138; + end; + +OnTimer68100: + donpcevent "#wop_master::OnStop"; + donpcevent "#wop_devillium1::OnReset"; + donpcevent "#wop_devillium2::OnReset"; + donpcevent "#wop_angellium1::OnReset"; + donpcevent "#wop_angellium2::OnReset"; + set $@wop_team_a,0; + set $@wop_team_d,0; + set $@wop_deadcount_a,0; + set $@wop_deadcount_d,0; + set $@wop_teamcount,0; + set $@wop_doorcount_a,0; + set $@wop_doorcount_d,0; + donpcevent "#wop_warp_a::OnDisable"; + donpcevent "#wop_warp_d::OnDisable"; + donpcevent "Mr. Doppel#wop_team_a::OnDisable"; + donpcevent "Mr. Doppel#wop_team_d::OnDisable"; + donpcevent "#wop_warp_rtry::OnDisable"; + donpcevent "Poring#wop_door_a::OnReset"; + donpcevent "Poring#wop_door_d::OnReset"; + donpcevent "Poring#wop_door_all::OnReset"; + stopnpctimer; + end; +} + +// Gate Guardian +//============================================================ +poring_w02,99,52,0 script Angeling Guardian#wop_da 111,{ + cutin "wop_emb0" + $@wop_doorcount_a,1; + if($@wop_doorcount_a < 3) { + if (wop_team == 2) { + mes "There is a device to equip the War Badges."; + mes "I can see the empty slots to equip the Badges."; + next; + switch(select("Equip War Badge.:Cancel.")) { + case 1: + if(countitem(7773)) { + if($@wop_doorcount_a < 3) { + mes "War Badge equipped."; + delitem 7773,1; // War_Badge + set $@wop_doorcount_a,$@wop_doorcount_a + 1; + cutin "wop_emb0" + $@wop_doorcount_a,1; + if($@wop_doorcount_a == 4) { + next; + mes "Gate Activated."; + donpcevent "#aroom_ingate_wop::OnEnable"; + donpcevent "#aroom_outgate_wop::OnEnable"; + } + close2; + } + else { + mes "All War Badges equipped."; + mes "No need to equip any more."; + close2; + } + } + else { + mes "^4d4dff - War Badge missing. You can obtain a War badge by killing members of the other team. - ^000000"; + close2; + } + break; + case 2: + mes "Cancel."; + close2; + } + } + else { + mes "There is a device to equip a War Badge."; + mes "Be carefull to not allow the enemy to take and equip your War Badge here."; + close2; + } + } + else { + mes "All War Badges have been equipped."; + close2; + } + cutin "",255; + end; + +OnInit: + set $@wop_doorcount_a,0; + end; +} + +poring_w02,103,52,0 script #aroom_ingate_wop 139,1,1,{ + end; + +OnInit: + disablenpc "#aroom_ingate_wop"; + end; + +OnEnable: + enablenpc "#aroom_ingate_wop"; + end; + +OnDisable: + disablenpc "#aroom_ingate_wop"; + end; + +OnTouch: + warp "poring_w02",99,49; + end; +} + +poring_w02,93,51,0 script #aroom_outgate_wop 139,1,1,{ + end; + +OnInit: + disablenpc "#aroom_outgate_wop"; + end; + +OnEnable: + enablenpc "#aroom_outgate_wop"; + end; + +OnDisable: + disablenpc "#aroom_outgate_wop"; + end; + +OnTouch: + warp "poring_w02",99,54; + end; +} + +poring_w02,98,113,0 script Deviling Guardian#wop_dd 111,{ + cutin "wop_emb0" + $@wop_doorcount_d,1; + if($@wop_doorcount_d < 3) { + if (wop_team == 1) { + mes "There is a device to equip the War Badges."; + mes "I can see the empty slots to equip the Badges."; + next; + switch(select("Equip War Badge.:Cancel.")) { + case 1: + if(countitem(7773)) { + if($@wop_doorcount_d < 3) { + mes "War Badge equipped."; + delitem 7773,1; // War_Badge + set $@wop_doorcount_d,$@wop_doorcount_d + 1; + cutin "wop_emb0" + $@wop_doorcount_d,1; + if($@wop_doorcount_d == 4) { + next; + mes "Gate Activated."; + donpcevent "#droom_ingate_wop::OnEnable"; + donpcevent "#droom_outgate_wop::OnEnable"; + } + close2; + } + else { + mes "All War Badges equipped."; + mes "No need to equip any more."; + close2; + } + } + else { + mes "^4d4dff - War Badge missing. You can obtain a War badge by killing members of the other team. - ^000000"; + close2; + } + break; + case 2: + mes "Cancel."; + close2; + } + } + else { + mes "There is a device to equip a War Badge."; + mes "Be carefull to not allow the enemy to take and equip your War Badge here."; + close2; + } + } + else { + mes "All War Badges have been equipped."; + close2; + } + cutin "",255; + end; + +OnInit: + set $@wop_doorcount_d,0; + end; +} + +poring_w02,93,113,0 script #droom_ingate_wop 139,1,1,{ + end; + +OnInit: + disablenpc "#droom_ingate_wop"; + end; + +OnEnable: + enablenpc "#droom_ingate_wop"; + end; + +OnDisable: + disablenpc "#droom_ingate_wop"; + end; + +OnTouch: + warp "poring_w02",98,116; + end; +} + +poring_w02,103,114,0 script #droom_outgate_wop 139,1,1,{ + end; + +OnInit: + disablenpc "#droom_outgate_wop"; + end; + +OnEnable: + enablenpc "#droom_outgate_wop"; + end; + +OnDisable: + disablenpc "#droom_outgate_wop"; + end; + +OnTouch: + warp "poring_w02",98,111; + end; +} + +// Other NPCs +//============================================================ +- script Angeling Side Poring#wpa -1,{ + end; +} + +- script Deviling Side Marin#wpd -1,{ + end; +} + +poring_w01,79,102,5 duplicate(Angeling Side Poring#wpa) Angeling Side Poring#wa1 1002 +poring_w01,80,107,5 duplicate(Angeling Side Poring#wpa) Angeling Side Poring#wa2 1002 +poring_w01,84,108,5 duplicate(Angeling Side Poring#wpa) Angeling Side Poring#wa3 1002 +poring_w01,84,112,5 duplicate(Angeling Side Poring#wpa) Angeling Side Poring#wa4 1002 +poring_w01,88,112,5 duplicate(Angeling Side Poring#wpa) Angeling Side Poring#wa5 1002 + +poring_w01,114,112,3 duplicate(Deviling Side Marin#wpd) Deviling Side Marin#wd1 1242 +poring_w01,117,111,3 duplicate(Deviling Side Marin#wpd) Deviling Side Marin#wd2 1242 +poring_w01,117,108,3 duplicate(Deviling Side Marin#wpd) Deviling Side Marin#wd3 1242 +poring_w01,122,108,3 duplicate(Deviling Side Marin#wpd) Deviling Side Marin#wd4 1242 +poring_w01,121,105,3 duplicate(Deviling Side Marin#wpd) Deviling Side Marin#wd5 1242 + +poring_w01,84,108,3 script #wop_ex_1 139,3,3,{ + end; + +OnTouch: + mes "[Porings]"; + mes "P~ooooooooo -!!!"; + mes "Let's teach them a lesson, ring!"; + mes "We are no longer betting our lives for Jellopies, ring!!!"; + next; + mes "[Porings]"; + mes "Let's go! Let's fight! Let's win, win, win!!!"; + emotion e_go,0,"Angeling Side Poring#wa1"; + emotion e_go,0,"Angeling Side Poring#wa2"; + emotion e_go,0,"Angeling Side Poring#wa3"; + emotion e_go,0,"Angeling Side Poring#wa4"; + emotion e_go,0,"Angeling Side Poring#wa5"; + next; + if(wop_team == 1) { + mes "[Porings]"; + mes "Ohhhhhh, there he is, the warrior that fought for us!!"; + mes "Oh my god... Nice, ring!"; + mes "Poring~ Poring~ Poooooo~"; + mes "Party of Angeling~ Popopo, Poring!"; + } + else if(wop_team == 2) { + mes "[Porings]"; + mes "Wait, YOU! Aren't you on the side of the Devilings?!"; + mes "Get out now! Leave!!"; + mes "Booooo~ Boo~ Boooo~"; + emotion e_omg,0,"Angeling Side Poring#wa1"; + emotion e_an,0,"Angeling Side Poring#wa2"; + emotion e_omg,0,"Angeling Side Poring#wa3"; + emotion e_an,0,"Angeling Side Poring#wa4"; + emotion e_gasp,0,"Angeling Side Poring#wa5"; + } + else { + mes "[Porings]"; + mes "Hey, human. How about fighting for us Porings on Angeling's side??!"; + emotion e_hlp,0,"Angeling Side Poring#wa1"; + emotion e_go,0,"Angeling Side Poring#wa2"; + emotion e_hlp,0,"Angeling Side Poring#wa3"; + emotion e_go,0,"Angeling Side Poring#wa4"; + emotion e_go,0,"Angeling Side Poring#wa5"; + } + next; + mes "[Porings]"; + mes "Party of Angeling~ Popopo, Poring!"; + mes "Victory~ Victory~ Pooooooo~"; + next; + mes "- Porings are cheerfully shouting for the victory. -"; + close; +} + +poring_w01,119,107,3 script #wop_ex_2 139,3,3,{ + end; + +OnTouch: + mes "[Marins]"; + mes "Woooooaaaaaaaaaaa!"; + mes "Finally, it's time for us to teach those stupid pigs a lesson!!"; + mes "Those Porings with low-grades are all idiots!!"; + next; + mes "[Marins]"; + mes "Let's go! Let's fight! Fight for Triumph!!!!"; + emotion e_go,0,"Deviling Side Marin#wd1"; + emotion e_go,0,"Deviling Side Marin#wd2"; + emotion e_go,0,"Deviling Side Marin#wd3"; + emotion e_go,0,"Deviling Side Marin#wd4"; + emotion e_go,0,"Deviling Side Marin#wd5"; + next; + if(wop_team == 1) { + mes "[Marins]"; + mes "Ohhhh... Here is the warrior that fought for us!!"; + mes "Amazing!"; + mes "This proves that humans recognize us as true monsters!!"; + } + else if(wop_team == 2) { + mes "[Marins]"; + mes "Wait, YOU! Aren't you on the side of the Angelings?!"; + mes "Get out now! Leave!!"; + mes "Booooo~ Boo~ Boooo~"; + emotion e_omg,0,"Deviling Side Marin#wd1"; + emotion e_an,0,"Deviling Side Marin#wd2"; + emotion e_omg,0,"Deviling Side Marin#wd3"; + emotion e_an,0,"Deviling Side Marin#wd4"; + emotion e_gasp,0,"Deviling Side Marin#wd5"; + } + else { + mes "[Marins]"; + mes "Hey, human. Don't you wanna fight for Deviling, the noble of darkness? What do you say?!"; + emotion e_hlp,0,"Deviling Side Marin#wd1"; + emotion e_go,0,"Deviling Side Marin#wd2"; + emotion e_hlp,0,"Deviling Side Marin#wd3"; + emotion e_go,0,"Deviling Side Marin#wd4"; + emotion e_go,0,"Deviling Side Marin#wd5"; + } + next; + mes "[Marins]"; + mes "The world's Best Miraculous Poring! Deviling has it all! Go, Deviling, Go-!!"; + next; + mes "- Marins are cheerfully shouting for the victory. -"; + close; +}
\ No newline at end of file diff --git a/npc/other/turbotrack/Expert_16.txt b/npc/other/turbotrack/Expert_16.txt index 4314aa635..2098cbb5f 100644 --- a/npc/other/turbotrack/Expert_16.txt +++ b/npc/other/turbotrack/Expert_16.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -14,14 +14,14 @@ //= 1.1 Fixed small official bug. [L0ne_W0lf] //= 1.2 Fixed a little mistake [akrus] //= 1.3 Corrected issue with top record setting. [L0ne_W0lf] +//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ turbo_room,124,135,3 script Expert mode - 16 person 124,{ end; OnInit: - waitingroom "Expert mode - 16 person",60,"Expert mode - 16 person::OnStartArena",16; - //SetFeeZeny 1000 + waitingroom "Expert mode - 16 person",60,"Expert mode - 16 person::OnStartArena",16,1000,10,99; enablewaitingroomevent "Expert mode - 16 person"; end; diff --git a/npc/other/turbotrack/Expert_4.txt b/npc/other/turbotrack/Expert_4.txt index a58220d82..578649b16 100644 --- a/npc/other/turbotrack/Expert_4.txt +++ b/npc/other/turbotrack/Expert_4.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -14,14 +14,14 @@ //= 1.1 Fixed small official bug. [L0ne_W0lf] //= 1.2 Fixed a little mistake [akrus] //= 1.3 Corrected issue with top record setting. [L0ne_W0lf] +//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ turbo_room,110,135,3 script Expert mode - 4 person 124,{ end; OnInit: - waitingroom "Expert mode - 4 person",60,"Expert mode - 4 person::OnStartArena",4; - //SetFeeZeny 1000 + waitingroom "Expert mode - 4 person",60,"Expert mode - 4 person::OnStartArena",4,1000,10,99; enablewaitingroomevent "Expert mode - 4 person"; end; diff --git a/npc/other/turbotrack/Expert_8.txt b/npc/other/turbotrack/Expert_8.txt index f7fea20d8..0c25a62b0 100644 --- a/npc/other/turbotrack/Expert_8.txt +++ b/npc/other/turbotrack/Expert_8.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -14,14 +14,14 @@ //= 1.1 Fixed small official bug. [L0ne_W0lf] //= 1.2 Fixed a little mistake [akrus] //= 1.3 Corrected issue with top record setting. [L0ne_W0lf] +//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ turbo_room,117,135,3 script Expert mode - 8 person 124,{ end; OnInit: - waitingroom "Expert mode - 8 person",60,"Expert mode - 8 person::OnStartArena",8; - //SetFeeZeny 1000 + waitingroom "Expert mode - 8 person",60,"Expert mode - 8 person::OnStartArena",8,1000,10,99; enablewaitingroomevent "Expert mode - 8 person"; end; diff --git a/npc/other/turbotrack/Normal_16.txt b/npc/other/turbotrack/Normal_16.txt index d694a1fc7..df40e7566 100644 --- a/npc/other/turbotrack/Normal_16.txt +++ b/npc/other/turbotrack/Normal_16.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.5 +//= 1.6 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -16,14 +16,14 @@ //= 1.3 Fixed a little mistake [akrus] //= 1.4 Corrected issue with top record setting. [L0ne_W0lf] //= 1.5 Fixed name being saved under expert mode. (bugreport:4433) [L0ne_W0lf] +//= 1.6 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ turbo_room,91,135,3 script Normal mode - 16 person 124,{ end; OnInit: - waitingroom "Normal mode - 16 person",60,"Normal mode - 16 person::OnStartArena",16; - //SetFeeZeny 1000 + waitingroom "Normal mode - 16 person",60,"Normal mode - 16 person::OnStartArena",16,1000,10,99; enablewaitingroomevent "Normal mode - 16 person"; end; diff --git a/npc/other/turbotrack/Normal_4.txt b/npc/other/turbotrack/Normal_4.txt index 3cee6ff5f..866f4f164 100644 --- a/npc/other/turbotrack/Normal_4.txt +++ b/npc/other/turbotrack/Normal_4.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.4 +//= 1.5 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -15,14 +15,14 @@ //= 1.2 Replaced effect numerics with constants. [L0ne_W0lf] //= 1.3 Fixed a little mistake [akrus] //= 1.4 Corrected issue with top record setting. [L0ne_W0lf] +//= 1.5 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ turbo_room,77,135,3 script Normal mode - 4 person 124,{ end; OnInit: - waitingroom "Normal mode - 4 person",60,"Normal mode - 4 person::OnStartArena",4; - //SetFeeZeny 1000 + waitingroom "Normal mode - 4 person",60,"Normal mode - 4 person::OnStartArena",4,1000,10,99; enablewaitingroomevent "Normal mode - 4 person"; end; diff --git a/npc/other/turbotrack/Normal_8.txt b/npc/other/turbotrack/Normal_8.txt index 04fbe007f..fa972c64a 100644 --- a/npc/other/turbotrack/Normal_8.txt +++ b/npc/other/turbotrack/Normal_8.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.5 +//= 1.6 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -16,14 +16,14 @@ //= 1.3 Fixed a little mistake [akrus] //= 1.4 Corrected issue with top record setting. [L0ne_W0lf] //= 1.5 Fixed name being saved under expert mode. (bugreport:4433) [L0ne_W0lf] +//= 1.6 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ turbo_room,84,135,3 script Normal mode - 8 person 124,{ end; OnInit: - waitingroom "Normal mode - 8 person",60,"Normal mode - 8 person::OnStartArena",8; - //SetFeeZeny 1000 + waitingroom "Normal mode - 8 person",60,"Normal mode - 8 person::OnStartArena",8,1000,10,99; enablewaitingroomevent "Normal mode - 8 person"; end; diff --git a/npc/quests/The_Sign_Quest.txt b/npc/quests/The_Sign_Quest.txt index 28146f879..e2e6ee2f0 100644 --- a/npc/quests/The_Sign_Quest.txt +++ b/npc/quests/The_Sign_Quest.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= SinSloth(Most of the NPCs), MasterOfMuppets(Some of the NPCs + bug fixes) & Kargha(The quiz NPCs) //===== Current Version: ===================================== -//= 3.2 +//= 3.4 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -20,6 +20,7 @@ //= 3.2 Removed mapannounce used while debugging. [L0ne_W0lf] //= Moved the disablewaitingroomevent in dancing portion. //= 3.3 Applied Kazukin's fix for the dancing portion. (bugreport:3966) [L0ne_W0lf] +//= 3.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka] //============================================================ //============================================================ @@ -5216,8 +5217,7 @@ cmd_in01,33,33,1 script Standby Room#sign 66,{ end; OnInit: - waitingroom "DANCE~ DANCE~",20,"Standby Room#sign::OnStartArena",1; - //SetReqLevel 44 99 + waitingroom "DANCE~ DANCE~",20,"Standby Room#sign::OnStartArena",1,0,44,99; enablewaitingroomevent; end; diff --git a/npc/scripts_athena.conf b/npc/scripts_athena.conf index 58876d5a9..842e58aff 100644 --- a/npc/scripts_athena.conf +++ b/npc/scripts_athena.conf @@ -288,6 +288,7 @@ npc: npc/other/mail.txt npc: npc/other/marriage.txt npc: npc/other/monster_museum.txt //npc: npc/other/msg_boards.txt +npc: npc/other/poring_war.txt npc: npc/other/powernpc.txt npc: npc/other/pvp.txt npc: npc/other/resetskill.txt diff --git a/src/map/chat.c b/src/map/chat.c index 4c2a001ec..933674db8 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -23,7 +23,7 @@ int chat_triggerevent(struct chat_data *cd); // forward declaration /// Initializes a chatroom object (common functionality for both pc and npc chatrooms). /// Returns a chatroom object on success, or NULL on failure. -static struct chat_data* chat_createchat(struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev) +static struct chat_data* chat_createchat(struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl) { struct chat_data* cd; nullpo_retr(NULL, bl); @@ -36,6 +36,9 @@ static struct chat_data* chat_createchat(struct block_list* bl, const char* titl cd->users = 0; cd->limit = min(limit, ARRAYLENGTH(cd->usersd)); cd->trigger = trigger; + cd->zeny = zeny; + cd->minLvl = minLvl; + cd->maxLvl = maxLvl; memset(cd->usersd, 0, sizeof(cd->usersd)); cd->owner = bl; safestrncpy(cd->npc_event, ev, sizeof(cd->npc_event)); @@ -88,7 +91,7 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char pc_stop_walking(sd,1); - cd = chat_createchat(&sd->bl, title, pass, limit, pub, 0, ""); + cd = chat_createchat(&sd->bl, title, pass, limit, pub, 0, "", 0, 1, MAX_LEVEL); if( cd ) { cd->users = 1; @@ -125,6 +128,22 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) return 0; } + if( sd->status.base_level < cd->minLvl || sd->status.base_level > cd->maxLvl ) + { + if(sd->status.base_level < cd->minLvl) + clif_joinchatfail(sd,5); + else + clif_joinchatfail(sd,6); + + return 0; + } + + if( sd->status.zeny < cd->zeny ) + { + clif_joinchatfail(sd,4); + return 0; + } + pc_stop_walking(sd,1); cd->usersd[cd->users] = sd; cd->users++; @@ -299,7 +318,7 @@ int chat_kickchat(struct map_session_data* sd, const char* kickusername) } /// Creates a chat room for the npc. -int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev) +int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl) { struct chat_data* cd; nullpo_ret(nd); @@ -310,7 +329,14 @@ int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool p return 0; } - cd = chat_createchat(&nd->bl, title, "", limit, pub, trigger, ev); + if( zeny > MAX_ZENY || maxLvl > MAX_LEVEL ) + { + ShowError("chat_createnpcchat: npc '%s' has a required lvl or amount of zeny over the max limit!\n", nd->exname); + return 0; + } + + cd = chat_createchat(&nd->bl, title, "", limit, pub, trigger, ev, zeny, minLvl, maxLvl); + if( cd ) { nd->chat_id = cd->bl.id; diff --git a/src/map/chat.h b/src/map/chat.h index 569e6cbe8..be3efb513 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -17,6 +17,9 @@ struct chat_data { uint8 users; // current user count uint8 limit; // join limit uint8 trigger; // number of users needed to trigger event + uint32 zeny; // required zeny to join + uint32 minLvl; // minimum base level to join + uint32 maxLvl; // maximum base level allowed to join struct map_session_data* usersd[20]; struct block_list* owner; char npc_event[50]; @@ -30,7 +33,7 @@ int chat_changechatowner(struct map_session_data* sd, const char* nextownername) int chat_changechatstatus(struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub); int chat_kickchat(struct map_session_data* sd, const char* kickusername); -int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev); +int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl); int chat_deletenpcchat(struct npc_data* nd); int chat_enableevent(struct chat_data* cd); int chat_disableevent(struct chat_data* cd); diff --git a/src/map/script.c b/src/map/script.c index 3cb469ac5..e9e1a51c0 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9262,52 +9262,24 @@ BUILDIN_FUNC(globalmes) return 0; } -///////////////////////////////////////////////////////////////////// -// NPC waiting room (chat room) -// - -/// Creates a waiting room (chat room) for this npc. -/// -/// waitingroom "<title>",<limit>,<trigger>,"<event>"; -/// waitingroom "<title>",<limit>,"<event>",<trigger>; -/// waitingroom "<title>",<limit>,"<event>"; -/// waitingroom "<title>",<limit>; +/*========================================== + * Creates a waiting room (chat room) + *------------------------------------------*/ BUILDIN_FUNC(waitingroom) { - struct npc_data* nd; - const char* title; - const char* ev = ""; - int limit; - int trigger = 0; + struct npc_data* nd; int pub = 1; - - title = script_getstr(st, 2); - limit = script_getnum(st, 3); - - if( script_hasdata(st,5) ) - { - struct script_data* last = script_getdata(st, 5); - get_val(st, last); - if( data_isstring(last) ) - {// ,<trigger>,"<event>" - trigger = script_getnum(st, 4); - ev = script_getstr(st, 5); - } - else - {// ,"<event>",<trigger> - ev = script_getstr(st, 4); - trigger = script_getnum(st,5); - } - } - else if( script_hasdata(st,4) ) - {// ,"<event>" - ev = script_getstr(st, 4); - trigger = limit; - } + const char* title = script_getstr(st, 2); + int limit = script_getnum(st, 3); + const char* ev = script_hasdata(st,4) ? script_getstr(st,4) : ""; + int trigger = script_hasdata(st,5) ? script_getnum(st,5) : limit; + int zeny = script_hasdata(st,6) ? script_getnum(st,6) : 0; + int minLvl = script_hasdata(st,7) ? script_getnum(st,7) : 1; + int maxLvl = script_hasdata(st,8) ? script_getnum(st,8) : MAX_LEVEL; nd = (struct npc_data *)map_id2bl(st->oid); if( nd != NULL ) - chat_createnpcchat(nd, title, limit, pub, trigger, ev); + chat_createnpcchat(nd, title, limit, pub, trigger, ev, zeny, minLvl, maxLvl); return 0; } @@ -9488,9 +9460,13 @@ BUILDIN_FUNC(warpwaitingpc) return 0;// can't teleport on this map pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); + if( cd->zeny ) + pc_payzeny(sd, cd->zeny); } else pc_setpos(sd, mapindex_name2id(map_name), x, y, CLR_OUTSIGHT); + if( cd->zeny ) + pc_payzeny(sd, cd->zeny); } mapreg_setreg(add_str("$@warpwaitingpcnum"), i); return 0; @@ -15029,7 +15005,7 @@ struct script_function buildin_func[] = { BUILDIN_DEF(skillpointcount,""), BUILDIN_DEF(changebase,"i?"), BUILDIN_DEF(changesex,""), - BUILDIN_DEF(waitingroom,"si??"), + BUILDIN_DEF(waitingroom,"si?????"), BUILDIN_DEF(delwaitingroom,"?"), BUILDIN_DEF2(waitingroomkickall,"kickwaitingroomall","?"), BUILDIN_DEF(enablewaitingroomevent,"?"), |