summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-11 10:52:56 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-11 10:52:56 -0300
commit9fe1b9dfc34cabe4ab3cb00b5ae200756bafb5a3 (patch)
treeb38a2afe54b6f0f8ffa09d3c382e3ae8b09c5421
parentf98683fda133ef529b60ae9aef26143aab070c6a (diff)
downloadserverdata-9fe1b9dfc34cabe4ab3cb00b5ae200756bafb5a3.tar.gz
serverdata-9fe1b9dfc34cabe4ab3cb00b5ae200756bafb5a3.tar.bz2
serverdata-9fe1b9dfc34cabe4ab3cb00b5ae200756bafb5a3.tar.xz
serverdata-9fe1b9dfc34cabe4ab3cb00b5ae200756bafb5a3.zip
Housekeeping: Use getmapname() from plugin, fix bad code in get_race()
-rw-r--r--npc/functions/util.txt13
1 files changed, 4 insertions, 9 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index a8e157b2..ededc2e1 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -36,7 +36,7 @@ function script season_direction {
}
// This is part of Jesusalva script toolkit to make his life easier when writing
-// quests. Many of these are actually redudant functions.
+// quests. Many of these are actually redundant functions.
// Four different flavours of setq() to quickly preserve old values
function script setq1 {
@@ -63,14 +63,9 @@ function script setqtime {
return;
}
-// Function to quickly disregard part of getmapxy().
-// If you use this function too much, you'll lose efficiency, and it'll be better
-// to use getmapxy() normally to save to temporary variables.
-// Can take one optional argument (unittype argument).
+// Shortcut for getmapname()
function script getmap {
- if (getmapxy(.@mapName$, .@xpos, .@ypos, getarg(0,0)) != 0)
- return false;
- return .@mapName$;
+ return getmapname();
}
// Returns the player race in plain text
@@ -84,7 +79,7 @@ function script get_race {
.@g=getarg(1, Class);
// We also allow this to run without player attached for... science.
- if (getarg(1,-1) >= 0)
+ if (playerattached())
{
setarray .@allraces$, l("Human"), l("Ukar"), l("Kralog"),
l("Raijin"), l("Kralog"), l("Raijin"), l("Tritan"),