summaryrefslogtreecommitdiff
path: root/npc/instances
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2016-08-28 17:03:57 +0100
committerhemagx <ibrahem.h.basyone@gmail.com>2016-08-29 01:03:42 +0200
commit86977d79269408a371384e61111c3a9cf6e87b0c (patch)
tree4f2a9b1f9a3ee6436a0b857d05caa2be7e99a877 /npc/instances
parent16f998c8a79153ed9f6721c36e129b6080fa59d2 (diff)
downloadhercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.gz
hercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.bz2
hercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.xz
hercules-86977d79269408a371384e61111c3a9cf6e87b0c.zip
*strnpcinfo now uses constants
- NPC_NAME for the whole npc name including hidden part - NPC_NAME_VISIBLE for the visible part of the npc name - NPC_NAME_HIDDEN for the hidden part of the npc name - NPC_NAME_UNIQUE for the npc unique name - NPC_MAP for npc map
Diffstat (limited to 'npc/instances')
-rw-r--r--npc/instances/EndlessTower.txt24
-rw-r--r--npc/instances/NydhoggsNest.txt72
-rw-r--r--npc/instances/OrcsMemory.txt10
-rw-r--r--npc/instances/SealedShrine.txt18
4 files changed, 62 insertions, 62 deletions
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index 3082cfdce..52c558a2a 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -1254,27 +1254,27 @@ OnTimer5000:
end;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0));
+ enablenpc instance_npcname(strnpcinfo(NPC_NAME));
callfunc "F_Tower_Monster",
- atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1,
- strnpcinfo(4),
- instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
+ atoi(replacestr(strnpcinfo(NPC_NAME),"FGate102tower","")) + 1,
+ strnpcinfo(NPC_MAP),
+ instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead";
end;
OnTouch_:
callfunc "F_Tower_Warp",
- atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1,
- strnpcinfo(4);
+ atoi(replacestr(strnpcinfo(NPC_NAME),"FGate102tower","")) + 1,
+ strnpcinfo(NPC_MAP);
end;
OnMyMobDead:
- .@map$ = strnpcinfo(4);
- .@level = atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1;
- .@mob_dead_num = mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead");
+ .@map$ = strnpcinfo(NPC_MAP);
+ .@level = atoi(replacestr(strnpcinfo(NPC_NAME),"FGate102tower","")) + 1;
+ .@mob_dead_num = mobcount(.@map$,instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
initnpctimer;
//SetItemPartyInMap in_102floor .@level
@@ -1283,8 +1283,8 @@ OnMyMobDead:
end;
OnTimer5000:
- .@level = atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1;
- mapannounce strnpcinfo(4), "All Monsters on the "+callsub(L_Display,.@level)+" Level have been defeated.",bc_map,"0xffff00";
+ .@level = atoi(replacestr(strnpcinfo(NPC_NAME),"FGate102tower","")) + 1;
+ mapannounce strnpcinfo(NPC_MAP), "All Monsters on the "+callsub(L_Display,.@level)+" Level have been defeated.",bc_map,"0xffff00";
donpcevent instance_npcname(.@level+"FGate102tower")+"::OnEnable";
stopnpctimer;
end;
diff --git a/npc/instances/NydhoggsNest.txt b/npc/instances/NydhoggsNest.txt
index c702d31d7..9e49bd9e9 100644
--- a/npc/instances/NydhoggsNest.txt
+++ b/npc/instances/NydhoggsNest.txt
@@ -2013,78 +2013,78 @@ OnEnable:
2@nyd,115,278,0 script nyd_2f_red FAKE_NPC,5,5,{
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0));
- donpcevent instance_npcname(strnpcinfo(0)+"_warp1")+"::OnEnable";
- donpcevent instance_npcname(strnpcinfo(0)+"_warp2")+"::OnEnable";
- donpcevent instance_npcname(strnpcinfo(0)+"_warp3")+"::OnEnable";
- donpcevent instance_npcname(strnpcinfo(0)+"_c")+"::OnEnable";
+ enablenpc instance_npcname(strnpcinfo(NPC_NAME));
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME)+"_warp1")+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME)+"_warp2")+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME)+"_warp3")+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME)+"_c")+"::OnEnable";
initnpctimer;
end;
OnDisable:
- donpcevent instance_npcname(strnpcinfo(0)+"_warp1")+"::OnDisable";
- donpcevent instance_npcname(strnpcinfo(0)+"_warp2")+"::OnDisable";
- donpcevent instance_npcname(strnpcinfo(0)+"_warp3")+"::OnDisable";
- disablenpc instance_npcname(strnpcinfo(0));
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME)+"_warp1")+"::OnDisable";
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME)+"_warp2")+"::OnDisable";
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME)+"_warp3")+"::OnDisable";
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnTouch:
- if (compare(strnpcinfo(0),"red")) {
+ if (compare(strnpcinfo(NPC_NAME),"red")) {
percentheal -50,0;
percentheal -30,0;
sc_start SC_BLOODING,60000,0;
- } else if (compare(strnpcinfo(0),"white")) {
+ } else if (compare(strnpcinfo(NPC_NAME),"white")) {
percentheal -50,0;
sc_start SC_FREEZE,20000,0;
- } else if (compare(strnpcinfo(0),"yellow")) {
+ } else if (compare(strnpcinfo(NPC_NAME),"yellow")) {
percentheal 0,-50;
sc_start SC_SLEEP,20000,0;
sc_start SC_CONFUSION,60000,0;
- } else if (compare(strnpcinfo(0),"green")) {
+ } else if (compare(strnpcinfo(NPC_NAME),"green")) {
percentheal -50,-50;
sc_start SC_POISON,60000,0;
}
end;
OnTimer10000:
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
stopnpctimer;
end;
}
2@nyd,6,6,0 script nyd_2f_red_c FAKE_NPC,{
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0));
+ enablenpc instance_npcname(strnpcinfo(NPC_NAME));
initnpctimer;
.@map$ = instance_mapname("2@nyd");
- .@label$ = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
- if (compare(strnpcinfo(0),"red")) {
+ .@label$ = instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead";
+ if (compare(strnpcinfo(NPC_NAME),"red")) {
monster .@map$,120,285,"Nidhoggur's Guardian#1",2020,1,.@label$;
monster .@map$,119,286,"Nidhoggur's Guardian#2",2020,1,.@label$;
monster .@map$,120,270,"Nidhoggur's Guardian#3",2020,1,.@label$;
monster .@map$,119,269,"Nidhoggur's Guardian#4",2021,1,.@label$;
monster .@map$,118,270,"Nidhoggur's Guardian#5",2021,1,.@label$;
- } else if (compare(strnpcinfo(0),"white")) {
+ } else if (compare(strnpcinfo(NPC_NAME),"white")) {
monster .@map$,120,380,"Nidhoggur's Guardian#1",2020,1,.@label$;
monster .@map$,119,381,"Nidhoggur's Guardian#2",2020,1,.@label$;
monster .@map$,120,367,"Nidhoggur's Guardian#3",2020,1,.@label$;
monster .@map$,119,366,"Nidhoggur's Guardian#4",2021,1,.@label$;
monster .@map$,118,365,"Nidhoggur's Guardian#5",2021,1,.@label$;
- } else if (compare(strnpcinfo(0),"yellow")) {
+ } else if (compare(strnpcinfo(NPC_NAME),"yellow")) {
monster .@map$,282,284,"Nidhoggur's Guardian#1",2020,1,.@label$;
monster .@map$,283,283,"Nidhoggur's Guardian#2",2020,1,.@label$;
monster .@map$,280,275,"Nidhoggur's Guardian#3",2020,1,.@label$;
monster .@map$,281,276,"Nidhoggur's Guardian#4",2021,1,.@label$;
monster .@map$,281,277,"Nidhoggur's Guardian#5",2021,1,.@label$;
- } else if (compare(strnpcinfo(0),"green")) {
+ } else if (compare(strnpcinfo(NPC_NAME),"green")) {
monster .@map$,282,378,"Nidhoggur's Guardian#1",2020,1,.@label$;
monster .@map$,283,377,"Nidhoggur's Guardian#2",2020,1,.@label$;
monster .@map$,280,368,"Nidhoggur's Guardian#3",2020,1,.@label$;
@@ -2095,30 +2095,30 @@ OnEnable:
OnMyMobDead:
.@map$ = instance_mapname("2@nyd");
- if (mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) {
+ if (mobcount(.@map$,instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead") < 1) {
mapannounce .@map$, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
donpcevent instance_npcname("nyd_2f_boss_enter_logic")+"::OnEnable";
- donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME))+"::OnDisable";
end;
}
end;
/*
OnReset: // Label not called.
- killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
- donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
+ killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead";
+ donpcevent instance_npcname(strnpcinfo(NPC_NAME))+"::OnDisable";
end;
*/
OnDisable:
stopnpctimer;
- killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; //custom
- donpcevent instance_npcname(substr(strnpcinfo(0),0,getstrlen(strnpcinfo(0))-3))+"::OnDisable";
- disablenpc instance_npcname(strnpcinfo(0));
+ killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead"; //custom
+ donpcevent instance_npcname(substr(strnpcinfo(NPC_NAME),0,getstrlen(strnpcinfo(NPC_NAME))-3))+"::OnDisable";
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnTimer180000:
- killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
+ killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(NPC_NAME))+"::OnMyMobDead";
stopnpctimer;
donpcevent instance_npcname("nyd_2f_boss_enter_call")+"::OnWarpColor";
end;
@@ -2127,21 +2127,21 @@ OnTimer180000:
2@nyd,130,298,0 script nyd_2f_red_warp1 FAKE_NPC,6,6,{
OnInstanceInit:
OnDisable:
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0));
+ enablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnTouch:
- if (compare(strnpcinfo(0),"red"))
+ if (compare(strnpcinfo(NPC_NAME),"red"))
warp instance_mapname("2@nyd"),115,278;
- else if (compare(strnpcinfo(0),"white"))
+ else if (compare(strnpcinfo(NPC_NAME),"white"))
warp instance_mapname("2@nyd"),115,373;
- else if (compare(strnpcinfo(0),"yellow"))
+ else if (compare(strnpcinfo(NPC_NAME),"yellow"))
warp instance_mapname("2@nyd"),284,278;
- else if (compare(strnpcinfo(0),"green"))
+ else if (compare(strnpcinfo(NPC_NAME),"green"))
warp instance_mapname("2@nyd"),284,374;
end;
}
diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt
index e65c18efe..9965fafd8 100644
--- a/npc/instances/OrcsMemory.txt
+++ b/npc/instances/OrcsMemory.txt
@@ -686,22 +686,22 @@ OnTimer23910:
2@orcs,26,164,0 script Torch#1-1 CLEAR_NPC,{
if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
progressbar "ffff00",5;
- setarray .@id[0], atoi(charat(strnpcinfo(2),0)), atoi(charat(strnpcinfo(2),2));
+ setarray .@id[0], atoi(charat(strnpcinfo(NPC_NAME_HIDDEN),0)), atoi(charat(strnpcinfo(NPC_NAME_HIDDEN),2));
if (.@id[1] == 4)
donpcevent instance_npcname("#Warp2-"+.@id[0])+"::OnEnable";
else
donpcevent instance_npcname("Torch#"+.@id[0]+"-"+(.@id[1]+1))+"::OnEnable";
initnpctimer;
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnInstanceInit:
- if (strnpcinfo(0) != "Torch#2-1" && strnpcinfo(0) != "Torch#3-1")
- disablenpc instance_npcname(strnpcinfo(0));
+ if (strnpcinfo(NPC_NAME) != "Torch#2-1" && strnpcinfo(NPC_NAME) != "Torch#3-1")
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0));
+ enablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
OnTimer100:
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index 5784d52a7..cbb8d20b5 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -896,7 +896,7 @@ OnInstanceInit:
specialeffect2 EF_HOLYHIT;
getitem Essence_Of_Fire,1;
mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
close;
}
else if (('ins_baphomet == 3) && (countitem(Essence_Of_Fire) > 10)) {
@@ -919,7 +919,7 @@ OnInstanceInit:
}
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
}
1@cata,267,210,0 duplicate(Bobbing Torch#SS) Bobbing Torch#1 CLEAR_NPC
@@ -1097,13 +1097,13 @@ OnTouch:
}
if (.@seal_check == 2) erasequest 3041;
specialeffect EF_LEXDIVINA;
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
.@map$ = instance_mapname("2@cata");
- if (strnpcinfo(2) == "0") areamobuseskill .@map$,79,81,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- else if (strnpcinfo(2) == "2") areamobuseskill .@map$,123,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- else if (strnpcinfo(2) == "4") areamobuseskill .@map$,123,22,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- else if (strnpcinfo(2) == "8") areamobuseskill .@map$,35,21,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
- else if (strnpcinfo(2) == "10") areamobuseskill .@map$,35,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ if (strnpcinfo(NPC_NAME_HIDDEN) == "0") areamobuseskill .@map$,79,81,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "2") areamobuseskill .@map$,123,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "4") areamobuseskill .@map$,123,22,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "8") areamobuseskill .@map$,35,21,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ else if (strnpcinfo(NPC_NAME_HIDDEN) == "10") areamobuseskill .@map$,35,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
percentheal -50,0;
sc_start Eff_Stone,20000,0;
setquest 3041;
@@ -1114,7 +1114,7 @@ OnTouch:
close;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0));
+ disablenpc instance_npcname(strnpcinfo(NPC_NAME));
end;
}
2@cata,79,81,0 duplicate(Magical Seal#SS) Magical Seal#0 CLEAR_NPC