summaryrefslogtreecommitdiff
path: root/npc/events/nguild/nguild_ev_agit.txt
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-28 23:34:14 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-28 23:34:14 +0000
commit01123b8b2f4a77936f8c1358fb2f1c638e169343 (patch)
tree3a01e72c80fd91a5d45c79b0237bb8bf9e2deb94 /npc/events/nguild/nguild_ev_agit.txt
parent80366703f21e3cbcdecf02863ceafe69f96c132b (diff)
downloadhercules-01123b8b2f4a77936f8c1358fb2f1c638e169343.tar.gz
hercules-01123b8b2f4a77936f8c1358fb2f1c638e169343.tar.bz2
hercules-01123b8b2f4a77936f8c1358fb2f1c638e169343.tar.xz
hercules-01123b8b2f4a77936f8c1358fb2f1c638e169343.zip
* Rewrote the WoE 1.0 from the ground up nearly.
- Renamed the WoE Time setting NPC to "agit_controller.txt" - System is set up to mimic Aegis, some parts are still lacking. - Documentation on the new system is forth-coming. - Updated Novice WoE scripts to keep them from breaking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12673 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/events/nguild/nguild_ev_agit.txt')
-rw-r--r--npc/events/nguild/nguild_ev_agit.txt94
1 files changed, 93 insertions, 1 deletions
diff --git a/npc/events/nguild/nguild_ev_agit.txt b/npc/events/nguild/nguild_ev_agit.txt
index 2cda87129..8afa4631b 100644
--- a/npc/events/nguild/nguild_ev_agit.txt
+++ b/npc/events/nguild/nguild_ev_agit.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.3
+//= 1.4
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
@@ -11,9 +11,88 @@
//===== Additional Comments: =================================
// Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
+//= 1.4 AGIT Functions added, treasure spawning added. [L0ne_W0lf]
//============================================================
+// Function for OnAgitStart =========================================
+function script F_AgitStart {
+ set .@map$, getarg(0);
+ set .@castle$, getarg(1);
+ set .@empx, getarg(2);
+ set .@empy, getarg(3);
+
+ MapRespawnGuildID .@map$,GetCastleData(.@map$,1),2;
+ monster .@map$,.@empx,.@empy,"Emperium",1288,1,"Agit_"+.@castle$+"::OnAgitBreak";
+ GvgOn .@map$;
+ if (GetCastleData(.@map$,1) != 0) return;
+ end;
+}
+
+// Function for OnGuildBreak ======================================
+function script F_GuildBreak {
+ set .@map$, getarg(0);
+ set .@castle$, getarg(1);
+
+ killmonsterall .@map$;
+
+ Announce "Guild Base [" + GetCastleName(.@map$) + "] has been abandoned.",0;
+ disablenpc "Kafra Staff#"+.@castle$;
+
+ SetCastleData .@map$,0,0;
+ return;
+}
+
+// Function for OnAgitBreak ======================================
+function script F_AgitBreak {
+ set .@map$, getarg(0);
+ set .@castle$, getarg(1);
+
+ set .@GID,getcharid(2);
+ if (.@GID <= 0) return;
+
+ set .@Economy,GetCastleData(.@map$,2) - 5;
+ if (.@Economy < 0) set .@Economy, 0;
+ SetCastleData .@map$, 2, .@Economy;
+
+ set .@Defence,GetCastleData(.@map$,3) - 5;
+ if (.@Defence < 0) set .@Defence, 0;
+ SetCastleData .@map$, 3, .@Defence;
+
+ SetCastleData .@map$,1, .@GID;
+ MapAnnounce .@map$,"The emperium has been destroyed.",bc_map,0x00CCFF;
+ Announce "The [" + GetCastleName(.@map$) + "] castle has been conquered by the [" + GetGuildName(.@GID) + "] guild.",bc_all;
+ GetCastleData .@map$,0,"::OnRecvCastle"+.@castle$;
+
+ disablenpc "Kafra Staff#"+.@castle$;
+
+ // remove investment data and kafra
+ for( set .@i, 4; .@i <= 9; set .@i, .@i+1 )
+ SetCastleData .@map$, .@i, 0;
+
+ // if the new guild doesn't have Guardian Research, erase guardians
+ if( getgdskilllv(.@GID,10002) == 0 )
+ for( set .@i, 10; .@i <= 17; set .@i, .@i+1 )
+ SetCastleData .@map$, .@i, 0;
+
+ return;
+}
+
+
+// Function for OnAgitEnd ======================================
+function script F_AgitEnd {
+ set .@map$, getarg(0);
+ set .@castle$, getarg(1);
+
+ GvgOff .@map$;
+ // Disable the following if statment to keep empty
+ // castles from being aquired after after WoE ends.
+ if (GetCastleData(.@map$,1) == 0) return;
+ MapRespawnGuildID .@map$,GetCastleData(.@map$,1),4;
+ KillMonster .@map$,"Agit_"+.@castle$+"::OnAgitBreak";
+ end;
+}
+
// Castle 1 ================================================================
nguild_alde,0,0,0 script Agit_N01 -1,{
OnInterIfInitOnce:
@@ -117,3 +196,16 @@ OnAgitEnd:
callfunc "F_AgitEnd","nguild_prt","N04";
end;
}
+
+// Treasure Spawn Time
+//========================================
+- script TreasSpawn -1,{
+ end;
+
+OnClock0005:
+ callfunc "F_GldTreas","nguild_alde","N01",$boxNumN01,$@bxN01,$@boxIdN01,1324,114,218,123,227,0;
+ callfunc "F_GldTreas","nguild_gef","N02",$boxNumN02,$@bxN02,$@boxIdN02,1334,150,108,158,114,0;
+ callfunc "F_GldTreas","nguild_pay","N03",$boxNumN03,$@bxN03,$@boxIdN03,1344,286,4,295,13,0;
+ callfunc "F_GldTreas","nguild_prt","N04",$boxNumN04,$@bxN04,$@boxIdN04,1354,6,204,15,213,0;
+ end;
+}