summaryrefslogtreecommitdiff
path: root/npc/guild2
diff options
context:
space:
mode:
Diffstat (limited to 'npc/guild2')
-rw-r--r--npc/guild2/agit_main_se.txt19
1 files changed, 17 insertions, 2 deletions
diff --git a/npc/guild2/agit_main_se.txt b/npc/guild2/agit_main_se.txt
index 0c15e3a70..45c847d5d 100644
--- a/npc/guild2/agit_main_se.txt
+++ b/npc/guild2/agit_main_se.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
-//= 1.3
+//= 1.4
//===== Description: =========================================
//= Like agit_main, this file is required
//= for SE castles to function.
@@ -13,6 +13,7 @@
//= 1.1 Fixed an incorrect label execution. [Euphy]
//= 1.2 Hopefully fixed a processing error. [Euphy]
//= 1.3 Fixed barricade issue in schg_cas02. [Cookie]
+//= 1.4 Added OnGuildBreak event and a spawn check. [Euphy]
//============================================================
// Core, triggers all other events
@@ -64,6 +65,17 @@ OnAgitEnd2:
}
end;
+OnGuildBreak:
+ if (strnpcinfo(2) == "template") end;
+ killmonster strnpcinfo(2),"gard1#"+strnpcinfo(2)+"::OnGuardianDied";
+ killmonster strnpcinfo(2),"gard2#"+strnpcinfo(2)+"::OnGuardianDied";
+ disablenpc "Kafra Employee#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
+ setcastledata strnpcinfo(2),1,0;
+ sleep 7000;
+ announce "Guild Base ["+getcastlename(strnpcinfo(2))+"] has been abandoned.",0;
+ donpcevent strnpcinfo(0)+"::OnRecvCastle2";
+ end;
+
OnStart:
// $agit_ar0x[] - $agit_sc0x[]
// 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
@@ -76,7 +88,10 @@ OnStart:
for(set .@i,0; .@i<4; set .@i,.@i+1)
donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnEnable";
}
+
OnEmpSpawn:
+ set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
+ if (mobcount(strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena")) end;
if (compare(strnpcinfo(2),"arug")) {
if (strnpcinfo(2) == "arug_cas01") setarray .@i[0],87,219;
else if (strnpcinfo(2) == "arug_cas02") setarray .@i[0],89,256;
@@ -87,7 +102,7 @@ OnEmpSpawn:
else if (strnpcinfo(2) == "schg_cas03") setarray .@i[0],338,202;
else setarray .@i[0],120,272; // Castles 1,4,5 are identical.
}
- monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"::OnStartArena";
+ monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+.@str$+"::OnStartArena";
end;
OnReset: