summaryrefslogtreecommitdiff
path: root/npc/events/nguild
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
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')
-rw-r--r--npc/events/nguild/nguild_dunsw.txt31
-rw-r--r--npc/events/nguild/nguild_ev_agit.txt94
-rw-r--r--npc/events/nguild/nguild_flags.txt47
-rw-r--r--npc/events/nguild/nguild_kafras.txt20
4 files changed, 188 insertions, 4 deletions
diff --git a/npc/events/nguild/nguild_dunsw.txt b/npc/events/nguild/nguild_dunsw.txt
index e81cc57bf..206fc4cd7 100644
--- a/npc/events/nguild/nguild_dunsw.txt
+++ b/npc/events/nguild/nguild_dunsw.txt
@@ -3,16 +3,45 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
//= Switch that warps guild members to the guild dungeon
//===== Additional Comments: =================================
//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
+//= 1.1 Guild Dungeon Switch Fucntion added. [L0ne_W0lf]
//============================================================
+//==================================================
+function script F_GldDunSw {
+ set .@GID, GetCastleData(getarg(0),1);
+ if (.@GID == 0) {
+ mes "[ Echoing Voice ]";
+ mes " ' The one who can overcome an ordeal and show true bravery... will find the way... ' ";
+ close;
+ }
+ else {
+ mes "[ Echoing Voice ]";
+ mes " ' Only the one who can show true bravery can take this test. '";
+ next;
+ mes " ";
+ mes "There's a small lever. Will you pull it?";
+ next;
+
+ if (select("Pull.:Do not.") == 1) {
+ if (getcharid(2) == .@GID) {
+ warp "gld_dun"+getarg(1),getarg(2),getarg(3);
+ end;
+ }
+ mes " ";
+ mes " Nothing happened.";
+ }
+ return;
+ }
+}
+
// Castle 1 ===============================================
nguild_alde,212,181,0 script Switch#DunN01 111,{
callfunc "F_GldDunSw","nguild_alde","02",32,122;
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;
+}
diff --git a/npc/events/nguild/nguild_flags.txt b/npc/events/nguild/nguild_flags.txt
index bc8c6b3cd..fc8323ae2 100644
--- a/npc/events/nguild/nguild_flags.txt
+++ b/npc/events/nguild/nguild_flags.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.2
+//= 1.3
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
@@ -12,8 +12,53 @@
// Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
// 1.1 Inner Flags don't teleport you to your HQ anymore [Lupus]
// 1.2 updated flags to use the new arguments. [L0ne__W0lf]
+// 1.3 Guild flag function added. [L0ne_W0lf]
//============================================================
+/// Flag Function
+//============================================================
+function script F_Flags {
+ set .@GID, GetCastleData(getarg(1),1);
+ if (getarg(5) == 0) return;
+ if (.@GID == 0) {
+ mes " [ Edict of the Divine Rune Midgard Kingdom ]";
+ mes " ";
+ mes "1. Follow the ordinance of The Divine Rune Midgard Kingdom, ";
+ mes "We declare that";
+ mes "there is no formal master of this castle.";
+ mes " ";
+ mes "2. To the one who can ";
+ mes "overcome all trials";
+ mes "and destroy the Emperium,";
+ mes "the king will endow the one with";
+ mes "ownership of this castle.";
+ return;
+ }
+ else {
+ if (getcharid(2) == .@GID && getarg(4) == 1) {
+ mes "Brave ones...";
+ mes "Do you wish to return to your honorable place?";
+ next;
+ if (select("Return to the guild castle.:Quit.") == 1) {
+ if (getcharid(2) == GetCastleData(getarg(1),1))
+ warp getarg(1),getarg(2),getarg(3);
+ }
+ return;
+ }
+ mes "[ Edict of the Divine Rune Midgard Kingdom ]";
+ mes " ";
+ mes "1. Following the ordinance of the";
+ mes "Divine Rune Midgard Kingdom,";
+ mes "we approve that this place is in";
+ mes "the private possession of ^ff0000" + GetGuildName(.@GID) + "^000000 Guild.";
+ mes " ";
+ mes "2. The guild Master of ^ff0000"+ GetGuildName(.@GID) + "^000000 Guild is";
+ mes "^FF0000" + GetGuildMaster(.@GID) + "^000000";
+ mes "If there is anyone who objects to this,";
+ mes " prove your strength and honor with a steel blade in your hand.";
+ return;
+ }
+}
//============================================================================//
// Castle 1
diff --git a/npc/events/nguild/nguild_kafras.txt b/npc/events/nguild/nguild_kafras.txt
index f0c43db53..e590c4b28 100644
--- a/npc/events/nguild/nguild_kafras.txt
+++ b/npc/events/nguild/nguild_kafras.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
-//= 1.1
+//= 1.2
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 5+
//===== Description: =========================================
@@ -12,9 +12,27 @@
//===== Additional Comments: =================================
//= Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
//= 1.1 All N Guild Kafras teleport to Prontera only! [Lupus]
+//= 1.2 Added Kafra function. [L0ne_W0lf]
//============================================================
+function script F_GKafra {
+ cutin "kafra_01",2;
+ set @GID, GetCastleData(getarg(0),1);
+ if (getcharid(2) == @GID && getgdskilllv(@GID,10001)) goto L_StartG;
+
+ mes "[Kafra Service]";
+ mes "I am contracted to provide service only for the ^ff0000" + GetGuildName(@GID) + "^000000 Guild. Please use another Kafra Corporation staff member around here. I am Sorry for your inconvenience.";
+ cutin "",255;
+ close;
+L_StartG:
+ set @wrpP[0], 200;
+ set @wrpD$[0], getarg(1);
+ setarray @wrpC$[0], @wrpD$[0]+" ^880000"+@wrpP[0]+"^000000 z", "Cancel", "", "", "","";
+ callfunc "F_Kafra",2,0,0,0,800;
+ end;
+}
+
// Castle 1 ===============================================
nguild_alde,218,170,0 script Kafra Service#N01 117,{
callfunc "F_GKafra", "nguild_alde", "Prontera";