//================= Hercules Script =======================================
//= _ _ _
//= | | | | | |
//= | |_| | ___ _ __ ___ _ _| | ___ ___
//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
//= | | | | __/ | | (__| |_| | | __/\__ \
//= \_| |_/\___|_| \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2015 Hercules Dev Team
//= Copyright (C) Joseph
//= Copyright (C) Euphy
//= Copyright (C) Masao
//= Copyright (C) Brian
//= Copyright (C) L0ne_W0lf
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program. If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
//= War of Emperium Guild Template File
//================= Description ===========================================
//= - THIS FILE IS REQUIRED FOR GUILD CASTLES TO FUNCTION.
//=
//= - Enables AGIT Manager inside Guild Strongholds.
//= Visible Name required: Agit
//= Manages the various functions used in and out of WoE.
//=
//= - Enables Stewards inside Guild Strongholds which lets the guild master
//= invest in Defense and Economy, and to summon guardians, a Kafra, and
//= enter master's room.
//=
//= - Guardian Spawning Template
//= Visible Name required: Guardian
//= Spawn guardians when guild castle data is recieved.
//=
//= - Enables Kafra Services inside Guild Strongholds.
//= Visible Name required: Kafra Employee
//= Storage, Guild Storage, Teleport Service, Cart rental.
//=
//= - Treasure Chest spawning.
//= Chests will NOT be saved anymore in the event of crashes.
//= Treasures will NOT spawn on a location that already has treasure
//= chest spawned.
//================= Current Version =======================================
//= 2.0
//=========================================================================
//== WoE : Main Functions ==================================
- script Gld_Agit_Manager::Gld_Agit_Manager FAKE_NPC,{
// War of Emperium has started.
OnAgitStart:
// Spawn (fall through), or respawn the Emperium once it has been broken.
OnStartArena:
// OnAgitStart will fall through and spawn the Emperium.
// Add custom Guild Castles here.
else {
}
}
// The Emperium has been broken.
OnAgitBreak:
// Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen)
if (.@GID <= 0) {
.@notice$
= "Character "+strcharinfo(PC_NAME
)+" ("+getcharid(CHAR_ID_CHAR
)+") broke the Emperium in Castle: "+strnpcinfo(NPC_NAME_HIDDEN
)+" while guildless. No data will be saved and Emperium respawned.";
}
// Adjust Economy Invest Level for Castle
if (.@Economy < 0) .@Economy = 0;
// Adjust Defense Invest Level for Castle
if (.@defence < 0) .@defence = 0;
// Set new Castle Occupant
// Announce that the Emperium is destroyed, and respawn all but new castle-occupants.
mapannounce strnpcinfo(NPC_NAME_HIDDEN
),
"The emperium has been destroyed.",
bc_map|
bc_woe,
"0x00CCFF",
FW_NORMAL,
12;
// Refresh castle data, disable Kafra and reset Invest information.
for (.@i = 4; .@i <= 9; ++.@i) {
}
// Erase Guardian Database information if the new owners do not have Guardian Research.
for (.@i = 10; .@i <= 17; ++.@i) {
}
}
// Respawn the Emperium, and display new owners.
sleep 500;
// Slow down script execution slightly.
// War of Emperium has ended.
OnAgitEnd:
// If the castle has no owner at the end of WoE, do not kill Emperium.
}
// Occupying Guild has been disbanded.
OnGuildBreak:
// Kill guardians, disable the Kafra, and set owner to 0.
// Wait before refreshing guild information.
OnAgitInit:
OnRecvCastle:
// Spawn Monsters if the castle is empty.
if (.@GID == 0) {
// Normal Spawns
// Set Emperium room spawn coordinates and spawn monsters.
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Bloody Knight",
1268,
1;
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Abysmal Knight",
1219,
1;
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Raydric Archer",
1276,
5;
}
// Normal Spawns
// Set Emperium room spawn coordinates and spawn monsters.
}
// Normal Spawns
// Set Emperium room spawn coordinates and spawn monsters.
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Moonlight Flower",
1150,
1;
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Raydric Archer",
1276,
5;
}
// Normal Spawns
// Set Emperium room spawn coordinates and spawn monsters.
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Guardian Knight",
1268,
1;
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Guardian Master",
1251,
1;
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Guardian Knight",
1219,
1;
monster strnpcinfo(NPC_NAME_HIDDEN
),.@emproom
[0],.@emproom
[1],
"Raydric Archer",
1276,
5;
}
// Add custom Guild Castles here.
else {
}
// Disable Kafra Staff...
}
else {
// Otherwise place the guild emblem on flags.
// Add custom Guild Castles here.
else {
}
// And load purchased Guardian in castles.
// And display Kafra if purchased.
}
}
//== WoE : Guild Kafras ====================================
- script Kafra Staff#woe::guildkafra FAKE_NPC,{
setarray .@destination$
[0],
"Al De Baran",
"aldebaran";
}
setarray .@destination$
[0],
"Geffen",
"geffen";
}
setarray .@destination$
[0],
"Payon",
"payon";
}
setarray .@destination$
[0],
"Prontera",
"prontera";
}
// Add custom Guild Castles here.
else {
}
mes "The Kafra Corporation will stay with you wherever you go.";
switch (select("Use Storage",
"Use Teleport Service",
"Rent a Pushcart",
"Cancel")) {
case 1:
mes "I'm sorry, but you";
mes "Basic Skill Level 6 to";
mes "use the Storage Service.";
}
mes "your Storage for you.";
mes "Thank you for using";
mes "the Kafra Service.";
case 2:
switch (select(.@destination$
+" -> 200z",
"Cancel")) {
case 1:
if (Zeny < 200) {
mes "I'm sorry, but you don't have";
mes "enough zeny for the Teleport";
mes "Service. The fee to teleport";
mes "to "+.@destination$
+" is 200 zeny.";
}
Zeny -= 200;
RESRVPTS += 2;
warp .@destination$
[1],.@coordinates
[0],.@coordinates
[1];
case 2:
}
case 3:
if (BaseClass != Job_Merchant) {
mes "I'm sorry, but the";
mes "Pushcart rental service";
mes "is only available to Merchants,";
mes "Blacksmiths, Master Smiths,";
mes "Alchemists, Biochemists,";
mes "Mechanics and Geneticists.";
}
mes "a Pushcart equipped.";
mes "Unfortunately, we can't";
mes "rent more than one to";
mes "each customer at a time.";
}
mes "The Pushcart rental";
mes "fee is 800 zeny. Would";
mes "you like to rent a Pushcart?";
switch (select("Rent a Pushcart.",
"Cancel")) {
case 1:
if (Zeny < 800) {
mes "I'm sorry, but you";
mes "zeny to pay the Pushcart";
mes "rental fee of 800 zeny.";
}
RESRVPTS += 8;
Zeny -= 800;
case 2:
}
case 4:
mes "We, here at Kafra Corporation,";
mes "are always endeavoring to provide you with the best services. We hope that we meet your adventuring needs and standards of excellence.";
}
}
mes "I am instructed to only offer my services to the ^ff0000"+getguildname(.@GID
)+"^000000 Guild. Please try another Kafra Employee around here. Sorry for the inconvenience.";
}
//== WoE : Castle Managers =================================
- script Castle Manager#cm::cm FAKE_NPC,{
// .@guardiantype = Defines the types of guardians per castle basis.
// 1 - Soldier Guardian, 2 - Archer Guardian, 3 - Knight Guardian
// .@guardianposx = Define the x spawn point for each uardian.
// [0] = 1st guardian's x spawn point.
// .@guardianposy = Define the y spawn point for each guardian.
// [0] = 1st guardian's y spawn point.
// .@masterroom = Defines the coordinates of the Treasure Room.
if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas01") {
setarray .@guardiantype
[0],
1,
2,
2,
2,
2,
3,
3,
3;
setarray .@guardianposx
[0],
17,
39,
38,
45,
21,
218,
213,
73;
setarray .@guardianposy
[0],
218,
208,
196,
228,
194,
24,
24,
70;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas02") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
2,
2,
2;
setarray .@guardianposx
[0],
27,
88,
117,
60,
51,
21,
36,
210;
setarray .@guardianposy
[0],
184,
43,
46,
202,
183,
177,
183,
7;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas03") {
setarray .@guardiantype
[0],
3,
3,
1,
1,
1,
2,
2,
2;
setarray .@guardianposx
[0],
90,
116,
86,
116,
64,
212,
195,
110;
setarray .@guardianposy
[0],
112,
112,
120,
76,
103,
160,
151,
217;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas04") {
setarray .@guardiantype
[0],
2,
2,
2,
1,
1,
1,
3,
3;
setarray .@guardianposx
[0],
187,
192,
148,
145,
169,
198,
48,
55;
setarray .@guardianposy
[0],
100,
42,
88,
209,
53,
77,
72,
88;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas05") {
setarray .@guardiantype
[0],
2,
2,
1,
1,
3,
3,
3,
3;
setarray .@guardianposx
[0],
51,
188,
157,
157,
27,
145,
156,
41;
setarray .@guardianposy
[0],
202,
79,
192,
74,
221,
78,
73,
112;
}
// Geffen (Britoniah) Castles
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas01") {
setarray .@guardiantype
[0],
1,
1,
1,
2,
2,
3,
3,
3;
setarray .@guardianposx
[0],
67,
184,
62,
36,
50,
50,
189,
200;
setarray .@guardianposy
[0],
179,
20,
41,
186,
186,
67,
41,
167;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas02") {
setarray .@guardiantype
[0],
1,
1,
1,
2,
2,
3,
3,
3;
setarray .@guardianposx
[0],
64,
56,
166,
35,
20,
19,
166,
159;
setarray .@guardianposy
[0],
168,
41,
25,
148,
150,
41,
42,
188;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas03") {
setarray .@guardiantype
[0],
2,
2,
1,
1,
1,
3,
3,
3;
setarray .@guardianposx
[0],
48,
113,
48,
157,
243,
157,
234,
238;
setarray .@guardianposy
[0],
176,
214,
207,
62,
41,
45,
25,
160;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas04") {
setarray .@guardiantype
[0],
2,
2,
1,
1,
1,
3,
3,
3;
setarray .@guardianposx
[0],
53,
31,
49,
29,
147,
57,
160,
148;
setarray .@guardianposy
[0],
191,
178,
220,
46,
65,
46,
50,
189;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas05") {
setarray .@guardiantype
[0],
2,
2,
1,
1,
1,
3,
3,
3;
setarray .@guardianposx
[0],
45,
71,
72,
66,
177,
66,
177,
193;
setarray .@guardianposy
[0],
149,
163,
142,
47,
50,
17,
35,
166;
}
// Payon (Baulder) Castles
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas01") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
229,
225,
222,
99,
65,
36,
51,
138;
setarray .@guardianposy
[0],
92,
80,
111,
45,
31,
127,
144,
133;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas02") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
237,
228,
210,
57,
42,
287,
264,
27;
setarray .@guardianposy
[0],
54,
72,
41,
241,
241,
257,
272,
20;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas03") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
245,
269,
36,
41,
39,
19,
37,
268;
setarray .@guardianposy
[0],
37,
51,
39,
39,
65,
276,
277,
244;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas04") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
251,
232,
231,
32,
32,
35,
36,
270;
setarray .@guardianposy
[0],
212,
212,
175,
287,
232,
45,
17,
41;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas05") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
19,
33,
266,
266,
263,
263,
250,
36;
setarray .@guardianposy
[0],
279,
260,
234,
279,
37,
21,
22,
36;
}
// Prontera (Valkyrie Realms) Castles
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas01") {
setarray .@guardiantype
[0],
1,
1,
1,
2,
2,
3,
3,
3;
setarray .@guardianposx
[0],
182,
182,
153,
59,
50,
184,
196,
107;
setarray .@guardianposy
[0],
62,
116,
86,
28,
36,
183,
189,
179;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas02") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
2,
2,
2;
setarray .@guardianposx
[0],
161,
153,
178,
71,
49,
64,
7,
75;
setarray .@guardianposy
[0],
161,
161,
44,
75,
28,
186,
196,
175;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas03") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
2,
2,
2;
setarray .@guardianposx
[0],
191,
137,
45,
50,
41,
191,
179,
191;
setarray .@guardianposy
[0],
190,
190,
99,
87,
87,
42,
43,
72;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas04") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
1,
2,
2;
setarray .@guardianposx
[0],
276,
274,
246,
38,
29,
33,
78,
36;
setarray .@guardianposy
[0],
14,
35,
246,
240,
240,
258,
48,
61;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas05") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
1,
2,
2;
setarray .@guardianposx
[0],
266,
287,
245,
236,
251,
278,
32,
44;
setarray .@guardianposy
[0],
262,
280,
250,
63,
63,
253,
253,
248;
}
// Add custom Guild Castles here.
else {
}
if (.@GID == 0) {
mes "I have been waiting for a master to fulfill my destiny.";
mes "Brave soul... fate will guide you towards your future...";
}
mes "No matter how much you pester me, I'll still follow my master ^ff0000"+getguildmaster(.@GID
)+"^000000. Where are the Guardians?! Send these ruffians away right now!";
}
mes "Welcome. My honorable master, ^ff0000"+strcharinfo(PC_NAME
)+"^000000...";
mes "Your humble servant, "+strnpcinfo(NPC_NAME_VISIBLE
)+", is here to serve you.";
switch (select("Castle briefing",
"Invest in commercial growth",
"Invest in Castle Defenses",
"Summon Guardian",
"Hire / Fire a Kafra Employee",
"Go into Master's room")) {
case 1:
mes "I will report the Castle briefing, Master.";
}
}
mes "That's all I have to report, Master.";
case 2:
if (.@Economy < 6) { .@eco_invest = 5000; }
else if ((.@Economy >= 6) && (.@Economy <= 10)) { .@eco_invest = 10000; }
else if ((.@Economy >= 11) && (.@Economy <= 15)) { .@eco_invest = 20000; }
else if ((.@Economy >= 16) && (.@Economy <= 20)) { .@eco_invest = 35000; }
else if ((.@Economy >= 21) && (.@Economy <= 25)) { .@eco_invest = 55000; }
else if ((.@Economy >= 26) && (.@Economy <= 30)) { .@eco_invest = 80000; }
else if ((.@Economy >= 31) && (.@Economy <= 35)) { .@eco_invest = 110000; }
else if ((.@Economy >= 36) && (.@Economy <= 40)) { .@eco_invest = 145000; }
else if ((.@Economy >= 41) && (.@Economy <= 45)) { .@eco_invest = 185000; }
else if ((.@Economy >= 46) && (.@Economy <= 50)) { .@eco_invest = 230000; }
else if ((.@Economy >= 51) && (.@Economy <= 55)) { .@eco_invest = 280000; }
else if ((.@Economy >= 56) && (.@Economy <= 60)) { .@eco_invest = 335000; }
else if ((.@Economy >= 61) && (.@Economy <= 65)) { .@eco_invest = 395000; }
else if ((.@Economy >= 66) && (.@Economy <= 70)) { .@eco_invest = 460000; }
else if ((.@Economy >= 71) && (.@Economy <= 75)) { .@eco_invest = 530000; }
else if ((.@Economy >= 76) && (.@Economy <= 80)) { .@eco_invest = 605000; }
else if ((.@Economy >= 81) && (.@Economy <= 85)) { .@eco_invest = 685000; }
else if ((.@Economy >= 86) && (.@Economy <= 90)) { .@eco_invest = 770000; }
else if ((.@Economy >= 91) && (.@Economy <= 95)) { .@eco_invest = 860000; }
else if ((.@Economy >= 96) && (.@Economy <= 100)) { .@eco_invest = 955000; }
//Quadruple the cost of investing if you've already invested once.
.@eco_invest *= 4;
}
mes "If you invest in commercial growth, the quantity of goods made by the guild will increase. Therfore, if you consider our future, investments will be a necessity.";
mes "Initially, you are able to invest just once but if you pay more money, you will be able to invest twice.";
if (.@Economy >= 100) {
mes "^ff0000The commercial growth level of our Castle is at it's highest, 100%. No more investments are needed. Just as I have expected from a great economist like you, Master.^000000";
}
mes "The current investment amount required is ^ff0000"+.@eco_invest
+"^000000 zeny. Will you invest?";
}
else {
mes "You've invested once today... if you wish to invest once more, ^ff0000"+.@eco_invest
+"^000000 more zeny will be needed.";
}
switch (select("Invest in commercial growth",
"Cancel")) {
case 1:
if (Zeny < .@eco_invest) {
mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master.";
}
Zeny -= .@eco_invest;
mes "We finished the investment safely. I expect that our growth level will be increased by tomorrow.";
case 2:
mes "I'll do as you bid, my master... There is no hurry. We will do our best.";
}
case 3:
if (.@defence < 6) { .@def_invest = 10000; }
else if ((.@defence >= 6) && (.@defence <= 10)) { .@def_invest = 20000; }
else if ((.@defence >= 11) && (.@defence <= 15)) { .@def_invest = 40000; }
else if ((.@defence >= 16) && (.@defence <= 20)) { .@def_invest = 70000; }
else if ((.@defence >= 21) && (.@defence <= 25)) { .@def_invest = 110000; }
else if ((.@defence >= 26) && (.@defence <= 30)) { .@def_invest = 160000; }
else if ((.@defence >= 31) && (.@defence <= 35)) { .@def_invest = 220000; }
else if ((.@defence >= 36) && (.@defence <= 40)) { .@def_invest = 290000; }
else if ((.@defence >= 41) && (.@defence <= 45)) { .@def_invest = 370000; }
else if ((.@defence >= 46) && (.@defence <= 50)) { .@def_invest = 460000; }
else if ((.@defence >= 51) && (.@defence <= 55)) { .@def_invest = 560000; }
else if ((.@defence >= 56) && (.@defence <= 60)) { .@def_invest = 670000; }
else if ((.@defence >= 61) && (.@defence <= 65)) { .@def_invest = 790000; }
else if ((.@defence >= 66) && (.@defence <= 70)) { .@def_invest = 920000; }
else if ((.@defence >= 71) && (.@defence <= 75)) { .@def_invest = 1060000; }
else if ((.@defence >= 76) && (.@defence <= 80)) { .@def_invest = 1210000; }
else if ((.@defence >= 81) && (.@defence <= 85)) { .@def_invest = 1370000; }
else if ((.@defence >= 86) && (.@defence <= 90)) { .@def_invest = 1540000; }
else if ((.@defence >= 91) && (.@defence <= 95)) { .@def_invest = 1720000; }
else if ((.@defence >= 96) && (.@defence <= 100)) { .@def_invest = 1910000; }
//Quadruple the cost of investing if you've already invested once.
.@def_invest *= 4;
}
mes "If you raise Castle Defenses, the durability of Guardians and the Emperium will increase. Therefore, if you consider our coming battles, some investment in this area will be required.";
mes "Originally you can invest just once but if you pay more money, you can invest twice.";
if (.@defence >= 100) {
mes "^ff0000But the Castle Defense level of our Castle is at it's highest, 100%. No more investments are needed. Just as I have expected from a great strategist like you, Master.^000000";
}
mes "The current investment amount required is ^ff0000"+.@def_invest
+"^000000 zeny. Will you invest?";
}
else {
mes "You've invested once today... if you wish to invest once more, ^ff0000"+.@def_invest
+"^000000 more zeny will be needed.";
}
switch (select("Invest in Castle Defenses.",
"Cancel")) {
case 1:
if (Zeny < .@def_invest) {
mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master.";
}
Zeny -= .@def_invest;
mes "We finished the investment safely. I expect that our Castle Defense level will be increased by tomorrow.";
case 2:
mes "I'll do as you bid, my master... There is no hurry. We will do our best.";
}
case 4:
mes "Will you summon a Guardian? It'll be a protector to defend us loyally.";
mes "Please select a guardian to defend us.";
for (.@i = 0; .@i <= 7; ++.@i) {
if (.@guardiantype[.@i] == 1) { .@type$ = "Guardian Soldier"; }
else if (.@guardiantype[.@i] == 2) { .@type$ = "Guardian Archer"; }
else { .@type$ = "Guardian Knight"; }
}
else {
setarray .@gname$
[.@i
], .@type$
+ " - Not Implemented";
}
}
.@
menu$
= .@gname$
[0]+":"+.@gname$
[1]+":"+.@gname$
[2]+":"+.@gname$
[3]+":"+.@gname$
[4]+":"+.@gname$
[5]+":"+.@gname$
[6]+":"+.@gname$
[7];
mes "Will you summon the chosen guardian? 10,000 zeny are required to summon a Guardian.";
switch (select("Summon",
"Cancel")) {
case 1:
mes "Master, we have not the resources to Summon the Guardian. If you want to accumulate them, you have to learn the Guild skill. We failed to summon the Guardian.";
}
mes "Master, you already have summoned that Guardian. We cannot summon another.";
}
if (Zeny < 10000) {
mes "Well... I'm sorry but we don't have funds to summon the Guardian. We failed to summon the Guardian.";
}
Zeny -= 10000;
.@UseGID = .@GDnum - 10;
if (.@guardiantype[.@UseGID] == 1) { .@type = 1287; }
else if (.@guardiantype[.@UseGID] == 2) { .@type = 1285; }
else { .@type = 1286; }
mes "We completed the summoning of the Guardian. Our defenses are now increased with it in place.";
case 2:
mes "I did as you ordered. But please remember if you the have money to spare, it'll be better to set it up.";
}
case 5:
mes "We are currently hiring a Kafra Employee... Do you want to fire the Kafra Employee?";
switch (select("Fire",
"Cancel")) {
case 1:
mes "[ Hired Kafra Employee ]";
mes "I worked so hard... How can you do that, Master?... Please... Please reconsider... Check it again, Master... Please...";
switch (select("Fire",
"Cancel")) {
case 1:
mes "[ Hired Kafra Employee ]";
mes "Oh, my goodness! This is nonsense!";
case 2:
mes "[ Hired Kafra Employee ]";
mes "I'll work hard for you... Thank you!";
if (.@pass1 == 1112244) {
mes "[ Hired Kafra Employee ]";
getitem2(.@brg,.@jml,
1,.@rfn,
0,.@krt1,.@krt2,.@krt3,.@krt3
);
}
if (.@pass1 == 1112233) {
mes "[ Hired Kafra Employee ]";
}
else
}
case 2:
mes "She worked hard in my opinion. It was a good decision to keep her.";
}
mes "I have discharged the Kafra Employee... But... are you unsatisfied with something?";
}
mes "Will you contact the kafra Main Office and Hire a Employee for our Castle?";
mes "^ff0000 10,000 zeny is required for their services. ";
switch (select("Hire.",
"Cancel")) {
case 1:
mes "Master, we can't hire a Kafra Employee because we don't have a contract with the Kafra Main Office. If you want to obtain a contract with the Kafra Main Office, you will need to learn the Guild skill first.";
}
if (Zeny < 10000) {
mes "Well... I'm sorry but we don't have enough funds to hire a Kafra Employee.";
}
Zeny -= 10000;
mes "We obtained a contract with the kafra Main Office, and hired a Kafra Employee.";
mes "[ Hired Kafra Employee ]";
mes "How do you do? I was dispatched from the Main Office.";
mes "I'll do my best to not tarnish the reputation of the Guild.";
mes "The Contract terms of the hired Kafra Employee are for 1 month and after this term, you will need to to pay an additional fee.";
mes "It will be useful for our members.";
case 2:
mes "I did as you ordered, but some of our members will be unhappy. It will be better to hire a Kafra Employee quickly.";
}
case 6:
mes "Do you want to visit the room where our valuables are stored?";
mes "That room is restricted to you... you are the only one with access to it.";
switch (select("Go into Master's room.",
"Cancel")) {
case 1:
mes "I'll show you the secret path. Follow me...please.";
mes "When you want to return here, please press the secret switch.";
case 2:
mes "Goods are produced once a day... if you don't remove them in time, they will not be produced anymore.";
mes "Therefore, it will be better if you check up on them from time to time.";
}
}
}
//== WoE : Guild Dungeon Entrances =========================
- script Lever#gd::gdlever FAKE_NPC,{
if (.@GID == 0) {
mes "'Those who overcome an ordeal shows a great deal of bravery... and will find their way to another ordeal.'";
}
.@destination$ = "gld_dun02";
}
.@destination$ = "gld_dun04";
}
.@destination$ = "gld_dun01";
}
.@destination$ = "gld_dun03";
}
// Add custom Guild Castles here.
else {
}
mes "'Only the truly brave can take the test.'";
mes "There's a small lever. Will you pull it?";
if(select("Pull.",
"Don't pull.") == 1) {
warp .@destination$,.@coordinates
[0],.@coordinates
[1];
}
}
}
//== Guardian Spawner Template =============================
- script Gld_Guard_Template::Gld_Guard_Template FAKE_NPC,{
// Spawn Guardians in castles
// When adding new castles, ensure that the coordinates coincide with the
// coordinates defined in the Guild Steward template.
OnSpawnGuardians:
// Define the types of guardians on a per castle basis.
// 1 - Soldier Guardian; 2 - Archer Guardian; 3 - Knight Guardian
// Define the x spawn point for each uardian.
// [0] = 1st guardian's x spawn point.
// Define the y spawn point for each uardian.
// [0] = 1st guardian's y spawn point.
// Aldebaran (Luina) Castles
if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas01") {
setarray .@guardiantype
[0],
1,
2,
2,
2,
2,
3,
3,
3;
setarray .@guardianposx
[0],
17,
39,
38,
45,
21,
218,
213,
73;
setarray .@guardianposy
[0],
218,
208,
196,
228,
194,
24,
24,
70;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas02") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
2,
2,
2;
setarray .@guardianposx
[0],
27,
88,
117,
60,
51,
21,
36,
210;
setarray .@guardianposy
[0],
184,
43,
46,
202,
183,
177,
183,
7;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas03") {
setarray .@guardiantype
[0],
3,
3,
1,
1,
1,
2,
2,
2;
setarray .@guardianposx
[0],
90,
116,
86,
116,
64,
212,
195,
110;
setarray .@guardianposy
[0],
112,
112,
120,
76,
103,
160,
151,
217;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas04") {
setarray .@guardiantype
[0],
2,
2,
2,
1,
1,
1,
3,
3;
setarray .@guardianposx
[0],
187,
192,
148,
145,
169,
198,
48,
55;
setarray .@guardianposy
[0],
100,
42,
88,
209,
53,
77,
72,
88;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas05") {
setarray .@guardiantype
[0],
2,
2,
1,
1,
3,
3,
3,
3;
setarray .@guardianposx
[0],
51,
188,
157,
157,
27,
145,
156,
41;
setarray .@guardianposy
[0],
202,
79,
192,
74,
221,
78,
73,
112;
}
// Geffen (Britoniah) Castles
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas01") {
setarray .@guardiantype
[0],
1,
1,
1,
2,
2,
3,
3,
3;
setarray .@guardianposx
[0],
67,
184,
62,
36,
50,
50,
189,
200;
setarray .@guardianposy
[0],
179,
20,
41,
186,
186,
67,
41,
167;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas02") {
setarray .@guardiantype
[0],
1,
1,
1,
2,
2,
3,
3,
3;
setarray .@guardianposx
[0],
64,
56,
166,
35,
20,
19,
166,
159;
setarray .@guardianposy
[0],
168,
41,
25,
148,
150,
41,
42,
188;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas03") {
setarray .@guardiantype
[0],
2,
2,
1,
1,
1,
3,
3,
3;
setarray .@guardianposx
[0],
48,
113,
48,
157,
243,
157,
234,
238;
setarray .@guardianposy
[0],
176,
214,
207,
62,
41,
45,
25,
160;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas04") {
setarray .@guardiantype
[0],
2,
2,
1,
1,
1,
3,
3,
3;
setarray .@guardianposx
[0],
53,
31,
49,
29,
147,
57,
160,
148;
setarray .@guardianposy
[0],
191,
178,
220,
46,
65,
46,
50,
189;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas05") {
setarray .@guardiantype
[0],
2,
2,
1,
1,
1,
3,
3,
3;
setarray .@guardianposx
[0],
45,
71,
72,
66,
177,
66,
177,
193;
setarray .@guardianposy
[0],
149,
163,
142,
47,
50,
17,
35,
166;
}
// Payon (Baulder) Castles
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas01") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
229,
225,
222,
99,
65,
36,
51,
138;
setarray .@guardianposy
[0],
92,
80,
111,
45,
31,
127,
144,
133;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas02") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
237,
228,
210,
57,
42,
287,
264,
27;
setarray .@guardianposy
[0],
54,
72,
41,
241,
241,
257,
272,
20;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas03") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
245,
269,
36,
41,
39,
19,
37,
268;
setarray .@guardianposy
[0],
37,
51,
39,
39,
65,
276,
277,
244;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas04") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
251,
232,
231,
32,
32,
35,
36,
270;
setarray .@guardianposy
[0],
212,
212,
175,
287,
232,
45,
17,
41;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas05") {
setarray .@guardiantype
[0],
2,
2,
2,
2,
2,
2,
2,
3;
setarray .@guardianposx
[0],
19,
33,
266,
266,
263,
263,
250,
36;
setarray .@guardianposy
[0],
279,
260,
234,
279,
37,
21,
22,
36;
}
// Prontera (Valkyrie Realms) Castles
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas01") {
setarray .@guardiantype
[0],
1,
1,
1,
2,
2,
3,
3,
3;
setarray .@guardianposx
[0],
182,
182,
153,
59,
50,
184,
196,
107;
setarray .@guardianposy
[0],
62,
116,
86,
28,
36,
183,
189,
179;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas02") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
2,
2,
2;
setarray .@guardianposx
[0],
161,
153,
178,
71,
49,
64,
7,
75;
setarray .@guardianposy
[0],
161,
161,
44,
75,
28,
186,
196,
175;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas03") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
2,
2,
2;
setarray .@guardianposx
[0],
191,
137,
45,
50,
41,
191,
179,
191;
setarray .@guardianposy
[0],
190,
190,
99,
87,
87,
42,
43,
72;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas04") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
1,
2,
2;
setarray .@guardianposx
[0],
276,
274,
246,
38,
29,
33,
78,
36;
setarray .@guardianposy
[0],
14,
35,
246,
240,
240,
258,
48,
61;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas05") {
setarray .@guardiantype
[0],
3,
3,
3,
1,
1,
1,
2,
2;
setarray .@guardianposx
[0],
266,
287,
245,
236,
251,
278,
32,
44;
setarray .@guardianposy
[0],
262,
280,
250,
63,
63,
253,
253,
248;
}
// Add custom Guild Castles here.
else {
}
// Kill all existing guardians before spawning new ones.
// This should prevent duplicating Guardians when char Server disconnects.
for (.@i = 0; .@i <= 7; ++.@i) {
.@UseGID = .@i + 10;
if (.@guardiantype[.@i] == 1) { .@type = 1287; }
else if (.@guardiantype[.@i] == 2) { .@type = 1285; }
else { .@type = 1286; }
}
}
OnGuardianDied:
}
//== Treasure Room Spawn Template ==========================
- script Gld_Trea_Spawn::Gld_Trea_Spawn FAKE_NPC,{
OnClock0110:
OnClock0710:
OnClock1310:
OnClock1910:
// Do nothing if this script is the template.
// If there is no owner, do nothing.
// Is there Economy in this castle?
// Set information
if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas01") {
.@treasurebox = 1324;
setarray .@treasurex
[0],
115,
122,
115,
122,
116,
117,
118,
119,
120,
121,
121,
121,
121,
121,
121,
120,
119,
118,
117,
116,
116,
116,
116,
116;
setarray .@treasurey
[0],
226,
226,
219,
219,
225,
225,
225,
225,
225,
225,
224,
223,
222,
221,
220,
220,
220,
220,
220,
220,
221,
222,
223,
224;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas02") {
.@treasurebox = 1326;
setarray .@treasurex
[0],
134,
135,
135,
134,
132,
133,
134,
135,
136,
137,
137,
137,
137,
137,
137,
136,
135,
134,
133,
132,
132,
132,
132,
132;
setarray .@treasurey
[0],
231,
231,
230,
230,
233,
233,
233,
233,
233,
233,
232,
231,
230,
229,
228,
228,
228,
228,
228,
228,
229,
230,
231,
232;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas03") {
.@treasurebox = 1328;
setarray .@treasurex
[0],
224,
225,
225,
224,
222,
223,
224,
225,
226,
227,
227,
227,
227,
227,
227,
226,
225,
224,
223,
222,
222,
222,
222,
222;
setarray .@treasurey
[0],
269,
269,
268,
268,
271,
271,
271,
271,
271,
271,
270,
269,
268,
267,
266,
266,
266,
266,
266,
266,
267,
268,
269,
270;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas04") {
.@treasurebox = 1330;
setarray .@treasurex
[0],
84,
85,
85,
84,
82,
83,
84,
85,
86,
87,
87,
87,
87,
87,
87,
86,
85,
84,
83,
82,
82,
82,
82,
82;
setarray .@treasurey
[0],
13,
13,
12,
12,
15,
15,
15,
15,
15,
15,
14,
13,
12,
11,
10,
10,
10,
10,
10,
10,
11,
12,
13,
14;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "aldeg_cas05") {
.@treasurebox = 1332;
setarray .@treasurex
[0],
61,
62,
62,
61,
59,
60,
61,
62,
63,
64,
64,
64,
64,
64,
64,
63,
62,
61,
60,
59,
59,
59,
59,
59;
setarray .@treasurey
[0],
12,
12,
11,
11,
14,
14,
14,
14,
14,
14,
13,
12,
11,
10,
9,
9,
9,
9,
9,
9,
10,
11,
12,
13;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas01") {
.@treasurebox = 1334;
setarray .@treasurex
[0],
153,
154,
154,
153,
151,
152,
153,
154,
155,
156,
156,
156,
156,
156,
156,
155,
154,
153,
152,
151,
151,
151,
151,
151;
setarray .@treasurey
[0],
113,
113,
112,
112,
115,
115,
115,
115,
115,
115,
114,
113,
112,
111,
110,
110,
110,
110,
110,
110,
111,
112,
113,
114;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas02") {
.@treasurebox = 1336;
setarray .@treasurex
[0],
139,
140,
140,
139,
137,
138,
139,
140,
141,
142,
142,
142,
142,
142,
142,
141,
140,
139,
138,
137,
137,
137,
137,
137;
setarray .@treasurey
[0],
115,
115,
114,
114,
117,
117,
117,
117,
117,
117,
116,
115,
114,
113,
112,
112,
112,
112,
112,
112,
113,
114,
115,
116;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas03") {
.@treasurebox = 1338;
setarray .@treasurex
[0],
269,
270,
270,
269,
267,
268,
269,
270,
271,
272,
272,
272,
272,
272,
272,
271,
270,
269,
268,
267,
267,
267,
267,
267;
setarray .@treasurey
[0],
291,
291,
290,
290,
293,
293,
293,
293,
293,
293,
292,
291,
290,
289,
288,
288,
288,
288,
288,
288,
289,
290,
291,
292;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas04") {
.@treasurebox = 1340;
setarray .@treasurex
[0],
115,
116,
116,
115,
113,
114,
115,
116,
117,
118,
118,
118,
118,
118,
118,
117,
116,
115,
114,
113,
113,
113,
113,
113;
setarray .@treasurey
[0],
119,
119,
118,
118,
121,
121,
121,
121,
121,
121,
120,
119,
118,
117,
116,
116,
116,
116,
116,
116,
117,
118,
119,
120;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "gefg_cas05") {
.@treasurebox = 1342;
setarray .@treasurex
[0],
143,
144,
144,
143,
141,
142,
143,
144,
145,
146,
146,
146,
146,
146,
146,
145,
144,
143,
142,
141,
141,
141,
141,
141;
setarray .@treasurey
[0],
110,
110,
109,
109,
112,
112,
112,
112,
112,
112,
111,
110,
109,
108,
107,
107,
107,
107,
107,
107,
108,
109,
110,
111;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas01") {
.@treasurebox = 1344;
setarray .@treasurex
[0],
289,
292,
292,
289,
288,
289,
290,
291,
292,
293,
293,
293,
293,
293,
293,
292,
291,
290,
289,
288,
288,
288,
288,
288;
setarray .@treasurey
[0],
10,
10,
7,
7,
11,
11,
11,
11,
11,
11,
10,
9,
8,
7,
6,
6,
6,
6,
6,
6,
7,
8,
9,
10;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas02") {
.@treasurebox = 1346;
setarray .@treasurex
[0],
143,
146,
146,
143,
142,
143,
144,
145,
146,
147,
147,
147,
147,
147,
147,
146,
145,
144,
143,
142,
142,
142,
142,
142;
setarray .@treasurey
[0],
146,
146,
143,
143,
147,
147,
147,
147,
147,
147,
146,
145,
144,
143,
142,
142,
142,
142,
142,
142,
143,
144,
145,
146;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas03") {
.@treasurebox = 1348;
setarray .@treasurex
[0],
158,
159,
159,
158,
156,
157,
158,
159,
160,
161,
161,
161,
161,
161,
161,
160,
159,
158,
157,
156,
156,
156,
156,
156;
setarray .@treasurey
[0],
169,
169,
168,
168,
171,
171,
171,
171,
171,
171,
170,
169,
168,
167,
166,
166,
166,
166,
166,
166,
167,
168,
169,
170;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas04") {
.@treasurebox = 1350;
setarray .@treasurex
[0],
146,
147,
147,
146,
144,
145,
146,
147,
148,
149,
149,
149,
149,
149,
149,
148,
147,
146,
145,
144,
144,
144,
144,
144;
setarray .@treasurey
[0],
48,
48,
47,
47,
50,
50,
50,
50,
50,
50,
49,
48,
47,
46,
45,
45,
45,
45,
45,
45,
46,
47,
48,
49;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "payg_cas05") {
.@treasurebox = 1352;
setarray .@treasurex
[0],
155,
158,
158,
155,
154,
155,
156,
157,
158,
159,
159,
159,
159,
159,
159,
158,
157,
156,
155,
154,
154,
154,
154,
154;
setarray .@treasurey
[0],
134,
134,
131,
131,
135,
135,
135,
135,
135,
135,
134,
133,
132,
131,
130,
130,
130,
130,
130,
130,
131,
132,
133,
134;
}
else if (strnpcinfo(NPC_NAME_HIDDEN
) == "prtg_cas01") {
.@treasurebox = 1354;
setarray .@treasurex
[0],
10,
11,
11,
10,
8,
9,
10,
11,
12,
13,
13,
13,
13,
13,
13,
12,
11,
10,
9,
8,
8,
8,
8,
8;
setarray .@treasurey
[0],
209,
209,
208,
208,
211,
211,
211,
211,
211,
211,
210,
209,
208,
207,
206,
206,
206,
206,
206,
206,
207,
208,
209,
210;
}
// Add custom Guild Castles here.
else {
}
// Apply investment to Eco. and Def. Only happens if there were investments made.
// Permanent Development can only happen once per day.
}
}
// Reset daily investment limits.
// Spawn boxes in proper order.
for (.@i = 0; .@i < .@Treasure ; ++.@i) {
// set treasure box ID
.@boxid = .@treasurebox + (.@i+2) % 2;
.@box = 1 << .@i;
// Spawn or do not spawn chests if one already exists.
if ((getd("$@"+strnpcinfo(NPC_NAME_HIDDEN
)+"_treasure") & .@box
) == 0) {
monster strnpcinfo(NPC_NAME_HIDDEN
),.@treasurex
[.@i
],.@treasurey
[.@i
],
"Treasure Chest",.@boxid,
1,
"Treasure#"+strnpcinfo(NPC_NAME_HIDDEN
)+"::OnTreasureDied"+.@i;
}
}
// Individual "You killed a chest" events to ensure proper spawning at the change of day.
OnTreasureDied0:
OnTreasureDied1:
OnTreasureDied2:
OnTreasureDied3:
OnTreasureDied4:
OnTreasureDied5:
OnTreasureDied6:
OnTreasureDied7:
OnTreasureDied8:
OnTreasureDied9:
OnTreasureDied10:
OnTreasureDied11:
OnTreasureDied12:
OnTreasureDied13:
OnTreasureDied14:
OnTreasureDied15:
OnTreasureDied16:
OnTreasureDied17:
OnTreasureDied18:
OnTreasureDied19:
OnTreasureDied20:
OnTreasureDied21:
OnTreasureDied22:
OnTreasureDied23:
}