diff options
author | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-08-11 18:17:26 +0000 |
---|---|---|
committer | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-08-11 18:17:26 +0000 |
commit | b1ca3ed2ab319fa5a81e24cad92fa2c9801e8806 (patch) | |
tree | 1b5973153481222ab11032ab1c1b5c9877ec81c9 /npc/custom/battleground | |
parent | f43db005fc8a815db1e348ca19693eb5b47bd460 (diff) | |
download | hercules-b1ca3ed2ab319fa5a81e24cad92fa2c9801e8806.tar.gz hercules-b1ca3ed2ab319fa5a81e24cad92fa2c9801e8806.tar.bz2 hercules-b1ca3ed2ab319fa5a81e24cad92fa2c9801e8806.tar.xz hercules-b1ca3ed2ab319fa5a81e24cad92fa2c9801e8806.zip |
* Documented Battleground commands with as much information as I've got.
* Another rather large overhaul of the battlegrounds.
- in bg_common.txt, stripped out several more NPCs, split them off.
- Most of the NPCs in bg_common.txt are now official Aegis versions.
- Completely rewrote Tierra Gorge for the most part, from ground up.
- Moved old Tierra Valley battlegrounds to /custom/battleground.
- Added Tierra scripts, Flavius, and bg_common to scripts_athena.
- Tierra, KvM, and bg_common scripts are now enabled by default.
- To use custom Flavius, you must enable /flavius/flavius_enter.txt
- * TIERRA GORGE AND KVM BOTH REQUIRE TESTING *
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14373 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/custom/battleground')
-rw-r--r-- | npc/custom/battleground/bg_tierra_01.txt | 488 | ||||
-rw-r--r-- | npc/custom/battleground/bg_tierra_02.txt | 488 |
2 files changed, 976 insertions, 0 deletions
diff --git a/npc/custom/battleground/bg_tierra_01.txt b/npc/custom/battleground/bg_tierra_01.txt new file mode 100644 index 000000000..e65a2424c --- /dev/null +++ b/npc/custom/battleground/bg_tierra_01.txt @@ -0,0 +1,488 @@ +// ============================================================================== +// BattleGround System - Tierra Valley 1 +// ============================================================================== + +// Registration NPC's +// ********************************************************************* + +bat_room,58,227,4 script Registration::TV1R_Guillaume 418,{ + end; +OnInit: + waitingroom "Battle Station 10 Players",10,"Tierra_BG1::OnGuillaumeJoin",1; + end; +OnEnterBG: + set $@TierraBG1_id1, waitingroom2bg("bat_a01",50,374,"Tierra_BG1::OnGuillaumeQuit",""); + end; +} + +bat_room,58,204,0 script Registration::TV1R_Croix 414,{ + end; +OnInit: + waitingroom "Battle Station 10 Players",10,"Tierra_BG1::OnCroixJoin",1; + end; +OnEnterBG: + set $@TierraBG1_id2, waitingroom2bg("bat_a01",42,16,"Tierra_BG1::OnCroixQuit",""); + end; +} + +// Battleground Engine +// ********************************************************************* + +- script Tierra_BG1 -1,{ + end; + +OnInit: + disablenpc "Croix Vintenar#tv1"; + disablenpc "Guillaume Vintenar#tv1"; + disablenpc "Therapist in battle#tv11"; + disablenpc "Therapist in battle#tv12"; + end; + +OnGuillaumeQuit: +OnCroixQuit: + set BG_Delay_Tick, gettimetick(2) + 1200; + end; + +OnGuillaumeJoin: +OnCroixJoin: + if( $@TierraBG1 == 0 ) + donpcevent "Tierra_BG1::OnReadyCheck"; + end; + +OnReadyCheck: + if( $@TierraBG1 ) + end; + set .@Guillaume, getwaitingroomstate(0,"TV1R_Guillaume"); + set .@Croix, getwaitingroomstate(0,"TV1R_Croix"); + + if( .@Guillaume < 10 || .@Croix < 10 ) + { + mapannounce "bat_room","Battleground -- Tierra Valley [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0xFFA500; + end; + } + + set $@TierraBG1, 1; + donpcevent "TV1R_Croix::OnEnterBG"; + donpcevent "TV1R_Guillaume::OnEnterBG"; + donpcevent "Guillaume_TV1B::OnBuild"; + donpcevent "Croix_TV1B::OnBuild"; + bg_monster $@TierraBG1_id1,"bat_a01",176,345,"Food Depot",1909,"Tierra_BG1::OnGuillaumeBreak"; + bg_monster $@TierraBG1_id2,"bat_a01",167,50,"Food Storage",1910,"Tierra_BG1::OnCroixBreak"; + bg_monster 0,"bat_a01",273,204,"Neutrality Flag",1911,"Tierra_BG1::OnNeutralBreak"; + + set .Neutral_Base, 0; + set $@TierraBG1_Victory, 0; + + set .Guardian_1, 0; + set .Guardian_2, 0; + set .Guardian_3, 0; + + enablenpc "Therapist in battle#tv11"; + enablenpc "Therapist in battle#tv12"; + disablenpc "Croix Vintenar#tv1"; + disablenpc "Guillaume Vintenar#tv1"; + // Respawner + donpcevent "#gtv1_respawn::OnBGStart"; + donpcevent "#ctv1_respawn::OnBGStart"; + donpcevent "#ntv1_respawn::OnBGStart"; + // Warp Teams + announce "Battleground -- Tierra Valley [80-99] has started!",0,0xFFA500; + bg_warp $@TierraBG1_id1,"bat_a01",353,344; + bg_warp $@TierraBG1_id2,"bat_a01",353,52; + // Final Messages + sleep 6000; + mapannounce "bat_a01","Guillaume Vintenar Axl Rose : Let's attack to burn down Croix's food storage",1,0x0000FF; + sleep 2000; + mapannounce "bat_a01","Croix Vintenar Swandery : Master of Valhalla! Let us be gifted with unfailing faith and courage",1,0xFF0000; + + initnpctimer; + end; + +OnNeutralBreak: + if( getcharid(4) == $@TierraBG1_id1 ) + { + mapannounce "bat_a01","Guillaume obtained a neurality banner, so they have an advantage.",1,0x0000FF; + bg_team_setxy $@TierraBG1_id2,42,16; + areawarp "bat_a01",52,208,61,217,"bat_a01",42,16; + } + else if( getcharid(4) == $@TierraBG1_id2 ) + { + mapannounce "bat_a01","Croix obtained a neutrality banner, so they have an advantage.",1,0xFF0000; + bg_team_setxy $@TierraBG1_id1,50,374; + areawarp "bat_a01",52,208,61,217,"bat_a01",50,374; + } + else end; + + set .Neutral_Base, getcharid(4); + bg_team_setxy .Neutral_Base,56,212; + + if( .Guardian_1 == 0 ) + set .Guardian_1, bg_monster(.Neutral_Base,"bat_a01",280,233,"Guardian",1949,"Tierra_BG1::OnGuardian1"); + else + bg_monster_set_team .Guardian_1, .Neutral_Base; + + if( .Guardian_2 == 0 ) + set .Guardian_2, bg_monster(.Neutral_Base,"bat_a01",287,203,"Guardian",1950,"Tierra_BG1::OnGuardian2"); + else + bg_monster_set_team .Guardian_2, .Neutral_Base; + + if( .Guardian_3 == 0 ) + set .Guardian_3, bg_monster(.Neutral_Base,"bat_a01",268,204,"Guardian",1949,"Tierra_BG1::OnGuardian3"); + else + bg_monster_set_team .Guardian_3, .Neutral_Base; + + sleep 10000; + if( $@TierraBG1 != 1 ) end; + + if( .Neutral_Base == $@TierraBG1_id1 ) + bg_monster .Neutral_Base,"bat_a01",273,204,"Guillaume Flag",1912,"Tierra_BG1::OnNeutralBreak"; + else if( .Neutral_Base == $@TierraBG1_id2 ) + bg_monster .Neutral_Base,"bat_a01",273,204,"Croix Flag",1913,"Tierra_BG1::OnNeutralBreak"; + end; + +OnGuardian1: set .Guardian_1, 0; end; +OnGuardian2: set .Guardian_2, 0; end; +OnGuardian3: set .Guardian_3, 0; end; + +OnGuillaumeBreak: + set $@TierraBG1_Victory, 2; + mapannounce "bat_a01","Croix Vintenar Swandery: We destroyed Guillaume's food storehouse. We won that! Wow!",1,0xFF0000; + donpcevent "Tierra_BG1::OnStop"; + end; + +OnCroixBreak: + set $@TierraBG1_Victory, 1; + mapannounce "bat_a01","Guillaume Vintenar Axl Rose: We destroyed Croix's food storehouse. We won that! Wow!",1,0x0000FF; + donpcevent "Tierra_BG1::OnStop"; + end; + +OnTimer2400000: + mapannounce "bat_a01","Battle of Tierra Gorge will ends in 5 minutes",1,0xFFA500; + end; +OnTimer2640000: + mapannounce "bat_a01","Battle of Tierra Gorge will ends in 1 minute",1,0xFFA500; + end; + +OnTimer2700000: + set $@TierraBG1_Victory, 3; // Draw Game + mapannounce "bat_a01","Battle of Tierra Gorge is over. The time is out, this is a Tie",1,0xFFA500; + donpcevent "Tierra_BG1::OnStop"; + end; + +OnStop: + set $@TierraBG1, 2; + disablenpc "Therapist in battle#tv11"; + disablenpc "Therapist in battle#tv12"; + donpcevent "#gtv1_respawn::OnBGStop"; + donpcevent "#ctv1_respawn::OnBGStop"; + donpcevent "#ntv1_respawn::OnBGStop"; + enablenpc "Croix Vintenar#tv1"; + enablenpc "Guillaume Vintenar#tv1"; + killmonster "bat_a01","Tierra_BG1::OnGuillaumeBreak"; + killmonster "bat_a01","Tierra_BG1::OnCroixBreak"; + killmonster "bat_a01","Tierra_BG1::OnNeutralBreak"; + killmonster "bat_a01","Tierra_BG1::OnGuardian1"; + killmonster "bat_a01","Tierra_BG1::OnGuardian2"; + killmonster "bat_a01","Tierra_BG1::OnGuardian3"; + stopnpctimer; + sleep 3000; + bg_warp $@TierraBG1_id1,"bat_a01",50,374; + bg_warp $@TierraBG1_id2,"bat_a01",42,16; + sleep 3000; + mapannounce "bat_a01","Battle of Tierra Gorge will close in 1 minute!",1,0xFFA500; + initnpctimer; + end; + +OnTimer30000: + if( $@TierraBG1 == 2 ) + mapannounce "bat_a01","Battle of Tierra Valley will close in 30 seconds!",1,0xFFA500; + end; +OnTimer50000: + if( $@TierraBG1 == 2 ) + mapannounce "bat_a01","Battle of Tierra Valley will close in 10 seconds!",1,0xFFA500; + end; + +OnTimer60000: + if( $@TierraBG1 != 2 ) + end; +OnReset: + stopnpctimer; + set .Neutral_Base, 0; + disablenpc "Croix Vintenar#tv1"; + disablenpc "Guillaume Vintenar#tv1"; + disablenpc "Therapist in battle#tv11"; + disablenpc "Therapist in battle#tv12"; + donpcevent "#gtv1_respawn::OnBGStop"; + donpcevent "#ctv1_respawn::OnBGStop"; + donpcevent "#ntv1_respawn::OnBGStop"; + + killmonster "bat_a01","Tierra_BG1::OnGuillaumeBreak"; + killmonster "bat_a01","Tierra_BG1::OnCroixBreak"; + killmonster "bat_a01","Tierra_BG1::OnNeutralBreak"; + killmonster "bat_a01","Tierra_BG1::OnGuardian1"; + killmonster "bat_a01","Tierra_BG1::OnGuardian2"; + killmonster "bat_a01","Tierra_BG1::OnGuardian3"; + donpcevent "Guillaume_TV1B::OnDestroy"; + donpcevent "Croix_TV1B::OnDestroy"; + + set $@TierraBG1_Victory, 0; + if( $@TierraBG1_id1 ) { bg_destroy $@TierraBG1_id1; set $@TierraBG1_id1, 0; } + if( $@TierraBG1_id2 ) { bg_destroy $@TierraBG1_id2; set $@TierraBG1_id2, 0; } + sleep 1000; + mapwarp "bat_a01","bat_room",155,150; + sleep 2000; + maprespawnguildid "bat_a01",0,3; // Just in case someone else + sleep 2000; + set $@TierraBG1, 0; + donpcevent "Tierra_BG1::OnReadyCheck"; // Maybe a game is ready to start + end; +} + +// MapFlags +// ********************************************************************* + +bat_a01 mapflag battleground +bat_a01 mapflag nomemo +bat_a01 mapflag nosave SavePoint +bat_a01 mapflag noteleport +bat_a01 mapflag nowarp +bat_a01 mapflag nowarpto +bat_a01 mapflag noreturn +bat_a01 mapflag nobranch +bat_a01 mapflag nopenalty + +// Other Flags +// ********************************************************************* + +bat_a01,148,85,1 duplicate(Croix camp#bat) Croix camp#bat10 974 +bat_a01,155,85,1 duplicate(Croix camp#bat) Croix camp#bat11 974 +bat_a01,357,75,1 duplicate(Croix camp#bat) Croix camp#bat12 974 +bat_a01,348,74,1 duplicate(Croix camp#bat) Croix camp#bat13 974 +bat_a01,199,49,1 duplicate(Croix camp#bat) Croix camp#bat14 974 +bat_a01,168,16,1 duplicate(Croix camp#bat) Croix camp#bat15 974 +bat_a01,138,12,1 duplicate(Croix camp#bat) Croix camp#bat16 974 +bat_a01,108,35,1 duplicate(Croix camp#bat) Croix camp#bat17 974 +bat_a01,164,308,1 duplicate(Guillaume camp#bat) Guillaume camp#bat10 973 +bat_a01,157,308,1 duplicate(Guillaume camp#bat) Guillaume camp#bat11 973 +bat_a01,359,327,1 duplicate(Guillaume camp#bat) Guillaume camp#bat12 973 +bat_a01,350,326,1 duplicate(Guillaume camp#bat) Guillaume camp#bat13 973 +bat_a01,209,344,1 duplicate(Guillaume camp#bat) Guillaume camp#bat14 973 +bat_a01,173,380,1 duplicate(Guillaume camp#bat) Guillaume camp#bat15 973 +bat_a01,150,380,1 duplicate(Guillaume camp#bat) Guillaume camp#bat16 973 +bat_a01,118,357,1 duplicate(Guillaume camp#bat) Guillaume camp#bat17 973 +bat_a01,119,336,1 duplicate(Guillaume camp#bat) Guillaume camp#bat18 973 + +// Barricades +// ********************************************************************* + +- script Guillaume_TV1B -1,{ + end; + +OnBuild: + for( set .@i, 0; .@i < 16; set .@i, .@i + 1 ) + bg_monster 0,"bat_a01",170+.@i,130,"Barricade",1906,"Guillaume_TV1B::OnWall"; + + setwall "bat_a01",170,130,16,6,1,"bat_a01_g1"; + set .MyMobCount,16; + end; + +OnDestroy: + killmonster "bat_a01","Guillaume_TV1B::OnWall"; + delwall "bat_a01_g1"; + set .MyMobCount,0; + end; + +OnWall: + if( set(.MyMobCount,.MyMobCount - 1) < 1 ) + { + delwall "bat_a01_g1"; + mapannounce "bat_a01","South Gate : The Gate has been Destroy!!",1,0xFFA500; + } + end; +} + +- script Croix_TV1B -1,{ + end; + +OnBuild: + for( set .@i, 0; .@i < 16; set .@i, .@i + 1 ) + bg_monster 0,"bat_a01",186+.@i,266,"Barricade",1906,"Croix_TV1B::OnWall"; + + setwall "bat_a01",186,266,16,6,1,"bat_a01_c1"; + set .MyMobCount,16; + end; + +OnDestroy: + killmonster "bat_a01","Croix_TV1B::OnWall"; + delwall "bat_a01_c1"; + set .MyMobCount,0; + end; + +OnWall: + if( set(.MyMobCount,.MyMobCount - 1) < 1 ) + { + delwall "bat_a01_c1"; + mapannounce "bat_a01","North Gate : A Gate has been Destroy!!",1,0xFFA500; + } + end; +} + +// Battleground rewards +// ********************************************************************* + +bat_a01,45,19,3 script Croix Vintenar#tv1 415,{ + if( $@TierraBG1_Victory ) + { + if( $@TierraBG1_Victory == Bat_Team ) + { // Victory + set .@Reward, 3; + mes "[Swandery]"; + mes "Blessed Croax!!"; + mes "Let's enjoy our glorious victory!"; + mes "" + strcharinfo(0) + ", its a sign reflecting victory"; + close2; + } + else + { // + set .@Reward, 1; + 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; + } + + setquest 2069; + getitem 7828, .@Reward; + bg_leave; + warp "bat_room",155,150; + end; + } + end; +} + +bat_a01,53,377,3 script Guillaume Vintenar#tv1 419,{ + if( $@TierraBG1_Victory ) + { + if( $@TierraBG1_Victory == Bat_Team ) + { // Victory + set .@Reward, 3; + mes "[Swandery]"; + mes "Blessed Guillaume!!"; + mes "Let's enjoy our glorious victory!"; + mes "" + strcharinfo(0) + ", its a sign reflecting victory"; + close2; + } + else + { // + set .@Reward, 1; + 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; + } + + setquest 2069; + getitem 7828, .@Reward; + bg_leave; + warp "bat_room",155,150; + end; + } + end; +} + +// Battleground Therapist +// ********************************************************************* + +bat_a01,60,216,3 script Ghost#tv13 950,{ + mes "[Ghost in valley]"; + mes "Boo...Boo..."; + specialeffect2 312; + close; +} + +bat_a01,53,377,3 script Therapist in battle#tv12 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_a01,45,18,3 script Therapist in battle#tv11 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_a01,57,213,0 script #ntv1_respawn 139,{ + end; + +OnBGStart: + initnpctimer; + end; + +OnBGStop: + stopnpctimer; + end; + +OnTimer19000: + misceffect 83; + end; + +OnTimer20000: + areapercentheal "bat_a01",52,208,61,217,100,100; + areawarp "bat_a01",52,208,61,217,"bat_a01",301,208; + initnpctimer; + end; +} + +bat_a01,50,374,0 script #gtv1_respawn 139,{ + end; + +OnBGStart: + initnpctimer; + end; + +OnBGStop: + stopnpctimer; + end; + +OnTimer24000: + misceffect 83; + end; + +OnTimer25000: + areapercentheal "bat_a01",46,370,54,378,100,100; + areawarp "bat_a01",46,370,54,378,"bat_a01",354,340; + initnpctimer; + end; +} + +bat_a01,42,16,0 script #ctv1_respawn 139,{ + end; + +OnBGStart: + initnpctimer; + end; + +OnBGStop: + stopnpctimer; + end; + +OnTimer24000: + misceffect 83; + end; + +OnTimer25000: + areapercentheal "bat_a01",38,12,47,21,100,100; + areawarp "bat_a01",38,12,47,21,"bat_a01",354,57; + initnpctimer; + end; +} diff --git a/npc/custom/battleground/bg_tierra_02.txt b/npc/custom/battleground/bg_tierra_02.txt new file mode 100644 index 000000000..a669b06dd --- /dev/null +++ b/npc/custom/battleground/bg_tierra_02.txt @@ -0,0 +1,488 @@ +// ============================================================================== +// BattleGround System - Tierra Valley 2 +// ============================================================================== + +// Registration NPC's +// ********************************************************************* + +bat_room,114,227,4 script Registration::TV2R_Guillaume 418,{ + end; +OnInit: + waitingroom "Battle Station 10 Players",10,"Tierra_BG2::OnGuillaumeJoin",1; + end; +OnEnterBG: + set $@TierraBG2_id1, waitingroom2bg("bat_a02",50,374,"Tierra_BG2::OnGuillaumeQuit",""); + end; +} + +bat_room,114,204,0 script Registration::TV2R_Croix 414,{ + end; +OnInit: + waitingroom "Battle Station 10 Players",10,"Tierra_BG2::OnCroixJoin",1; + end; +OnEnterBG: + set $@TierraBG2_id2, waitingroom2bg("bat_a02",42,16,"Tierra_BG2::OnCroixQuit",""); + end; +} + +// Battleground Engine +// ********************************************************************* + +- script Tierra_BG2 -1,{ + end; + +OnInit: + disablenpc "Croix Vintenar#tv2"; + disablenpc "Guillaume Vintenar#tv2"; + disablenpc "Therapist in battle#tv21"; + disablenpc "Therapist in battle#tv22"; + end; + +OnGuillaumeQuit: +OnCroixQuit: + set BG_Delay_Tick, gettimetick(2) + 1200; + end; + +OnGuillaumeJoin: +OnCroixJoin: + if( $@TierraBG2 == 0 ) + donpcevent "Tierra_BG2::OnReadyCheck"; + end; + +OnReadyCheck: + if( $@TierraBG2 ) + end; + set .@Guillaume, getwaitingroomstate(0,"TV2R_Guillaume"); + set .@Croix, getwaitingroomstate(0,"TV2R_Croix"); + + if( .@Guillaume < 10 || .@Croix < 10 ) + { + mapannounce "bat_room","Battleground -- Tierra Valley [80-99] G: " + .@Guillaume + "/10, C: " + .@Croix + "/10",1,0xF4A460; + end; + } + + set $@TierraBG2, 1; + donpcevent "TV2R_Croix::OnEnterBG"; + donpcevent "TV2R_Guillaume::OnEnterBG"; + donpcevent "Guillaume_TV2B::OnBuild"; + donpcevent "Croix_TV2B::OnBuild"; + bg_monster $@TierraBG2_id1,"bat_a02",176,345,"Food Depot",1909,"Tierra_BG2::OnGuillaumeBreak"; + bg_monster $@TierraBG2_id2,"bat_a02",167,50,"Food Storage",1910,"Tierra_BG2::OnCroixBreak"; + bg_monster 0,"bat_a02",273,204,"Neutrality Flag",1911,"Tierra_BG2::OnNeutralBreak"; + + set .Neutral_Base, 0; + set $@TierraBG2_Victory, 0; + + set .Guardian_1, 0; + set .Guardian_2, 0; + set .Guardian_3, 0; + + enablenpc "Therapist in battle#tv21"; + enablenpc "Therapist in battle#tv22"; + disablenpc "Croix Vintenar#tv2"; + disablenpc "Guillaume Vintenar#tv2"; + // Respawner + donpcevent "#gtv2_respawn::OnBGStart"; + donpcevent "#ctv2_respawn::OnBGStart"; + donpcevent "#ntv2_respawn::OnBGStart"; + // Warp Teams + announce "Battleground -- Tierra Valley [80-99] has started!",0,0xF4A460; + bg_warp $@TierraBG2_id1,"bat_a02",353,344; + bg_warp $@TierraBG2_id2,"bat_a02",353,52; + // Final Messages + sleep 6000; + mapannounce "bat_a02","Guillaume Vintenar Axl Rose : Let's attack to burn down Croix's food storage",1,0x0000FF; + sleep 2000; + mapannounce "bat_a02","Croix Vintenar Swandery : Master of Valhalla! Let us be gifted with unfailing faith and courage",1,0xFF0000; + + initnpctimer; + end; + +OnNeutralBreak: + if( getcharid(4) == $@TierraBG2_id1 ) + { + mapannounce "bat_a02","Guillaume obtained a neurality banner, so they have an advantage.",1,0x0000FF; + bg_team_setxy $@TierraBG2_id2,42,16; + areawarp "bat_a02",52,208,61,217,"bat_a02",42,16; + } + else if( getcharid(4) == $@TierraBG2_id2 ) + { + mapannounce "bat_a02","Croix obtained a neutrality banner, so they have an advantage.",1,0xFF0000; + bg_team_setxy $@TierraBG2_id1,50,374; + areawarp "bat_a02",52,208,61,217,"bat_a02",50,374; + } + else end; + + set .Neutral_Base, getcharid(4); + bg_team_setxy .Neutral_Base,56,212; + + if( .Guardian_1 == 0 ) + set .Guardian_1, bg_monster(.Neutral_Base,"bat_a02",280,233,"Guardian",1949,"Tierra_BG2::OnGuardian1"); + else + bg_monster_set_team .Guardian_1, .Neutral_Base; + + if( .Guardian_2 == 0 ) + set .Guardian_2, bg_monster(.Neutral_Base,"bat_a02",287,203,"Guardian",1950,"Tierra_BG2::OnGuardian2"); + else + bg_monster_set_team .Guardian_2, .Neutral_Base; + + if( .Guardian_3 == 0 ) + set .Guardian_3, bg_monster(.Neutral_Base,"bat_a02",268,204,"Guardian",1949,"Tierra_BG2::OnGuardian3"); + else + bg_monster_set_team .Guardian_3, .Neutral_Base; + + sleep 10000; + if( $@TierraBG2 != 1 ) end; + + if( .Neutral_Base == $@TierraBG2_id1 ) + bg_monster .Neutral_Base,"bat_a02",273,204,"Guillaume Flag",1912,"Tierra_BG2::OnNeutralBreak"; + else if( .Neutral_Base == $@TierraBG2_id2 ) + bg_monster .Neutral_Base,"bat_a02",273,204,"Croix Flag",1913,"Tierra_BG2::OnNeutralBreak"; + end; + +OnGuardian1: set .Guardian_1, 0; end; +OnGuardian2: set .Guardian_2, 0; end; +OnGuardian3: set .Guardian_3, 0; end; + +OnGuillaumeBreak: + set $@TierraBG2_Victory, 2; + mapannounce "bat_a02","Croix Vintenar Swandery: We destroyed Guillaume's food storehouse. We won that! Wow!",1,0xFF0000; + donpcevent "Tierra_BG2::OnStop"; + end; + +OnCroixBreak: + set $@TierraBG2_Victory, 1; + mapannounce "bat_a02","Guillaume Vintenar Axl Rose: We destroyed Croix's food storehouse. We won that! Wow!",1,0x0000FF; + donpcevent "Tierra_BG2::OnStop"; + end; + +OnTimer2400000: + mapannounce "bat_a02","Battle of Tierra Gorge will ends in 5 minutes",1,0xF4A460; + end; +OnTimer2640000: + mapannounce "bat_a02","Battle of Tierra Gorge will ends in 1 minute",1,0xF4A460; + end; + +OnTimer2700000: + set $@TierraBG2_Victory, 3; // Draw Game + mapannounce "bat_a02","Battle of Tierra Gorge is over. The time is out, this is a Tie",1,0xF4A460; + donpcevent "Tierra_BG2::OnStop"; + end; + +OnStop: + set $@TierraBG2, 2; + disablenpc "Therapist in battle#tv21"; + disablenpc "Therapist in battle#tv22"; + donpcevent "#gtv2_respawn::OnBGStop"; + donpcevent "#ctv2_respawn::OnBGStop"; + donpcevent "#ntv2_respawn::OnBGStop"; + enablenpc "Croix Vintenar#tv2"; + enablenpc "Guillaume Vintenar#tv2"; + killmonster "bat_a02","Tierra_BG2::OnGuillaumeBreak"; + killmonster "bat_a02","Tierra_BG2::OnCroixBreak"; + killmonster "bat_a02","Tierra_BG2::OnNeutralBreak"; + killmonster "bat_a02","Tierra_BG2::OnGuardian1"; + killmonster "bat_a02","Tierra_BG2::OnGuardian2"; + killmonster "bat_a02","Tierra_BG2::OnGuardian3"; + stopnpctimer; + sleep 3000; + bg_warp $@TierraBG2_id1,"bat_a02",50,374; + bg_warp $@TierraBG2_id2,"bat_a02",42,16; + sleep 3000; + mapannounce "bat_a02","Battle of Tierra Gorge will close in 1 minute!",1,0xF4A460; + initnpctimer; + end; + +OnTimer30000: + if( $@TierraBG2 == 2 ) + mapannounce "bat_a02","Battle of Tierra Valley will close in 30 seconds!",1,0xF4A460; + end; +OnTimer50000: + if( $@TierraBG2 == 2 ) + mapannounce "bat_a02","Battle of Tierra Valley will close in 10 seconds!",1,0xF4A460; + end; + +OnTimer60000: + if( $@TierraBG2 != 2 ) + end; +OnReset: + stopnpctimer; + set .Neutral_Base, 0; + disablenpc "Croix Vintenar#tv2"; + disablenpc "Guillaume Vintenar#tv2"; + disablenpc "Therapist in battle#tv21"; + disablenpc "Therapist in battle#tv22"; + donpcevent "#gtv2_respawn::OnBGStop"; + donpcevent "#gtv2_respawn::OnBGStop"; + donpcevent "#ctv2_respawn::OnBGStop"; + + killmonster "bat_a02","Tierra_BG2::OnGuillaumeBreak"; + killmonster "bat_a02","Tierra_BG2::OnCroixBreak"; + killmonster "bat_a02","Tierra_BG2::OnNeutralBreak"; + killmonster "bat_a02","Tierra_BG2::OnGuardian1"; + killmonster "bat_a02","Tierra_BG2::OnGuardian2"; + killmonster "bat_a02","Tierra_BG2::OnGuardian3"; + donpcevent "Guillaume_TV2B::OnDestroy"; + donpcevent "Croix_TV2B::OnDestroy"; + + set $@TierraBG2_Victory, 0; + if( $@TierraBG2_id1 ) { bg_destroy $@TierraBG2_id1; set $@TierraBG2_id1, 0; } + if( $@TierraBG2_id2 ) { bg_destroy $@TierraBG2_id2; set $@TierraBG2_id2, 0; } + sleep 1000; + mapwarp "bat_a02","bat_room",155,150; + sleep 2000; + maprespawnguildid "bat_a02",0,3; // Just in case someone else + sleep 2000; + set $@TierraBG2, 0; + donpcevent "Tierra_BG2::OnReadyCheck"; // Maybe a game is ready to start + end; +} + +// MapFlags +// ********************************************************************* + +bat_a02 mapflag battleground +bat_a02 mapflag nomemo +bat_a02 mapflag nosave SavePoint +bat_a02 mapflag noteleport +bat_a02 mapflag nowarp +bat_a02 mapflag nowarpto +bat_a02 mapflag noreturn +bat_a02 mapflag nobranch +bat_a02 mapflag nopenalty + +// Other Flags +// ********************************************************************* + +bat_a02,148,85,1 duplicate(Croix camp#bat) Croix camp#bat22 974 +bat_a02,155,85,1 duplicate(Croix camp#bat) Croix camp#bat23 974 +bat_a02,357,75,1 duplicate(Croix camp#bat) Croix camp#bat24 974 +bat_a02,348,74,1 duplicate(Croix camp#bat) Croix camp#bat25 974 +bat_a02,199,49,1 duplicate(Croix camp#bat) Croix camp#bat26 974 +bat_a02,168,16,1 duplicate(Croix camp#bat) Croix camp#bat27 974 +bat_a02,138,12,1 duplicate(Croix camp#bat) Croix camp#bat28 974 +bat_a02,108,35,1 duplicate(Croix camp#bat) Croix camp#bat29 974 +bat_a02,164,308,1 duplicate(Guillaume camp#bat) Guillaume camp#bat23 973 +bat_a02,157,308,1 duplicate(Guillaume camp#bat) Guillaume camp#bat24 973 +bat_a02,359,327,1 duplicate(Guillaume camp#bat) Guillaume camp#bat25 973 +bat_a02,350,326,1 duplicate(Guillaume camp#bat) Guillaume camp#bat26 973 +bat_a02,209,344,1 duplicate(Guillaume camp#bat) Guillaume camp#bat27 973 +bat_a02,173,380,1 duplicate(Guillaume camp#bat) Guillaume camp#bat28 973 +bat_a02,150,380,1 duplicate(Guillaume camp#bat) Guillaume camp#bat29 973 +bat_a02,118,357,1 duplicate(Guillaume camp#bat) Guillaume camp#bat30 973 +bat_a02,119,336,1 duplicate(Guillaume camp#bat) Guillaume camp#bat31 973 + +// Barricades +// ********************************************************************* + +- script Guillaume_TV2B -1,{ + end; + +OnBuild: + for( set .@i, 0; .@i < 16; set .@i, .@i + 1 ) + bg_monster 0,"bat_a02",170+.@i,130,"Barricade",1906,"Guillaume_TV2B::OnWall"; + + setwall "bat_a02",170,130,16,6,1,"bat_a02_g1"; + set .MyMobCount,16; + end; + +OnDestroy: + killmonster "bat_a02","Guillaume_TV2B::OnWall"; + delwall "bat_a02_g1"; + set .MyMobCount,0; + end; + +OnWall: + if( set(.MyMobCount,.MyMobCount - 1) < 1 ) + { + delwall "bat_a02_g1"; + mapannounce "bat_a02","South Gate : The Gate has been Destroy!!",1,0xF4A460; + } + end; +} + +- script Croix_TV2B -1,{ + end; + +OnBuild: + for( set .@i, 0; .@i < 16; set .@i, .@i + 1 ) + bg_monster 0,"bat_a02",186+.@i,266,"Barricade",1906,"Croix_TV2B::OnWall"; + + setwall "bat_a02",186,266,16,6,1,"bat_a02_c1"; + set .MyMobCount,16; + end; + +OnDestroy: + killmonster "bat_a02","Croix_TV2B::OnWall"; + delwall "bat_a02_c1"; + set .MyMobCount,0; + end; + +OnWall: + if( set(.MyMobCount,.MyMobCount - 1) < 1 ) + { + delwall "bat_a02_c1"; + mapannounce "bat_a02","North Gate : A Gate has been Destroy!!",1,0xF4A460; + } + end; +} + +// Battleground rewards +// ********************************************************************* + +bat_a02,45,19,3 script Croix Vintenar#tv2 415,{ + if( $@TierraBG2_Victory ) + { + if( $@TierraBG2_Victory == Bat_Team ) + { // Victory + set .@Reward, 3; + mes "[Swandery]"; + mes "Blessed Croax!!"; + mes "Let's enjoy our glorious victory!"; + mes "" + strcharinfo(0) + ", its a sign reflecting victory"; + close2; + } + else + { // + set .@Reward, 1; + 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; + } + + setquest 2069; + getitem 7828, .@Reward; + bg_leave; + warp "bat_room",155,150; + end; + } + end; +} + +bat_a02,53,377,3 script Guillaume Vintenar#tv2 419,{ + if( $@TierraBG2_Victory ) + { + if( $@TierraBG2_Victory == Bat_Team ) + { // Victory + set .@Reward, 3; + mes "[Swandery]"; + mes "Blessed Guillaume!!"; + mes "Let's enjoy our glorious victory!"; + mes "" + strcharinfo(0) + ", its a sign reflecting victory"; + close2; + } + else + { // + set .@Reward, 1; + 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; + } + + setquest 2069; + getitem 7828, .@Reward; + bg_leave; + warp "bat_room",155,150; + end; + } + end; +} + +// Battleground Therapist +// ********************************************************************* + +bat_a02,60,216,3 script Ghost#tv23 950,{ + mes "[Ghost in valley]"; + mes "Boo...Boo..."; + specialeffect2 312; + close; +} + +bat_a02,53,377,3 script Therapist in battle#tv22 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_a02,45,18,3 script Therapist in battle#tv21 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_a02,57,213,0 script #ntv2_respawn 139,{ + end; + +OnBGStart: + initnpctimer; + end; + +OnBGStop: + stopnpctimer; + end; + +OnTimer19000: + misceffect 83; + end; + +OnTimer20000: + areapercentheal "bat_a02",52,208,61,217,100,100; + areawarp "bat_a02",52,208,61,217,"bat_a02",301,208; + initnpctimer; + end; +} + +bat_a02,50,374,0 script #gtv2_respawn 139,{ + end; + +OnBGStart: + initnpctimer; + end; + +OnBGStop: + stopnpctimer; + end; + +OnTimer24000: + misceffect 83; + end; + +OnTimer25000: + areapercentheal "bat_a02",46,370,54,378,100,100; + areawarp "bat_a02",46,370,54,378,"bat_a02",354,340; + initnpctimer; + end; +} + +bat_a02,42,16,0 script #ctv2_respawn 139,{ + end; + +OnBGStart: + initnpctimer; + end; + +OnBGStop: + stopnpctimer; + end; + +OnTimer24000: + misceffect 83; + end; + +OnTimer25000: + areapercentheal "bat_a02",38,12,47,21,100,100; + areawarp "bat_a02",38,12,47,21,"bat_a02",354,57; + initnpctimer; + end; +} |