summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/util.txt21
1 files changed, 8 insertions, 13 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index fb93ff074..c3c1f390a 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -927,9 +927,8 @@ function script EnterTown {
// Fill variable
.@v$=getarg(0);
- // Validade variable, see npc/000-1/exit.txt first
- setarray .@locs$, "Candor", "Tulim", "Halin", "Hurns", "LoF", "Lilit", "Nival", "Frostia";
- if (array_find(.@locs$, .@v$) < 0)
+ // Validade variable, see npc/config/location.txt first
+ if (array_find($@LOCMASTER_LOC$, .@v$) < 0)
return Exception("Invalid location passed to EnterTown: "+.@v$);
LOCATION$=.@v$;
@@ -948,14 +947,12 @@ function script LocToMap {
else
.@err=RB_DEBUGMES;
- // Validade variable, see npc/000-1/exit.txt first
- setarray .@mapx$, "005-1", "003-1", "009-1", "012-1", "017-1", "018-5", "020-1", "024-1";
- setarray .@locs$, "Candor", "Tulim", "Halin", "Hurns", "LoF", "Lilit", "Nival", "Frostia";
- .@lx=array_find(.@locs$, .@v$);
+ // Validade variable, see npc/config/location.txt first
+ .@lx=array_find($@LOCMASTER_LOC$, .@v$);
if (.@lx < 0)
return Exception("Invalid location passed to LocToMap: "+.@v$, .@err);
- return .@locs$[.@lx];
+ return $@LOCMASTER_MAP$[.@lx];
}
// Convert map name to location id
@@ -970,14 +967,12 @@ function script MapToLoc {
else
.@err=RB_DEBUGMES;
- // Validade variable, see npc/000-1/exit.txt first
- setarray .@mapx$, "005-1", "003-1", "009-1", "012-1", "017-1", "018-5", "020-1", "024-1";
- setarray .@locs$, "Candor", "Tulim", "Halin", "Hurns", "LoF", "Lilit", "Nival", "Frostia";
- .@lx=array_find(.@mapx$, .@v$);
+ // Validade variable, see npc/config/location.txt first
+ .@lx=array_find($@LOCMASTER_MAP$, .@v$);
if (.@lx < 0)
return Exception("Invalid map passed to MapToLoc: "+.@v$, .@err);
- return .@locs$[.@lx];
+ return $@LOCMASTER_LOC$[.@lx];
}
// Returns TOP 3 Average Level