summaryrefslogtreecommitdiff
path: root/npc/re/cities/malaya.txt
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/re/cities/malaya.txt
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/re/cities/malaya.txt')
-rw-r--r--npc/re/cities/malaya.txt34
1 files changed, 17 insertions, 17 deletions
diff --git a/npc/re/cities/malaya.txt b/npc/re/cities/malaya.txt
index 6d69feefe..c8171b9d6 100644
--- a/npc/re/cities/malaya.txt
+++ b/npc/re/cities/malaya.txt
@@ -153,7 +153,7 @@ ma_in01,30,94,4 script Inn Keeper#ma 4_F_MALAYA,{
- script Unidentified Creature#i FAKE_NPC,{
end;
OnInit:
- switch(atoi(strnpcinfo(2))) {
+ switch(atoi(strnpcinfo(NPC_NAME_HIDDEN))) {
case 1: setarray .@npc$,"01","02","03","04"; break;
case 5: setarray .@npc$,"05","06","07","08"; break;
case 9: setarray .@npc$,"09","10","11"; break;
@@ -165,13 +165,13 @@ OnInit:
donpcevent "Unidentified Creature#"+.@npc$[.@i]+"::"+((.@i == .@rand)?"OnEnable":"OnDisable");
end;
OnEnable:
- enablenpc strnpcinfo(0);
+ enablenpc strnpcinfo(NPC_NAME);
end;
OnDisable:
- disablenpc strnpcinfo(0);
+ disablenpc strnpcinfo(NPC_NAME);
end;
OnBingx2:
- switch(atoi(strnpcinfo(2))) {
+ switch(atoi(strnpcinfo(NPC_NAME_HIDDEN))) {
case 1: setarray .@npc$,"02","03","04"; break;
case 5: setarray .@npc$,"06","07","08"; break;
case 9: setarray .@npc$,"10","11"; break;
@@ -180,27 +180,27 @@ OnBingx2:
.@rand = rand(.@size);
for(.@i = 0; .@i<.@size; ++.@i)
donpcevent "Unidentified Creature#"+.@npc$[.@i]+"::"+((.@i == .@rand)?"OnEnable":"OnDisable");
- donpcevent strnpcinfo(0)+"::OnDisable";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnDisable";
end;
OnTouch:
if (getcharid(1)) {
if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
- donpcevent strnpcinfo(0)+"::OnBingx2";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnBingx2";
mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
close;
}
if (rand(1,5)%2) {
- switch(atoi(strnpcinfo(2))) {
+ switch(atoi(strnpcinfo(NPC_NAME_HIDDEN))) {
case 1: $ma_name04$ = strcharinfo(0); break;
case 5: $ma_name05$ = strcharinfo(0); break;
case 9: $ma_name06$ = strcharinfo(0); break;
}
}
- donpcevent strnpcinfo(0)+"::OnBingx2";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnBingx2";
mes "The unidentified creature gets a glimpse of you and disappears.";
close;
}
- donpcevent strnpcinfo(0)+"::OnBingx2";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnBingx2";
mes "The unidentified creature looks at you and runs away.";
close;
}
@@ -211,13 +211,13 @@ ma_scene01,195,92,4 duplicate(Unidentified Creature#i) Unidentified Creature#09
- script Unidentified Creature#j FAKE_NPC,{
end;
OnEnable:
- enablenpc strnpcinfo(0);
+ enablenpc strnpcinfo(NPC_NAME);
end;
OnDisable:
- disablenpc strnpcinfo(0);
+ disablenpc strnpcinfo(NPC_NAME);
end;
OnBingx2:
- switch(atoi(strnpcinfo(2))) {
+ switch(atoi(strnpcinfo(NPC_NAME_HIDDEN))) {
case 2: setarray .@npc$,"01","03","04"; break;
case 3: setarray .@npc$,"01","02","04"; break;
case 4: setarray .@npc$,"01","02","03"; break;
@@ -231,10 +231,10 @@ OnBingx2:
.@rand = rand(.@size);
for(.@i = 0; .@i<.@size; ++.@i)
donpcevent "Unidentified Creature#"+.@npc$[.@i]+"::"+((.@i == .@rand)?"OnEnable":"OnDisable");
- donpcevent strnpcinfo(0)+"::OnDisable";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnDisable";
end;
OnTouch:
- .@i = atoi(strnpcinfo(2));
+ .@i = atoi(strnpcinfo(NPC_NAME_HIDDEN));
if (.@i%4 == 2) {
if (getcharid(0) == getpartyleader(getcharid(1),2))
.@pass = 1;
@@ -247,7 +247,7 @@ OnTouch:
}
if (.@pass) {
if ($ma_name04$ == strcharinfo(0) || $ma_name05$ == strcharinfo(0) || $ma_name06$ == strcharinfo(0)) {
- donpcevent strnpcinfo(0)+"::OnBingx2";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnBingx2";
mes "The unidentified creature gets a glimpse of you, blushes and then disappears.";
close;
}
@@ -269,11 +269,11 @@ OnTouch:
break;
}
}
- donpcevent strnpcinfo(0)+"::OnBingx2";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnBingx2";
mes "The unidentified creature gets a glimpse of you and disappears.";
close;
}
- donpcevent strnpcinfo(0)+"::OnBingx2";
+ donpcevent strnpcinfo(NPC_NAME)+"::OnBingx2";
mes "The unidentified creature looks at you and runs away.";
close;
}