Fixed #231 - Flavius Battleground Crystals can no longer be attacked while Guardians are still alive. Thanks to @cydh.

This commit is contained in:
aleos89 2015-03-19 21:02:59 -04:00
parent 2cee5b6ff1
commit ec4f1f8f80
2 changed files with 16 additions and 6 deletions

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.6 //= 1.7
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= rAthena Project //= rAthena Project
//===== Description: ========================================= //===== Description: =========================================
@ -19,6 +19,7 @@
//= 1.4 Label standardization. [Euphy] //= 1.4 Label standardization. [Euphy]
//= 1.5 Added GM management function. [Euphy] //= 1.5 Added GM management function. [Euphy]
//= 1.6 Added VIP features and created a reward function. [Euphy] //= 1.6 Added VIP features and created a reward function. [Euphy]
//= 1.7 Made Crystals immune to attacks until Guardians are defeated. [Cydh/Aleos]
//============================================================ //============================================================
// Waiting Room NPCs // Waiting Room NPCs
@ -152,7 +153,8 @@ OnTimer10000:
bat_b01,1,1,3 script OBJ#bat_b01_a 844,{ bat_b01,1,1,3 script OBJ#bat_b01_a 844,{
OnEnable: OnEnable:
bg_monster $@FlaviusBG1_id1,"bat_b01",61,150,"Pink Crystal",1915,"OBJ#bat_b01_a::OnMyMobDead"; $@FlavBG1_C1_ID = bg_monster $@FlaviusBG1_id1,"bat_b01",61,150,"Pink Crystal",1915,"OBJ#bat_b01_a::OnMyMobDead";
setunitdata $@FlavBG1_C1_ID,31,1; // Make Crystal immune to damage until Guardians are defeated
end; end;
OnKill: OnKill:
@ -185,7 +187,8 @@ OnMyMobDead:
bat_b01,1,2,3 script OBJ#bat_b01_b 844,{ bat_b01,1,2,3 script OBJ#bat_b01_b 844,{
OnEnable: OnEnable:
bg_monster $@FlaviusBG1_id2,"bat_b01",328,150,"Blue Crystal",1914,"OBJ#bat_b01_b::OnMyMobDead"; $@FlavBG1_C2_ID = bg_monster $@FlaviusBG1_id2,"bat_b01",328,150,"Blue Crystal",1914,"OBJ#bat_b01_b::OnMyMobDead";
setunitdata $@FlavBG1_C2_ID,31,1; // Make Crystal immune to damage until Guardians are defeated
end; end;
OnKill: OnKill:
@ -230,6 +233,7 @@ OnMyMobDead:
if (mobcount("bat_b01","guardian#bat_b01_a::OnMyMobDead") < 1) { if (mobcount("bat_b01","guardian#bat_b01_a::OnMyMobDead") < 1) {
donpcevent "cell#bat_b01_a::OnGreen"; donpcevent "cell#bat_b01_a::OnGreen";
mapannounce "bat_b01", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00"; mapannounce "bat_b01", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00";
setunitdata $@FlavBG1_C1_ID,31,0; // Make Crystal damageable again
} }
end; end;
} }
@ -248,6 +252,7 @@ OnMyMobDead:
if (mobcount("bat_b01","guardian#bat_b01_b::OnMyMobDead") < 1) { if (mobcount("bat_b01","guardian#bat_b01_b::OnMyMobDead") < 1) {
donpcevent "cell#bat_b01_b::OnGreen"; donpcevent "cell#bat_b01_b::OnGreen";
mapannounce "bat_b01", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00"; mapannounce "bat_b01", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00";
setunitdata $@FlavBG1_C2_ID,31,0; // Make Crystal damageable again
} }
end; end;
} }

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.7 //= 1.8
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= rAthena Project //= rAthena Project
//===== Description: ========================================= //===== Description: =========================================
@ -20,6 +20,7 @@
//= 1.5 Label standardization. [Euphy] //= 1.5 Label standardization. [Euphy]
//= 1.6 Added GM management function. [Euphy] //= 1.6 Added GM management function. [Euphy]
//= 1.7 Added VIP features and created a reward function. [Euphy] //= 1.7 Added VIP features and created a reward function. [Euphy]
//= 1.8 Made Crystals immune to attacks until Guardians are defeated. [Cydh/Aleos]
//============================================================ //============================================================
// Waiting Room NPCs // Waiting Room NPCs
@ -153,7 +154,8 @@ OnTimer10000:
bat_b02,1,1,3 script OBJ#bat_b02_a 844,{ bat_b02,1,1,3 script OBJ#bat_b02_a 844,{
OnEnable: OnEnable:
bg_monster $@FlaviusBG2_id1,"bat_b02",61,150,"Pink Crystal",1915,"OBJ#bat_b02_a::OnMyMobDead"; $@FlavBG2_C1_ID = bg_monster $@FlaviusBG2_id1,"bat_b02",61,150,"Pink Crystal",1915,"OBJ#bat_b02_a::OnMyMobDead";
setunitdata $@FlavBG2_C1_ID,31,1; // Make Crystal immune to damage until Guardians are defeated
end; end;
OnKill: OnKill:
@ -186,7 +188,8 @@ OnMyMobDead:
bat_b02,1,2,3 script OBJ#bat_b02_b 844,{ bat_b02,1,2,3 script OBJ#bat_b02_b 844,{
OnEnable: OnEnable:
bg_monster $@FlaviusBG2_id2,"bat_b02",328,150,"Blue Crystal",1914,"OBJ#bat_b02_b::OnMyMobDead"; $@FlavBG2_C2_ID = bg_monster $@FlaviusBG2_id2,"bat_b02",328,150,"Blue Crystal",1914,"OBJ#bat_b02_b::OnMyMobDead";
setunitdata $@FlavBG2_C2_ID,31,1; // Make Crystal immune to damage until Guardians are defeated
end; end;
OnKill: OnKill:
@ -231,6 +234,7 @@ OnMyMobDead:
if (mobcount("bat_b02","guardian#bat_b02_a::OnMyMobDead") < 1) { if (mobcount("bat_b02","guardian#bat_b02_a::OnMyMobDead") < 1) {
donpcevent "cell#bat_b02_a::OnGreen"; donpcevent "cell#bat_b02_a::OnGreen";
mapannounce "bat_b02", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00"; mapannounce "bat_b02", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00";
setunitdata $@FlavBG2_C1_ID,31,0; // Make Crystal damageable again
} }
end; end;
} }
@ -249,6 +253,7 @@ OnMyMobDead:
if (mobcount("bat_b02","guardian#bat_b02_b::OnMyMobDead") < 1) { if (mobcount("bat_b02","guardian#bat_b02_b::OnMyMobDead") < 1) {
donpcevent "cell#bat_b02_b::OnGreen"; donpcevent "cell#bat_b02_b::OnGreen";
mapannounce "bat_b02", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00"; mapannounce "bat_b02", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00";
setunitdata $@FlavBG2_C2_ID,31,0; // Make Crystal damageable again
} }
end; end;
} }