//===== eAthena Script ======================================= //= Poring War (War of Porings) //===== By: ================================================== //= alexx //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= //= Custom version of official iRO Poring War. //= ^_^ Enjoy!! //===== Additional Comments: ================================= //= 1.0 First public release. [alexx] //= 1.0.1 Several bugfixes and typo edits. [alexx] //= 1.1 Added saving of items marcked as WoP Trophy. [alexx] //= 1.2 Added experemental saving at waiting stairs during //= the battle. [alexx] //===== Todo List: =========================================== //= * Add more official dialogues and announces //= * Add official skills and items restrictions //= * Make gameplay closer to official //= * Test, optimize and bugfix //============================================================ //- General Script Cofiguration //============================================================ - script WoP_Config -1,{ end; OnInit: set $WoP_Level,50; // Min Base Lv required to enter Poring realm // Officialy unset set $WoP_Donation,500; // Zeny ammount required to enter Poring realm // Officialy '500'z set $WoP_Players,1; // Amount of players required for each side, // Officialy '5' set $WoP_Reward,7539; // Reward item ID // Officialy '7539' Poring Coin set $WoP_Winner_Reward_Ammount,6; // Prise ammount for team-winner // Officialy '3' set $WoP_Looser_Reward_Ammount,1; // Prise ammount for team-looser // Officialy '0' set $WoP_Draw_Reward_Ammount,3; // Prise ammount if result is draw // Officialy '1' set $WoP_AngDev_Amount,2; // How many Angelings/Develings has each team // Officialy '2' set $WoP_Trophy,7773; // Item geting from killed player // Officialy '7773' War Badge set $WoP_Angeling_MobID,1766; // Mob ID of Angeling to spawn // Officialy ??? (unknown) set $WoP_Deviling_MobID,1767; // Mob ID of Deviling to spawn // Officialy ??? (unknown) set $WoP_Rounded,1; // Play (1) or don't play (0) with rounds // Officialy ??? (unknown) end; } //- Poring War Recrutier //============================================================ prt_fild08,159,371,5 script Poring War Recruitier 909,{ if ($WoP_Level && BaseLevel < $WoP_Level) { mes "[Poring]"; mes "Go level up first. You can't help me at this time."; emotion e_sob; close; } if (!WoP_Recruted) { mes "[Poring]"; mes "There's big trouble in the world of the little Porings... Can you help us?"; next; if (select("What is going on?:It doesn't matter.") == 2) { mes "[Poring]"; mes "If you change your mind please come and help us..."; emotion e_sob; close; } mes "[Poring]"; mes "The war between ^F06EAAAngeling^000000 and ^42B4FFDeveling^000000 come to a new level. I am here to recruit more people. Would you agree to help us?"; next; if (select("Yes, I agree to help you.:I don't care!") == 2) { mes "[Poring]"; mes "Nobody care about as. What we shall do now?.. *crying*"; emotion e_sob; close; } mes "[Poring]"; mes "I leed you to our realm, where you need to team up with other players in a party of five and then choose which side you will fight for."; set WoP_Recruted,1; next; } mes "[Poring]"; mes "But... life as a Poring is quite hard these days. Before I leed you please make a little donation of ^8DC63F"+$WoP_Donation+"z^000000. It is small amount but I need it very much."; next; if (select("Please take theese money.:Foget about it!") == 2) { mes "[Poring]"; mes "Oh poore poore little porings. What we shall do now?.. *crying*"; emotion e_sob; close; } if (Zeny < $WoP_Donation) { mes "[Poring]"; mes "You don't have ^8DC63F"+$WoP_Donation+"z^000000."; emotion e_sob; close; } mes "[Poring]"; mes "Thank you. Now you will be taken to the recruiting room. Are you ready to go?"; emotion e_thx; next; if (select("Yes, I am ready!:No, I need more time.") == 2) { mes "[Poring]"; mes "Please come back as soon as posible. We need help such brave warrior as you!"; close; } mes "[Poring]"; mes "Good luck. I belive you will win!"; set Zeny,Zeny-$WoP_Donation; close2; warp "poring_w01",98,103; end; } //- Waiting Room Portal //============================================================ poring_w01,111,135,0 script WoP_warp_out 45,1,1,{ end; OnTouch: warp getsavepoint(0), getsavepoint(1), getsavepoint(2); end; } //- Waiting Devi - Battle Guide //============================================================ poring_w01,96,99,3 script Devi#WoP_waiting 738,{ mes "[Devi]"; mes "Greetings human!~"; mes "Did you come to get envolved in the greate battle between"; mes "^F06EAAAngeling^000000 and ^42B4FFDeveling^000000?"; mes "...Good~ very good!~"; next; mes "[Devi]"; mes "If you wish mortal, I will explain you some Poring War issues. Would you like to learn about them?"; next; switch (select("Please, tell about registration.:Explane common battle rules.:I want to know about rewards.:I don't care anything...")) { case 1: mes "[Devi]"; mes "Listen carefuly human... I don't like to repeate twice!"; next; mes "[Devi]"; mes "At fist you need to enter the waiting room not far from me and wait it will be fulled with ^DD3636"+($WoP_Players*2)+"^000000 to pass first registration step."; mes "Next you should join with your friends on of two waiting rooms... Left room is for ^F06EAAAngeling team^000000 recruiting, right ~ for ^42B4FFDeveling^000000 one."; next; mes "[Devi]"; mes "When all the rooms will be full each team will be warped to the separated preparing spots."; mes "Here you have only 1 munute to register your party with ^007CCCMr.Doppel^000000. Then all the members should confirm their party with ^007CCCMr.Doppel^000000. If you late you will be warped out there!"; next; mes "[Devi]"; mes "I advise to orginize party before entering recruiting room."; mes "After all the players confermed their parties ^DD3636PvP mode^000000 will be enabled and both teams will be warped to their start spots."; close; case 2: mes "[Devi]"; mes "Listen carefuly human... I don't like to repeate twice!"; next; mes "[Devi]"; mes "From the moment both teams are warped to their start spots your only one goal is fighting against opposite team and kill their "+$WoP_AngDev_Amount+" ^F06EAAAngelings^000000 or ^42B4FFDevelings^000000."; next; mes "[Devi]"; mes "Kiling an enemies you will obtain War Badges signed with names of opposite team characters."; mes "Insert gained Bages into free slots of opposite team ^A1A1A1Gate Keeper^000000 to unlock way to location of ^F06EAAAngeling^000000 or ^42B4FFDeveling^000000."; next; mes "[Devi]"; mes "If you die during the battle you will be taken to the waiting stairs (right for ^42B4FFDeveling^000000 team, left for ^F06EAAAngeling^000000 team)."; mes "You are able to restore ^8DC63FHP^000000 and ^007CCCSP^000000 cliking the ^00C000Fontane of Life^000000 locating right behind the stairs."; next; if ($WoP_Rounded) { mes "[Devi]"; mes "The battle lasts "+$WoP_AngDev_Amount+" rounds. Your team has to terminate 1 ^F06EAAAngeling^000000/^42B4FFDeveling^000000 per round."; mes "Once it will be killed both teams will be sent to the stairs for preparing for the next round. 30 seconds is given to continue the battle."; next; } mes "[Devi]"; mes "Team killed more ^F06EAAAngelings^000000/^42B4FFDevelings^000000 than an opposite team will win the battle as soon as 20 minutes passed."; mes "Team killed all the "+$WoP_AngDev_Amount+" ^F06EAAAngelings^000000/^42B4FFDevelings^000000 will instantly win the battle."; mes "If time ran over and both teams have the same score the battle will have a draw result."; next; mes "[Devi]"; mes "When the battle will over all the players will be warped to Devi for rewarding. 1 minute will be given to recive a reward."; mes "All the playes who did not get in time will be warped out of Poring Realm with out any reward. So don't waste you time!"; close; case 3: mes "[Devi]"; mes "Listen carefuly human... I don't like to repeate twice!"; next; mes "[Devi]"; mes "The main reward is "+getitemname($WoP_Reward)+"."; mes "Winners get"; mes $WoP_Winner_Reward_Ammount+" "+getitemname($WoP_Reward)+"."; if ($WoP_Looser_Reward_Ammount) { mes "Loosers get"; mes $WoP_Looser_Reward_Ammount+" "+getitemname($WoP_Reward)+"."; } mes "If teams scored tied everybody get"; mes $WoP_Draw_Reward_Ammount+" "+getitemname($WoP_Reward)+"."; mes "You should talk to me at the central room to recive ones when the battle will be over."; next; mes "[Devi]"; mes "All the receved "+getitemname($WoP_Reward)+"s can be traded at ^8DC63FPoring Vending Machine^000000."; mes "Selling items are very-very intresting!"; close; default: mes "[Devi]"; mes "Human! Don't play with me or you will die!!"; mes ""; mes "Ha-ha-ha!~ I'm just joking... Don't be sacare."; close; } } //- Waiting Porings //============================================================ poring_w01,79,102,5 script #Poring_WoP_waiting_1 1002,{ end; } poring_w01,79,102,0 script Poring#WoP_waiting_1 111,3,3,{ end; } poring_w01,80,107,5 duplicate(#Poring_WoP_waiting_1) #Poring_WoP_waiting_2 1002 poring_w01,84,108,5 duplicate(#Poring_WoP_waiting_1) #Poring_WoP_waiting_3 1002 poring_w01,84,112,5 duplicate(#Poring_WoP_waiting_1) #Poring_WoP_waiting_4 1002 poring_w01,88,112,5 duplicate(#Poring_WoP_waiting_1) #Poring_WoP_waiting_5 1002 poring_w01,80,107,0 duplicate(Poring#WoP_waiting_1) Poring#WoP_waiting_2 111,3,3 poring_w01,84,108,0 duplicate(Poring#WoP_waiting_1) Poring#WoP_waiting_3 111,3,3 poring_w01,84,112,0 duplicate(Poring#WoP_waiting_1) Poring#WoP_waiting_4 111,3,3 poring_w01,88,112,0 duplicate(Poring#WoP_waiting_1) Poring#WoP_waiting_5 111,3,3 //- Waiting Marins //============================================================ poring_w01,114,112,3 script #Marin_WoP_waiting_1 1242,{ end; } poring_w01,114,112,0 script Marin#WoP_waiting_1 111,3,3,{ end; } poring_w01,117,111,3 duplicate(#Marin_WoP_waiting_1) #Marin_WoP_waiting_2 1242 poring_w01,117,108,3 duplicate(#Marin_WoP_waiting_1) #Marin_WoP_waiting_3 1242 poring_w01,122,108,3 duplicate(#Marin_WoP_waiting_1) #Marin_WoP_waiting_4 1242 poring_w01,121,105,3 duplicate(#Marin_WoP_waiting_1) #Marin_WoP_waiting_5 1242 poring_w01,117,111,0 duplicate(Marin#WoP_waiting_1) Marin#WoP_waiting_2 111,3,3 poring_w01,117,108,0 duplicate(Marin#WoP_waiting_1) Marin#WoP_waiting_3 111,3,3 poring_w01,122,108,0 duplicate(Marin#WoP_waiting_1) Marin#WoP_waiting_4 111,3,3 poring_w01,121,105,0 duplicate(Marin#WoP_waiting_1) Marin#WoP_waiting_5 111,3,3 //- Player Logout Control //============================================================ - script WoP_Logout -1,{ end; OnPCLogoutEvent: if (OnWoP) { if (!$WoP_Rewarding) { if (WoP_Team == 1) { set $Angeling_Team_Players,$Angeling_Team_Players-1; } if (WoP_Team == 2) { set $Deviling_Team_Players,$Deviling_Team_Players-1; } donpcevent "WoP_Logout::OnWarning"; } set WoP_Team,0; set OnWoP,0; set WoP_Party_Confirmed,0; if (countitem($WoP_Trophy)) { delitem $WoP_Trophy,countitem($WoP_Trophy); } if (WoP_Deleted_Trophy) { getitem $WoP_Trophy,WoP_Deleted_Trophy; set WoP_Deleted_Trophy,0; } savepoint WoP_Savepoint_Memo$,WoP_Savepoint_Memo_X,WoP_Savepoint_Memo_Y; if (!getmapusers("poring_w02")) { donpcevent "WoP_Common::OnReset"; } } end; OnWarning: if ($Angeling_Team_Players < $WoP_Players-1 || $Deviling_Team_Players < $WoP_Players-1) { for (set .i,0; .i<$WoP_Players; set .i,.i+1) { if (!isloggedin($wop_ang[.i],$wop_ang2[.i])) { deletearray $wop_ang[.i],1; set $WoP_AngelingPlayersAway,$WoP_AngelingPlayersAway+1; } if (!isloggedin($wop_dev[.i],$wop_dev2[.i])) { deletearray $wop_dev[.i],1; set $WoP_DevilingPlayersAway,$WoP_DevilingPlayersAway+1; } } if ($WoP_Players-$WoP_AngelingPlayersAway) { for (set .i,0; .i<$WoP_Players-$WoP_AngelingPlayersAway; set .i,.i+1) { attachrid($wop_ang[.i]); set OnWoP,0; set WoP_Team,0; set WoP_Party_Confirmed,0; if (countitem($WoP_Trophy)) { delitem $WoP_Trophy,countitem($WoP_Trophy); } if (WoP_Deleted_Trophy) { getitem $WoP_Trophy,WoP_Deleted_Trophy; set WoP_Deleted_Trophy,0; } savepoint WoP_Savepoint_Memo$,WoP_Savepoint_Memo_X,WoP_Savepoint_Memo_Y; } } if ($WoP_Players-$WoP_DevilingPlayersAway) { for (set .i,0; .i<$WoP_Players-$WoP_DevilingPlayersAway; set .i,.i+1) { attachrid($wop_dev[.i]); set OnWoP,0; set WoP_Team,0; set WoP_Party_Confirmed,0; if (countitem($WoP_Trophy)) { delitem $WoP_Trophy,countitem($WoP_Trophy); } if (WoP_Deleted_Trophy) { getitem $WoP_Trophy,WoP_Deleted_Trophy; set WoP_Deleted_Trophy,0; } savepoint WoP_Savepoint_Memo$,WoP_Savepoint_Memo_X,WoP_Savepoint_Memo_Y; } } donpcevent "WoP_Common::OnReset"; mapwarp "poring_w02","pay_fild04",255,193; end; } else { if (WoP_Team == 1) { mapannounce "poring_w02","Mr.Doppel : One of Angeling teammates has been disconnected. If it be repeated again this battle will be over.",bc_map,0xFF0000; } if (WoP_Team == 2) { mapannounce "poring_w02","Mr.Doppel : One of Deviling teammates has been disconnected. If it be repeated again this battle will be over.",bc_map,0xFF0000; } } end; OnPCLoginEvent: if (OnWoP) { set WoP_Team,0; set OnWoP,0; set WoP_Party_Confirmed,0; if (countitem($WoP_Trophy)) { delitem $WoP_Trophy,countitem($WoP_Trophy); } if (WoP_Deleted_Trophy) { getitem $WoP_Trophy,WoP_Deleted_Trophy; set WoP_Deleted_Trophy,0; } savepoint WoP_Savepoint_Memo$,WoP_Savepoint_Memo_X,WoP_Savepoint_Memo_Y; } end; } //- Common Reset //============================================================ - script WoP_Common -1,{ end; OnReset: set $WoP_Started,0; set $WoP_Rewarding,0; set $WoP_Team_Winner,0; set $Angeling_Team_Ready,0; set $Deviling_Team_Ready,0; set $Angeling_Team_Players,0; set $Deviling_Team_Players,0; set $Ang_Party,0; set $Dev_Party,0; set $Ang_Party_Confirmed,0; set $Dev_Party_Confirmed,0; set $Angelings_Amount,0; set $Devilings_Amount,0; donpcevent "WoP_RegClear::OnInit"; donpcevent "WoP_Battle::OnGate1Close"; donpcevent "WoP_Battle::OnGate2Close"; donpcevent "Poring#WoP_Reg::OnSart"; end; } //- Registration - Init //============================================================ - script WoP_RegClear -1,{ end; OnInit: deletearray $wop_ang[0]; deletearray $wop_dev[0]; deletearray $wop_ang2[0]; deletearray $wop_dev2[0]; end; } //- Registration - 1st Stage NPC //============================================================ poring_w01,91,99,3 script Poring#WoP_Reg 909,{ end; OnStart: sleep 2000; waitingroom "Recruiting "+($WoP_Players*2)+" Members of Battle Participants",($WoP_Players*2),"Poring#WoP_Reg::OnReady"; end; OnReady: sleep 5000; warpwaitingpc "poring_w01",101,68; donpcevent "Poring#WoP_Reg::OnClose"; sleep 1000; donpcevent "Poring#WoP_Reg_Ang::OnPrepare"; donpcevent "Marin#WoP_Reg_Dev::OnPrepare"; sleep 300000; areawarp "poring_w01",91,74,112,63,"poring_w01",100,100; end; OnClose: delwaitingroom; end; } //- Registration - 2nd Stage NPC's //============================================================ poring_w01,91,68,5 script Poring#WoP_Reg_Ang 909,{ end; OnPrepare: sleep 2000; waitingroom "Angeling Team Recruiter",$WoP_Players,"WoP_Join::OnAngTeamJoin"; end; OnWarp: warpwaitingpc "poring_w02",25,175; copyarray $wop_ang[0],$@warpwaitingpc[0],$WoP_Players; for(set .i,0; .i<$WoP_Players; set .i,.i+1) { set $wop_ang2[.i],getcharid(0,rid2name($wop_ang[.i])); attachrid($wop_ang[.i]); set OnWoP,1; set WoP_Team,1; if (countitem($WoP_Trophy)) { delitem $WoP_Trophy,countitem($WoP_Trophy); set WoP_Deleted_Trophy,countitem($WoP_Trophy); } set WoP_Savepoint_Memo$,getsavepoint(0); set WoP_Savepoint_Memo_X,getsavepoint(1); set WoP_Savepoint_Memo_Y,getsavepoint(2); set $Angeling_Team_Players,$Angeling_Team_Players+1; detachrid; } delwaitingroom; donpcevent "Marin#WoP_Reg_Dev::OnWarp"; end; } poring_w01,112,68,3 script Marin#WoP_Reg_Dev 1242,{ end; OnPrepare: sleep 2000; waitingroom "Deviling Team Recruiter",$WoP_Players,"WoP_Join::OnDevTeamJoin"; end; OnWarp: warpwaitingpc "poring_w02",170,175; copyarray $wop_dev[0],$@warpwaitingpc[0],$WoP_Players; for(set .i,0; .i<$WoP_Players; set .i,.i+1) { set $wop_dev2[.i],getcharid(0,rid2name($wop_dev[.i])); attachrid($wop_dev[.i]); set OnWoP,1; set WoP_Team,2; set $Develing_Team_Players,$Develing_Team_Players+1; detachrid; } delwaitingroom; areawarp "poring_w01",91,74,112,63,"poring_w01",100,100; donpcevent "WoP_PartyReg::OnPrepare"; end; } //- Registration - 3rd Stage NPC's //============================================================ poring_w02,26,181,3 script Mr.Doppel#Ang 739,{ set @Ang_team_word$,"F06EAAAngeling"; set @Dev_team_word$,"42B4FFDeviling"; if (!getd("$"+strnpcinfo(2)+"_Party")) { if (!getcharid(1)) { mes "[Mr.Doppel]"; mes "Sorry, human. But you must be in a party if you want to register."; mes "Orginize one and try again."; close; } if (getcharid(0) != getpartyleader(getcharid(1),2)) { mes "[Mr.Doppel]"; mes "I can't do anything for you, human... Only the party leader can register."; close; } // if ($WoP_Players != getpartymember(getcharid(1))) { // mes "[Mr.Doppel]"; // mes "Your party is too small or too large. You should organize Party of "+$WoP_Players+" members."; // close; // } mes "[Mr.Doppel]"; mes "Hello, human... I can see you are the leader of"; mes "^0072BC"+getpartyname(getcharid(1))+"^000000 party."; mes "Do you want to register your party for ^"+getd("@"+strnpcinfo(2)+"_team_word$")+" Team^000000?"; next; if (select("Yes, I do.:No, I don't") == 2) { mes "[Mr.Doppel]"; mes "You should hurry with registration if you don't wanna be warped out here."; close; } if (!getd("$"+strnpcinfo(2)+"_Party")) { mes "[Mr.Doppel]"; mes "^0072BC"+getpartyname(getcharid(1))+"^000000 party"; mes "was registred as party of "+strnpcinfo(2)+" Team."; mes "Now all your friends should confirm their party with me."; set WoP_Party_Confirmed,1; setd "$"+strnpcinfo(2)+"_Party",getcharid(1); if (strnpcinfo(2) == "Ang") { dispbottom "Party Name registration of Angeling Team is complete. All Members should confirm your party with Mr.Doppel."; // mapannounce "poring_w02","Party Name registration of Angeling Team is complete. All Members should confirm your party with Mr.Doppel.",bc_map,0x00FF00; // not shure what to use here } else { dispbottom "Party Name registration of Angeling Team is complete. All Members should confirm your party with Mr.Doppel."; // mapannounce "poring_w02","Party Name registration of Angeling Team is complete. All Members should confirm your party with Mr.Doppel.",bc_map,0x00FF00; // not shure what to use here } donpcevent "WoP_PartyReg::On"+strnpcinfo(2)+"PartyConfirm"; close; } else { mes "[Mr.Doppel]"; mes "Sorry, but some of your friends has just registred ^0072BC"+getpartyname(getd("$"+strnpcinfo(2)+"_Party"))+"^000000 party for ^"+getd("@"+strnpcinfo(2)+"_team_word$")+" Team^000000. Now you do to join his party."; close; } } else { if (!WoP_Party_Confirmed) { mes "[Mr.Doppel]"; mes "Hello, human. Do you want to confirm your party for ^"+getd("@"+strnpcinfo(2)+"_team_word$")+" Team^000000?"; next; if (select("Yes, I do.:No, I don't") == 2) { mes "[Mr.Doppel]"; mes "You should hurry with confirmation if you don't wanna the battle be over ever be not started."; close; } if (!getcharid(1)) { mes "[Mr.Doppel]"; mes "Sorry, you must in a party for confirmation. Join ^0072BC"+getpartyname(getd("$"+strnpcinfo(2)+"_Party"))+"^000000 party as soon as posible!"; close; } else if (getcharid(1) != getd("$"+strnpcinfo(2)+"_Party")) { mes "[Mr.Doppel]"; mes "Hey human, don't try to cheat me. Your Party Name is not like registred one. Join registered Party as soon as posible!"; close; } mes "[Mr.Doppel]"; mes "You just have confirmed your party membership."; if (getd("$"+strnpcinfo(2)+"_Party_Confirmed") < $WoP_Players-1) { mes "Please wait others do the same..."; } set WoP_Party_Confirmed,1; donpcevent "WoP_PartyReg::On"+strnpcinfo(2)+"PartyConfirm"; close; } else { mes "[Mr.Doppel]"; mes "You have just confirmed your Party. Please wait for teammates..."; close; } } } poring_w02,170,181,3 duplicate(Mr.Doppel#Ang) Mr.Doppel#Dev 739 //- Registration - Events //============================================================ - script WoP_Join -1,{ end; OnAngTeamJoin: set $Angeling_Team_Ready,1; if ($Deviling_Team_Ready == 1) { initnpctimer; } end; OnDevTeamJoin: set $Deviling_Team_Ready,1; if ($Angeling_Team_Ready == 1) { initnpctimer; } end; OnTimer10000: if($Angeling_Team_Ready == 1 && $Deviling_Team_Ready == 1){ set $Angeling_Team_Ready,0; set $Angeling_Team_Ready,0; stopnpctimer; set $wop,1; donpcevent "Poring#WoP_Reg_Ang::OnWarp"; sleep 3000; set $wop,0; end; } end; } - script WoP_PartyReg -1,{ end; OnPrepare: sleep 1000; mapannounce "poring_w02","You have 1 minute for registration. Party Leaders should register their Parties with Mr.Doppel.",bc_map,0x00FF00; initnpctimer; end; OnTimer30000: mapannounce "poring_w02","Mr.Doppel : 30 seconds left to prepare for battle.",bc_map,0xF49AC1; end; OnTimer60000: stopnpctimer; if ($Ang_Party_Confirmed == $WoP_Players && $Dev_Party_Confirmed == $WoP_Players) { sleep 1000; mapannounce "poring_w02","Mr.Doppel : Both teams are ready. Battle will begin in 10 seconds.",bc_map,0xF49AC1; sleep 5000; for (set .i,1; .i<6; set .i,.i+1) { mapannounce "poring_w02","Mr.Doppel : "+(6-.i)+".",bc_map,0xF49AC1; sleep 1000; } mapannounce "poring_w02","Mr.Doppel : Let the battle begin!!",bc_map,0xF49AC1; sleep 2000; pvpon "poring_w02"; donpcevent "WoP_Battle::OnStart"; } else { mapwarp "poring_w02","pay_fild04",255,193; sleep 2000; mapannounce "pay_fild04","Mr.Doppel : Unfortunetly you have failed to prepare your Parties for battle. You should to start from the first point to try again.",bc_map,0xF49AC1; donpcevent "WoP_Common::OnReset"; } end; OnAngPartyConfirm: set $Ang_Party_Confirmed,$Ang_Party_Confirmed+1; if ($Ang_Party_Confirmed == $WoP_Players) { mapannounce "poring_w02","Mr.Doppel : Angeling Team is ready for battle.",bc_map,0x00FF00; } if ($Dev_Party_Confirmed == $WoP_Players) { donpcevent "WoP_PartyReg::OnTimer60000"; } end; OnDevPartyConfirm: set $Dev_Party_Confirmed,$Dev_Party_Confirmed+1; if ($Dev_Party_Confirmed == $WoP_Players) { mapannounce "poring_w02","Mr.Doppel : Deviling Team is ready for battle.",bc_map,0x00FF00; } if ($Ang_Party_Confirmed == $WoP_Players) { donpcevent "WoP_PartyReg::OnTimer60000"; } end; } //- Battle Timer //============================================================ - script WoP_BattleTimer -1,{ end; OnStart: initnpctimer; end; OnTimer600000: donpcevent "WoP_Battle::OnBattleEnd"; end; OnStop: stopnpctimer; end; } //- General Battle Events //============================================================ - script WoP_Battle -1,{ end; OnInit: donpcevent "WoP_Common::OnReset"; end; OnStart: if ($Angelings_Amount > 0 || $Devilings_Amount > 0) { donpcevent "WoP_Battle::OnTeamsRelease"; donpcevent "WoP_Battle::OnGate1Close"; donpcevent "WoP_Battle::OnGate2Close"; } else { set $WoP_Started,1; donpcevent "WoP_BattleTimer::OnStart"; set $Angelings_Amount,$WoP_AngDev_Amount; set $Devilings_Amount,$WoP_AngDev_Amount; areawarp "poring_w02",15,186,36,165,"poring_w02",80,82; areawarp "poring_w02",159,186,180,165,"poring_w02",116,82; } donpcevent "WoP_Battle::OnAngelingsSpawn"; donpcevent "WoP_Battle::OnDevilingsSpawn"; end; OnBattleEnd: donpcevent "WoP_BattleTimer::OnStop"; if ($Angelings_Amount > $Devilings_Amount) { set $WoP_Team_Winner,1; } if ($Angelings_Amount < $Devilings_Amount) { set $WoP_Team_Winner,2; } pvpoff "poring_w02"; set $WoP_Rewarding,1; donpcevent "WoP_RewardTimer::OnStart"; sleep 3000; if ($WoP_Team_Winner == 1) { mapannounce "poring_w02","Mr.Doppel : The Battle is over. Angeling Team has won the battle. Congradulations to the Team of Winners!",bc_map,0x00FF00; } else if ($WoP_Team_Winner == 2) { mapannounce "poring_w02","Mr.Doppel : The Battle is over. Deviling Team has won the battle. Congratulations to the Team of Winners!",bc_map,0x00FF00; } else { mapannounce "poring_w02","Mr.Doppel : The Battle is over. There is no Winner or Looser for this time.",bc_map,0x00FF00; } sleep 2000; mapwarp "poring_w02","poring_w02",100,197; sleep 1000; mapannounce "poring_w02","Mr.Doppel : Allow me to offer a Souvenir for the humans who bravely fought for Porings. Please Talk to Devi.",bc_map,0x00FF00; sleep 5000; mapannounce "poring_w02","Devi : You have 1 minute to get your reward. If time ends you will be warped out from here with nothing.",bc_map,0x00FF00; end; OnRoundEnd: sleep 3000; for (set .i,0; .i<$WoP_Players; set .i,.i+1) { attachrid($WoP_ang[.i]); if (OnWoP) { warp "poring_w02",rand(44,51),rand(76,87); } attachrid($WoP_dev[.i]); if (OnWoP) { warp "poring_w02",rand(146,153),rand(76,87); } } sleep 2000; mapannounce "poring_w02","Mr.Doppel : Next round in 30 seconds.",bc_map,0xF49AC1; sleep 20000; mapannounce "poring_w02","Mr.Doppel : Battle will continue in 10 seconds.",bc_map,0xF49AC1; sleep 5000; for (set .i,1; .i<6; set .i,.i+1) { mapannounce "poring_w02","Mr.Doppel : "+(6-.i)+".",bc_map,0xF49AC1; sleep 1000; } mapannounce "poring_w02","Mr.Doppel : Let's fight!",bc_map,0xF49AC1; sleep 1000; donpcevent "WoP_Battle::OnStart"; end; OnTeamsRelease: areawarp "poring_w02",42,76,51,87,"poring_w02",59,82; areawarp "poring_w02",146,76,155,87,"poring_w02",138,82; end; OnAngelingsSpawn: monster "poring_w02",98,41,"Angeling",$WoP_Angeling_MobID,($WoP_AngDev_Amount-$WoP_Rounded*($WoP_AngDev_Amount-1)),"WoP_Battle::OnAngelingFall"; end; OnDevilingsSpawn: monster "poring_w02",98,124,"Deviling",$WoP_Deviling_MobID,($WoP_AngDev_Amount-$WoP_Rounded*($WoP_AngDev_Amount-1)),"WoP_Battle::OnDevilingFall"; end; OnPCDieEvent: getmapxy @map$,@x,@y,0; if (@map$ == "poring_w02" && OnWoP) { if (WoP_Team == 1) { // warp "poring_w02",rand(44,51),rand(76,87); savepoint "poring_w02",rand(44,51),rand(76,87); } if (WoP_Team == 2) { // warp "poring_w02",rand(146,153),rand(76,87); savepoint "poring_w02",rand(146,153),rand(76,87); } // sleep2 500; // atcommand "@alive"; } end; OnPCKillEvent: getmapxy @map$,@x,@y,0; if (@map$ == "poring_w02" && OnWoP) { getitem2 $WoP_Trophy,1,1,0,0,254,0,getcharid(0,rid2name(killedrid)),0; } end; OnGate1Close: disablenpc "Angeling_Warp_To"; disablenpc "Angeling_Warp_Out"; set $bages_equipped_1,0; end; OnGate1Open: enablenpc "Angeling_Warp_To"; enablenpc "Angeling_Warp_Out"; sleep 1000; mapannounce "poring_w02","Mr.Doppel : Angeling Gates are now open. Angeling is avalble to attack!",bc_map,0x00FF00; end; OnGate2Close: disablenpc "Deviling_Warp_To"; disablenpc "Deviling_Warp_Out"; set $bages_equipped_2,0; end; OnGate2Open: enablenpc "Deviling_Warp_To"; enablenpc "Deviling_Warp_Out"; sleep 1000; mapannounce "poring_w02","Mr.Doppel : Deviling Gates are now open. Deviling is avalble to attack!",bc_map,0x00FF00; end; OnAngelingFall: set $Angelings_Amount,$Angelings_Amount-1; mapannounce "poring_w02","Mr.Doppel : Angeling has fallen!!",8; if ($Angelings_Amount == 0) { donpcevent "WoP_Battle::OnBattleEnd"; } else if ($WoP_Rounded) { donpcevent "WoP_Battle::OnRoundEnd"; } end; OnDevilingFall: set $Devilings_Amount,$Devilings_Amount-1; mapannounce "poring_w02","Mr.Doppel : Deviling has fallen!!",8; if ($Devilings_Amount == 0) { donpcevent "WoP_Battle::OnBattleEnd"; } else if ($WoP_Rounded) { donpcevent "WoP_Battle::OnRoundEnd"; } end; } //- Stairs Warps Controllers //============================================================ - script WoP_LeftStairsWarp -1,{ end; OnInit: disablenpc "Left_Stairs_Warp"; end; OnPCDieEvent: if (OnWoP) { sleep 1000; if ($Left_Stairs_Warp_Opened) { disablenpc "Left_Stairs_Warp"; set $Left_Stairs_Warp_Opened,0; stopnpctimer; } initnpctimer; } end; OnTimer10000: stopnpctimer; if (getareausers("poring_w02",42,76,51,87) > 0) { if (!$Left_Stairs_Warp_Opened) { enablenpc "Left_Stairs_Warp"; set $Left_Stairs_Warp_Opened,1; } initnpctimer; } if (getareausers("poring_w02",42,76,51,87) == 0 && $Left_Stairs_Warp_Opened) { disablenpc "Left_Stairs_Warp"; set $Left_Stairs_Warp_Opened,0; stopnpctimer; } end; } - script WoP_RightStairsWarp -1,{ end; OnInit: disablenpc "Right_Stairs_Warp"; end; OnPCDieEvent: if (OnWoP) { sleep 1000; if ($Right_Stairs_Warp_Opened) { disablenpc "Left_Stairs_Warp"; set $Right_Stairs_Warp_Opened,0; stopnpctimer; } initnpctimer; } end; OnTimer10000: stopnpctimer; if (getareausers("poring_w02",146,76,155,87) > 0) { if (!$Right_Stairs_Warp_Opened) { enablenpc "Right_Stairs_Warp"; set $Right_Stairs_Warp_Opened,1; } initnpctimer; } if (getareausers("poring_w02",146,76,155,87) == 0 && $Right_Stairs_Warp_Opened) { disablenpc "Right_Stairs_Warp"; set $Right_Stairs_Warp_Opened,0; stopnpctimer; } end; } //- Gate Keepers //============================================================ poring_w02,99,52,0 script Angeling Gate Keeper#1 111,{ if (OnWoP) { cutin "wop_emb0"+getd("$bages_equipped_"+strnpcinfo(2)),2; if (WoP_Team == atoi(strnpcinfo(2))) { mes "- It's your team Gate Keeper. -"; } else { if (getd("$bages_equipped_"+strnpcinfo(2)) == 4) { mes "- Badges are all equipped. -"; } else if (countitem($WoP_Trophy)) { while (1) { if (countitem($WoP_Trophy)) { mes "- Choose your action. -"; next; if (select("Equip badge on the free slot.:Cancel.") == 2) { mes "- Exiting -"; close2; cutin "",255; end; } mes "- You have successfuly equipped the badge. -"; delitem $WoP_Trophy,1; setd "$bages_equipped_"+strnpcinfo(2),getd("$bages_equipped_"+strnpcinfo(2))+1; cutin "wop_emb0"+getd("$bages_equipped_"+strnpcinfo(2)),2; next; if (getd("$bages_equipped_"+strnpcinfo(2)) == 4) { mes "- Badges are all equipped. -"; donpcevent "WoP_Battle::OnGate"+strnpcinfo(2)+"Open"; close2; cutin "",255; end; } } else { mes "- You don't have bages to equip. -"; break; } } } else { mes "- You don't have bages to equip. -"; } } close2; cutin "",255; end; } } poring_w02,98,113,0 duplicate(Angeling Gate Keeper#1) Deviling Gate Keeper#2 111 //- Gate Warps //============================================================ poring_w02,103,53,0 warp Angeling_Warp_To 2,2,poring_w02,94,47 poring_w02,94,50,0 warp Angeling_Warp_Out 2,2,poring_w02,103,56 poring_w02,94,112,0 warp Deviling_Warp_To 2,2,poring_w02,103,118 poring_w02,103,115,0 warp Deviling_Warp_Out 2,2,poring_w02,94,109 //- Stairs Warps //============================================================ poring_w02,50,82,0 warp Left_Stairs_Warp 1,1,poring_w02,59,82 poring_w02,147,82,0 warp Right_Stairs_Warp 1,1,poring_w02,138,82 //- Heal Fontanes //============================================================ poring_w02,36,82,0 script Fontane of Life#1 111,{ if (OnWoP && WoP_Team == atoi(strnpcinfo(2))) { specialeffect2 312; percentheal 100,100; } end; } poring_w02,161,82,0 duplicate(Fontane of Life#1) Fontane of Life#2 111 //- Reward - NPC //============================================================ poring_w02,99,201,3 script Devi#wop_reward 738,{ mes "[Devi]"; mes "Oh, human!~ Did you came for reward?"; mes "Let me see what your reward is..."; next; mes "[Devi]"; if (!$WoP_Team_Winner) { mes "Nobody won the battle at this time."; mes "Your reward is "+$WoP_Draw_Reward_Ammount+" "+getitemname($WoP_Reward)+"."; } else if (WoP_Team == $WoP_Team_Winner) { mes "Good! I know you have won the battle."; mes "Your reward is "+$WoP_Winner_Reward_Ammount+" "+getitemname($WoP_Reward)+"."; } else if ($WoP_Looser_Reward_Ammount) { mes "Don't be sad. You will win next time."; mes "Your compensation is "+$WoP_Looser_Reward_Ammount+" "+getitemname($WoP_Reward)+"."; } else { mes "Don't be sad. You will win next time."; } if (countitem($WoP_Trophy)) { next; mes "[Devi]"; mes "Wait a second please..."; mes "As I see you have "+countitem($WoP_Trophy)+" "+getitemname($WoP_Trophy)+" at the inventory."; mes "Sorry, human, but you can't leave them. I have to take them before you leave this place."; delitem $WoP_Trophy,countitem($WoP_Trophy); } if (WoP_Deleted_Trophy) { next; mes "[Devi]"; mes "I have to return your "+WoP_Deleted_Trophy+" "+getitemname($WoP_Trophy)+"."; getitem $WoP_Trophy,WoP_Deleted_Trophy; set WoP_Deleted_Trophy,0; } next; mes "[Devi]"; mes "See you later, human!~ Bye!"; close2; switch ($WoP_Team_Winner) { case 1: case 2: if (WoP_Team == $WoP_Team_Winner) { getitem $WoP_Reward,$WoP_Winner_Reward_Ammount; } else if ($WoP_Looser_Reward_Ammount) { getitem $WoP_Reward,$WoP_Looser_Reward_Ammount; } break; default: getitem $WoP_Reward,$WoP_Draw_Reward_Ammount; } set OnWoP,0; set WoP_Team,0; set WoP_Party_Confirmed,0; savepoint WoP_Savepoint_Memo$,WoP_Savepoint_Memo_X,WoP_Savepoint_Memo_Y; warp "pay_fild04",255,193; if (!getmapusers("poring_w02")) { donpcevent "WoP_RewardTimer::OnStop"; } end; } //- Reward - Timer //============================================================ - script WoP_RewardTimer -1,{ end; OnStart: initnpctimer; end; OnTimer54000: mapannounce "poring_w02","Devi : Hurry up!! Time is running low...",bc_map,0x00FF00; end; OnTimer64000: for (set .i,0; .i<$WoP_Players; set .i,.i+1) { attachrid($wop_ang[.i]); if (OnWoP) { set OnWoP,0; set WoP_Team,0; set WoP_Party_Confirmed,0; if (countitem($WoP_Trophy)) { delitem $WoP_Trophy,countitem($WoP_Trophy); } } attachrid($wop_dev[.i]); if (OnWoP) { set OnWoP,0; set WoP_Team,0; set WoP_Party_Confirmed,0; if (countitem($WoP_Trophy)) { delitem $WoP_Trophy,countitem($WoP_Trophy); } } } mapwarp "poring_w02","pay_fild04",255,193; donpcevent "WoP_RewardTimer::OnStop"; end; OnStop: donpcevent "WoP_Common::OnReset"; stopnpctimer; end; } //- Poring Vending Machine - NPC //============================================================ pay_fild04,265,194,3 script Poring Vending Machine 909,{ mes "[Poring Vending Machine]"; mes "Do you have ^DD3636"+getitemname($WoP_Reward)+"s^000000?"; mes "Using these you can buy various interesting and exclusive items."; next; if (select("Buy items.:Leave.") == 2) { callfunc "PoringVend",0,0; } mes "[Poring Vending Machine]"; mes "What type of items would you like to buy?"; next; switch (select("Prize Medals:Usable Items:Mercenary Scrolls:Accesories:Nothing")) { case 1: callfunc "PoringVend",7515,4; case 2: mes "[Poring Vending Machine]"; mes "What Usable Item would you like to buy?"; next; switch (select("Tribal Solidarity:Poring Box:Nothing")) { case 1: callfunc "PoringVend",658,20; case 2: callfunc "PoringVend",12109,30; default: callfunc "PoringVend",0,0; } break; case 3: mes "[Poring Vending Machine]"; mes "What Mercenary Scroll would you like to buy?"; next; switch (select("Wild Rose Mercenary Scroll:Doppelganger Mercenary Scroll:Egnigem Cenia Mercenary Scroll:Nothing")) { case 1: callfunc "PoringVend",12300,15; case 2: callfunc "PoringVend",12301,20; case 3: callfunc "PoringVend",12302,20; default: callfunc "PoringVend",0,0; } break; case 4: mes "[Poring Vending Machine]"; mes "What Accesory would you like to buy?"; next; switch (select("Novice Figure:Swordman Figure:Acolyte Figure:Mage Figure:Archer Figure:Thief Figure:Merchant Figure:Nothing")) { case 1: callfunc "PoringVend",2765,50; case 2: callfunc "PoringVend",2766,100; case 3: callfunc "PoringVend",2767,100; case 4: callfunc "PoringVend",2768,100; case 5: callfunc "PoringVend",2769,100; case 6: callfunc "PoringVend",2770,100; case 7: callfunc "PoringVend",2771,100; default: callfunc "PoringVend",0,0; } break; default: callfunc "PoringVend",0,0; } } //- Poring Vending Machine - Function //============================================================ function script PoringVend { if (getarg(0) == 0) { mes "[Poring Vending Machine]"; mes "Come back later."; close; } else { mes "[Poring Vending Machine]"; mes "How many ^007CCC"+getitemname(getarg(0))+"s^000000 do you wish to buy?"; next; set .@vend_amount,1; if (select("I will input the ammount.:1 ea.") == 1) { input .@vend_amount; } if (!.@vend_amount) { mes "[Poring Vending Machine]"; mes "Zero? What does it mean?"; close; } mes "[Poring Vending Machine]"; mes "Would you like to buy ^007CCC"+.@vend_amount+" "+getitemname(getarg(0))+"^000000 for ^DD3636"+(getarg(1)*.@vend_amount)+" ^DD3636"+getitemname($WoP_Reward)+"s^000000^000000?"; next; switch (select("Yes:No")) { case 1: if(countitem($WoP_Reward) < (getarg(1)*.@vend_amount)){ mes "[Poring Vending Machine]"; mes "Sorry, but you don't have enough ^DD3636"+getitemname($WoP_Reward)+"s^000000 to comlete this deal."; close; } else { mes "[Poring Vending Machine]"; mes "Thank you. Come back later."; getitem getarg(0),.@vend_amount; delitem $WoP_Reward,(getarg(1)*.@vend_amount); close; } case 2: mes "[Poring Vending Machine]"; mes "Come back later."; close; } } return; } //- Mapflags //============================================================ poring_w01 mapflag nowarpto poring_w01 mapflag nowarp poring_w01 mapflag noteleport poring_w01 mapflag nomemo poring_w01 mapflag nosave SavePoint poring_w01 mapflag nobranch poring_w01 mapflag noicewall poring_w02 mapflag nowarpto poring_w02 mapflag nowarp poring_w02 mapflag noteleport poring_w02 mapflag nomemo poring_w02 mapflag nosave SavePoint poring_w02 mapflag nobranch poring_w02 mapflag noicewall poring_w02 mapflag monster_noteleport poring_w02 mapflag nopenalty