summaryrefslogtreecommitdiff
path: root/npc/woe-se/agit_main_se.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/woe-se/agit_main_se.txt')
-rw-r--r--npc/woe-se/agit_main_se.txt530
1 files changed, 265 insertions, 265 deletions
diff --git a/npc/woe-se/agit_main_se.txt b/npc/woe-se/agit_main_se.txt
index 71d796367..6f1ad7df0 100644
--- a/npc/woe-se/agit_main_se.txt
+++ b/npc/woe-se/agit_main_se.txt
@@ -40,59 +40,59 @@
- script Manager#template FAKE_NPC,{
OnAgitInit2:
OnRecvCastle2:
- if (strnpcinfo(2) == "template") end;
- if (!getcastledata(strnpcinfo(2),1)) {
- donpcevent strnpcinfo(0)+"::OnStart";
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end;
+ if (!getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) {
+ donpcevent strnpcinfo(NPC_NAME)+"::OnStart";
// Monster spawns are identical for all castles.
- monster strnpcinfo(2),0,0,"Evil Druid",1117,10;
- monster strnpcinfo(2),0,0,"Khalitzburg",1132,4;
- monster strnpcinfo(2),0,0,"Abysmal Knight",1219,3;
- monster strnpcinfo(2),0,0,"Executioner",1205,1;
- monster strnpcinfo(2),0,0,"Penomena",1216,10;
- monster strnpcinfo(2),0,0,"Alarm",1193,18;
- monster strnpcinfo(2),0,0,"Clock",1269,9;
- monster strnpcinfo(2),0,0,"Raydric Archer",1276,12;
- monster strnpcinfo(2),0,0,"Wanderer",1208,3;
- monster strnpcinfo(2),0,0,"Alice",1275,1;
- monster strnpcinfo(2),0,0,"Bloody Knight",1268,2;
- monster strnpcinfo(2),0,0,"Dark Lord",1272,2;
- monster strnpcinfo(2),0,0,"Tower Keeper",1270,4;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Evil Druid",1117,10;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Khalitzburg",1132,4;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Abysmal Knight",1219,3;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Executioner",1205,1;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Penomena",1216,10;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Alarm",1193,18;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Clock",1269,9;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Raydric Archer",1276,12;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Wanderer",1208,3;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Alice",1275,1;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Bloody Knight",1268,2;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Dark Lord",1272,2;
+ monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Tower Keeper",1270,4;
}
- if (getcastledata(strnpcinfo(2),9) < 1)
- disablenpc "Kafra Employee#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
+ if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),9) < 1)
+ disablenpc "Kafra Employee#"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
end;
OnAgitStart2:
- if (strnpcinfo(2) == "template") end;
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end;
if (agitcheck2()) {
- maprespawnguildid strnpcinfo(2),getcastledata(strnpcinfo(2),1),2;
- gvgon strnpcinfo(2);
- donpcevent strnpcinfo(0)+"::OnStart";
+ maprespawnguildid strnpcinfo(NPC_NAME_HIDDEN),getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1),2;
+ gvgon strnpcinfo(NPC_NAME_HIDDEN);
+ donpcevent strnpcinfo(NPC_NAME)+"::OnStart";
}
else for(.@i = 0; .@i<4; ++.@i)
- donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnDisable";
+ donpcevent "RL"+.@i+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable";
end;
OnAgitEnd2:
- if (strnpcinfo(2) == "template") end;
- gvgoff strnpcinfo(2);
- if (getcastledata(strnpcinfo(2),1)) {
- .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
- killmonster strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena";
- donpcevent strnpcinfo(0)+"::OnReset";
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end;
+ gvgoff strnpcinfo(NPC_NAME_HIDDEN);
+ if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) {
+ .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
+ killmonster strnpcinfo(NPC_NAME_HIDDEN),"Steward#"+.@str$+"::OnStartArena";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnReset";
donpcevent "Steward#"+.@str$+"::OnStop";
}
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;
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end;
+ killmonster strnpcinfo(NPC_NAME_HIDDEN),"gard1#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnGuardianDied";
+ killmonster strnpcinfo(NPC_NAME_HIDDEN),"gard2#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnGuardianDied";
+ disablenpc "Kafra Employee#"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
+ setcastledata strnpcinfo(NPC_NAME_HIDDEN),1,0;
sleep 7000;
- announce "Guild Base ["+getcastlename(strnpcinfo(2))+"] has been abandoned.",0;
- donpcevent strnpcinfo(0)+"::OnRecvCastle2";
+ announce "Guild Base ["+getcastlename(strnpcinfo(NPC_NAME_HIDDEN))+"] has been abandoned.",0;
+ donpcevent strnpcinfo(NPC_NAME)+"::OnRecvCastle2";
end;
OnStart:
@@ -100,50 +100,50 @@ OnStart:
// 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians
// Settings for all but Summon Guardians: 0 = Okay | 1 = Destroyed | 2 = Repairing
// Summon Guardians: 0 = Do not Summon | 1 = Summon
- if (getcastledata(strnpcinfo(2),1)) {
- setarray getd("$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"[0]"),0,0,0,0,0,0;
- donpcevent "df1#"+strnpcinfo(2)+"::OnEnable";
- donpcevent "df2#"+strnpcinfo(2)+"::OnEnable";
+ if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) {
+ setarray getd("$agit_"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"[0]"),0,0,0,0,0,0;
+ donpcevent "df1#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnEnable";
+ donpcevent "df2#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnEnable";
for (.@i = 0; .@i<4; ++.@i)
- donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnEnable";
+ donpcevent "RL"+.@i+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnEnable";
}
OnEmpSpawn:
- .@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;
+ .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
+ if (mobcount(strnpcinfo(NPC_NAME_HIDDEN),"Steward#"+.@str$+"::OnStartArena")) end;
+ if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") setarray .@i[0],87,219;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") setarray .@i[0],89,256;
else setarray .@i[0],141,293; // Castles 3,4,5 are identical.
}
else {
- if (strnpcinfo(2) == "schg_cas02") setarray .@i[0],162,193;
- else if (strnpcinfo(2) == "schg_cas03") setarray .@i[0],338,202;
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") setarray .@i[0],162,193;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "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#"+.@str$+"::OnStartArena";
+ monster strnpcinfo(NPC_NAME_HIDDEN),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+.@str$+"::OnStartArena";
end;
OnReset:
- .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
- donpcevent "df1#"+strnpcinfo(2)+"::OnDisable";
- donpcevent "df2#"+strnpcinfo(2)+"::OnDisable";
- donpcevent "gard1#"+strnpcinfo(2)+"::OnReset";
- donpcevent "gard2#"+strnpcinfo(2)+"::OnReset";
+ .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
+ donpcevent "df1#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable";
+ donpcevent "df2#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable";
+ donpcevent "gard1#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnReset";
+ donpcevent "gard2#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnReset";
donpcevent "1st Guardian Stone#"+.@str$+"::OnDisable";
donpcevent "2nd Guardian Stone#"+.@str$+"::OnDisable";
for(.@i = 1; .@i<4; ++.@i)
donpcevent "Control Device0"+.@i+"#"+.@str$+"::OnDisable";
for(.@i = 0; .@i<4; ++.@i)
- donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnDisable";
+ donpcevent "RL"+.@i+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable";
if (agitcheck2())
- setarray getd("$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"[0]"),0,0,1,1,1,0;
+ setarray getd("$agit_"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"[0]"),0,0,1,1,1,0;
end;
OnChange:
- .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
+ .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
setarray getd("$agit_"+.@str$+"[0]"),2,2,1,1,2,0;
- donpcevent strnpcinfo(0)+"::OnEmpSpawn";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnEmpSpawn";
donpcevent "Control Device03#"+.@str$+"::OnEnable";
donpcevent "1st Guardian Stone#"+.@str$+"::OnEnable";
donpcevent "2nd Guardian Stone#"+.@str$+"::OnEnable";
@@ -151,65 +151,65 @@ OnChange:
OnClock0001:
// Spawn Treasure Chests based on castle economy.
- if (strnpcinfo(2) == "template") end;
- if (!getcastledata(strnpcinfo(2),1)) end;
- killmonster strnpcinfo(2),strnpcinfo(0)+"::OnTreasureDied";
- if (getcastledata(strnpcinfo(2),4)) {
- .@Economy = getcastledata(strnpcinfo(2),2);
- setcastledata strnpcinfo(2),2,.@Economy+getcastledata(strnpcinfo(2),4)+(rand(2) && getgdskilllv(getcastledata(strnpcinfo(2),1),10014));
- if (getcastledata(strnpcinfo(2),2) > 100) setcastledata strnpcinfo(2),2,100;
- setcastledata strnpcinfo(2),4,0;
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end;
+ if (!getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) end;
+ killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnTreasureDied";
+ if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)) {
+ .@Economy = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2);
+ setcastledata strnpcinfo(NPC_NAME_HIDDEN),2,.@Economy+getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)+(rand(2) && getgdskilllv(getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1),10014));
+ if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2) > 100) setcastledata strnpcinfo(NPC_NAME_HIDDEN),2,100;
+ setcastledata strnpcinfo(NPC_NAME_HIDDEN),4,0;
}
- if (getcastledata(strnpcinfo(2),5)) {
- .@defence = getcastledata(strnpcinfo(2),3);
- setcastledata strnpcinfo(2),3,.@defence+getcastledata(strnpcinfo(2),5);
- if (getcastledata(strnpcinfo(2),3) > 100) setcastledata strnpcinfo(2),3,100;
- setcastledata strnpcinfo(2),5,0;
+ if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5)) {
+ .@defence = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3);
+ setcastledata strnpcinfo(NPC_NAME_HIDDEN),3,.@defence+getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5);
+ if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3) > 100) setcastledata strnpcinfo(NPC_NAME_HIDDEN),3,100;
+ setcastledata strnpcinfo(NPC_NAME_HIDDEN),5,0;
}
- .@Treasure = getcastledata(strnpcinfo(2),2)/5+4;
+ .@Treasure = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2)/5+4;
if (!.@Treasure) end;
freeloop(1);
- if (compare(strnpcinfo(2),"arug")) {
- if (strnpcinfo(2) == "arug_cas01") {
+ if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") {
.@treasurebox = 1943;
setarray .@treasurex[0],251,252,253,254,255,256,257,258,251,252,253,254,255,256,257,258,251,252,253,254,255,256,257,258;
setarray .@treasurey[0],369,369,369,369,368,368,368,368,367,367,367,367,366,366,366,366,365,365,365,365,364,364,364,364;
}
- else if (strnpcinfo(2) == "arug_cas02") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") {
.@treasurebox = 1944;
setarray .@treasurex[0],382,383,384,385,386,387,384,385,386,387,388,389,382,383,384,385,386,387,384,385,386,387,388,389;
setarray .@treasurey[0],231,231,231,231,231,231,230,230,230,230,230,230,225,225,225,225,225,225,224,224,224,224,224,224;
}
else { // Castles 3,4,5 are identical, except 4's treasure.
- .@treasurebox = (strnpcinfo(2) == "arug_cas04")?1946:1945;
+ .@treasurebox = (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas04")?1946:1945;
setarray .@treasurex[0],291,292,293,294,295,296,293,294,295,296,297,298,291,292,293,294,295,296,293,294,295,296,297,298;
setarray .@treasurey[0],276,276,276,276,276,276,274,274,274,274,274,274,272,272,272,272,272,272,269,269,269,269,269,269;
}
}
else {
- if (strnpcinfo(2) == "schg_cas02") {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") {
.@treasurebox = 1939;
setarray .@treasurex[0],249,250,251,252,253,246,247,248,249,250,250,251,252,253,246,247,248,249,250,249,250,251,252,253;
setarray .@treasurey[0],378,378,378,378,378,376,376,376,376,376,374,374,374,374,372,372,372,372,372,370,370,370,370,370;
}
- else if (strnpcinfo(2) == "schg_cas03") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") {
.@treasurebox = 1940;
setarray .@treasurex[0],189,190,191,192,193,194,189,190,191,192,193,194,189,190,191,192,193,194,189,190,191,192,193,194;
setarray .@treasurey[0], 21, 21, 21, 21, 21, 21, 19, 19, 19, 19, 19, 19, 17, 17, 17, 17, 17, 17, 15, 15, 15, 15, 15, 15;
}
else { // Castles 1,4,5 are identical, except treasures.
- if (strnpcinfo(2) == "schg_cas01") .@treasurebox = 1938;
- else if (strnpcinfo(2) == "schg_cas04") .@treasurebox = 1941;
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas01") .@treasurebox = 1938;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas04") .@treasurebox = 1941;
else .@treasurebox = 1942;
setarray .@treasurex[0],388,388,388,387,386,385,384,384,384,384,384,384,385,386,387,388,389,390,390,390,389,388,387,386;
setarray .@treasurey[0],388,389,390,390,390,390,389,388,387,386,385,384,384,384,384,384,384,384,385,386,386,386,386,386;
}
}
for(.@i = 0; .@i<4; ++.@i)
- monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(0)+"::OnTreasureDied";
+ monster strnpcinfo(NPC_NAME_HIDDEN),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(NPC_NAME)+"::OnTreasureDied";
for(.@i = 4; .@i<24; ++.@i) {
if (.@Treasure < .@i+1) break;
- monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(0)+"::OnTreasureDied";
+ monster strnpcinfo(NPC_NAME_HIDDEN),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(NPC_NAME)+"::OnTreasureDied";
}
freeloop(0);
end;
@@ -220,7 +220,7 @@ OnTreasureDied:
//== Guild Manager =========================================
- script Steward#template FAKE_NPC,{
- .@GID = getcastledata(strnpcinfo(4),1);
+ .@GID = getcastledata(strnpcinfo(NPC_MAP),1);
if (!.@GID) {
mes "[ Steward ]";
mes "I await for the master";
@@ -251,24 +251,24 @@ OnTreasureDied:
case 1:
mes "[ Steward ]";
mes "The Commercial Growth";
- mes "Level of the stronghold is ^0000ff"+getcastledata(strnpcinfo(4),2)+".";
- if (getcastledata(strnpcinfo(4),4) > 0) {
+ mes "Level of the stronghold is ^0000ff"+getcastledata(strnpcinfo(NPC_MAP),2)+".";
+ if (getcastledata(strnpcinfo(NPC_MAP),4) > 0) {
mes "Last time, you invested in";
- mes "Commercial Growth "+getcastledata(strnpcinfo(4),4)+".";
+ mes "Commercial Growth "+getcastledata(strnpcinfo(NPC_MAP),4)+".";
}
next;
mes "[ Steward ]";
mes "Our stronghold's";
- mes "safeguard level is "+getcastledata(strnpcinfo(4),3)+".";
- if (getcastledata(strnpcinfo(4),5) > 0) {
+ mes "safeguard level is "+getcastledata(strnpcinfo(NPC_MAP),3)+".";
+ if (getcastledata(strnpcinfo(NPC_MAP),5) > 0) {
mes "Last time, you invested";
- mes "in defense "+getcastledata(strnpcinfo(4),5)+" times.";
+ mes "in defense "+getcastledata(strnpcinfo(NPC_MAP),5)+" times.";
}
mes " ";
mes "That is all, master.";
close;
case 2:
- .@Economy = getcastledata(strnpcinfo(4),2);
+ .@Economy = getcastledata(strnpcinfo(NPC_MAP),2);
setarray .@cost[0],5000,10000,20000,35000,55000,80000,110000,145000,185000,230000,280000,335000,395000,460000,530000,605000,685000,770000,860000,955000;
.@j = 0;
for(.@i = 6; .@i<101; .@i += 5) {
@@ -279,7 +279,7 @@ OnTreasureDied:
++.@j;
}
// Quadruple the cost of investing if you've already invested once.
- if (getcastledata(strnpcinfo(4),4))
+ if (getcastledata(strnpcinfo(NPC_MAP),4))
.@eco_invest *= 4;
mes "[ Steward ]";
mes "Raising the stronghold's";
@@ -306,7 +306,7 @@ OnTreasureDied:
mes "any further than that.";
close;
}
- if (getcastledata(strnpcinfo(4),4) >= 2) {
+ if (getcastledata(strnpcinfo(NPC_MAP),4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -314,7 +314,7 @@ OnTreasureDied:
mes "to make another investment.";
close;
}
- if (getcastledata(strnpcinfo(4),4) == 0) {
+ if (getcastledata(strnpcinfo(NPC_MAP),4) == 0) {
mes "[ Steward ]";
mes "You must pay ^FF0000"+.@eco_invest+"^000000 Zeny";
mes "to make an investment";
@@ -332,7 +332,7 @@ OnTreasureDied:
next;
switch(select("Invest in Commercial Growth", "Cancel")) {
case 1:
- if (getcastledata(strnpcinfo(4),4) >= 2) {
+ if (getcastledata(strnpcinfo(NPC_MAP),4) >= 2) {
mes "[ Steward ]";
mes "You've already made two";
mes "investments today, so you'll";
@@ -349,7 +349,7 @@ OnTreasureDied:
close;
}
Zeny -= .@eco_invest;
- setcastledata strnpcinfo(4),4,getcastledata(strnpcinfo(4),4)+1;
+ setcastledata strnpcinfo(NPC_MAP),4,getcastledata(strnpcinfo(NPC_MAP),4)+1;
mes "[ Steward ]";
mes "A wise use of the guild's";
mes "funds, Master. We can expect";
@@ -362,7 +362,7 @@ OnTreasureDied:
close;
}
case 3:
- .@defence = getcastledata(strnpcinfo(4),3);
+ .@defence = getcastledata(strnpcinfo(NPC_MAP),3);
setarray .@cost[0],10000,20000,40000,70000,110000,160000,220000,290000,370000,460000,560000,670000,790000,920000,1060000,1210000,1370000,1540000,1720000,1910000;
.@j = 0;
for(.@i = 6; .@i<101; .@i += 5) {
@@ -373,7 +373,7 @@ OnTreasureDied:
++.@j;
}
// Quadruple the cost of investing if you've already invested once.
- if (getcastledata(strnpcinfo(4),5))
+ if (getcastledata(strnpcinfo(NPC_MAP),5))
.@def_invest *= 4;
mes "[ Steward ]";
mes "Investing in our stronghold's";
@@ -390,13 +390,13 @@ OnTreasureDied:
mes "a maximum of two times daily.";
next;
mes "[ Steward ]";
- if (getcastledata(strnpcinfo(4),3) == 100) {
+ if (getcastledata(strnpcinfo(NPC_MAP),3) == 100) {
mes "The Defense Level of this";
mes "stronghold is 100%, and";
mes "cannot be increased further.";
close;
}
- if (getcastledata(strnpcinfo(4),5) >= 2) {
+ if (getcastledata(strnpcinfo(NPC_MAP),5) >= 2) {
mes "Master, you've already";
mes "invested in Defense twice";
mes "today. You'll need to wait";
@@ -404,7 +404,7 @@ OnTreasureDied:
mes "want to increase our defenses.";
close;
}
- if (getcastledata(strnpcinfo(4),5) == 0) {
+ if (getcastledata(strnpcinfo(NPC_MAP),5) == 0) {
mes "We need ^FF0000"+.@def_invest+"^000000";
mes "Zeny to invest in our";
mes "stronghold's defenses.";
@@ -420,7 +420,7 @@ OnTreasureDied:
next;
switch(select("Invest in Defense", "Cancel")) {
case 1:
- if (getcastledata(strnpcinfo(4),5) >= 2) {
+ if (getcastledata(strnpcinfo(NPC_MAP),5) >= 2) {
mes "[ Steward ]";
mes "Master, you've already";
mes "invested in Defense twice";
@@ -438,7 +438,7 @@ OnTreasureDied:
close;
}
Zeny -= .@def_invest;
- setcastledata strnpcinfo(4),5,getcastledata(strnpcinfo(4),5)+1;
+ setcastledata strnpcinfo(NPC_MAP),5,getcastledata(strnpcinfo(NPC_MAP),5)+1;
mes "[ Steward ]";
mes "A wise use of the guild's";
mes "funds, Master. Increasing";
@@ -452,7 +452,7 @@ OnTreasureDied:
close;
}
case 4:
- if (getcastledata(strnpcinfo(4),9) == 1) {
+ if (getcastledata(strnpcinfo(NPC_MAP),9) == 1) {
mes "[ Steward ]";
mes "Do you wish to dismiss";
mes "the Kafra Employee that";
@@ -494,8 +494,8 @@ OnTreasureDied:
mes "allow her to stay with us.";
close;
}
- disablenpc "Kafra Employee#"+strnpcinfo(2);
- setcastledata strnpcinfo(4),9,0;
+ disablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN);
+ setcastledata strnpcinfo(NPC_MAP),9,0;
mes "[ Steward ]";
mes "That Kafra Employee";
mes "has been dismissed.";
@@ -530,8 +530,8 @@ OnTreasureDied:
close;
}
Zeny -= 10000;
- enablenpc "Kafra Employee#"+strnpcinfo(2);
- setcastledata strnpcinfo(4),9,1;
+ enablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN);
+ setcastledata strnpcinfo(NPC_MAP),9,1;
mes "[ Steward ]";
mes "Very well. We have formed";
mes "a contract with the Kafra";
@@ -590,17 +590,17 @@ OnTreasureDied:
mes "Press the secret switch";
mes "when you wish to return here.";
close2;
- if (compare(strnpcinfo(4),"arug")) {
- if (strnpcinfo(4) == "arug_cas01") setarray .@i[0],250,363;
- else if (strnpcinfo(4) == "arug_cas02") setarray .@i[0],382,227;
+ if (compare(strnpcinfo(NPC_MAP),"arug")) {
+ if (strnpcinfo(NPC_MAP) == "arug_cas01") setarray .@i[0],250,363;
+ else if (strnpcinfo(NPC_MAP) == "arug_cas02") setarray .@i[0],382,227;
else setarray .@i[0],292,266; // Castles 3,4,5 are identical.
}
else {
- if (strnpcinfo(4) == "schg_cas02") setarray .@i[0],249,373;
- else if (strnpcinfo(4) == "schg_cas03") setarray .@i[0],190,16;
+ if (strnpcinfo(NPC_MAP) == "schg_cas02") setarray .@i[0],249,373;
+ else if (strnpcinfo(NPC_MAP) == "schg_cas03") setarray .@i[0],190,16;
else setarray .@i[0],381,381; // Castles 1,4,5 are identical.
}
- warp strnpcinfo(4),.@i[0],.@i[1];
+ warp strnpcinfo(NPC_MAP),.@i[0],.@i[1];
end;
case 2:
mes "[ Steward ]";
@@ -615,46 +615,46 @@ OnTreasureDied:
}
OnStop:
- awake strnpcinfo(0);
+ awake strnpcinfo(NPC_NAME);
end;
OnStartArena:
.@GID = getcharid(2);
- .@region$ = (compare(strnpcinfo(4),"arug"))?"Valfreyja":"Nithafjoll";
+ .@region$ = (compare(strnpcinfo(NPC_MAP),"arug"))?"Valfreyja":"Nithafjoll";
// Lower castle Economy
- .@Economy = getcastledata(strnpcinfo(4),2)-5;
+ .@Economy = getcastledata(strnpcinfo(NPC_MAP),2)-5;
if (.@Economy < 0) .@Economy = 0;
- setcastledata strnpcinfo(4),2,.@Economy;
+ setcastledata strnpcinfo(NPC_MAP),2,.@Economy;
// Lower Castle Defence
- .@defence = getcastledata(strnpcinfo(4),3)-5;
+ .@defence = getcastledata(strnpcinfo(NPC_MAP),3)-5;
if (.@defence < 0) .@defence = 0;
- setcastledata strnpcinfo(4),3,.@defence;
+ setcastledata strnpcinfo(NPC_MAP),3,.@defence;
// Set new owner
- setcastledata strnpcinfo(4),1,.@GID;
+ setcastledata strnpcinfo(NPC_MAP),1,.@GID;
// Clear castle's data.
for(.@i = 4; .@i<10; ++.@i)
- setcastledata strnpcinfo(4),.@i,0;
+ setcastledata strnpcinfo(NPC_MAP),.@i,0;
// Disable Kafra
- disablenpc "Kafra Employee#"+strnpcinfo(2);
+ disablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN);
- announce "The ["+getguildname(.@GID)+"] guild conquered the ["+.@region$+" "+charat(strnpcinfo(2),3)+"] stronghold of "+getcastlename(strnpcinfo(4))+"!",bc_all|bc_woe;
- mapannounce strnpcinfo(4),"The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
- donpcevent "Manager#"+strnpcinfo(4)+"::OnReset";
- maprespawnguildid strnpcinfo(4),getcastledata(strnpcinfo(4),1),2;
- donpcevent "Manager#"+strnpcinfo(4)+"::OnRecvCastle2";
- donpcevent "::OnRecvCastle"+ strtoupper( substr( strnpcinfo(2), 0, 0 ) ) + substr( strnpcinfo(2), 1, getstrlen( strnpcinfo(2) ) -1 );
+ announce "The ["+getguildname(.@GID)+"] guild conquered the ["+.@region$+" "+charat(strnpcinfo(NPC_NAME_HIDDEN),3)+"] stronghold of "+getcastlename(strnpcinfo(NPC_MAP))+"!",bc_all|bc_woe;
+ mapannounce strnpcinfo(NPC_MAP),"The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
+ donpcevent "Manager#"+strnpcinfo(NPC_MAP)+"::OnReset";
+ maprespawnguildid strnpcinfo(NPC_MAP),getcastledata(strnpcinfo(NPC_MAP),1),2;
+ donpcevent "Manager#"+strnpcinfo(NPC_MAP)+"::OnRecvCastle2";
+ donpcevent "::OnRecvCastle"+ strtoupper( substr( strnpcinfo(NPC_NAME_HIDDEN), 0, 0 ) ) + substr( strnpcinfo(NPC_NAME_HIDDEN), 1, getstrlen( strnpcinfo(NPC_NAME_HIDDEN) ) -1 );
sleep 10000;
if (agitcheck2()) {
- donpcevent "Manager#"+strnpcinfo(4)+"::OnChange";
- mapannounce strnpcinfo(4),"Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
+ donpcevent "Manager#"+strnpcinfo(NPC_MAP)+"::OnChange";
+ mapannounce strnpcinfo(NPC_MAP),"Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
}
end;
}
//== Castle Guardians ======================================
- script Guardian#template FAKE_NPC,{
- .@GID = getcastledata(strnpcinfo(4),1);
- .@n$ = "["+strnpcinfo(1)+"]";
+ .@GID = getcastledata(strnpcinfo(NPC_MAP),1);
+ .@n$ = "["+strnpcinfo(NPC_NAME_VISIBLE)+"]";
if (!.@GID) {
mes .@n$;
mes "Great job. Now, all you";
@@ -675,7 +675,7 @@ OnStartArena:
else {
if (!agitcheck2()) {
mes .@n$;
- mes "I am "+strnpcinfo(1)+", guardian of";
+ mes "I am "+strnpcinfo(NPC_NAME_VISIBLE)+", guardian of";
mes "this stronghold. For now,";
mes "all is quiet in this place.";
next;
@@ -786,7 +786,7 @@ OnStartArena:
next;
switch(select("Increase Stronghold Defense", "Situational Briefing", "Cancel")) {
case 1:
- if (!getd("$agit_"+strnpcinfo(2)+"[5]")) {
+ if (!getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[5]")) {
if (getgdskilllv(.@GID,10002) == 0) {
mes .@n$;
mes "I'm sorry, but the Guardian";
@@ -804,11 +804,11 @@ OnStartArena:
mes "Stone. However, keep in mind";
mes "that this will not work if the";
mes "Guardian Stone is destroyed.";
- setd "$agit_"+strnpcinfo(2)+"[5]",1;
- if (!getd("$agit_"+strnpcinfo(2)+"[0]"))
- donpcevent "gard1#"+strnpcinfo(4)+"::OnEnable";
- if (!getd("$agit_"+strnpcinfo(2)+"[1]"))
- donpcevent "gard2#"+strnpcinfo(4)+"::OnEnable";
+ setd "$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[5]",1;
+ if (!getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"))
+ donpcevent "gard1#"+strnpcinfo(NPC_MAP)+"::OnEnable";
+ if (!getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[1]"))
+ donpcevent "gard2#"+strnpcinfo(NPC_MAP)+"::OnEnable";
close;
}
}
@@ -823,11 +823,11 @@ OnStartArena:
mes .@n$;
mes "Our defense status is...";
setarray .@status$[0],"^4D4DFFOperational","^FF0000Destroyed","^008000Repairing";
- mes "1st Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[0]")]+"^000000";
- mes "2nd Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[1]")]+"^000000";
- mes "1st Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[2]")]+"^000000";
- mes "2nd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[3]")]+"^000000";
- mes "3rd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(2)+"[4]")]+"^000000";
+ mes "1st Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]")]+"^000000";
+ mes "2nd Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[1]")]+"^000000";
+ mes "1st Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[2]")]+"^000000";
+ mes "2nd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[3]")]+"^000000";
+ mes "3rd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[4]")]+"^000000";
close;
case 3:
mes .@n$;
@@ -846,14 +846,14 @@ OnStartArena:
}
OnInit:
- setarray getd("$agit_"+strnpcinfo(2)+"[0]"),0,0,0,0,0,0;
+ setarray getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),0,0,0,0,0,0;
end;
}
//== Guild Kafras ==========================================
- script Kafra#template FAKE_NPC,{
cutin "kafra_01",2;
- .@GID = getcastledata(strnpcinfo(4),1);
+ .@GID = getcastledata(strnpcinfo(NPC_MAP),1);
if (getcharid(2) == .@GID && getgdskilllv(.@GID,10001)) {
mes "[Kafra Employee]";
mes "Welcome, proud member";
@@ -964,9 +964,9 @@ OnInit:
//== Guardian Stones (2) ===================================
- script Guardian Stone#template FAKE_NPC,{
- .@GID = getcastledata(strnpcinfo(4),1);
- .@num = atoi(charat(strnpcinfo(1),0));
- .@var$ = "$agit_"+strnpcinfo(2);
+ .@GID = getcastledata(strnpcinfo(NPC_MAP),1);
+ .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),0));
+ .@var$ = "$agit_"+strnpcinfo(NPC_NAME_HIDDEN);
if (getcharid(2) == .@GID) {
mes "^3355FFYou will need the";
mes "following materials to";
@@ -1067,18 +1067,18 @@ OnInit:
delitem Yellow_Gemstone,5;
delitem Red_Gemstone,5;
close2;
- donpcevent "df"+.@num+"#"+strnpcinfo(4)+"::OnEnable";
+ donpcevent "df"+.@num+"#"+strnpcinfo(NPC_MAP)+"::OnEnable";
specialeffect EF_ICECRASH;
- disablenpc strnpcinfo(0);
+ disablenpc strnpcinfo(NPC_NAME);
setd .@var$+"["+(.@num-1)+"]",0;
.@df_all = getd(.@var$+"[0]")+getd(.@var$+"[1]");
if (!.@df_all) {
- mapannounce strnpcinfo(4),"Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
- donpcevent "RL0#"+strnpcinfo(4)+"::OnEnable";
+ mapannounce strnpcinfo(NPC_MAP),"Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00";
+ donpcevent "RL0#"+strnpcinfo(NPC_MAP)+"::OnEnable";
}
- else mapannounce strnpcinfo(4),"The "+strnpcinfo(1)+" has been repaired successfully.",bc_map,"0x00ff00";
+ else mapannounce strnpcinfo(NPC_MAP),"The "+strnpcinfo(NPC_NAME_VISIBLE)+" has been repaired successfully.",bc_map,"0x00ff00";
if (getd(.@var$+"[5]") == 1)
- donpcevent "gard"+.@num+"#"+strnpcinfo(4)+"::OnEnable";
+ donpcevent "gard"+.@num+"#"+strnpcinfo(NPC_MAP)+"::OnEnable";
end;
}
}
@@ -1106,20 +1106,20 @@ OnInit:
OnInit:
OnDisable:
- disablenpc strnpcinfo(0);
+ disablenpc strnpcinfo(NPC_NAME);
end;
OnEnable:
- enablenpc strnpcinfo(0);
+ enablenpc strnpcinfo(NPC_NAME);
specialeffect EF_MAPPILLAR2;
end;
}
//== Control Devices (3) ===================================
- script Control#template FAKE_NPC,{
- .@GID = getcastledata(strnpcinfo(4),1);
- .@num = atoi(charat(strnpcinfo(1),15));
- .@var$ = "$agit_"+strnpcinfo(2);
+ .@GID = getcastledata(strnpcinfo(NPC_MAP),1);
+ .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),15));
+ .@var$ = "$agit_"+strnpcinfo(NPC_NAME_HIDDEN);
if (getcharid(2) == .@GID) {
if (strcharinfo(0) == getguildmaster(.@GID)) {
if (getd(.@var$+"["+(.@num+1)+"]") == 2) {
@@ -1309,16 +1309,16 @@ OnEnable:
delitem Emveretarcon,10;
delitem Oridecon,5;
close2;
- donpcevent "RL"+.@num+"#"+strnpcinfo(4)+"::OnEnable";
- disablenpc strnpcinfo(0);
+ donpcevent "RL"+.@num+"#"+strnpcinfo(NPC_MAP)+"::OnEnable";
+ disablenpc strnpcinfo(NPC_NAME);
if (.@num == 1) .@str$ = "1st";
else if (.@num == 2) .@str$ = "2nd";
else if (.@num == 3) .@str$ = "3rd";
- mapannounce strnpcinfo(4),"The "+.@str$+" Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
+ mapannounce strnpcinfo(NPC_MAP),"The "+.@str$+" Fortress Gate has been reconstructed!",bc_map,"0x00ff00";
if (.@num == 1) setd .@var$+"[2]",0;
else {
setarray getd(.@var$+"["+.@num+"]"),2,0;
- donpcevent "Control Device0"+(.@num-1)+"#"+strnpcinfo(2)+"::OnEnable";
+ donpcevent "Control Device0"+(.@num-1)+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnEnable";
}
end;
}
@@ -1349,11 +1349,11 @@ OnEnable:
OnInit:
OnDisable:
- disablenpc strnpcinfo(0);
+ disablenpc strnpcinfo(NPC_NAME);
end;
OnEnable:
- enablenpc strnpcinfo(0);
+ enablenpc strnpcinfo(NPC_NAME);
end;
}
@@ -1362,13 +1362,13 @@ OnEnable:
OnEnable:
// .@x[i],.@y[i]: Normal coordinates, #0-21.
// .@w[x],.@w[y]: Special coordinates if 'defence' is under 11.
- if (compare(strnpcinfo(2),"arug")) {
- if (strnpcinfo(2) == "arug_cas01") {
+ if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") {
setarray .@w[0],195,250,292,188;
setarray .x[0],233,252,232,201,224,196,269,252,201,224,222, 294,256,240,246,235,235,246,240,256,254,242;
setarray .y[0], 83, 81,108,130,168,137, 89, 81,130,168,129, 210,203,133, 92,132,132, 92,133,203, 95,151;
}
- else if (strnpcinfo(2) == "arug_cas02") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") {
setarray .@w[0],20,169,268,169;
setarray .x[0],104,67,67,113,122,67, 90, 91,122, 20,67, 175,204,211,209,161,186,183,150,161,209,211;
setarray .y[0], 32,36,85, 87,112,60,167,119,112,169,85, 31, 32, 63, 88, 91,170,121,110, 91, 88, 63;
@@ -1380,12 +1380,12 @@ OnEnable:
}
}
else {
- if (strnpcinfo(2) == "schg_cas02") {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") {
setarray .@w[0],337,95,307,222;
setarray .x[0],326,337,334,296,285,236,285,296,334,337,334, 359,300,337,317,307,300,337,317,307,359,236;
setarray .y[0], 83, 95,119, 82, 40, 41, 40, 82,119, 95,119, 85,119,154,183,222,119,154,183,222, 85, 41;
}
- else if (strnpcinfo(2) == "schg_cas03") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") {
setarray .@w[0],306,325,364,305;
setarray .x[0],323,273,288,306,323,323,273,288,306,273,273, 338,364,365,317,338,338,364,365,317,364,329;
setarray .y[0],308,309,306,326,308,308,309,306,325,309,309, 309,305,261,318,310,309,305,261,318,305,314;
@@ -1396,28 +1396,28 @@ OnEnable:
setarray .y[0], 18, 44,22, 40,20,40,43, 48, 18, 32, 37, 22, 47, 18, 15, 42, 43, 15, 42, 22, 28, 18;
}
}
- if (charat(strnpcinfo(1),4) == "2")
+ if (charat(strnpcinfo(NPC_NAME_VISIBLE),4) == "2")
.@z = 11;
freeloop(1);
- .@defence = getcastledata(strnpcinfo(2),3);
+ .@defence = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3);
callsub OnSummon,.@z;
- if (.@defence > 70) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),5;
- else if (.@defence > 50) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),4;
- else if (.@defence > 30) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),3;
- else if (.@defence > 10) set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),2;
+ if (.@defence > 70) set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),5;
+ else if (.@defence > 50) set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),4;
+ else if (.@defence > 30) set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),3;
+ else if (.@defence > 10) set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),2;
if (.@w[4] && .@z)
- guardian strnpcinfo(2),.@w[4],.@w[5],"Guardian Soldier",1899,strnpcinfo(0)+"::OnGuardianDied";
+ guardian strnpcinfo(NPC_NAME_HIDDEN),.@w[4],.@w[5],"Guardian Soldier",1899,strnpcinfo(NPC_NAME)+"::OnGuardianDied";
else if (.@defence < 11) {
- set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),2;
+ set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),2;
.@i = (.@z)?2:0;
- guardian strnpcinfo(2),.@w[.@i],.@w[.@i+1],"Guardian Soldier",1899,strnpcinfo(0)+"::OnGuardianDied";
+ guardian strnpcinfo(NPC_NAME_HIDDEN),.@w[.@i],.@w[.@i+1],"Guardian Soldier",1899,strnpcinfo(NPC_NAME)+"::OnGuardianDied";
}
- else for(.@i = 1; .@i<getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)); ++.@i)
+ else for(.@i = 1; .@i<getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)); ++.@i)
callsub OnSummon,.@i+.@z;
freeloop(0);
- copyarray getd(".x_"+strnpcinfo(2)+"[0]"),.@x[0],22;
- copyarray getd(".y_"+strnpcinfo(2)+"[0]"),.@y[0],22;
- setd ".timer_"+charat(strnpcinfo(1),4)+strnpcinfo(2),4+.@z;
+ copyarray getd(".x_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),.@x[0],22;
+ copyarray getd(".y_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),.@y[0],22;
+ setd ".timer_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN),4+.@z;
setarray .count$[5],"1st","2nd","3rd","4th","5th";
initnpctimer;
end;
@@ -1427,13 +1427,13 @@ OnTimer900000:
OnTimer1800000:
OnTimer2700000:
OnTimer3600000:
- if (charat(strnpcinfo(1),4) == "2") end;
- .@var$ = ".timer_"+charat(strnpcinfo(1),4)+strnpcinfo(2);
+ if (charat(strnpcinfo(NPC_NAME_VISIBLE),4) == "2") end;
+ .@var$ = ".timer_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN);
setd .@var$, getd(.@var$)+1;
- set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2))+1;
+ set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN))+1;
callsub OnSummon,getd(.@var$);
setarray .count$[5],"1st","2nd","3rd","4th","5th";
- mapannounce strnpcinfo(2),"The "+.count$[getd(.@var$)]+" Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
+ mapannounce strnpcinfo(NPC_NAME_HIDDEN),"The "+.count$[getd(.@var$)]+" Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
if (getd(.@var$) == 9) {
setd .@var$,0;
stopnpctimer;
@@ -1445,10 +1445,10 @@ OnTimer1200000:
OnTimer2100000:
OnTimer3000000:
OnTimer3900000:
- if (!(charat(strnpcinfo(1),4) == "2")) end;
- .@var$ = ".timer_"+charat(strnpcinfo(1),4)+strnpcinfo(2);
+ if (!(charat(strnpcinfo(NPC_NAME_VISIBLE),4) == "2")) end;
+ .@var$ = ".timer_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN);
setd .@var$, getd(.@var$)+1;
- set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2))+1;
+ set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN))+1;
callsub OnSummon,getd(.@var$);
if (getd(.@var$) == 20) {
setd .@var$,0;
@@ -1457,54 +1457,54 @@ OnTimer3900000:
end;
OnSummon:
- guardian strnpcinfo(2),getd(".x_"+strnpcinfo(2)+"["+getarg(0)+"]"),getd(".y_"+strnpcinfo(2)+"["+getarg(0)+"]"),"Guardian Soldier",1899,strnpcinfo(0)+"::OnGuardianDied";
+ guardian strnpcinfo(NPC_NAME_HIDDEN),getd(".x_"+strnpcinfo(NPC_NAME_HIDDEN)+"["+getarg(0)+"]"),getd(".y_"+strnpcinfo(NPC_NAME_HIDDEN)+"["+getarg(0)+"]"),"Guardian Soldier",1899,strnpcinfo(NPC_NAME)+"::OnGuardianDied";
return;
OnGuardianDied:
- if (charat(strnpcinfo(1),4) == "2")
+ if (charat(strnpcinfo(NPC_NAME_VISIBLE),4) == "2")
.@z = 11;
- set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2))-1;
- if (getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)) < 2) {
- set getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2)),getd(".MyMobCount_"+charat(strnpcinfo(1),4)+strnpcinfo(2))+1;
+ set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN))-1;
+ if (getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)) < 2) {
+ set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN))+1;
callsub OnSummon,10+.@z;
}
end;
OnReset:
stopnpctimer;
- killmonster strnpcinfo(2),strnpcinfo(0)+"::OnGuardianDied";
- deletearray getd(".x_"+strnpcinfo(2)+"[0]"),22;
- deletearray getd(".y_"+strnpcinfo(2)+"[0]"),22;
+ killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnGuardianDied";
+ deletearray getd(".x_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),22;
+ deletearray getd(".y_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),22;
end;
}
//== Guardian Stone Summoners (2) ==========================
- script df#template FAKE_NPC,{
OnEnable:
- if (compare(strnpcinfo(2),"arug")) {
- if (strnpcinfo(2) == "arug_cas01") setarray .@i[0],210,234,308,189;
- else if (strnpcinfo(2) == "arug_cas02") setarray .@i[0],33,168,245,168;
+ if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") setarray .@i[0],210,234,308,189;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") setarray .@i[0],33,168,245,168;
else setarray .@i[0],65,171,212,149; // Castles 3,4,5 are identical.
}
else {
- if (strnpcinfo(2) == "schg_cas02") setarray .@i[0],231,58,335,230;
- else if (strnpcinfo(2) == "schg_cas03") setarray .@i[0],242,309,376,251;
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") setarray .@i[0],231,58,335,230;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") setarray .@i[0],242,309,376,251;
else setarray .@i[0],27,35,207,75; // Castles 1,4,5 are identical.
}
- .@num = atoi(charat(strnpcinfo(1),2));
+ .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2));
.@j = (.@num == 1)?0:2;
- guardian strnpcinfo(2),.@i[.@j],.@i[.@j+1],((.@num == 1)?"1st":"2nd")+" Guardian Stone",1906+.@num,strnpcinfo(0)+"::OnGuardianStoneDied";
+ guardian strnpcinfo(NPC_NAME_HIDDEN),.@i[.@j],.@i[.@j+1],((.@num == 1)?"1st":"2nd")+" Guardian Stone",1906+.@num,strnpcinfo(NPC_NAME)+"::OnGuardianStoneDied";
end;
OnDisable:
- killmonster strnpcinfo(2),strnpcinfo(0)+"::OnGuardianStoneDied";
- setd "$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"["+(atoi(charat(strnpcinfo(1),2))-1)+"]",1;
+ killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnGuardianStoneDied";
+ setd "$agit_"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"["+(atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2))-1)+"]",1;
stopnpctimer;
end;
OnGuardianStoneDied:
- .@num = atoi(charat(strnpcinfo(1),2));
- .@var$ = "$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
+ .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2));
+ .@var$ = "$agit_"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
setd .@var$+"["+(.@num-1)+"]",1;
if (getd(.@var$+"[0]") == 1 || getd(.@var$+"[0]") == 2) {
++.@destroyed;
@@ -1513,19 +1513,19 @@ OnGuardianStoneDied:
++.@destroyed;
}
if (.@destroyed == 2) {
- mapannounce strnpcinfo(2),"All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
- donpcevent "RL0#"+strnpcinfo(2)+"::OnDisable";
+ mapannounce strnpcinfo(NPC_NAME_HIDDEN),"All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
+ donpcevent "RL0#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable";
}
- else mapannounce strnpcinfo(2),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed!",bc_map,"0x00ff00";
- donpcevent "gard"+.@num+"#"+strnpcinfo(2)+"::OnReset";
+ else mapannounce strnpcinfo(NPC_NAME_HIDDEN),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed!",bc_map,"0x00ff00";
+ donpcevent "gard"+.@num+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnReset";
initnpctimer;
end;
OnTimer300000:
- .@num = atoi(charat(strnpcinfo(1),2));
- .@str$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
+ .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2));
+ .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
donpcevent ((.@num == 1)?"1st":"2nd")+" Guardian Stone#"+.@str$+"::OnEnable";
- setd "$agit_"+.@str$+"["+(atoi(charat(strnpcinfo(1),2))-1)+"]",2;
+ setd "$agit_"+.@str$+"["+(atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2))-1)+"]",2;
stopnpctimer;
end;
}
@@ -1533,15 +1533,15 @@ OnTimer300000:
//== Barrier Summoners (4) =================================
- script RL#template FAKE_NPC,{
OnEnable:
- .@num = atoi(charat(strnpcinfo(1),2));
+ .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2));
if (.@num == 0) {
- if (compare(strnpcinfo(2),"arug")) {
- if (strnpcinfo(2) == "arug_cas01") {
+ if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") {
setarray .@wall[0],238,74,8,6,0;
setarray .@x[0],239,241,243,245;
setarray .@y[0], 73, 73, 73, 73;
}
- else if (strnpcinfo(2) == "arug_cas02") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") {
setarray .@wall[0],136,136,8,6,0;
setarray .@x[0],137,139,141,143;
setarray .@y[0],137,137,137,137;
@@ -1553,12 +1553,12 @@ OnEnable:
}
}
else {
- if (strnpcinfo(2) == "schg_cas02") {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") {
setarray .@wall[0],290,98,8,0,0;
setarray .@x[0],289,289,289,289;
setarray .@y[0], 98,100,102,104;
}
- else if (strnpcinfo(2) == "schg_cas03") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") {
setarray .@wall[0],326,301,6,6,0;
setarray .@x[0],326,328,330;
setarray .@y[0],300,300,300;
@@ -1571,13 +1571,13 @@ OnEnable:
}
}
else if (.@num == 1) {
- if (compare(strnpcinfo(2),"arug")) {
- if (strnpcinfo(2) == "arug_cas01") {
+ if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") {
setarray .@wall[0],239,53,8,6,1;
setarray .@x[0],239,241,243,240,242,244;
setarray .@y[0], 55, 55, 55, 54, 54, 54;
}
- else if (strnpcinfo(2) == "arug_cas02") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") {
setarray .@wall[0],150,223,12,6,1;
setarray .@x[0],151,153,155,157,159,161;
setarray .@y[0],222,222,222,222,222,222;
@@ -1589,12 +1589,12 @@ OnEnable:
}
}
else {
- if (strnpcinfo(2) == "schg_cas02") {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") {
setarray .@wall[0],279,98,8,0,1;
setarray .@x[0],280,280,280,281,281,281;
setarray .@y[0], 98,100,102, 99,101,103;
}
- else if (strnpcinfo(2) == "schg_cas03") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") {
setarray .@wall[0],325,277,8,6,1;
setarray .@x[0],326,328,330,327,329,331;
setarray .@y[0],278,278,278,279,279,279;
@@ -1607,13 +1607,13 @@ OnEnable:
}
}
else if (.@num == 2) {
- if (compare(strnpcinfo(2),"arug")) {
- if (strnpcinfo(2) == "arug_cas01") {
+ if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") {
setarray .@wall[0],107,124,6,6,1;
setarray .@x[0],107,109,111,108,110,112;
setarray .@y[0],122,122,122,123,123,123;
}
- else if (strnpcinfo(2) == "arug_cas02") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") {
setarray .@wall[0],125,342,8,0,1;
setarray .@x[0],126,126,126,127,127,127;
setarray .@y[0],343,345,347,344,346,348;
@@ -1625,12 +1625,12 @@ OnEnable:
}
}
else {
- if (strnpcinfo(2) == "schg_cas02") {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") {
setarray .@wall[0],230,213,6,0,1;
setarray .@x[0],231,231,231,232,232,232;
setarray .@y[0],213,215,217,213,215,217;
}
- else if (strnpcinfo(2) == "schg_cas03") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") {
setarray .@wall[0],200,230,8,0,1;
setarray .@x[0],201,201,201,202,202,202;
setarray .@y[0],231,233,235,232,234,236;
@@ -1643,13 +1643,13 @@ OnEnable:
}
}
else {
- if (compare(strnpcinfo(2),"arug")) {
- if (strnpcinfo(2) == "arug_cas01") {
+ if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") {
setarray .@wall[0],84,171,8,6,1;
setarray .@x[0], 84, 86, 88, 90;
setarray .@y[0],170,170,170,170;
}
- else if (strnpcinfo(2) == "arug_cas02") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") {
setarray .@wall[0],38,314,12,6,1;
setarray .@x[0], 40, 42, 44, 46;
setarray .@y[0],315,315,315,315;
@@ -1661,12 +1661,12 @@ OnEnable:
}
}
else {
- if (strnpcinfo(2) == "schg_cas02") {
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") {
setarray .@wall[0],160,141,6,6,1;
setarray .@x[0],160,162,164,166;
setarray .@y[0],140,140,140,140;
}
- else if (strnpcinfo(2) == "schg_cas03") {
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") {
setarray .@wall[0],285,198,8,0,1;
setarray .@x[0],284,284,284,284;
setarray .@y[0],199,201,203,205;
@@ -1678,36 +1678,36 @@ OnEnable:
}
}
}
- if (.@num == 3) set getd(".MyMobCount_"+.@num+strnpcinfo(2)),4;
- else if (.@num) set getd(".MyMobCount_"+.@num+strnpcinfo(2)),6;
- setwall strnpcinfo(2),.@wall[0],.@wall[1],.@wall[2],.@wall[3],.@wall[4],substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"_"+strnpcinfo(1);
- .@j = (getd(".MyMobCount_"+.@num+strnpcinfo(2)))?getd(".MyMobCount_"+.@num+strnpcinfo(2)):getarraysize(.@x);
+ if (.@num == 3) set getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)),4;
+ else if (.@num) set getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)),6;
+ setwall strnpcinfo(NPC_NAME_HIDDEN),.@wall[0],.@wall[1],.@wall[2],.@wall[3],.@wall[4],substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"_"+strnpcinfo(NPC_NAME_VISIBLE);
+ .@j = (getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)))?getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)):getarraysize(.@x);
for (.@i = 0; .@i<.@j; ++.@i)
- guardian strnpcinfo(2),.@x[.@i],.@y[.@i]," ",1905,strnpcinfo(0)+"::OnBarrierDestroyed";
+ guardian strnpcinfo(NPC_NAME_HIDDEN),.@x[.@i],.@y[.@i]," ",1905,strnpcinfo(NPC_NAME)+"::OnBarrierDestroyed";
end;
OnBarrierDestroyed:
- .@num = atoi(charat(strnpcinfo(1),2));
+ .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2));
if (!.@num) end;
- set getd(".MyMobCount_"+.@num+strnpcinfo(2)),getd(".MyMobCount_"+.@num+strnpcinfo(2))-1;
- if (getd(".MyMobCount_"+.@num+strnpcinfo(2)) == 0) {
- .@var$ = substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
+ set getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN))-1;
+ if (getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)) == 0) {
+ .@var$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9);
setd "$agit_"+.@var$+"["+(.@num+1)+"]",1;
setarray .@count$[0],"1st","2nd","3rd";
- mapannounce strnpcinfo(2),"The "+.@count$[.@num-1]+" Fortress Gate is destroyed.",bc_map,"0x00ff00";
- delwall .@var$+"_"+strnpcinfo(1);
+ mapannounce strnpcinfo(NPC_NAME_HIDDEN),"The "+.@count$[.@num-1]+" Fortress Gate is destroyed.",bc_map,"0x00ff00";
+ delwall .@var$+"_"+strnpcinfo(NPC_NAME_VISIBLE);
}
end;
OnDisable:
- delwall substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"_"+strnpcinfo(1);
- killmonster strnpcinfo(2),strnpcinfo(0)+"::OnBarrierDestroyed";
+ delwall substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"_"+strnpcinfo(NPC_NAME_VISIBLE);
+ killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnBarrierDestroyed";
end;
}
//== Link Flags (function) =================================
function script LinkFlag {
- if (!getcharid(2) || getcharid(2) != getcastledata(strnpcinfo(4),1)) end;
+ if (!getcharid(2) || getcharid(2) != getcastledata(strnpcinfo(NPC_MAP),1)) end;
if (getarg(0) == "Convenience Facility") {
mes "^3355FFThis is the Stronghold";
mes "Teleport Service. Would";
@@ -1715,7 +1715,7 @@ function script LinkFlag {
mes "Convenience Facility for";
mes "guild members?^000000";
if(select("Go to Convenience Facility", "Cancel") == 1)
- warp strnpcinfo(4),getarg(1),getarg(2);
+ warp strnpcinfo(NPC_MAP),getarg(1),getarg(2);
close;
}
if (getarg(0) == "Emperium Center") {
@@ -1724,7 +1724,7 @@ function script LinkFlag {
mes "you like to teleport to";
mes "the Emperium Center?^000000";
if(select("Teleport", "Cancel") == 1)
- warp strnpcinfo(4),getarg(1),getarg(2);
+ warp strnpcinfo(NPC_MAP),getarg(1),getarg(2);
close;
}
mes "^3355FFThis is the Stronghold";
@@ -1736,13 +1736,13 @@ function script LinkFlag {
.@menu$ += "Cancel";
.@i = select(.@menu$)-1;
if (.@i != getargcount()/3)
- warp strnpcinfo(4),getarg(.@i*3+1),getarg(.@i*3+2);
+ warp strnpcinfo(NPC_MAP),getarg(.@i*3+1),getarg(.@i*3+2);
close;
}
//== Return Flags (function) ===============================
function script ReturnFlag {
- .@str$ = (compare(strnpcinfo(4),"aru"))?"Arunafeltz":"Schwaltzvalt";
+ .@str$ = (compare(strnpcinfo(NPC_MAP),"aru"))?"Arunafeltz":"Schwaltzvalt";
.@GID = getcastledata(getarg(0),1);
if (!.@GID) {
mes "[ "+.@str$+" Royal Edict ]";
@@ -1798,28 +1798,28 @@ function script ReturnFlag {
mes "this small lever?^000000";
next;
if(select("Pull Lever", "Cancel") == 2) close;
- if (compare(strnpcinfo(4),"arug")) {
- if (strnpcinfo(4) == "arug_cas01") setarray .@i[0],121,357;
- else if (strnpcinfo(4) == "arug_cas02") setarray .@i[0],387,323;
+ if (compare(strnpcinfo(NPC_MAP),"arug")) {
+ if (strnpcinfo(NPC_MAP) == "arug_cas01") setarray .@i[0],121,357;
+ else if (strnpcinfo(NPC_MAP) == "arug_cas02") setarray .@i[0],387,323;
else setarray .@i[0],321,57; // Castles 3,4,5 are identical.
}
else {
- if (strnpcinfo(4) == "schg_cas02") setarray .@i[0],339,79;
- else if (strnpcinfo(4) == "schg_cas03") setarray .@i[0],57,13;
+ if (strnpcinfo(NPC_MAP) == "schg_cas02") setarray .@i[0],339,79;
+ else if (strnpcinfo(NPC_MAP) == "schg_cas03") setarray .@i[0],57,13;
else setarray .@i[0],275,244; // Castles 1,4,5 are identical.
}
- warp strnpcinfo(4),.@i[0],.@i[1];
+ warp strnpcinfo(NPC_MAP),.@i[0],.@i[1];
close;
}
//== Guild Dungeon Warps ===================================
- script Sunflower#template FAKE_NPC,{
- if (getcharid(2) == getcastledata(strnpcinfo(4),1)) {
+ if (getcharid(2) == getcastledata(strnpcinfo(NPC_MAP),1)) {
mes "- It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower. -";
next;
switch(select("Hold the stem.", "Do nothing.")) {
case 1:
- if (compare(strnpcinfo(4),"arug")) {
+ if (compare(strnpcinfo(NPC_MAP),"arug")) {
.@map$ = "arug_dun01";
setarray .@mapx[0],350,350,50, 50,200;
setarray .@mapy[0],350, 50,50,350,386;
@@ -1829,7 +1829,7 @@ function script ReturnFlag {
setarray .@mapx[0],262, 94, 79,212,322;
setarray .@mapy[0],314,284,140, 70,166;
}
- .@i = atoi(charat(strnpcinfo(4),9))-1;
+ .@i = atoi(charat(strnpcinfo(NPC_MAP),9))-1;
warp .@map$,.@mapx[.@i],.@mapy[.@i];
close;
case 2: