From d2b18c292a3a59f785a1eb27208f7379065f6317 Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Sat, 14 Aug 2010 16:06:23 +0000 Subject: * Quest log kill count now updated properly. (Added from topic 253813) * More battleground editing, and some bug fixes. - * ALL BATTLEGROUNDS ARE NOW ACTIVE BY DEFAULT. PLEASE CONTINUE TESTING * - Rewrote the Badge Exchange NPC in bg_common.txt, is official now. - Other changes to the bg_common folder, including disabled GM NPC. - Completely rewrote Flavius for the most part, from ground up. - Moved old Flavius battlegrounds to /custom/battleground folder. - Restored original bg_common, and KVM to /custom/battleground - Fixed wall bugs in Tierra Gorge, and added an oninit to the timers. - Other minor tweaks to both Tierra Gorge and KVM scripts. - Fixed the pseudo-cooldown on KVM not working properly, I hope. - Added global time2str function which will be used later in Endless tower. * Applied Epoque's mapflag clean up, which removes flags from scripts. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14374 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/battleground/bg_common.txt | 680 ++++++++++++++++++++++------- npc/battleground/bg_flavius_01.txt | 453 -------------------- npc/battleground/bg_flavius_02.txt | 453 -------------------- npc/battleground/flavius/flavius01.txt | 759 +++++++++++++++++++++++++++++++++ npc/battleground/flavius/flavius02.txt | 759 +++++++++++++++++++++++++++++++++ npc/battleground/kvm/kvm01.txt | 49 ++- npc/battleground/kvm/kvm02.txt | 49 ++- npc/battleground/kvm/kvm03.txt | 49 ++- npc/battleground/kvm/kvm_enter.txt | 20 +- npc/battleground/tierra/tierra01.txt | 7 +- npc/battleground/tierra/tierra02.txt | 7 +- 11 files changed, 2137 insertions(+), 1148 deletions(-) delete mode 100644 npc/battleground/bg_flavius_01.txt delete mode 100644 npc/battleground/bg_flavius_02.txt create mode 100644 npc/battleground/flavius/flavius01.txt create mode 100644 npc/battleground/flavius/flavius02.txt (limited to 'npc/battleground') diff --git a/npc/battleground/bg_common.txt b/npc/battleground/bg_common.txt index df3dbaf41..cf6a85bc1 100644 --- a/npc/battleground/bg_common.txt +++ b/npc/battleground/bg_common.txt @@ -1,15 +1,23 @@ -// ============================================================================== +//===== eAthena Script ======================================= // BattleGround System - Common NPCs -// ============================================================================== - -// MapFlags -// ********************************************************************* - -bat_room mapflag nomemo -bat_room mapflag nowarpto -bat_room mapflag nobranch -bat_room mapflag nopenalty -bat_room mapflag noteleport +//===== By: ================================================== +//= ????, L0ne_W0lf +//===== Current Version: ===================================== +//= 1.1 +//===== Compatible With: ===================================== +//= eAthena 1.0 +//===== Description: ========================================= +//= [AEGIS Conversion] +//= Battleground npcs: +//= - Generals and Aides +//= - Battlegroun Warper +//= - Kafra and Repairman. +//= - GM Management NPC (Disabled by default) +//= - Badge Exhanger (Tierra and Flavius.) +//===== Additional Comments: ================================= +//= 1.0 First Version. +//= 1.1 Updated several NPCs to Official. +//============================================================ // Generals //============================================================ @@ -269,197 +277,551 @@ payon,189,105,3 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit5 728 lighthalzen,153,86,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit6 728 rachel,149,138,3 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit7 728 -// Time calculation Function -// ********************************************************************* -function script Time2Str { - set .@Time_Left, getarg(0) - gettimetick(2); - - set .@Days, .@Time_Left / 86400; - set .@Time_Left, .@Time_Left - (.@Days * 86400); - set .@Hours, .@Time_Left / 3600; - set .@Time_Left, .@Time_Left - (.@Hours * 3600); - set .@Minutes, .@Time_Left / 60; - set .@Time_Left, .@Time_Left - (.@Minutes * 60); - - set .@Time$, ""; - if( .@Days > 1 ) - set .@Time$, .@Time$ + .@Days + " days, "; - else if( .@Days > 0 ) - set .@Time$, .@Time$ + .@Days + " day, "; - - if( .@Hours > 1 ) - set .@Time$, .@Time$ + .@Hours + " hours, "; - else if( .@Hours > 0 ) - set .@Time$, .@Time$ + .@Hours + " hour, "; - - if( .@Minutes > 1 ) - set .@Time$, .@Time$ + .@Minutes + " minutes, "; - else if( .@Minutes > 0 ) - set .@Time$, .@Time$ + .@Minutes + " minute, "; - - if( .@Time_Left > 1 || .@Time_Left == 0 ) - set .@Time$, .@Time$ + .@Time_Left + " seconds."; - else if( .@Time_Left == 1 ) - set .@Time$, .@Time$ + .@Time_Left + " second."; - - return .@Time$; -} - -// Exit from Registration -// ********************************************************************* -- script warp2bat_room -1,{ - end; - -OnTouch: - set BG_Delay_Tick, gettimetick(2) + 30; - warp "bat_room",154,149; - end; -} - -// Flavius bat_b02 -bat_room,57,81,0 duplicate(warp2bat_room) bat1 45,1,1 -bat_room,57,90,0 duplicate(warp2bat_room) bat2 45,1,1 +// Additional warps // Empty -bat_room,85,81,0 duplicate(warp2bat_room) bat5 45,1,1 -bat_room,85,90,0 duplicate(warp2bat_room) bat6 45,1,1 +bat_room,57,81,0 warp bat1 1,1,bat_room,154,149 +bat_room,57,90,0 warp bat2 1,1,bat_room,154,149 // Empty -bat_room,85,220,0 duplicate(warp2bat_room) bat7 45,1,1 -bat_room,85,211,0 duplicate(warp2bat_room) bat8 45,1,1 -// Free BG -bat_room,113,81,0 duplicate(warp2bat_room) bat9 45,1,1 -bat_room,113,90,0 duplicate(warp2bat_room) bat10 45,1,1 +bat_room,85,81,0 warp bat5 1,1,bat_room,154,149 +bat_room,85,90,0 warp bat6 1,1,bat_room,154,149 // Free BG -bat_room,141,81,0 duplicate(warp2bat_room) bat13 45,1,1 -bat_room,141,90,0 duplicate(warp2bat_room) bat14 45,1,1 +bat_room,113,81,0 warp bat9 1,1,bat_room,154,149 +bat_room,113,90,0 warp bat10 1,1,bat_room,154,149 // Free BG -bat_room,141,220,0 duplicate(warp2bat_room) bat15 45,1,1 -bat_room,141,211,0 duplicate(warp2bat_room) bat16 45,1,1 +bat_room,141,81,0 warp bat13 1,1,bat_room,154,149 +bat_room,141,90,0 warp bat14 1,1,bat_room,154,149 // Free BG -bat_room,169,81,0 duplicate(warp2bat_room) bat17 45,1,1 -bat_room,169,90,0 duplicate(warp2bat_room) bat18 45,1,1 +bat_room,169,81,0 warp bat17 1,1,bat_room,154,149 +bat_room,169,90,0 warp bat18 1,1,bat_room,154,149 // Free BG -bat_room,197,81,0 duplicate(warp2bat_room) bat21 45,1,1 -bat_room,197,90,0 duplicate(warp2bat_room) bat22 45,1,1 +bat_room,197,81,0 warp bat21 1,1,bat_room,154,149 +bat_room,197,90,0 warp bat22 1,1,bat_room,154,149 // Free BG -bat_room,225,81,0 duplicate(warp2bat_room) bat25 45,1,1 -bat_room,225,90,0 duplicate(warp2bat_room) bat26 45,1,1 -// Flavius bat_b01 -bat_room,253,81,0 duplicate(warp2bat_room) bat29 45,1,1 -bat_room,253,90,0 duplicate(warp2bat_room) bat30 45,1,1 +bat_room,225,81,0 warp bat25 1,1,bat_room,154,149 +bat_room,225,90,0 warp bat26 1,1,bat_room,154,149 +// Empty +bat_room,253,81,0 warp bat29 1,1,bat_room,154,149 +bat_room,253,90,0 warp bat30 1,1,bat_room,154,149 // Empty -bat_room,253,220,0 duplicate(warp2bat_room) bat31 45,1,1 -bat_room,253,211,0 duplicate(warp2bat_room) bat32 45,1,1 +bat_room,253,220,0 warp bat31 1,1,bat_room,154,149 +bat_room,253,211,0 warp bat32 1,1,bat_room,154,149 // Kafra -// ********************************************************************* +//============================================================ bat_room,148,147,4 script Kafra Staff::kaf_bat 861,{ cutin "kafra_09",2; callfunc "F_Kafra",0,2,1,150,0; } -// Badges Repairman -// ********************************************************************* - +// Repairman +//============================================================ bat_room,138,144,5 script Repairman#bg 86,{ callfunc "repairmain","Repairman"; end; } -// Badges Exchange -// ********************************************************************* +/* +// GM Management NPC +//============================================================ +bat_room,1,151,3 script Switch#batgnd 81,{ + input .@input,0,2000; + if (.@input == 0) { + mes "The command has been cancelled."; + close; + } + else if (.@input == 1854) { + mes "May I help ypu?"; + next; + switch(select("Close Battlefield:Open Battlefield:Reset a01:Reset b01:Reset a02:Reset b02")) { + case 1: + disablenpc "Tierra Gorge Officer#01a"; + disablenpc "Tierra Gorge Officer#02a"; + disablenpc "Tierra Gorge Officer#01b"; + disablenpc "Tierra Gorge Officer#02b"; + disablenpc "Flavius Officer#01a"; + disablenpc "Flavius Officer#01b"; + disablenpc "Flavius Officer#02a"; + disablenpc "Flavius Officer#02b"; + break; + case 2: + enablenpc "Tierra Gorge Officer#01a"; + enablenpc "Tierra Gorge Officer#02a"; + enablenpc "Tierra Gorge Officer#01b"; + enablenpc "Tierra Gorge Officer#02b"; + enablenpc "Flavius Officer#01a"; + enablenpc "Flavius Officer#01b"; + enablenpc "Flavius Officer#02a"; + enablenpc "Flavius Officer#02b"; + break; + case 3: + donpcevent "start#bat_a01::OnEnable"; + break; + case 4: + donpcevent "start#bat_b01::OnEnable"; + break; + case 5: + donpcevent "start#bat_a02::OnEnable"; + break; + case 6: + donpcevent "start#bat_b02::OnEnable"; + break; + } + mes "Complete"; + close; + } +} +*/ +// Badges Exchange +//============================================================ bat_room,160,150,3 script Erundek 109,{ + if (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 "[Erundek]"; - mes "Welcome, mighty warrior."; - mes "What can I do for you today ?"; + mes "Do you have the battlefield badges?"; + mes "I can exchange Bravery Badges and Valor Badges for reward items."; next; - switch( select("Check the Catalog","Exchange Bravery Badges","Exchange Valor Badges","Hmm, nothing I guess.") ) - { + switch(select("Exchange Badges:Check the Catalog")) { + case 1: + mes "[Erundek]"; + mes "Which type of items would you like to exchange?"; + mes "To check more information about the reward items, please use our ^3131FFCatalog^000000."; + next; + switch(select("Weapon:Armor:Accessory:Consumable")) { case 1: mes "[Erundek]"; - mes "We have many items, so please take a look and purchase deliberately."; - close2; - Readbook 11010,1; - end; - case 4: + mes "You chose ^3131FFWeapon^000000."; + mes "The following weapons are available for exchange with the battlefield badges."; + mes "Please note that items for ^3131FFBravery Badges are indicated as (BB)^000000, and ^3131FFValor Badges as (VB)^000000."; + next; + switch(select("Dagger/OneSword/TwoSword/TwoSpear:Staff/Mace/TwoAxe/Shuriken:Bow/Katar/Music/Whip:Book/Knuckle:Revolver/Rifle/Gatling/Shotgun/Launcher")) { + case 1: + mes "[Erundek]"; + mes "The following items are available in the ^3131FFDagger, One-Handed Sword, Two-Handed Sword, and Two-Handed Spear^000000 category."; + next; + switch(select("Brave Assassin's Damascus(BB):Valorous Assassin's Damascus(VB):Brave Gladiator's Blade(BB):Valorous Gladiator's Blade(VB):Brave Assaulter's Katzbalger(BB):Valorous Assaulters's Katzbalger(VB):Assaulter Spear:Assaulter Lance")) { + case 1: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],13036,1; //BF_Dagger1 + break; + case 2: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],13037,1; //BF_Dagger2 + break; + case 3: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],13411,1; //BF_Sword2 + break; + case 4: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],13410,1; //BF_Sword1 + break; + case 5: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1183,1; //BF_Two_Handed_Sword1 + break; + case 6: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1184,1; //BF_Two_Handed_Sword2 + break; + case 7: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1425,1; //BF_Spear1 + break; + case 8: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1482,1; //BF_Lance1 + break; + } + break; + case 2: + mes "[Erundek]"; + mes "The following items are available in the ^3131FFStaff / Mace / Two-Handed Axe / Huuma Shuriken^000000 category."; + next; + switch(select("Warlock's Magic Wand(BB):Warlock's Battle Wand(VB):Strong Recovery Wand:Speedy Recovery Wand:Brave Battlefield Morning Star(BB):Valorous Battlefield Morning Star(VB):Insane Battle Axe(BB):Insane Battle Axe(VB):Brave Huuma Front Shuriken(BB):Valorous Huuma Front Shuriken(VB)")) { + case 1: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1632,1; //BF_Staff1 + break; + case 2: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1633,1; //BF_Staff2 + break; + case 3: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1634,1; //BF_Staff3 + break; + case 4: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1635,1; //BF_Staff4 + break; + case 5: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1543,1; //BF_Morning_Star2 + break; + case 6: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1542,1; //BF_Morning_Star1 + break; + case 7: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1380,1; //BF_Two_Handed_Axe2 + break; + case 8: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1379,1; //BF_Two_Handed_Axe1 + break; + case 9: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],13305,1; //BF_Huuma_Shuriken1 + break; + case 10: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],13306,1; //BF_Huuma_Shuriken2 + break; + } + break; + case 3: + mes "[Erundek]"; + mes "The following weapons are available in the ^3131FFBow / Katar / Musical Instrument / Whip^000000 category."; + next; + switch(select("Brave Battle CrossBow(BB):Valorous Battle CrossBow(VB):Brave Carnage Katar(BB):Valorous Carnage Katar(VB):Brave Battlefield Guitar(BB):Valorous Battlefield Guitar(VB):Brave Battle Lariat(BB):Valorous Battle Lariat(VB)")) { + case 1: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1739,1; //BF_Bow2 + break; + case 2: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1738,1; //BF_Bow1 + break; + case 3: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1279,1; //BF_Katar1 + break; + case 4: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1280,1; //BF_Katar2 + break; + case 5: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1924,1; //BF_Instrument2 + break; + case 6: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1923,1; //BF_Instrument1 + break; + case 7: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1978,1; //BF_Whip2 + break; + case 8: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1977,1; //BF_Whip1 + break; + } + break; + case 4: + mes "[Erundek]"; + mes "The following weapons are available in the ^3131FFBook / Knuckle^000000 category."; + next; + switch(select("Brave Battle Strategy Book(BB):Valorous Battle Strategy Book(VB):Brave Battle Fist(BB):Valorous Battle Fist(VB)")) { + case 1: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1574,1; //BF_Book1 + break; + case 2: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1575,1; //BF_Book2 + break; + case 3: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],1824,1; //BF_Knuckle2 + break; + case 4: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],1823,1; //BF_Knuckle1 + break; + } + break; + case 5: + mes "[Erundek]"; + mes "The following weapons are available in the ^3131FFRevolver / Rifle / Gatling Gun / Shotgun / Grenade Launcher^000000 category."; + next; + switch(select("Soldier Revolver:Soldier Rifle:Soldier Gatling Gun:Soldier Shotgun:Soldier Grenade Launcher")) { + case 1: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],13108,1; //BF_Pistol1 + break; + case 2: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],13171,1; //BF_Rifle1 + break; + case 3: + setarray .@cost[0],7828,100; //BF_Badge1 + setarray .@item[0],13172,1; //BF_Gatling_Gun1 + break; + case 4: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],13173,1; //BF_Shotgun1 + break; + case 5: + setarray .@cost[0],7829,100; //BF_Badge2 + setarray .@item[0],13174,1; //BF_Launcher1 + break; + } + break; + } + if (.@cost[0] == 7829) + set .@type$,"(VB)"; + else +v set .@type$,"(BB)"; mes "[Erundek]"; - mes "As you wish."; - mes "See you later."; + mes "You chose ^3131FF"+getitemname(.@item[0])+""+.@type$+"^000000."; + mes "You can exchange for this item with ^FF0000"+.@cost[1]+" "+getitemname(.@cost[0])+"^000000."; + mes "Would you like to exchange?"; + next; + switch(select("Do not exchange:Exchange")) { + case 1: + mes "[Erundek]"; + mes "Do you need more time to check the items?"; + break; + case 2: + mes "[Erundek]"; + mes "Would you like to spend ^FF0000"+.@cost[1]+" "+getitemname(.@cost[0])+"^000000 and receive an ^3131FF"+getitemname(.@item[0])+""+.@type$+"^000000?"; + next; + mes "[Erundek]"; + mes "Remember, Battleground Reward Items are ^FF0000Character Bound^000000. Are you sure you want this item?"; + next; + switch(select("Yes:No")) { + case 1: + if (countitem(.@cost[0]) >= .@cost[1]) { + mes "[Erundek]"; + mes "Thank you for exchanging."; + delitem .@cost[0],.@cost[1]; + getitem .@item[0],.@item[1]; + } + else { + mes "[Erundek]"; + mes "I'm sorry, but you don't have enough badges to exchange."; + } + break; + case 2: + mes "[Erundek]"; + mes "Do you need more time to check out the items?"; + break; + } + break; + } close; - case 2: // Bravery Badges + case 2: mes "[Erundek]"; - mes "So you want to exchange ^0000FFBravery Badges^000000 from the Battle of Tierra Gorge."; - mes "What kind of item do you want to exchange?"; + mes "You chose ^3131FFArmor^000000."; + mes "The following armors are available for exchange with the battlefield badges."; next; - deletearray .@Item_DB[0],127; - set .@Badge, 7828; - - switch( select("Weapons:Garment:Footgear:Armor:Accessory") ) - { - case 1: setarray .@Item_DB[0],13036,13411,1425,1632,1634,1543,1924,1978,1574,1824,1183,1380,13305,1279,1739,13108,13172; set .@Value, 100; break; - case 2: setarray .@Item_DB[0],2538,2539,2540; set .@Value, 50; break; - case 3: setarray .@Item_DB[0],2435,2436,2437; set .@Value, 50; break; - case 4: setarray .@Item_DB[0],2376,2377,2378,2379,2380,2381,2382; set .@Value, 80; break; - case 5: setarray .@Item_DB[0],2720,2721,2722,2723,2724,2725,2733; set .@Value, 500; break; + switch(select("Garments / Shoes:Armor")) { + case 1: + switch(select("Captain's Manteau:Commander's Manteau:Sheriff's Manteau:Battle Greave:Combat Boots:Battle Boots")) { + case 1: + setarray .@cost[0],7828,50,7829,50; //BF_Badge1 + setarray .@item[0],2538,1; //Commander_Manteau + break; + case 2: + setarray .@cost[0],7828,50,7829,50; //BF_Badge1 + setarray .@item[0],2539,1; //Commander_Manteau_ + break; + case 3: + setarray .@cost[0],7828,50,7829,50; //BF_Badge1 + setarray .@item[0],2540,1; //Sheriff_Manteau + break; + case 4: + setarray .@cost[0],7828,50,7829,50; //BF_Badge1 + setarray .@item[0],2435,1; //Battle_Greave + break; + case 5: + setarray .@cost[0],7828,50,7829,50; //BF_Badge1 + setarray .@item[0],2436,1; //Combat_Boots + break; + case 6: + setarray .@cost[0],7828,50,7829,50; //BF_Badge1 + setarray .@item[0],2437,1; //Battle_Boots + break; + } + break; + case 2: + switch(select("Assaulter Plate:Elite Engineer Armor:Assassin Robe:Warlock's Battle Robe:Medic's Robe:Elite Archer Suit:Elite Shooter Suit")) { + case 1: + setarray .@cost[0],7828,80,7829,80; //BF_Badge1 + setarray .@item[0],2376,1; //Assaulter_Plate + break; + case 2: + setarray .@cost[0],7828,80,7829,80; //BF_Badge1 + setarray .@item[0],2377,1; //Elite_Engineer_Armor + break; + case 3: + setarray .@cost[0],7828,80,7829,80; //BF_Badge1 + setarray .@item[0],2378,1; //Assassin_Robe + break; + case 4: + setarray .@cost[0],7828,80,7829,80; //BF_Badge1 + setarray .@item[0],2379,1; //Warlock_Battle_Robe + break; + case 5: + setarray .@cost[0],7828,80,7829,80; //BF_Badge1 + setarray .@item[0],2380,1; //Medic_Robe + break; + case 6: + setarray .@cost[0],7828,80,7829,80; //BF_Badge1 + setarray .@item[0],2381,1; //Elite_Archer_Suit + break; + case 7: + setarray .@cost[0],7828,80,7829,80; //BF_Badge1 + setarray .@item[0],2382,1; //Elite_Shooter_Suit + break; + } + break; + } + break; + case 3: + mes "[Erundek]"; + mes "You chose ^3131FFAccessory^000000."; + mes "You can exchange the Medal of Honors with your Badges according to the job classes, as follows:"; + next; + switch(select("Gunslinger:Swordman/Taekwon Master:Thief:Acolyte:Magician:Archer:Merchant")) { + case 1: + setarray .@cost[0],7828,500,7829,500; //BF_Badge1 + setarray .@item[0],2733,1; //Medal_Gunner + break; + case 2: + setarray .@cost[0],7828,500,7829,500; //BF_Badge1 + setarray .@item[0],2720,1; //Medal_Swordman + break; + case 3: + setarray .@cost[0],7828,500,7829,500; //BF_Badge1 + setarray .@item[0],2721,1; //Medal_Thief + break; + case 4: + setarray .@cost[0],7828,500,7829,500; //BF_Badge1 + setarray .@item[0],2722,1; //Medal_Acolyte + break; + case 5: + setarray .@cost[0],7828,500,7829,500; //BF_Badge1 + setarray .@item[0],2723,1; //Medal_Mage + break; + case 6: + setarray .@cost[0],7828,500,7829,500; //BF_Badge1 + setarray .@item[0],2724,1; //Medal_Archer + break; + case 7: + setarray .@cost[0],7828,500,7829,500; //BF_Badge1 + setarray .@item[0],2725,1; //Medal_Merchant + break; } - break; - case 3: // Valor Badges + case 4: mes "[Erundek]"; - mes "So you want to exchange ^FF0000Valor Badges^000000 from the Battle of Flavius."; - mes "What kind of item do you want to exchange?"; + mes "You chose ^3131FFConsumable^000000."; + mes "The following consumable items are available for exchange with the battlefield badges:"; next; - deletearray .@Item_DB[0],127; - set .@Badge, 7829; - - switch( select("Weapons:Garment:Footgear:Armor:Accessory") ) - { - case 1: setarray .@Item_DB[0],13037,13410,1633,1635,1542,1923,1977,1575,1823,1184,1482,1379,13306,1280,1738,13171,13173,13174; set .@Value, 100; break; - case 2: setarray .@Item_DB[0],2538,2539,2540; set .@Value, 50; break; - case 3: setarray .@Item_DB[0],2435,2436,2437; set .@Value, 50; break; - case 4: setarray .@Item_DB[0],2376,2377,2378,2379,2380,2381,2382; set .@Value, 80; break; - case 5: setarray .@Item_DB[0],2720,2721,2722,2723,2724,2725,2733; set .@Value, 500; break; + switch(select("Tasty Pink Ration:Tasty White Ration:Military Ration A:Military Ration B:Military Ration C")) { + case 1: + setarray .@cost[0],7828,10,7829,10; //BF_Badge1 + setarray .@item[0],12269,1; //Tasty_Colonel + break; + case 2: + setarray .@cost[0],7828,10,7829,10; //BF_Badge1 + setarray .@item[0],12270,1; //Tasty_Major + break; + case 3: + setarray .@cost[0],7828,5,7829,5; //BF_Badge1 + setarray .@item[0],12271,1; //Mre_A + break; + case 4: + setarray .@cost[0],7828,10,7829,10; //BF_Badge1 + setarray .@item[0],12272,1; //Mre_B + break; + case 5: + setarray .@cost[0],7828,10,7829,10; //BF_Badge1 + setarray .@item[0],12273,1; //Mre_C + break; } - break; + } + break; + case 2: + mes "[Erundek]"; + mes "We have many items, so please take a look and purchase deliberately."; + close2; + ReadBook 11010,1; + end; } mes "[Erundek]"; - mes "What item do you want to exchange?"; - mes "If you are not sure, check the catalog."; - next; - - set .@Menu$, ""; - set .@Count, getarraysize(.@Item_DB); - for( set .@i, 0; .@i < .@Count; set .@i, .@i + 1 ) - set .@Menu$, .@Menu$ + getitemname(.@Item_DB[.@i]) + ":"; - - set .@Item_ID, .@Item_DB[select(.@Menu$) - 1]; - - mes "[Erundek]"; - mes "Would you like to exchange ^FF0000" + .@Value + " " + getitemname(.@Badge) + "^000000 for a ^0000FF" + getitemname(.@Item_ID) + "^000000?"; - next; - mes "Remember, Battleground Reward Items are ^FF0000Character Bound^000000."; - mes "Are you sure you want this item?"; + mes "You chose ^3131FF"+getitemname(.@item[0])+"^000000."; + switch(.@item[0]) { + case 2720: mes "This item is for Swordman and Taekwon Master Class only."; break; + case 2721: mes "This item is for Thief Class only."; break; + case 2722: mes "This item is for Acolyte Class only."; break; + case 2723: mes "This item is for Magician Class only."; break; + case 2724: mes "This item is for Archer Class only."; break; + case 2725: mes "This item is for Merchant Class only."; break; + case 2733: mes "This item is for Gunslinger only."; break; + default: break; + } + mes "You can exchange for this item with ^FF0000"+.@cost[1]+" "+getitemname(.@cost[0])+" or "+.@cost[3]+" "+getitemname(.@cost[2])+"^000000."; + mes "Would you like to exchange?"; next; - - if( select("Yes:No") == 2 ) - { + switch(select("Do not exchange:Exchange")) { + case 1: mes "[Erundek]"; mes "Do you need more time to check the items?"; - close; - } - - if( countitem(.@Badge) < .@Value ) - { + break; + case 2: mes "[Erundek]"; - mes "I'm sorry, but you don't have enough badges to exchange."; - close; + mes "Which Badge do you want to exchange?"; + mes "You need ^3131FF"+.@cost[1]+" Badges^000000 to exchange."; + next; + if (.@item[0] < 12269 || .@item[0] > 12273 ) { + mes "[Erundek]"; + mes "Remember, Battleground Reward Items are ^FF0000Character Bound^000000. Are you sure you want this item?"; + next; + } + switch(select("Bravery Badge:Valor Badge:Cancel")) { + case 1: + if (countitem(.@cost[0]) >= .@cost[1]) { + mes "[Erundek]"; + mes "Thank you for exchanging."; + delitem .@cost[0],.@cost[1]; + getitem .@item[0],.@item[1]; + } + else { + mes "[Erundek]"; + mes "You do not have enough Bravery Badges."; + } + break; + case 2: + if (countitem(.@cost[2]) >= .@cost[3]) { + mes "[Erundek]"; + mes "Thank you for exchanging."; + delitem .@cost[2],.@cost[3]; + getitem .@item[0],.@item[1]; + } + else { + mes "[Erundek]"; + mes "You do not have enough Valor Badges."; + } + break; + case 3: + mes "[Erundek]"; + mes "You cancelled the exchange."; + break; + } + break; } - - delitem .@Badge,.@Value; - getitem .@Item_ID,1; - mes "[Erundek]"; - mes "Thank you for exchanging."; close; } diff --git a/npc/battleground/bg_flavius_01.txt b/npc/battleground/bg_flavius_01.txt deleted file mode 100644 index 1a61b4255..000000000 --- a/npc/battleground/bg_flavius_01.txt +++ /dev/null @@ -1,453 +0,0 @@ -// ============================================================================== -// BattleGround System - Flavius 1 -// ============================================================================== - -// Registration NPC's -// ********************************************************************* - -bat_room,86,227,4 script Registration::Fl1R_Guillaume 418,{ - end; -OnInit: - waitingroom "Battle Station 10 Players",10,"Flavius_BG1::OnGuillaumeJoin",1; - end; -OnEnterBG: - set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",390,10,"Flavius_BG1::OnGuillaumeQuit",""); - end; -} - -bat_room,85,204,0 script Registration::Fl1R_Croix 414,{ - end; -OnInit: - waitingroom "Battle Station 10 Players",10,"Flavius_BG1::OnCroixJoin",1; - end; -OnEnterBG: - set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",10,290,"Flavius_BG1::OnCroixQuit",""); - end; -} - -// Battleground Engine -// ********************************************************************* - -- script Flavius_BG1 -1,{ - end; - -OnInit: - disablenpc "Guillaume Vintenar#fl1"; - disablenpc "Croix Vintenar#fl1"; - disablenpc "Therapist in battle#fl11"; - disablenpc "Therapist in battle#fl12"; - end; - -OnGuillaumeQuit: -OnCroixQuit: - set BG_Delay_Tick, gettimetick(2) + 1200; - end; - -OnGuillaumeJoin: -OnCroixJoin: - if( $@FlaviusBG1 == 0 ) - donpcevent "Flavius_BG1::OnReadyCheck"; - end; - -OnReadyCheck: - if( $@FlaviusBG1 ) - end; - set .@Guillaume, getwaitingroomstate(0,"Fl1R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"Fl1R_Croix"); - - if( .@Guillaume < 10 || .@Croix < 10 ) - { - mapannounce "bat_room","Battleground -- Flavius [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0x006400; - end; - } - - // BG Variables - set $@FlaviusBG1, 1; - set $@FlaviusBG1_Victory, 0; - set .Guillaume_Score, 0; - set .Guillaume_Loss, 0; - set .Croix_Score, 0; - set .Croix_Loss, 0; - set .Match, 0; - // Prepare NPC - donpcevent "#gfl1_respawn::OnBGStart"; - donpcevent "#cfl1_respawn::OnBGStart"; - enablenpc "Therapist in battle#fl11"; - enablenpc "Therapist in battle#fl12"; - disablenpc "Guillaume Vintenar#fl1"; - disablenpc "Croix Vintenar#fl1"; - // Build and Warp Teams - donpcevent "Fl1R_Guillaume::OnEnterBG"; - donpcevent "Fl1R_Croix::OnEnterBG"; - announce "Battleground -- Flavius [80-99] has started!",0,0x006400; - initnpctimer; - // Start Match!! - -OnRoundStart: - sleep 2000; - if( $@FlaviusBG1 != 1 ) end; - - areapercentheal "bat_b01",382,2,397,17,100,100; - areapercentheal "bat_b01",2,282,17,297,100,100; - bg_warp $@FlaviusBG1_id1,"bat_b01",311,224; - bg_warp $@FlaviusBG1_id2,"bat_b01",87,75; - - sleep 2000; - if( $@FlaviusBG1 != 1 ) end; - - set .Match, .Match + 1; - // Crystal Spawn - set .Guillaume_Crystal, bg_monster($@FlaviusBG1_id1,"bat_b01",328,150,"Crystal Guillaume",1914,"Flavius_BG1::OnGuillaumeBreak"); - setwall "bat_b01",327,149,2,6,0,"gui_wall1-1"; - setwall "bat_b01",329,149,2,0,0,"gui_wall1-2"; - setwall "bat_b01",329,151,2,2,0,"gui_wall1-3"; - setwall "bat_b01",327,151,2,4,0,"gui_wall1-4"; - - set .Croix_Crystal, bg_monster($@FlaviusBG1_id2,"bat_b01",62,150,"Crystal Croix",1915,"Flavius_BG1::OnCroixBreak"); - setwall "bat_b01",61,149,2,6,0,"cro_wall1-1"; - setwall "bat_b01",63,149,2,0,0,"cro_wall1-2"; - setwall "bat_b01",63,151,2,2,0,"cro_wall1-3"; - setwall "bat_b01",61,151,2,4,0,"cro_wall1-4"; - - // Guardian Spawns - bg_monster $@FlaviusBG1_id1,"bat_b01",328,160,"Guillaume Guardian",1949,"Flavius_BG1::OnGuiGuardian"; - bg_monster $@FlaviusBG1_id1,"bat_b01",328,140,"Guillaume Guardian",1950,"Flavius_BG1::OnGuiGuardian"; - set .Guillaume_Guardian, 2; - bg_monster $@FlaviusBG1_id2,"bat_b01",62,160,"Croix Guardian",1949,"Flavius_BG1::OnCroGuardian"; - bg_monster $@FlaviusBG1_id2,"bat_b01",61,140,"Croix Guardian",1950,"Flavius_BG1::OnCroGuardian"; - set .Croix_Guardian, 2; - // Announces - mapannounce "bat_b01","The Battle of Flavius [ " + .Match + " ] Round has begun!!",1,0x006400; - end; - -OnRoundStop: - // Remove Monsters - killmonster "bat_b01","Flavius_BG1::OnGuiGuardian"; - killmonster "bat_b01","Flavius_BG1::OnCroGuardian"; - delwall "gui_wall1-1"; - delwall "gui_wall1-2"; - delwall "gui_wall1-3"; - delwall "gui_wall1-4"; - killmonster "bat_b01","Flavius_BG1::OnGuillaumeBreak"; - delwall "cro_wall1-1"; - delwall "cro_wall1-2"; - delwall "cro_wall1-3"; - delwall "cro_wall1-4"; - killmonster "bat_b01","Flavius_BG1::OnCroixBreak"; - end; - -OnGuiGuardian: - if( set(.Guillaume_Guardian, .Guillaume_Guardian - 1) <= 0 ) - { - delwall "gui_wall1-1"; - delwall "gui_wall1-2"; - delwall "gui_wall1-3"; - delwall "gui_wall1-4"; - mapannounce "bat_b01","The Guillaume Crystal is vulnerable to attack!",1,0x0000FF; - } - end; - -OnCroGuardian: - if( set(.Croix_Guardian, .Croix_Guardian - 1) <= 0 ) - { - delwall "cro_wall1-1"; - delwall "cro_wall1-2"; - delwall "cro_wall1-3"; - delwall "cro_wall1-4"; - mapannounce "bat_b01","The Croix Crystal is vulnerable to attack!",1,0xFF0000; - } - end; - -OnGuillaumeBreak: - donpcevent "Flavius_BG1::OnRoundStop"; - set .Guillaume_Loss, .Guillaume_Loss + 1; - if( set(.Croix_Score, .Croix_Score + 1) < 2 ) - { - bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score; - mapannounce "bat_b01","The Guillaume Crystal has been destroyed!",1,0x0000FF; - donpcevent "Flavius_BG1::OnRoundStart"; - } - else - { - bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score; - mapannounce "bat_b01","The Croix army has won the Battle of Flavius!",1,0xFF0000; - set $@FlaviusBG1_Victory, 2; - donpcevent "Flavius_BG1::OnMatchEnd"; - } - end; - -OnCroixBreak: - donpcevent "Flavius_BG1::OnRoundStop"; - set .Croix_Loss, .Croix_Loss + 1; - if( set(.Guillaume_Score, .Guillaume_Score + 1) < 2 ) - { - bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score; - mapannounce "bat_b01","The Croix Crystal has been destroyed!",1,0xFF0000; - donpcevent "Flavius_BG1::OnRoundStart"; - } - else - { - bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score; - mapannounce "bat_b01","The Guillaume army has won the Battle of Flavius!",1,0x0000FF; - set $@FlaviusBG1_Victory, 1; - donpcevent "Flavius_BG1::OnMatchEnd"; - } - end; - -OnTimer2400000: - mapannounce "bat_b01","Battle of Flavius will ends in 5 minutes",1,0x006400; - end; -OnTimer2640000: - mapannounce "bat_b01","Battle of Flavius will ends in 1 minute",1,0x006400; - end; - -OnTimer2700000: - if( .Croix_Score > .Guillaume_Score ) - { - mapannounce "bat_b01","The Croix army has won the Battle of Flavius!",1,0xFF0000; - set $@FlaviusBG1_Victory, 2; - } - else if( .Croix_Score < .Guillaume_Score ) - { - mapannounce "bat_b01","The Guillaume army has won the Battle of Flavius!",1,0x0000FF; - set $@FlaviusBG1_Victory, 1; - } - else - { - mapannounce "bat_b01","The Battle of Flavius is over. The time is out, this is a Tie",1,0x006400; - set $@FlaviusBG1_Victory, 3; - } - -OnMatchEnd: - set $@FlaviusBG1, 2; - stopnpctimer; - donpcevent "#gfl1_respawn::OnBGStop"; - donpcevent "#cfl1_respawn::OnBGStop"; - disablenpc "Therapist in battle#fl11"; - disablenpc "Therapist in battle#fl12"; - enablenpc "Guillaume Vintenar#fl1"; - enablenpc "Croix Vintenar#fl1"; - sleep 2000; - bg_warp $@FlaviusBG1_id1,"bat_b01",390,10; - bg_warp $@FlaviusBG1_id2,"bat_b01",10,290; - sleep 3000; - mapannounce "bat_b01","Battle of Flavius will close in 1 minute!",1,0x006400; - initnpctimer; - end; - -OnTimer30000: - if( $@FlaviusBG1 == 2 ) - mapannounce "bat_b01","Battle of Flavius will close in 30 seconds!",1,0x006400; - end; -OnTimer50000: - if( $@FlaviusBG1 == 2 ) - mapannounce "bat_b01","Battle of Flavius will close in 10 seconds!",1,0x006400; - end; - -OnTimer60000: - if( $@FlaviusBG1 != 2 ) - end; -OnReset: - stopnpctimer; - donpcevent "Flavius_BG1::OnRoundStop"; - set .Guillaume_Score, 0; - set .Guillaume_Crystal, 0; - set .Guillaume_Loss, 0; - set .Croix_Score, 0; - set .Croix_Crystal, 0; - set .Croix_Loss, 0; - set .Match, 0; - set $@FlaviusBG1_Victory, 0; - // NPC's - disablenpc "Guillaume Vintenar#fl1"; - disablenpc "Croix Vintenar#fl1"; - disablenpc "Therapist in battle#fl11"; - disablenpc "Therapist in battle#fl12"; - - if( $@FlaviusBG1_id1 ) { bg_destroy $@FlaviusBG1_id1; set $@FlaviusBG1_id1, 0; } - if( $@FlaviusBG1_id2 ) { bg_destroy $@FlaviusBG1_id2; set $@FlaviusBG1_id2, 0; } - sleep 1000; - mapwarp "bat_b01","bat_room",155,150; - sleep 2000; - maprespawnguildid "bat_b01",0,3; // Just in case someone else - sleep 2000; - bg_updatescore "bat_b01",0,0; - set $@FlaviusBG1, 0; - donpcevent "Flavius_BG1::OnReadyCheck"; - end; -} - -// Battleground rewards -// ********************************************************************* - -bat_b01,390,13,5 script Guillaume Vintenar#fl1 419,{ - if( $@FlaviusBG1_Victory ) - { - if( $@FlaviusBG1_Victory == Bat_Team ) - { // Victory - mes "[Swandery]"; - mes "Blessed Guillaume!!"; - mes "Let's enjoy our glorious victory!"; - mes "" + strcharinfo(0) + ", its a sign reflecting victory"; - close2; - set .@Reward, 9; - } - else - { // - mes "[Swandery]"; - mes "You lost, but you're dedicated to this battle."; - mes "This is a reward for your great dedication by Guillaume Marollo!"; - mes "Just take this defeat a lesson, and later you would definitely learn."; - close2; - set .@Reward, 3; - } - - setquest 2070; - getitem 7829, .@Reward; - bg_leave; - warp "bat_room",155,150; - end; - } - end; -} - -bat_b01,10,293,5 script Croix Vintenar#fl1 415,{ - if( $@FlaviusBG1_Victory ) - { - if( $@FlaviusBG1_Victory == Bat_Team ) - { // Victory - mes "[Swandery]"; - mes "Blessed Croax!!"; - mes "Let's enjoy our glorious victory!"; - mes "" + strcharinfo(0) + ", its a sign reflecting victory"; - close2; - set .@Reward, 9; - } - else - { // - mes "[Swandery]"; - mes "Oh, " + strcharinfo(0) + ". Don't be sad."; - mes "Even though we didn't win, we did our best."; - mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next."; - close2; - set .@Reward, 3; - } - - setquest 2070; - getitem 7829, .@Reward; - bg_leave; - warp "bat_room",155,150; - end; - } - end; -} - -// Battleground Therapist -// ********************************************************************* - -bat_b01,390,13,5 script Therapist in battle#fl12 95,{ - mes "[Therapist in battle]"; - mes "Just close your eyes, and take a deep breathe."; - mes "You can be free from pain."; - specialeffect2 312; - close; -} - -bat_b01,10,293,5 script Therapist in battle#fl11 95,{ - mes "[Therapist in battle]"; - mes "Just close your eyes, and take a deep breathe."; - mes "You can be free from pain."; - specialeffect2 312; - close; -} - -// Battleground Respawn -// ********************************************************************* - -bat_b01,390,10,0 script #gfl1_respawn 139,{ - end; - -OnBGStart: - initnpctimer; - end; - -OnBGStop: - stopnpctimer; - end; - -OnTimer24000: - misceffect 83; - end; - -OnTimer25000: - areapercentheal "bat_b01",382,2,397,17,100,100; - areawarp "bat_b01",382,2,397,17,"bat_b01",311,224; - initnpctimer; - end; -} - -bat_b01,10,290,0 script #cfl1_respawn 139,{ - end; - -OnBGStart: - initnpctimer; - end; - -OnBGStop: - stopnpctimer; - end; - -OnTimer24000: - misceffect 83; - end; - -OnTimer25000: - areapercentheal "bat_b01",2,282,17,297,100,100; - areawarp "bat_b01",2,282,17,297,"bat_b01",87,75; - initnpctimer; - end; -} - -// Flags -// ********************************************************************* - -bat_b01,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat1 973 -bat_b01,319,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat2 973 -bat_b01,304,218,1 duplicate(Guillaume camp#bat) Guillaume camp#bat3 973 -bat_b01,319,218,1 duplicate(Guillaume camp#bat) Guillaume camp#bat4 973 -bat_b01,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat5 973 -bat_b01,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat6 973 -bat_b01,335,142,1 duplicate(Guillaume camp#bat) Guillaume camp#bat7 973 -bat_b01,335,157,1 duplicate(Guillaume camp#bat) Guillaume camp#bat8 973 -bat_b01,390,16,1 duplicate(Guillaume camp#bat) Guillaume camp#bat9 973 -bat_b01,292,163,1 duplicate(Guillaume camp#bat) Guillaume camp#bat19 973 -bat_b01,292,136,1 duplicate(Guillaume camp#bat) Guillaume camp#bat20 973 -bat_b01,241,185,1 duplicate(Guillaume camp#bat) Guillaume camp#bat21 973 -bat_b01,247,179,1 duplicate(Guillaume camp#bat) Guillaume camp#bat22 973 - -bat_b01,96,81,1 duplicate(Croix camp#bat) Croix camp#bat1 974 -bat_b01,96,68,1 duplicate(Croix camp#bat) Croix camp#bat2 974 -bat_b01,79,81,1 duplicate(Croix camp#bat) Croix camp#bat3 974 -bat_b01,79,68,1 duplicate(Croix camp#bat) Croix camp#bat4 974 -bat_b01,96,81,1 duplicate(Croix camp#bat) Croix camp#bat5 974 -bat_b01,96,81,1 duplicate(Croix camp#bat) Croix camp#bat6 974 -bat_b01,59,164,1 duplicate(Croix camp#bat) Croix camp#bat7 974 -bat_b01,59,137,1 duplicate(Croix camp#bat) Croix camp#bat8 974 -bat_b01,10,296,1 duplicate(Croix camp#bat) Croix camp#bat9 974 -bat_b01,110,162,1 duplicate(Croix camp#bat) Croix camp#bat18 974 -bat_b01,110,137,1 duplicate(Croix camp#bat) Croix camp#bat19 974 -bat_b01,152,120,1 duplicate(Croix camp#bat) Croix camp#bat20 974 -bat_b01,158,114,1 duplicate(Croix camp#bat) Croix camp#bat21 974 - -// MapFlags -// ********************************************************************* - -bat_b01 mapflag battleground 2 -bat_b01 mapflag nomemo -bat_b01 mapflag nosave SavePoint -bat_b01 mapflag noteleport -bat_b01 mapflag nowarp -bat_b01 mapflag nowarpto -bat_b01 mapflag noreturn -bat_b01 mapflag nobranch -bat_b01 mapflag nopenalty diff --git a/npc/battleground/bg_flavius_02.txt b/npc/battleground/bg_flavius_02.txt deleted file mode 100644 index c4e51fcea..000000000 --- a/npc/battleground/bg_flavius_02.txt +++ /dev/null @@ -1,453 +0,0 @@ -// ============================================================================== -// BattleGround System - Flavius 2 -// ============================================================================== - -// Registration NPC's -// ********************************************************************* - -bat_room,142,227,4 script Registration::Fl2R_Guillaume 418,{ - end; -OnInit: - waitingroom "Battle Station 10 Players",10,"Flavius_BG2::OnGuillaumeJoin",1; - end; -OnEnterBG: - set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",390,10,"Flavius_BG2::OnGuillaumeQuit",""); - end; -} - -bat_room,142,204,0 script Registration::Fl2R_Croix 414,{ - end; -OnInit: - waitingroom "Battle Station 10 Players",10,"Flavius_BG2::OnCroixJoin",1; - end; -OnEnterBG: - set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",10,290,"Flavius_BG2::OnCroixQuit",""); - end; -} - -// Battleground Engine -// ********************************************************************* - -- script Flavius_BG2 -1,{ - end; - -OnInit: - disablenpc "Guillaume Vintenar#fl2"; - disablenpc "Croix Vintenar#fl2"; - disablenpc "Therapist in battle#fl21"; - disablenpc "Therapist in battle#fl22"; - end; - -OnGuillaumeQuit: -OnCroixQuit: - set BG_Delay_Tick, gettimetick(2) + 1200; - end; - -OnGuillaumeJoin: -OnCroixJoin: - if( $@FlaviusBG2 == 0 ) - donpcevent "Flavius_BG2::OnReadyCheck"; - end; - -OnReadyCheck: - if( $@FlaviusBG2 ) - end; - set .@Guillaume, getwaitingroomstate(0,"Fl2R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"Fl2R_Croix"); - - if( .@Guillaume < 10 || .@Croix < 10 ) - { - mapannounce "bat_room","Battleground -- Flavius [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0x808000; - end; - } - - // BG Variables - set $@FlaviusBG2, 1; - set $@FlaviusBG2_Victory, 0; - set .Guillaume_Score, 0; - set .Guillaume_Loss, 0; - set .Croix_Score, 0; - set .Croix_Loss, 0; - set .Match, 0; - // Prepare NPC - donpcevent "#gfl2_respawn::OnBGStart"; - donpcevent "#cfl2_respawn::OnBGStart"; - enablenpc "Therapist in battle#fl21"; - enablenpc "Therapist in battle#fl22"; - disablenpc "Guillaume Vintenar#fl2"; - disablenpc "Croix Vintenar#fl2"; - // Build and Warp Teams - donpcevent "Fl2R_Guillaume::OnEnterBG"; - donpcevent "Fl2R_Croix::OnEnterBG"; - announce "Battleground -- Flavius [80-99] has started!",0,0x808000; - initnpctimer; - // Start Match!! - -OnRoundStart: - sleep 2000; - if( $@FlaviusBG2 != 1 ) end; - - areapercentheal "bat_b02",382,2,397,17,100,100; - areapercentheal "bat_b02",2,282,17,297,100,100; - bg_warp $@FlaviusBG2_id1,"bat_b02",311,224; - bg_warp $@FlaviusBG2_id2,"bat_b02",87,75; - - sleep 2000; - if( $@FlaviusBG2 != 1 ) end; - - set .Match, .Match + 1; - // Crystal Spawn - set .Guillaume_Crystal, bg_monster($@FlaviusBG2_id1,"bat_b02",328,150,"Crystal Guillaume",1914,"Flavius_BG2::OnGuillaumeBreak"); - setwall "bat_b02",327,149,2,6,0,"gui_wall2-1"; - setwall "bat_b02",329,149,2,0,0,"gui_wall2-2"; - setwall "bat_b02",329,151,2,2,0,"gui_wall2-3"; - setwall "bat_b02",327,151,2,4,0,"gui_wall2-4"; - - set .Croix_Crystal, bg_monster($@FlaviusBG2_id2,"bat_b02",62,150,"Crystal Croix",1915,"Flavius_BG2::OnCroixBreak"); - setwall "bat_b02",61,149,2,6,0,"cro_wall2-1"; - setwall "bat_b02",63,149,2,0,0,"cro_wall2-2"; - setwall "bat_b02",63,151,2,2,0,"cro_wall2-3"; - setwall "bat_b02",61,151,2,4,0,"cro_wall2-4"; - - // Guardian Spawns - bg_monster $@FlaviusBG2_id1,"bat_b02",328,160,"Guillaume Guardian",1949,"Flavius_BG2::OnGuiGuardian"; - bg_monster $@FlaviusBG2_id1,"bat_b02",328,140,"Guillaume Guardian",1950,"Flavius_BG2::OnGuiGuardian"; - set .Guillaume_Guardian, 2; - bg_monster $@FlaviusBG2_id2,"bat_b02",62,160,"Croix Guardian",1949,"Flavius_BG2::OnCroGuardian"; - bg_monster $@FlaviusBG2_id2,"bat_b02",61,140,"Croix Guardian",1950,"Flavius_BG2::OnCroGuardian"; - set .Croix_Guardian, 2; - // Announces - mapannounce "bat_b02","The Battle of Flavius [ " + .Match + " ] Round has begun!!",1,0x808000; - end; - -OnRoundStop: - // Remove Monsters - killmonster "bat_b02","Flavius_BG2::OnGuiGuardian"; - killmonster "bat_b02","Flavius_BG2::OnCroGuardian"; - delwall "gui_wall2-1"; - delwall "gui_wall2-2"; - delwall "gui_wall2-3"; - delwall "gui_wall2-4"; - killmonster "bat_b02","Flavius_BG2::OnGuillaumeBreak"; - delwall "cro_wall2-1"; - delwall "cro_wall2-2"; - delwall "cro_wall2-3"; - delwall "cro_wall2-4"; - killmonster "bat_b02","Flavius_BG2::OnCroixBreak"; - end; - -OnGuiGuardian: - if( set(.Guillaume_Guardian, .Guillaume_Guardian - 1) <= 0 ) - { - delwall "gui_wall2-1"; - delwall "gui_wall2-2"; - delwall "gui_wall2-3"; - delwall "gui_wall2-4"; - mapannounce "bat_b02","The Guillaume Crystal is vulnerable to attack!",1,0x0000FF; - } - end; - -OnCroGuardian: - if( set(.Croix_Guardian, .Croix_Guardian - 1) <= 0 ) - { - delwall "cro_wall2-1"; - delwall "cro_wall2-2"; - delwall "cro_wall2-3"; - delwall "cro_wall2-4"; - mapannounce "bat_b02","The Croix Crystal is vulnerable to attack!",1,0xFF0000; - } - end; - -OnGuillaumeBreak: - donpcevent "Flavius_BG2::OnRoundStop"; - set .Guillaume_Loss, .Guillaume_Loss + 1; - if( set(.Croix_Score, .Croix_Score + 1) < 2 ) - { - bg_updatescore "bat_b02",.Guillaume_Score,.Croix_Score; - mapannounce "bat_b02","The Guillaume Crystal has been destroyed!",1,0x0000FF; - donpcevent "Flavius_BG2::OnRoundStart"; - } - else - { - bg_updatescore "bat_b02",.Guillaume_Score,.Croix_Score; - mapannounce "bat_b02","The Croix army has won the Battle of Flavius!",1,0xFF0000; - set $@FlaviusBG2_Victory, 2; - donpcevent "Flavius_BG2::OnMatchEnd"; - } - end; - -OnCroixBreak: - donpcevent "Flavius_BG2::OnRoundStop"; - set .Croix_Loss, .Croix_Loss + 1; - if( set(.Guillaume_Score, .Guillaume_Score + 1) < 2 ) - { - bg_updatescore "bat_b02",.Guillaume_Score,.Croix_Score; - mapannounce "bat_b02","The Croix Crystal has been destroyed!",1,0xFF0000; - donpcevent "Flavius_BG2::OnRoundStart"; - } - else - { - bg_updatescore "bat_b02",.Guillaume_Score,.Croix_Score; - mapannounce "bat_b02","The Guillaume army has won the Battle of Flavius!",1,0x0000FF; - set $@FlaviusBG2_Victory, 1; - donpcevent "Flavius_BG2::OnMatchEnd"; - } - end; - -OnTimer2400000: - mapannounce "bat_b02","Battle of Flavius will ends in 5 minutes",1,0x808000; - end; -OnTimer2640000: - mapannounce "bat_b02","Battle of Flavius will ends in 1 minute",1,0x808000; - end; - -OnTimer2700000: - if( .Croix_Score > .Guillaume_Score ) - { - mapannounce "bat_b02","The Croix army has won the Battle of Flavius!",1,0xFF0000; - set $@FlaviusBG2_Victory, 2; - } - else if( .Croix_Score < .Guillaume_Score ) - { - mapannounce "bat_b02","The Guillaume army has won the Battle of Flavius!",1,0x0000FF; - set $@FlaviusBG2_Victory, 1; - } - else - { - mapannounce "bat_b02","The Battle of Flavius is over. The time is out, this is a Tie",1,0x808000; - set $@FlaviusBG2_Victory, 3; - } - -OnMatchEnd: - set $@FlaviusBG2, 2; - stopnpctimer; - donpcevent "#gfl2_respawn::OnBGStop"; - donpcevent "#cfl2_respawn::OnBGStop"; - disablenpc "Therapist in battle#fl21"; - disablenpc "Therapist in battle#fl22"; - enablenpc "Guillaume Vintenar#fl2"; - enablenpc "Croix Vintenar#fl2"; - sleep 2000; - bg_warp $@FlaviusBG2_id1,"bat_b02",390,10; - bg_warp $@FlaviusBG2_id2,"bat_b02",10,290; - sleep 3000; - mapannounce "bat_b02","Battle of Flavius will close in 1 minute!",1,0x808000; - initnpctimer; - end; - -OnTimer30000: - if( $@FlaviusBG2 == 2 ) - mapannounce "bat_b02","Battle of Flavius will close in 30 seconds!",1,0x808000; - end; -OnTimer50000: - if( $@FlaviusBG2 == 2 ) - mapannounce "bat_b02","Battle of Flavius will close in 10 seconds!",1,0x808000; - end; - -OnTimer60000: - if( $@FlaviusBG2 != 2 ) - end; -OnReset: - stopnpctimer; - donpcevent "Flavius_BG2::OnRoundStop"; - set .Guillaume_Score, 0; - set .Guillaume_Crystal, 0; - set .Guillaume_Loss, 0; - set .Croix_Score, 0; - set .Croix_Crystal, 0; - set .Croix_Loss, 0; - set .Match, 0; - set $@FlaviusBG2_Victory, 0; - // NPC's - disablenpc "Guillaume Vintenar#fl2"; - disablenpc "Croix Vintenar#fl2"; - disablenpc "Therapist in battle#fl21"; - disablenpc "Therapist in battle#fl22"; - - if( $@FlaviusBG2_id1 ) { bg_destroy $@FlaviusBG2_id1; set $@FlaviusBG2_id1, 0; } - if( $@FlaviusBG2_id2 ) { bg_destroy $@FlaviusBG2_id2; set $@FlaviusBG2_id2, 0; } - sleep 1000; - mapwarp "bat_b02","bat_room",155,150; - sleep 2000; - maprespawnguildid "bat_b02",0,3; // Just in case someone else - sleep 2000; - bg_updatescore "bat_b02",0,0; - set $@FlaviusBG2, 0; - donpcevent "Flavius_BG2::OnReadyCheck"; - end; -} - -// Battleground rewards -// ********************************************************************* - -bat_b02,390,13,5 script Guillaume Vintenar#fl2 419,{ - if( $@FlaviusBG2_Victory ) - { - if( $@FlaviusBG2_Victory == Bat_Team ) - { // Victory - mes "[Swandery]"; - mes "Blessed Guillaume!!"; - mes "Let's enjoy our glorious victory!"; - mes "" + strcharinfo(0) + ", its a sign reflecting victory"; - close2; - set .@Reward, 9; - } - else - { // - mes "[Swandery]"; - mes "You lost, but you're dedicated to this battle."; - mes "This is a reward for your great dedication by Guillaume Marollo!"; - mes "Just take this defeat a lesson, and later you would definitely learn."; - close2; - set .@Reward, 3; - } - - setquest 2070; - getitem 7829, .@Reward; - bg_leave; - warp "bat_room",155,150; - end; - } - end; -} - -bat_b02,10,293,5 script Croix Vintenar#fl2 415,{ - if( $@FlaviusBG2_Victory ) - { - if( $@FlaviusBG2_Victory == Bat_Team ) - { // Victory - mes "[Swandery]"; - mes "Blessed Croax!!"; - mes "Let's enjoy our glorious victory!"; - mes "" + strcharinfo(0) + ", its a sign reflecting victory"; - close2; - set .@Reward, 9; - } - else - { // - mes "[Swandery]"; - mes "Oh, " + strcharinfo(0) + ". Don't be sad."; - mes "Even though we didn't win, we did our best."; - mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next."; - close2; - set .@Reward, 3; - } - - setquest 2070; - getitem 7829, .@Reward; - bg_leave; - warp "bat_room",155,150; - end; - } - end; -} - -// Battleground Therapist -// ********************************************************************* - -bat_b02,390,13,5 script Therapist in battle#fl22 95,{ - mes "[Therapist in battle]"; - mes "Just close your eyes, and take a deep breathe."; - mes "You can be free from pain."; - specialeffect2 312; - close; -} - -bat_b02,10,293,5 script Therapist in battle#fl21 95,{ - mes "[Therapist in battle]"; - mes "Just close your eyes, and take a deep breathe."; - mes "You can be free from pain."; - specialeffect2 312; - close; -} - -// Battleground Respawn -// ********************************************************************* - -bat_b02,390,10,0 script #gfl2_respawn 139,{ - end; - -OnBGStart: - initnpctimer; - end; - -OnBGStop: - stopnpctimer; - end; - -OnTimer24000: - misceffect 83; - end; - -OnTimer25000: - areapercentheal "bat_b02",382,2,397,17,100,100; - areawarp "bat_b02",382,2,397,17,"bat_b02",311,224; - initnpctimer; - end; -} - -bat_b02,10,290,0 script #cfl2_respawn 139,{ - end; - -OnBGStart: - initnpctimer; - end; - -OnBGStop: - stopnpctimer; - end; - -OnTimer24000: - misceffect 83; - end; - -OnTimer25000: - areapercentheal "bat_b02",2,282,17,297,100,100; - areawarp "bat_b02",2,282,17,297,"bat_b02",87,75; - initnpctimer; - end; -} - -// Flags -// ********************************************************************* - -bat_b02,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat32 973 -bat_b02,319,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat33 973 -bat_b02,304,218,1 duplicate(Guillaume camp#bat) Guillaume camp#bat34 973 -bat_b02,319,218,1 duplicate(Guillaume camp#bat) Guillaume camp#bat35 973 -bat_b02,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat36 973 -bat_b02,304,231,1 duplicate(Guillaume camp#bat) Guillaume camp#bat37 973 -bat_b02,335,142,1 duplicate(Guillaume camp#bat) Guillaume camp#bat38 973 -bat_b02,335,157,1 duplicate(Guillaume camp#bat) Guillaume camp#bat39 973 -bat_b02,390,16,1 duplicate(Guillaume camp#bat) Guillaume camp#bat40 973 -bat_b02,292,163,1 duplicate(Guillaume camp#bat) Guillaume camp#bat41 973 -bat_b02,292,136,1 duplicate(Guillaume camp#bat) Guillaume camp#bat42 973 -bat_b02,241,185,1 duplicate(Guillaume camp#bat) Guillaume camp#bat43 973 -bat_b02,247,179,1 duplicate(Guillaume camp#bat) Guillaume camp#bat44 973 - -bat_b02,96,81,1 duplicate(Croix camp#bat) Croix camp#bat30 974 -bat_b02,96,68,1 duplicate(Croix camp#bat) Croix camp#bat31 974 -bat_b02,79,81,1 duplicate(Croix camp#bat) Croix camp#bat32 974 -bat_b02,79,68,1 duplicate(Croix camp#bat) Croix camp#bat33 974 -bat_b02,96,81,1 duplicate(Croix camp#bat) Croix camp#bat34 974 -bat_b02,96,81,1 duplicate(Croix camp#bat) Croix camp#bat35 974 -bat_b02,59,164,1 duplicate(Croix camp#bat) Croix camp#bat36 974 -bat_b02,59,137,1 duplicate(Croix camp#bat) Croix camp#bat37 974 -bat_b02,10,296,1 duplicate(Croix camp#bat) Croix camp#bat38 974 -bat_b02,110,162,1 duplicate(Croix camp#bat) Croix camp#bat39 974 -bat_b02,110,137,1 duplicate(Croix camp#bat) Croix camp#bat40 974 -bat_b02,152,120,1 duplicate(Croix camp#bat) Croix camp#bat41 974 -bat_b02,158,114,1 duplicate(Croix camp#bat) Croix camp#bat42 974 - -// MapFlags -// ********************************************************************* - -bat_b02 mapflag battleground -bat_b02 mapflag nomemo -bat_b02 mapflag nosave SavePoint -bat_b02 mapflag noteleport -bat_b02 mapflag nowarp -bat_b02 mapflag nowarpto -bat_b02 mapflag noreturn -bat_b02 mapflag nobranch -bat_b02 mapflag nopenalty diff --git a/npc/battleground/flavius/flavius01.txt b/npc/battleground/flavius/flavius01.txt new file mode 100644 index 000000000..66e6db86d --- /dev/null +++ b/npc/battleground/flavius/flavius01.txt @@ -0,0 +1,759 @@ +//===== eAthena Script ======================================= +// BattleGround System - Flavius +//===== By: ================================================== +//= L0ne_W0lf +//===== Current Version: ===================================== +//= 1.0 +//===== Compatible With: ===================================== +//= eAthena 1.0 +//===== Description: ========================================= +//= [AEGIS Conversion] +//= Flavius Battleground. +//= - Winning Team: 9 badges +//= - Losing Team: 3 badge +//===== Additional Comments: ================================= +//= 1.0 First Version. +//============================================================ + +// Waiting Room NPCs +//============================================================ +bat_room,86,227,4 script Lieutenant Ator 418,{ + end; +OnInit: + waitingroom "Battle Station",1,"start#bat_b01::OnReadyCheck",1; + end; +OnEnterBG: + set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit",""); + end; +} + +bat_room,85,204,0 script Lieutenant Thelokus 414,{ + end; +OnInit: + waitingroom "Battle Station",1,"start#bat_b01::OnReadyCheck",1; + end; +OnEnterBG: + set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit",""); + end; +} + +bat_room,85,220,0 warp back_bgroomb02a 1,1,bat_room,154,150 +bat_room,85,211,0 warp back_bgroomb02b 1,1,bat_room,154,150 + +bat_room,2,151,3 script #bat_b01_timer 844,{ + end; + +OnInit: +OnEnable: + initnpctimer; + end; + +OnStop: + stopnpctimer; + end; + +OnTimer1000: + stopnpctimer; + initnpctimer; + set .@chk_bat_a01,getmapusers("bat_b01"); + if (.@chk_bat_a01 < 1) { + set $@FlaviusBG1, 0; + if( $@FlaviusBG1_id1 ) { bg_destroy $@FlaviusBG1_id1; set $@FlaviusBG1_id1, 0; } + if( $@FlaviusBG1_id2 ) { bg_destroy $@FlaviusBG1_id2; set $@FlaviusBG1_id2, 0; } + donpcevent "start#bat_b01::OnReadyCheck"; + } + end; +} + + +// Flavius Battleground Engine +//============================================================ +bat_b01,15,15,3 script start#bat_b01 844,{ +OnInit: + mapwarp "bat_b01","bat_room",154,150; + end; + +OnReadyCheck: + if( $@FlaviusBG1 ) + end; + set .@Guillaume, getwaitingroomstate(0,"Lieutenant Ator"); + set .@Croix, getwaitingroomstate(0,"Lieutenant Thelokus"); + if( !.@Guillaume && !.@Croix ) { + donpcevent "#bat_b01_timer::OnStop"; + end; + } + if( .@Guillaume < 1 || .@Croix < 1 ) + end; + set $@FlaviusBG1, 1; + set $@FlaviusBG1_Victory, 0; + set $@Croix_ScoreBG1, 0; + set $@Guill_ScoreBG1, 0; + bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1; + + donpcevent "Lieutenant Ator::OnEnterBG"; + donpcevent "Lieutenant Thelokus::OnEnterBG"; + donpcevent "OBJ#bat_b01_a::Onkill"; + donpcevent "OBJ#bat_b01_a::OnEnable"; + donpcevent "OBJ#bat_b01_b::Onkill"; + donpcevent "OBJ#bat_b01_b::OnEnable"; + donpcevent "guardian#bat_b01_a::Onkill"; + donpcevent "guardian#bat_b01_b::Onkill"; + donpcevent "guardian#bat_b01_a::OnEnable"; + donpcevent "guardian#bat_b01_b::OnEnable"; + donpcevent "cell#bat_b01_a::Onred"; + donpcevent "cell#bat_b01_b::Onred"; + donpcevent "time#bat_b01::OnEnable"; + disablenpc "Guillaume Vintenar#b01_a"; + disablenpc "Croix Vintenar#b01_b"; + disablenpc "Vintenar#bat_b01_aover"; + disablenpc "Vintenar#bat_b01_bover"; + bg_warp $@FlaviusBG1_id1,"bat_b01",87,75; + bg_warp $@FlaviusBG1_id2,"bat_b01",311,224; + donpcevent "countdown#bat_b01::OnEnable"; + initnpctimer; + end; + +OnReset: + donpcevent "OBJ#bat_b01_a::Onkill"; + donpcevent "OBJ#bat_b01_a::OnEnable"; + donpcevent "OBJ#bat_b01_b::Onkill"; + donpcevent "OBJ#bat_b01_b::OnEnable"; + donpcevent "guardian#bat_b01_a::Onkill"; + donpcevent "guardian#bat_b01_b::Onkill"; + donpcevent "guardian#bat_b01_a::OnEnable"; + donpcevent "guardian#bat_b01_b::OnEnable"; + donpcevent "cell#bat_b01_a::Onred"; + donpcevent "cell#bat_b01_b::Onred"; + donpcevent "time#bat_b01::OnEnable"; + disablenpc "Guillaume Vintenar#b01_a"; + disablenpc "Croix Vintenar#b01_b"; + disablenpc "Vintenar#bat_b01_aover"; + disablenpc "Vintenar#bat_b01_bover"; + bg_warp $@FlaviusBG1_id1,"bat_b01",87,75; + bg_warp $@FlaviusBG1_id2,"bat_b01",311,224; + end; + +OnGuillaumeQuit: +OnCroixQuit: + bg_leave; + end; + +OnTimer10000: + stopnpctimer; + donpcevent "#bat_b01_timer::OnEnable"; + end; +} + +bat_b01,1,1,3 script OBJ#bat_b01_a 844,{ +OnEnable: + bg_monster $@FlaviusBG1_id1,"bat_b01",61,150,"Blue Crystal",1915,"OBJ#bat_b01_a::OnMyMobDead"; + end; + +Onkill: + killmonster "bat_b01","OBJ#bat_b01_a::OnMyMobDead"; + end; + +OnMyMobDead: + if (mobcount("bat_b01","OBJ#bat_b01_a::OnMyMobDead") < 1) { + mapannounce "bat_b01", "Guillaume's Crystal has been destroyed.",bc_map,"0xFFCE00"; + if ($@Croix_ScoreBG1 > 0) { + set $@FlaviusBG1_Victory,2; + set $@Croix_ScoreBG1,$@Croix_ScoreBG1+1; + enablenpc "Guillaume Vintenar#b01_a"; + enablenpc "Croix Vintenar#b01_b"; + donpcevent "time#bat_b01::Onstop"; + } + else { + set $@Croix_ScoreBG1,1; + donpcevent "time#bat_b01::OnEnable"; + donpcevent "start#bat_b01::onReset"; + } + donpcevent "#bat_b01_timer::OnStop"; + bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1; + bg_warp $@FlaviusBG1_id1,"bat_b01",10,290; + bg_warp $@FlaviusBG1_id2,"bat_b01",390,10; + donpcevent "#bat_b01_timer::OnEnable"; + } + end; +} + +bat_b01,1,2,3 script OBJ#bat_b01_b 844,{ +OnEnable: + bg_monster $@FlaviusBG1_id2,"bat_b01",328,150,"Blue Crystal",1914,"OBJ#bat_b01_b::OnMyMobDead"; + end; + +Onkill: + killmonster "bat_b01","OBJ#bat_b01_b::OnMyMobDead"; + end; + +OnMyMobDead: + if (mobcount("bat_b01","OBJ#bat_b01_b::OnMyMobDead") < 1) { + mapannounce "bat_b01", "Croix's Crystal has been destroyed.",bc_map,"0xFFCE00"; + if ($@Guill_ScoreBG1 > 0) { + set $@FlaviusBG1_Victory,1; + set $@Guill_ScoreBG1,$@Guill_ScoreBG1+1; + enablenpc "Guillaume Vintenar#b01_a"; + enablenpc "Croix Vintenar#b01_b"; + donpcevent "time#bat_b01::Onstop"; + } + else { + set $@Guill_ScoreBG1,1; + donpcevent "time#bat_b01::OnEnable"; + donpcevent "start#bat_b01::onReset"; + } + donpcevent "#bat_b01_timer::OnStop"; + bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1; + bg_warp $@FlaviusBG1_id1,"bat_b01",10,290; + bg_warp $@FlaviusBG1_id2,"bat_b01",390,10; + donpcevent "#bat_b01_timer::OnEnable"; + } + end; +} + +bat_b01,1,3,3 script guardian#bat_b01_a 844,{ +OnEnable: + bg_monster $@FlaviusBG1_id1,"bat_b01",108,159,"Guillaume Camp Guardian",1949,"guardian#bat_b01_a::OnMyMobDead"; + bg_monster $@FlaviusBG1_id1,"bat_b01",108,141,"Guillaume Camp Guardian",1949,"guardian#bat_b01_a::OnMyMobDead"; + end; + +Onkill: + killmonster "bat_b01","guardian#bat_b01_a::OnMyMobDead"; + end; + +OnMyMobDead: + if (mobcount("bat_b01","guardian#bat_b01_a::OnMyMobDead") < 1) { + donpcevent "cell#bat_b01_a::Ongreen"; + mapannounce "bat_b01", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00"; + } + end; +} + +bat_b01,1,3,3 script guardian#bat_b01_b 844,{ +OnEnable: + bg_monster $@FlaviusBG1_id2,"bat_b01",307,160,"Croix Camp Guardian",1949,"guardian#bat_b01_b::OnMyMobDead"; + bg_monster $@FlaviusBG1_id2,"bat_b01",307,138,"Croix Camp Guardian",1949,"guardian#bat_b01_b::OnMyMobDead"; + end; + +Onkill: + killmonster "bat_b01","guardian#bat_b01_b::OnMyMobDead"; + end; + +OnMyMobDead: + if (mobcount("bat_b01","guardian#bat_b01_b::OnMyMobDead") < 1) { + donpcevent "cell#bat_b01_b::Ongreen"; + mapannounce "bat_b01", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00"; + } + end; +} + +bat_b01,1,4,3 script cell#bat_b01_a 844,{ +Onred: + setwall "bat_b01",60,149,2,6,0,"Guillaume_wall1-1"; + setwall "bat_b01",62,149,2,0,0,"Guillaume_wall1-2"; + setwall "bat_b01",62,151,2,2,0,"Guillaume_wall1-3"; + setwall "bat_b01",60,151,2,4,0,"Guillaume_wall1-4"; + end; + +Ongreen: + delwall "Guillaume_wall1-1"; + delwall "Guillaume_wall1-2"; + delwall "Guillaume_wall1-3"; + delwall "Guillaume_wall1-4"; + end; +} + +bat_b01,1,5,3 script cell#bat_b01_b 844,{ +Onred: + setwall "bat_b01",327,149,2,6,0,"Croix_wall1-1"; + setwall "bat_b01",329,149,2,0,0,"Croix_wall1-2"; + setwall "bat_b01",329,151,2,2,0,"Croix_wall1-3"; + setwall "bat_b01",327,151,2,4,0,"Croix_wall1-4"; + end; + +Ongreen: + delwall "Croix_wall1-1"; + delwall "Croix_wall1-2"; + delwall "Croix_wall1-3"; + delwall "Croix_wall1-4"; + end; +} + +bat_b01,1,6,1 script time#bat_b01 844,{ +OnEnable: + donpcevent "Battle Therapist#b01_a::OnEnable"; + donpcevent "Battle Therapist#b01_b::OnEnable"; + end; + +Onstop: + donpcevent "Battle Therapist#b01_a::OnStop"; + donpcevent "Battle Therapist#b01_b::OnStop"; + end; +} + +bat_b01,10,294,3 script Battle Therapist#b01_a 95,{ + specialeffect2 EF_HEAL; + mes "[Battle Therapist]"; + mes "Just close your eyes,"; + mes "and take a deep breath."; + mes "You can be free from pain."; + close; + +OnTimer25000: + specialeffect EF_SANCTUARY; + enablenpc "bat_b01_rp1_a_warp"; + end; + +OnTimer26000: + disablenpc "bat_b01_rp1_a_warp"; + end; + +OnTimer26500: + stopnpctimer; + donpcevent "Battle Therapist#b01_a::onEnable"; + end; + +OnEnable: + initnpctimer; + enablenpc "Battle Therapist#b01_a"; + end; + +Onstop: + disablenpc "bat_b01_rp1_a_warp"; + disablenpc "Battle Therapist#b01_a"; + stopnpctimer; + end; +} + +bat_b01,10,290,0 script bat_b01_rp1_a_warp 45,10,10,{ +OnInit: + disablenpc "bat_b01_rp1_a_warp"; + end; + +OnTouch: + percentheal 100,100; + warp "bat_b01",87,73; + end; +} + +bat_b01,389,14,3 script Battle Therapist#b01_b 95,{ + specialeffect2 EF_HEAL; + mes "[Battle Therapist]"; + mes "Just close your eyes,"; + mes "and take a deep breath."; + mes "You can be free from pain."; + close; + +OnTimer25000: + specialeffect EF_SANCTUARY; + enablenpc "bat_b01_rp1_b_warp"; + end; + +OnTimer26000: + disablenpc "bat_b01_rp1_b_warp"; + end; + +OnTimer26500: + stopnpctimer; + donpcevent "Battle Therapist#b01_b::OnEnable"; + end; + +OnEnable: + initnpctimer; + enablenpc "Battle Therapist#b01_b"; + end; + +Onstop: + disablenpc "bat_b01_rp1_b_warp"; + disablenpc "Battle Therapist#b01_b"; + stopnpctimer; + end; +} + +bat_b01,389,10,0 script bat_b01_rp1_b_warp 45,9,9,{ +OnInit: + disablenpc "bat_b01_rp1_a_warp"; + end; + +OnTouch: + percentheal 100,100; + warp "bat_b01",312,225; + end; +} + +bat_b01,87,76,0 script A_CODE#bat_b01 -1,5,5,{ +OnTouch: + if (checkquest(2070) < 0) + setquest 2070; + end; +} + +bat_b01,312,224,0 script B_CODE#bat_b01 -1,5,5,{ +OnTouch: + if (checkquest(2070) < 0) + setquest 2070; + end; +} + +bat_b01,10,294,3 script Guillaume Vintenar#b01_a 934,{ + if ($@FlaviusBG1_id1 == getcharid(4)) { + if ($@FlaviusBG1_Victory == 1) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 8) { + mes "[Axl Rose]"; + mes "Blessed Guillaume!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,9; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "Blessed Guillaume!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + } + bg_leave; + warp "bat_room",154,150; + end; + +OnInit: + disablenpc "Guillaume Vintenar#b01_a"; + end; +} + +bat_b01,389,14,3 script Croix Vintenar#b01_b 934,{ + if ($@FlaviusBG1_id2 == getcharid(4)) { + if ($@FlaviusBG1_Victory == 2) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 8) { + mes "[Swandery]"; + mes "Blessed Croix!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,9; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Blessed Croix!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + } + bg_leave; + warp "bat_room",154,150; + end; + +OnInit: + disablenpc "Croix Vintenar#b01_b"; + end; +} + +bat_b01,1,5,3 script countdown#bat_b01 844,{ +OnInit: + stopnpctimer; + end; + +OnEnable: + stopnpctimer; + initnpctimer; + end; + +Onstop: + stopnpctimer; + end; + +OnTimer7000: + mapannounce "bat_b01", "Guillaume Vintenar Axl Rose : Let's attack to destroy that Crystal!",bc_map,"0xFF9900"; + end; + +OnTimer8000: + mapannounce "bat_b01", "Croix Vintenar Swandery : Even though Guillaume is struggling to win against us, the victory is ours. Let's show them our power.",bc_map,"0xFF99CC"; + end; + +OnTimer1800000: + mapannounce "bat_b01", "Marollo VII : Guillaume Marollo, Croix Marollo! And their followers!",bc_map,"0x99CC00"; + end; + +OnTimer1803000: + mapannounce "bat_b01", "Marollo VII : Both camps are competitive, so it's hard to judge which team is superior.",bc_map,"0x99CC00"; + end; + +OnTimer1808000: + mapannounce "bat_b01", "Marollo VII : This battle of Flavian is such a waste of time. I will decide victory and defeat by your progress.",bc_map,"0x99CC00"; + end; + +OnTimer1822000: + mapannounce "bat_b01", "Marollo VII : If you can't accept the results, try again in another valley battle!",bc_map,"0x99CC00"; + end; + +OnTimer1825000: + mapannounce "bat_b01", "Axl Rose, Swandery : Yes, sir.",bc_map,"0x99CC00"; + end; + +OnTimer1830000: + donpcevent "time#bat_b01::Onstop"; + bg_warp $@FlaviusBG1_id1,"bat_b01",10,290; + bg_warp $@FlaviusBG1_id2,"bat_b01",390,10; + enablenpc "Vintenar#bat_b01_aover"; + enablenpc "Vintenar#bat_b01_bover"; + end; + +OnTimer1900000: + mapwarp "bat_b01","bat_room",154,150; + donpcevent "countdown#bat_b01::Onstop"; + end; +} + +bat_b01,81,83,3 script Guillaume Camp#flag21 973,{ end; } +bat_b01,94,83,3 script Guillaume Camp#flag22 973,{ end; } +bat_b01,81,66,3 script Guillaume Camp#flag23 973,{ end; } +bat_b01,94,66,3 script Guillaume Camp#flag24 973,{ end; } +bat_b01,139,142,3 script Guillaume Camp#flag25 973,{ end; } +bat_b01,139,158,3 script Guillaume Camp#flag26 973,{ end; } +bat_b01,110,161,3 script Guillaume Camp#flag27 973,{ end; } +bat_b01,110,137,3 script Guillaume Camp#flag28 973,{ end; } +bat_b01,63,135,3 script Guillaume Camp#flag29 973,{ end; } +bat_b01,63,165,3 script Guillaume Camp#flag30 973,{ end; } +bat_b01,10,296,3 script Guillaume Camp#flag31 973,{ end; } + +bat_b01,306,233,3 script Croix Camp#flag21 974,{ end; } +bat_b01,317,233,3 script Croix Camp#flag22 974,{ end; } +bat_b01,306,216,3 script Croix Camp#flag23 974,{ end; } +bat_b01,317,216,3 script Croix Camp#flag24 974,{ end; } +bat_b01,257,158,3 script Croix Camp#flag25 974,{ end; } +bat_b01,257,141,3 script Croix Camp#flag26 974,{ end; } +bat_b01,297,164,3 script Croix Camp#flag27 974,{ end; } +bat_b01,297,136,3 script Croix Camp#flag28 974,{ end; } +bat_b01,336,161,3 script Croix Camp#flag29 974,{ end; } +bat_b01,336,139,3 script Croix Camp#flag30 974,{ end; } +bat_b01,389,16,3 script Croix Camp#flag31 974,{ end; } + +bat_b01,10,294,3 script Vintenar#bat_b01_aover 419,{ + set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1; + if ($@FlaviusBG1_id1 == getcharid(4)) { + if (.@A_B_gap > 0) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 8) { + mes "[Axl Rose]"; + mes "Blessed Guillaume!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,9; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "Blessed Guillaume!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else if (.@A_B_gap == 0) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + } + else { + mes "[Axl Rose]"; + mes "Why are you here, Croix mercenary? I am definitely sure of victory against foolish Croix such as you. Ha!"; + close; + } + bg_leave; + warp "bat_room",154,150; + end; + +OnInit: + disablenpc "Vintenar#bat_b01_aover"; + end; +} + +bat_b01,389,14,3 script Vintenar#bat_b01_bover 415,{ + set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1; + if ($@FlaviusBG1_id2 == getcharid(4)) { + if (.@A_B_gap > 0) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else if (.@A_B_gap == 0) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 8) { + mes "[Swandery]"; + mes "Blessed Croix!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,9; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Blessed Croix!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + } + else { + mes "[Swandery]"; + mes "Why do you come here as a Guillaume? You will be sent to where you should be!"; + close; + } + bg_leave; + warp "bat_room",154,150; + end; + +OnInit: + disablenpc "Vintenar#bat_b01_bover"; + end; +} + +/* +bat_b01,1,10,3 script Release all#b01 81,{ + input .@input,0,2000; + if (.@input == 0) { + mes "Cancelled."; + close; + } + else if (.@input == 1854) { + mes "May I help you?"; + next; + switch(select("Release all.:Cancel.")) { + case 1: + mes "Bye."; + close2; + mapwarp "bat_b01","bat_room",154,150; + end; + case 2: + mes "Cancelled."; + close; + } + } +} +*/ \ No newline at end of file diff --git a/npc/battleground/flavius/flavius02.txt b/npc/battleground/flavius/flavius02.txt new file mode 100644 index 000000000..4aabbc839 --- /dev/null +++ b/npc/battleground/flavius/flavius02.txt @@ -0,0 +1,759 @@ +//===== eAthena Script ======================================= +// BattleGround System - Flavius Second +//===== By: ================================================== +//= L0ne_W0lf +//===== Current Version: ===================================== +//= 1.0 +//===== Compatible With: ===================================== +//= eAthena 1.0 +//===== Description: ========================================= +//= [AEGIS Conversion] +//= Flavius Battleground. +//= - Winning Team: 9 badges +//= - Losing Team: 3 badge +//===== Additional Comments: ================================= +//= 1.0 First Version. +//============================================================ + +// Waiting Room NPCs +//============================================================ +bat_room,142,227,4 script Lieutenant Huvas 418,{ + end; +OnInit: + waitingroom "Battle Station",1,"start#bat_b02::OnReadyCheck",1; + end; +OnEnterBG: + set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit",""); + end; +} + +bat_room,142,204,0 script Lieutenant Yukon 414,{ + end; +OnInit: + waitingroom "Battle Station",1,"start#bat_b02::OnReadyCheck",1; + end; +OnEnterBG: + set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit",""); + end; +} + +bat_room,141,220,0 warp back_bgroomb02a 1,1,bat_room,154,150 +bat_room,141,211,0 warp back_bgroomb02b 1,1,bat_room,154,150 + +bat_room,2,151,3 script #bat_b02_timer 844,{ + end; + +OnInit: +OnEnable: + initnpctimer; + end; + +OnStop: + stopnpctimer; + end; + +OnTimer1000: + stopnpctimer; + initnpctimer; + set .@chk_bat_a01,getmapusers("bat_b02"); + if (.@chk_bat_a01 < 1) { + set $@FlaviusBG2, 0; + if( $@FlaviusBG2_id1 ) { bg_destroy $@FlaviusBG2_id1; set $@FlaviusBG2_id1, 0; } + if( $@FlaviusBG2_id2 ) { bg_destroy $@FlaviusBG2_id2; set $@FlaviusBG2_id2, 0; } + donpcevent "start#bat_b02::OnReadyCheck"; + } + end; +} + + +// Flavius Battleground Engine +//============================================================ +bat_b02,15,15,3 script start#bat_b02 844,{ +OnInit: + mapwarp "bat_b02","bat_room",154,150; + end; + +OnReadyCheck: + if( $@FlaviusBG2 ) + end; + set .@Guillaume, getwaitingroomstate(0,"Lieutenant Ator"); + set .@Croix, getwaitingroomstate(0,"Lieutenant Thelokus"); + if( !.@Guillaume && !.@Croix ) { + donpcevent "#bat_b02_timer::OnStop"; + end; + } + if( .@Guillaume < 1 || .@Croix < 1 ) + end; + set $@FlaviusBG2, 1; + set $@FlaviusBG2_Victory, 0; + set $@Croix_ScoreBG2, 0; + set $@Guill_ScoreBG2, 0; + + bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2; + donpcevent "Lieutenant Ator::OnEnterBG"; + donpcevent "Lieutenant Thelokus::OnEnterBG"; + donpcevent "OBJ#bat_b02_a::Onkill"; + donpcevent "OBJ#bat_b02_a::OnEnable"; + donpcevent "OBJ#bat_b02_b::Onkill"; + donpcevent "OBJ#bat_b02_b::OnEnable"; + donpcevent "guardian#bat_b02_a::Onkill"; + donpcevent "guardian#bat_b02_b::Onkill"; + donpcevent "guardian#bat_b02_a::OnEnable"; + donpcevent "guardian#bat_b02_b::OnEnable"; + donpcevent "cell#bat_b02_a::Onred"; + donpcevent "cell#bat_b02_b::Onred"; + donpcevent "time#bat_b02::OnEnable"; + disablenpc "Guillaume Vintenar#b02_a"; + disablenpc "Croix Vintenar#b02_b"; + disablenpc "Vintenar#bat_b02_aover"; + disablenpc "Vintenar#bat_b02_bover"; + bg_warp $@FlaviusBG2_id1,"bat_b02",87,75; + bg_warp $@FlaviusBG2_id2,"bat_b02",311,224; + donpcevent "countdown#bat_b02::OnEnable"; + initnpctimer; + end; + +OnReset: + donpcevent "OBJ#bat_b02_a::Onkill"; + donpcevent "OBJ#bat_b02_a::OnEnable"; + donpcevent "OBJ#bat_b02_b::Onkill"; + donpcevent "OBJ#bat_b02_b::OnEnable"; + donpcevent "guardian#bat_b02_a::Onkill"; + donpcevent "guardian#bat_b02_b::Onkill"; + donpcevent "guardian#bat_b02_a::OnEnable"; + donpcevent "guardian#bat_b02_b::OnEnable"; + donpcevent "cell#bat_b02_a::Onred"; + donpcevent "cell#bat_b02_b::Onred"; + donpcevent "time#bat_b02::OnEnable"; + disablenpc "Guillaume Vintenar#b02_a"; + disablenpc "Croix Vintenar#b02_b"; + disablenpc "Vintenar#bat_b02_aover"; + disablenpc "Vintenar#bat_b02_bover"; + bg_warp $@FlaviusBG2_id1,"bat_b02",87,75; + bg_warp $@FlaviusBG2_id2,"bat_b02",311,224; + end; + +OnGuillaumeQuit: +OnCroixQuit: + bg_leave; + end; + +OnTimer10000: + stopnpctimer; + donpcevent "#bat_b02_timer::OnEnable"; + end; +} + +bat_b02,1,1,3 script OBJ#bat_b02_a 844,{ +OnEnable: + bg_monster $@FlaviusBG2_id1,"bat_b02",61,150,"Blue Crystal",1915,"OBJ#bat_b02_a::OnMyMobDead"; + end; + +Onkill: + killmonster "bat_b02","OBJ#bat_b02_a::OnMyMobDead"; + end; + +OnMyMobDead: + if (mobcount("bat_b02","OBJ#bat_b02_a::OnMyMobDead") < 1) { + mapannounce "bat_b02", "Guillaume's Crystal has been destroyed.",bc_map,"0xFFCE00"; + if ($@Croix_ScoreBG2 > 0) { + set $@FlaviusBG2_Victory,2; + set $@Croix_ScoreBG2,$@Croix_ScoreBG2+1; + enablenpc "Guillaume Vintenar#b02_a"; + enablenpc "Croix Vintenar#b02_b"; + donpcevent "time#bat_b02::Onstop"; + } + else { + set $@Croix_ScoreBG2,1; + donpcevent "time#bat_b02::OnEnable"; + donpcevent "start#bat_b02::onReset"; + } + donpcevent "#bat_b02_timer::OnStop"; + bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2; + bg_warp $@FlaviusBG2_id1,"bat_b02",10,290; + bg_warp $@FlaviusBG2_id2,"bat_b02",390,10; + donpcevent "#bat_b02_timer::OnEnable"; + } + end; +} + +bat_b02,1,2,3 script OBJ#bat_b02_b 844,{ +OnEnable: + bg_monster $@FlaviusBG2_id2,"bat_b02",328,150,"Blue Crystal",1914,"OBJ#bat_b02_b::OnMyMobDead"; + end; + +Onkill: + killmonster "bat_b02","OBJ#bat_b02_b::OnMyMobDead"; + end; + +OnMyMobDead: + if (mobcount("bat_b02","OBJ#bat_b02_b::OnMyMobDead") < 1) { + mapannounce "bat_b02", "Croix's Crystal has been destroyed.",bc_map,"0xFFCE00"; + if ($@Guill_ScoreBG2 > 0) { + set $@FlaviusBG2_Victory,1; + set $@Guill_ScoreBG2,$@Guill_ScoreBG2+1; + enablenpc "Guillaume Vintenar#b02_a"; + enablenpc "Croix Vintenar#b02_b"; + donpcevent "time#bat_b02::Onstop"; + } + else { + set $@Guill_ScoreBG2,1; + donpcevent "time#bat_b02::OnEnable"; + donpcevent "start#bat_b02::onReset"; + } + donpcevent "#bat_b02_timer::OnStop"; + bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2; + bg_warp $@FlaviusBG2_id1,"bat_b02",10,290; + bg_warp $@FlaviusBG2_id2,"bat_b02",390,10; + donpcevent "#bat_b02_timer::OnEnable"; + } + end; +} + +bat_b02,1,3,3 script guardian#bat_b02_a 844,{ +OnEnable: + bg_monster $@FlaviusBG2_id1,"bat_b02",108,159,"Guillaume Camp Guardian",1949,"guardian#bat_b02_a::OnMyMobDead"; + bg_monster $@FlaviusBG2_id1,"bat_b02",108,141,"Guillaume Camp Guardian",1949,"guardian#bat_b02_a::OnMyMobDead"; + end; + +Onkill: + killmonster "bat_b02","guardian#bat_b02_a::OnMyMobDead"; + end; + +OnMyMobDead: + if (mobcount("bat_b02","guardian#bat_b02_a::OnMyMobDead") < 1) { + donpcevent "cell#bat_b02_a::Ongreen"; + mapannounce "bat_b02", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00"; + } + end; +} + +bat_b02,1,3,3 script guardian#bat_b02_b 844,{ +OnEnable: + bg_monster $@FlaviusBG2_id2,"bat_b02",307,160,"Croix Camp Guardian",1949,"guardian#bat_b02_b::OnMyMobDead"; + bg_monster $@FlaviusBG2_id2,"bat_b02",307,138,"Croix Camp Guardian",1949,"guardian#bat_b02_b::OnMyMobDead"; + end; + +Onkill: + killmonster "bat_b02","guardian#bat_b02_b::OnMyMobDead"; + end; + +OnMyMobDead: + if (mobcount("bat_b02","guardian#bat_b02_b::OnMyMobDead") < 1) { + donpcevent "cell#bat_b02_b::Ongreen"; + mapannounce "bat_b02", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00"; + } + end; +} + +bat_b02,1,4,3 script cell#bat_b02_a 844,{ +Onred: + setwall "bat_b02",60,149,2,6,0,"Guillaume_wall1-1"; + setwall "bat_b02",62,149,2,0,0,"Guillaume_wall1-2"; + setwall "bat_b02",62,151,2,2,0,"Guillaume_wall1-3"; + setwall "bat_b02",60,151,2,4,0,"Guillaume_wall1-4"; + end; + +Ongreen: + delwall "Guillaume_wall1-1"; + delwall "Guillaume_wall1-2"; + delwall "Guillaume_wall1-3"; + delwall "Guillaume_wall1-4"; + end; +} + +bat_b02,1,5,3 script cell#bat_b02_b 844,{ +Onred: + setwall "bat_b02",327,149,2,6,0,"Croix_wall1-1"; + setwall "bat_b02",329,149,2,0,0,"Croix_wall1-2"; + setwall "bat_b02",329,151,2,2,0,"Croix_wall1-3"; + setwall "bat_b02",327,151,2,4,0,"Croix_wall1-4"; + end; + +Ongreen: + delwall "Croix_wall1-1"; + delwall "Croix_wall1-2"; + delwall "Croix_wall1-3"; + delwall "Croix_wall1-4"; + end; +} + +bat_b02,1,6,1 script time#bat_b02 844,{ +OnEnable: + donpcevent "Battle Therapist#b02_a::OnEnable"; + donpcevent "Battle Therapist#b02_b::OnEnable"; + end; + +Onstop: + donpcevent "Battle Therapist#b02_a::OnStop"; + donpcevent "Battle Therapist#b02_b::OnStop"; + end; +} + +bat_b02,10,294,3 script Battle Therapist#b02_a 95,{ + specialeffect2 EF_HEAL; + mes "[Battle Therapist]"; + mes "Just close your eyes,"; + mes "and take a deep breath."; + mes "You can be free from pain."; + close; + +OnTimer25000: + specialeffect EF_SANCTUARY; + enablenpc "bat_b02_rp1_a_warp"; + end; + +OnTimer26000: + disablenpc "bat_b02_rp1_a_warp"; + end; + +OnTimer26500: + stopnpctimer; + donpcevent "Battle Therapist#b02_a::onEnable"; + end; + +OnEnable: + initnpctimer; + enablenpc "Battle Therapist#b02_a"; + end; + +Onstop: + disablenpc "bat_b02_rp1_a_warp"; + disablenpc "Battle Therapist#b02_a"; + stopnpctimer; + end; +} + +bat_b02,10,290,0 script bat_b02_rp1_a_warp 45,10,10,{ +OnInit: + disablenpc "bat_b02_rp1_a_warp"; + end; + +OnTouch: + percentheal 100,100; + warp "bat_b02",87,73; + end; +} + +bat_b02,389,14,3 script Battle Therapist#b02_b 95,{ + specialeffect2 EF_HEAL; + mes "[Battle Therapist]"; + mes "Just close your eyes,"; + mes "and take a deep breath."; + mes "You can be free from pain."; + close; + +OnTimer25000: + specialeffect EF_SANCTUARY; + enablenpc "bat_b02_rp1_b_warp"; + end; + +OnTimer26000: + disablenpc "bat_b02_rp1_b_warp"; + end; + +OnTimer26500: + stopnpctimer; + donpcevent "Battle Therapist#b02_b::OnEnable"; + end; + +OnEnable: + initnpctimer; + enablenpc "Battle Therapist#b02_b"; + end; + +Onstop: + disablenpc "bat_b02_rp1_b_warp"; + disablenpc "Battle Therapist#b02_b"; + stopnpctimer; + end; +} + +bat_b02,389,10,0 script bat_b02_rp1_b_warp 45,9,9,{ +OnInit: + disablenpc "bat_b02_rp1_a_warp"; + end; + +OnTouch: + percentheal 100,100; + warp "bat_b02",312,225; + end; +} + +bat_b02,87,76,0 script A_CODE#bat_b02 -1,5,5,{ +OnTouch: + if (checkquest(2070) < 0) + //setquest 2070; + end; +} + +bat_b02,312,224,0 script B_CODE#bat_b02 -1,5,5,{ +OnTouch: + if (checkquest(2070) < 0) + //setquest 2070; + end; +} + +bat_b02,10,294,3 script Guillaume Vintenar#b02_a 934,{ + if ($@FlaviusBG2_id1 == getcharid(4)) { + if ($@FlaviusBG2_Victory == 1) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 8) { + mes "[Axl Rose]"; + mes "Blessed Guillaume!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,9; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "Blessed Guillaume!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + } + bg_leave; + warp "bat_room",154,150; + end; + +OnInit: + disablenpc "Guillaume Vintenar#b02_a"; + end; +} + +bat_b02,389,14,3 script Croix Vintenar#b02_b 934,{ + if ($@FlaviusBG2_id2 == getcharid(4)) { + if ($@FlaviusBG2_Victory == 2) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 8) { + mes "[Swandery]"; + mes "Blessed Croix!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,9; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Blessed Croix!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + } + bg_leave; + warp "bat_room",154,150; + end; + +OnInit: + disablenpc "Croix Vintenar#b02_b"; + end; +} + +bat_b02,1,5,3 script countdown#bat_b02 844,{ +OnInit: + stopnpctimer; + end; + +OnEnable: + stopnpctimer; + initnpctimer; + end; + +Onstop: + stopnpctimer; + end; + +OnTimer7000: + mapannounce "bat_b02", "Guillaume Vintenar Axl Rose : Let's attack to destroy that Crystal!",bc_map,"0xFF9900"; + end; + +OnTimer8000: + mapannounce "bat_b02", "Croix Vintenar Swandery : Even though Guillaume is struggling to win against us, the victory is ours. Let's show them our power.",bc_map,"0xFF99CC"; + end; + +OnTimer1800000: + mapannounce "bat_b02", "Marollo VII : Guillaume Marollo, Croix Marollo! And their followers!",bc_map,"0x99CC00"; + end; + +OnTimer1803000: + mapannounce "bat_b02", "Marollo VII : Both camps are competitive, so it's hard to judge which team is superior.",bc_map,"0x99CC00"; + end; + +OnTimer1808000: + mapannounce "bat_b02", "Marollo VII : This battle of Flavian is such a waste of time. I will decide victory and defeat by your progress.",bc_map,"0x99CC00"; + end; + +OnTimer1822000: + mapannounce "bat_b02", "Marollo VII : If you can't accept the results, try again in another valley battle!",bc_map,"0x99CC00"; + end; + +OnTimer1825000: + mapannounce "bat_b02", "Axl Rose, Swandery : Yes, sir.",bc_map,"0x99CC00"; + end; + +OnTimer1830000: + donpcevent "time#bat_b02::Onstop"; + bg_warp $@FlaviusBG2_id1,"bat_b02",10,290; + bg_warp $@FlaviusBG2_id2,"bat_b02",390,10; + enablenpc "Vintenar#bat_b02_aover"; + enablenpc "Vintenar#bat_b02_bover"; + end; + +OnTimer1900000: + mapwarp "bat_b02","bat_room",154,150; + donpcevent "countdown#bat_b02::Onstop"; + end; +} + +bat_b02,81,83,3 script Guillaume Camp#flag32 973,{ end; } +bat_b02,94,83,3 script Guillaume Camp#flag33 973,{ end; } +bat_b02,81,66,3 script Guillaume Camp#flag34 973,{ end; } +bat_b02,94,66,3 script Guillaume Camp#flag35 973,{ end; } +bat_b02,139,142,3 script Guillaume Camp#flag36 973,{ end; } +bat_b02,139,158,3 script Guillaume Camp#flag37 973,{ end; } +bat_b02,110,161,3 script Guillaume Camp#flag38 973,{ end; } +bat_b02,110,137,3 script Guillaume Camp#flag39 973,{ end; } +bat_b02,63,135,3 script Guillaume Camp#flag40 973,{ end; } +bat_b02,63,165,3 script Guillaume Camp#flag41 973,{ end; } +bat_b02,10,296,3 script Guillaume Camp#flag42 973,{ end; } + +bat_b02,306,233,3 script Croix Camp#flag32 974,{ end; } +bat_b02,317,233,3 script Croix Camp#flag33 974,{ end; } +bat_b02,306,216,3 script Croix Camp#flag34 974,{ end; } +bat_b02,317,216,3 script Croix Camp#flag35 974,{ end; } +bat_b02,257,158,3 script Croix Camp#flag36 974,{ end; } +bat_b02,257,141,3 script Croix Camp#flag37 974,{ end; } +bat_b02,297,164,3 script Croix Camp#flag38 974,{ end; } +bat_b02,297,136,3 script Croix Camp#flag39 974,{ end; } +bat_b02,336,161,3 script Croix Camp#flag40 974,{ end; } +bat_b02,336,139,3 script Croix Camp#flag41 974,{ end; } +bat_b02,389,16,3 script Croix Camp#flag42 974,{ end; } + +bat_b02,10,294,3 script Vintenar#bat_b02_aover 419,{ + set .@A_B_gap,$@Guill_ScoreBG2 - $@Croix_ScoreBG2; + if ($@FlaviusBG2_id1 == getcharid(4)) { + if (.@A_B_gap > 0) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 8) { + mes "[Axl Rose]"; + mes "Blessed Guillaume!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,9; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "Blessed Guillaume!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else if (.@A_B_gap == 0) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Axl Rose]"; + mes "You lost, but you're dedicated to this battle."; + mes "This is a reward for your great dedication by Guillaume Marollo!"; + mes "Just take this defeat as a lesson, next time you will definitely win."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + } + else { + mes "[Axl Rose]"; + mes "Why are you here, Croix mercenary? I am definitely sure of victory against foolish Croix such as you. Ha!"; + close; + } + bg_leave; + warp "bat_room",154,150; + end; + +OnInit: + disablenpc "Vintenar#bat_b02_aover"; + end; +} + +bat_b02,389,14,3 script Vintenar#bat_b02_bover 415,{ + set .@A_B_gap,$@Guill_ScoreBG2 - $@Croix_ScoreBG2; + if ($@FlaviusBG2_id2 == getcharid(4)) { + if (.@A_B_gap > 0) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else if (.@A_B_gap == 0) { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 2) { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,3; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Oh, "+strcharinfo(0)+". Don't be sad."; + mes "Even though we didn't win, we did our best."; + mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + else { + set .@your_medal,countitem(7829); + set .@medal_gap,500 - .@your_medal; + if (.@medal_gap > 8) { + mes "[Swandery]"; + mes "Blessed Croix!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,9; //BF_Badge2 + } + else { + mes "[Swandery]"; + mes "Blessed Croix!"; + mes "Let's enjoy our glorious victory!"; + mes ""+strcharinfo(0)+", it's a sign reflecting victory."; + close2; + getitem 7829,.@medal_gap; //BF_Badge2 + } + } + } + else { + mes "[Swandery]"; + mes "Why do you come here as a Guillaume? You will be sent to where you should be!"; + close; + } + bg_leave; + warp "bat_room",154,150; + end; + +OnInit: + disablenpc "Vintenar#bat_b02_bover"; + end; +} + +/* +bat_b02,1,10,3 script Release all#b02 81,{ + input .@input,0,2000; + if (.@input == 0) { + mes "Cancelled."; + close; + } + else if (.@input == 1854) { + mes "May I help you?"; + next; + switch(select("Release all.:Cancel.")) { + case 1: + mes "Bye."; + close2; + mapwarp "bat_b02","bat_room",154,150; + end; + case 2: + mes "Cancelled."; + close; + } + } +} +*/ \ No newline at end of file diff --git a/npc/battleground/kvm/kvm01.txt b/npc/battleground/kvm/kvm01.txt index 27f01d47d..1b8f3cb6c 100644 --- a/npc/battleground/kvm/kvm01.txt +++ b/npc/battleground/kvm/kvm01.txt @@ -60,23 +60,23 @@ OnKvM01Two: end; } -bat_c01,54,124,3 duplicate(CellEffect) #RedcellA1-1 111 -bat_c01,55,124,3 duplicate(CellEffect) #RedcellA2-1 111 -bat_c01,56,124,3 duplicate(CellEffect) #RedcellA3-1 111 -bat_c01,57,124,3 duplicate(CellEffect) #RedcellA4-1 111 -bat_c01,57,125,3 duplicate(CellEffect) #RedcellA5-1 111 -bat_c01,57,126,3 duplicate(CellEffect) #RedcellA6-1 111 -bat_c01,57,127,3 duplicate(CellEffect) #RedcellA7-1 111 +bat_c01,54,124,3 duplicate(CellEffect) #RedcellA1-1 139 +bat_c01,55,124,3 duplicate(CellEffect) #RedcellA2-1 139 +bat_c01,56,124,3 duplicate(CellEffect) #RedcellA3-1 139 +bat_c01,57,124,3 duplicate(CellEffect) #RedcellA4-1 139 +bat_c01,57,125,3 duplicate(CellEffect) #RedcellA5-1 139 +bat_c01,57,126,3 duplicate(CellEffect) #RedcellA6-1 139 +bat_c01,57,127,3 duplicate(CellEffect) #RedcellA7-1 139 -bat_c01,145,59,3 duplicate(CellEffect) #RedcellB1-1 111 -bat_c01,144,59,3 duplicate(CellEffect) #RedcellB2-1 111 -bat_c01,143,59,3 duplicate(CellEffect) #RedcellB3-1 111 -bat_c01,142,59,3 duplicate(CellEffect) #RedcellB4-1 111 -bat_c01,142,56,3 duplicate(CellEffect) #RedcellB5-1 111 -bat_c01,142,57,3 duplicate(CellEffect) #RedcellB6-1 111 -bat_c01,142,58,3 duplicate(CellEffect) #RedcellB7-1 111 +bat_c01,145,59,3 duplicate(CellEffect) #RedcellB1-1 139 +bat_c01,144,59,3 duplicate(CellEffect) #RedcellB2-1 139 +bat_c01,143,59,3 duplicate(CellEffect) #RedcellB3-1 139 +bat_c01,142,59,3 duplicate(CellEffect) #RedcellB4-1 139 +bat_c01,142,56,3 duplicate(CellEffect) #RedcellB5-1 139 +bat_c01,142,57,3 duplicate(CellEffect) #RedcellB6-1 139 +bat_c01,142,58,3 duplicate(CellEffect) #RedcellB7-1 139 -bat_c01,54,128,3 script #A_camp_start01 111,4,4,{ +bat_c01,54,128,3 script #A_camp_start01 139,4,4,{ end; OnInit: @@ -97,7 +97,7 @@ OnTouch: end; } -bat_c01,146,56,3 script #B_camp_start01 111,4,4,{ +bat_c01,146,56,3 script #B_camp_start01 139,4,4,{ end; OnInit: @@ -146,6 +146,10 @@ OnGuillaumeDie: set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score; if( .Guillaume_Count < 1 ) donpcevent "KvM01_BG::OnCroixWin"; + else { + mapannounce "bat_c01", "NUmber of Guillaume survivors "+.Guillaume_Count+".",bc_map,"0x00ff00"; + mapannounce "bat_c01", "NUmber of Croix survivors "+.Croix_Count+".",bc_map,"0x00ff00"; + } } end; @@ -158,6 +162,10 @@ OnCroixDie: set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score; if( .Croix_Count < 1 ) donpcevent "KvM01_BG::OnGuillaumeWin"; + else { + mapannounce "bat_c01", "NUmber of Guillaume survivors "+.Guillaume_Count+".",bc_map,"0x00ff00"; + mapannounce "bat_c01", "NUmber of Croix survivors "+.Croix_Count+".",bc_map,"0x00ff00"; + } } end; @@ -426,12 +434,3 @@ bat_c01,148,53,1 script KVM Officer#KVM01B 415,{ // MapFlags //============================================================ -bat_c01 mapflag battleground 2 -bat_c01 mapflag nomemo -bat_c01 mapflag nosave SavePoint -bat_c01 mapflag noteleport -bat_c01 mapflag nowarp -bat_c01 mapflag nowarpto -bat_c01 mapflag noreturn -bat_c01 mapflag nobranch -bat_c01 mapflag nopenalty diff --git a/npc/battleground/kvm/kvm02.txt b/npc/battleground/kvm/kvm02.txt index 063f34ba6..11a1c3d47 100644 --- a/npc/battleground/kvm/kvm02.txt +++ b/npc/battleground/kvm/kvm02.txt @@ -60,23 +60,23 @@ OnKvM02Two: end; } -bat_c02,54,124,3 duplicate(CellEffect2) #RedcellA1-2 111 -bat_c02,55,124,3 duplicate(CellEffect2) #RedcellA2-2 111 -bat_c02,56,124,3 duplicate(CellEffect2) #RedcellA3-2 111 -bat_c02,57,124,3 duplicate(CellEffect2) #RedcellA4-2 111 -bat_c02,57,125,3 duplicate(CellEffect2) #RedcellA5-2 111 -bat_c02,57,126,3 duplicate(CellEffect2) #RedcellA6-2 111 -bat_c02,57,127,3 duplicate(CellEffect2) #RedcellA7-2 111 +bat_c02,54,124,3 duplicate(CellEffect2) #RedcellA1-2 139 +bat_c02,55,124,3 duplicate(CellEffect2) #RedcellA2-2 139 +bat_c02,56,124,3 duplicate(CellEffect2) #RedcellA3-2 139 +bat_c02,57,124,3 duplicate(CellEffect2) #RedcellA4-2 139 +bat_c02,57,125,3 duplicate(CellEffect2) #RedcellA5-2 139 +bat_c02,57,126,3 duplicate(CellEffect2) #RedcellA6-2 139 +bat_c02,57,127,3 duplicate(CellEffect2) #RedcellA7-2 139 -bat_c02,145,59,3 duplicate(CellEffect2) #RedcellB1-2 111 -bat_c02,144,59,3 duplicate(CellEffect2) #RedcellB2-2 111 -bat_c02,143,59,3 duplicate(CellEffect2) #RedcellB3-2 111 -bat_c02,142,59,3 duplicate(CellEffect2) #RedcellB4-2 111 -bat_c02,142,56,3 duplicate(CellEffect2) #RedcellB5-2 111 -bat_c02,142,57,3 duplicate(CellEffect2) #RedcellB6-2 111 -bat_c02,142,58,3 duplicate(CellEffect2) #RedcellB7-2 111 +bat_c02,145,59,3 duplicate(CellEffect2) #RedcellB1-2 139 +bat_c02,144,59,3 duplicate(CellEffect2) #RedcellB2-2 139 +bat_c02,143,59,3 duplicate(CellEffect2) #RedcellB3-2 139 +bat_c02,142,59,3 duplicate(CellEffect2) #RedcellB4-2 139 +bat_c02,142,56,3 duplicate(CellEffect2) #RedcellB5-2 139 +bat_c02,142,57,3 duplicate(CellEffect2) #RedcellB6-2 139 +bat_c02,142,58,3 duplicate(CellEffect2) #RedcellB7-2 139 -bat_c02,54,128,3 script #A_camp_start02 111,4,4,{ +bat_c02,54,128,3 script #A_camp_start02 139,4,4,{ end; OnInit: @@ -97,7 +97,7 @@ OnTouch: end; } -bat_c02,146,56,3 script #B_camp_start02 111,4,4,{ +bat_c02,146,56,3 script #B_camp_start02 139,4,4,{ end; OnInit: @@ -146,6 +146,10 @@ OnGuillaumeDie: set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score; if( .Guillaume_Count < 1 ) donpcevent "KvM02_BG::OnCroixWin"; + else { + mapannounce "bat_c02", "NUmber of Guillaume survivors "+.Guillaume_Count+".",bc_map,"0x00ff00"; + mapannounce "bat_c02", "NUmber of Croix survivors "+.Croix_Count+".",bc_map,"0x00ff00"; + } } end; @@ -158,6 +162,10 @@ OnCroixDie: set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score; if( .Croix_Count < 1 ) donpcevent "KvM02_BG::OnGuillaumeWin"; + else { + mapannounce "bat_c02", "NUmber of Guillaume survivors "+.Guillaume_Count+".",bc_map,"0x00ff00"; + mapannounce "bat_c02", "NUmber of Croix survivors "+.Croix_Count+".",bc_map,"0x00ff00"; + } } end; @@ -423,12 +431,3 @@ bat_c02,148,53,1 script KVM Officer#KVM02B 415,{ // MapFlags //============================================================ -bat_c02 mapflag battleground 2 -bat_c02 mapflag nomemo -bat_c02 mapflag nosave SavePoint -bat_c02 mapflag noteleport -bat_c02 mapflag nowarp -bat_c02 mapflag nowarpto -bat_c02 mapflag noreturn -bat_c02 mapflag nobranch -bat_c02 mapflag nopenalty diff --git a/npc/battleground/kvm/kvm03.txt b/npc/battleground/kvm/kvm03.txt index 245fefc7d..ab30a6708 100644 --- a/npc/battleground/kvm/kvm03.txt +++ b/npc/battleground/kvm/kvm03.txt @@ -60,23 +60,23 @@ OnKvM03Two: end; } -bat_c03,54,124,3 duplicate(CellEffect3) #RedcellA1-3 111 -bat_c03,55,124,3 duplicate(CellEffect3) #RedcellA2-3 111 -bat_c03,56,124,3 duplicate(CellEffect3) #RedcellA3-3 111 -bat_c03,57,124,3 duplicate(CellEffect3) #RedcellA4-3 111 -bat_c03,57,125,3 duplicate(CellEffect3) #RedcellA5-3 111 -bat_c03,57,126,3 duplicate(CellEffect3) #RedcellA6-3 111 -bat_c03,57,127,3 duplicate(CellEffect3) #RedcellA7-3 111 +bat_c03,54,124,3 duplicate(CellEffect3) #RedcellA1-3 139 +bat_c03,55,124,3 duplicate(CellEffect3) #RedcellA2-3 139 +bat_c03,56,124,3 duplicate(CellEffect3) #RedcellA3-3 139 +bat_c03,57,124,3 duplicate(CellEffect3) #RedcellA4-3 139 +bat_c03,57,125,3 duplicate(CellEffect3) #RedcellA5-3 139 +bat_c03,57,126,3 duplicate(CellEffect3) #RedcellA6-3 139 +bat_c03,57,127,3 duplicate(CellEffect3) #RedcellA7-3 139 -bat_c03,145,59,3 duplicate(CellEffect3) #RedcellB1-3 111 -bat_c03,144,59,3 duplicate(CellEffect3) #RedcellB2-3 111 -bat_c03,143,59,3 duplicate(CellEffect3) #RedcellB3-3 111 -bat_c03,142,59,3 duplicate(CellEffect3) #RedcellB4-3 111 -bat_c03,142,56,3 duplicate(CellEffect3) #RedcellB5-3 111 -bat_c03,142,57,3 duplicate(CellEffect3) #RedcellB6-3 111 -bat_c03,142,58,3 duplicate(CellEffect3) #RedcellB7-3 111 +bat_c03,145,59,3 duplicate(CellEffect3) #RedcellB1-3 139 +bat_c03,144,59,3 duplicate(CellEffect3) #RedcellB2-3 139 +bat_c03,143,59,3 duplicate(CellEffect3) #RedcellB3-3 139 +bat_c03,142,59,3 duplicate(CellEffect3) #RedcellB4-3 139 +bat_c03,142,56,3 duplicate(CellEffect3) #RedcellB5-3 139 +bat_c03,142,57,3 duplicate(CellEffect3) #RedcellB6-3 139 +bat_c03,142,58,3 duplicate(CellEffect3) #RedcellB7-3 139 -bat_c03,54,128,3 script #A_camp_start03 111,4,4,{ +bat_c03,54,128,3 script #A_camp_start03 139,4,4,{ end; OnInit: @@ -97,7 +97,7 @@ OnTouch: end; } -bat_c03,146,56,3 script #B_camp_start03 111,4,4,{ +bat_c03,146,56,3 script #B_camp_start03 139,4,4,{ end; OnInit: @@ -146,6 +146,10 @@ OnGuillaumeDie: set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c03",.Guillaume_Score,.Croix_Score; if( .Guillaume_Count < 1 ) donpcevent "KvM03_BG::OnCroixWin"; + else { + mapannounce "bat_c03", "NUmber of Guillaume survivors "+.Guillaume_Count+".",bc_map,"0x00ff00"; + mapannounce "bat_c03", "NUmber of Croix survivors "+.Croix_Count+".",bc_map,"0x00ff00"; + } } end; @@ -158,6 +162,10 @@ OnCroixDie: set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c03",.Guillaume_Score,.Croix_Score; if( .Croix_Count < 1 ) donpcevent "KvM03_BG::OnGuillaumeWin"; + else { + mapannounce "bat_c03", "NUmber of Guillaume survivors "+.Guillaume_Count+".",bc_map,"0x00ff00"; + mapannounce "bat_c03", "NUmber of Croix survivors "+.Croix_Count+".",bc_map,"0x00ff00"; + } } end; @@ -425,12 +433,3 @@ bat_c03,148,53,1 script KVM Officer#KVM03B 415,{ // MapFlags //============================================================ -bat_c03 mapflag battleground 2 -bat_c03 mapflag nomemo -bat_c03 mapflag nosave SavePoint -bat_c03 mapflag noteleport -bat_c03 mapflag nowarp -bat_c03 mapflag nowarpto -bat_c03 mapflag noreturn -bat_c03 mapflag nobranch -bat_c03 mapflag nopenalty diff --git a/npc/battleground/kvm/kvm_enter.txt b/npc/battleground/kvm/kvm_enter.txt index 544438534..c6d50e87a 100644 --- a/npc/battleground/kvm/kvm_enter.txt +++ b/npc/battleground/kvm/kvm_enter.txt @@ -17,14 +17,22 @@ // KvM Officer - Guillaume //============================================================ bat_room,164,178,5 script KVM Mercenary Officer#1 418,{ - set .@permit,checkquest(6026,PLAYTIME); + /* + set .@kvm,checkquest(6027,PLAYTIME); + if ((.@kvm == 0) || (.@kvm == 1)) { + mes "[Croix Mercenary Officer]"; + mes "It seems you ahve recently participated in a KVM battle. You must wait 5 minutes before signing up again."; + close; + } + */ + set .@permit,checkquest(6025,PLAYTIME); if ((.@permit == 0) || (.@permit == 1)) { mes "[Guillaume Mercenary Officer]"; mes "I know that you've already signed with the Croix. Go back and join their team. We will not accept traitors to fight for us."; close; } else { - if (checkquest(6025) >= 0) erasequest 6026; + if (checkquest(6025) >= 0) erasequest 6025; } mes "[Guillaume Mercenary Officer]"; mes "Let them know the real might of Guillaume!"; @@ -115,6 +123,14 @@ bat_room,167,178,5 script Guillaume Knight#kvm 417,{ // KvM Officer - Croix //============================================================ bat_room,164,121,1 script KVM Mercenary Officer#2 414,{ + /* + set .@kvm,checkquest(6027,PLAYTIME); + if ((.@kvm == 0) || (.@kvm == 1)) { + mes "[Croix Mercenary Officer]"; + mes "It seems you ahve recently participated in a KVM battle. You must wait 5 minutes before signing up again."; + close; + } + */ set .@permit,checkquest(6025,PLAYTIME); if ((.@permit == 0) || (.@permit == 1)) { mes "[Croix Mercenary Officer]"; diff --git a/npc/battleground/tierra/tierra01.txt b/npc/battleground/tierra/tierra01.txt index bdd089d25..6795a2300 100644 --- a/npc/battleground/tierra/tierra01.txt +++ b/npc/battleground/tierra/tierra01.txt @@ -44,6 +44,7 @@ OnEnterBG: bat_room,1,151,3 script #bat_a01_timer 844,{ end; +onInit: OnEnable: initnpctimer; end; @@ -129,7 +130,7 @@ OnReadyCheck: donpcevent "#bat_a01_timer::OnStop"; end; } - if( .@Guillaume < 10 || .@Croix < 10 ) + else if( .@Guillaume < 10 || .@Croix < 10 ) end; set $@TierraBG1,1; donpcevent "Lieutenant Kalos::OnEnterBG"; @@ -196,7 +197,7 @@ bat_a01,15,18,3 script barricade#bat_a01_a 844,{ OnEnable: for( set .@i,185; .@i < 202; set .@i,.@i+1 ) bg_monster $@TierraBG1_id1,"bat_a01",.@i,266,"Barricade",1906,"barricade#bat_a01_a::OnMyMobDead"; - setwall "bat_a01",185,266,16,6,1,"bat_a01_c1"; + setwall "bat_a01",185,265,16,6,1,"bat_a01_c1"; end; Onkill: @@ -218,7 +219,7 @@ bat_a01,15,19,3 script barricade#bat_a01_b 844,{ OnEnable: for( set .@i,169; .@i < 186; set .@i,.@i+1 ) bg_monster $@TierraBG1_id2,"bat_a01",.@i,129,"Barricade",1906,"barricade#bat_a01_b::OnMyMobDead"; - setwall "bat_a01",169,129,16,6,1,"bat_a01_g1"; + setwall "bat_a01",169,130,16,6,1,"bat_a01_g1"; end; Onkill: diff --git a/npc/battleground/tierra/tierra02.txt b/npc/battleground/tierra/tierra02.txt index f3b8bc2cd..fad2e1266 100644 --- a/npc/battleground/tierra/tierra02.txt +++ b/npc/battleground/tierra/tierra02.txt @@ -44,6 +44,7 @@ OnEnterBG: bat_room,1,151,3 script #bat_a02_timer 844,{ end; +onInit: OnEnable: initnpctimer; end; @@ -129,7 +130,7 @@ OnReadyCheck: donpcevent "#bat_a02_timer::OnStop"; end; } - if( .@Guillaume < 10 || .@Croix < 10 ) + else if( .@Guillaume < 10 || .@Croix < 10 ) end; set $@TierraBG2,1; donpcevent "Lieutenant Rundel::OnEnterBG"; @@ -196,7 +197,7 @@ bat_a02,15,18,3 script barricade#bat_a02_a 844,{ OnEnable: for( set .@i,185; .@i < 202; set .@i,.@i+1 ) bg_monster $@TierraBG2_id1,"bat_a02",.@i,266,"Barricade",1906,"barricade#bat_a02_a::OnMyMobDead"; - setwall "bat_a02",185,266,16,6,1,"bat_a02_c1"; + setwall "bat_a02",185,265,16,6,1,"bat_a02_c1"; end; Onkill: @@ -218,7 +219,7 @@ bat_a02,15,19,3 script barricade#bat_a02_b 844,{ OnEnable: for( set .@i,169; .@i < 186; set .@i,.@i+1 ) bg_monster $@TierraBG2_id2,"bat_a02",.@i,129,"Barricade",1906,"barricade#bat_a02_b::OnMyMobDead"; - setwall "bat_a02",169,129,16,6,1,"bat_a02_g1"; + setwall "bat_a02",169,130,16,6,1,"bat_a02_g1"; end; Onkill: -- cgit v1.2.3-70-g09d2