summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorMatheus Macabu <mkbu95@gmail.com>2013-02-04 00:32:19 -0200
committerMatheus Macabu <mkbu95@gmail.com>2013-02-04 00:32:19 -0200
commit524291493e64196d8ce02f4b637ea0ee1a176d0a (patch)
tree7a15790fb1b7658d7fb39deaae83f562fd81c872 /npc
parentf651ffc9f92dbf339e9691c24d66577bf4a43d47 (diff)
downloadhercules-524291493e64196d8ce02f4b637ea0ee1a176d0a.tar.gz
hercules-524291493e64196d8ce02f4b637ea0ee1a176d0a.tar.bz2
hercules-524291493e64196d8ce02f4b637ea0ee1a176d0a.tar.xz
hercules-524291493e64196d8ce02f4b637ea0ee1a176d0a.zip
Merged some commits from rAthena.
Diffstat (limited to 'npc')
-rw-r--r--npc/guild/agit_main.txt5
-rw-r--r--npc/guild2/agit_main_se.txt19
-rw-r--r--npc/jobs/2-1/hunter.txt1
3 files changed, 21 insertions, 4 deletions
diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt
index 115238bfb..5253fbe16 100644
--- a/npc/guild/agit_main.txt
+++ b/npc/guild/agit_main.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.9
+//= 1.9a
//===== Description: =========================================
//= [ Aegis Conversion]
//= ----------------------------------------------------------
@@ -49,6 +49,7 @@
//= and added extended anouncement format for mapannounce.
//= 1.8 Fixed a possible exploit in guild castle investment. [Brian]
//= 1.9 Partially rewrote Script. [Masao]
+//= 1.9a Fixed incorrect setcastledata parameter. [Euphy]
//============================================================
// WoE : Main Functions
@@ -156,7 +157,7 @@ OnGuildBreak:
// Kill guardians, disable the Kafra, and set owner to 0.
killmonster strnpcinfo(2),"Guardian#"+strnpcinfo(2)+"::OnGuardianDied";
disablenpc "Kafra Staff#"+strnpcinfo(2);
- SetCastleData strnpcinfo(2),0,0;
+ SetCastleData strnpcinfo(2),1,0;
// Wait before refreshing guild information.
sleep 7000;
Announce "Guild Base [" + GetCastleName(strnpcinfo(2)) + "] has been abandoned.",0;
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:
diff --git a/npc/jobs/2-1/hunter.txt b/npc/jobs/2-1/hunter.txt
index 96874f73e..2777e0a43 100644
--- a/npc/jobs/2-1/hunter.txt
+++ b/npc/jobs/2-1/hunter.txt
@@ -534,6 +534,7 @@ hu_in01,382,382,4 script Guild Receptionist#hnt 732,{
close;
}
else if (HNTR_Q >= 3 && HNTR_Q <= 9) {
+ if(checkre(0)) set .@i,1;
switch(HNTR_Q) {
//Insect_Feeler/Claw_Of_Desert_Wolf, Wooden_Block, White_Herb
case 3: setarray .@items[0], (.@i?928:7030),5, 1019,5, 509,3, 10; break;