summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-01-27 21:43:36 -0500
committergumi <mekolat@users.noreply.github.com>2017-01-27 21:43:36 -0500
commit36a0f913168fdca7d50e73d8a4df5e01d1c08c21 (patch)
tree95042ce1e3a0f9fa370495b81938675d5b204dcb /npc
parentbfe1270fe576ed1de759ee91fcadb3f373f3def2 (diff)
downloadserverdata-36a0f913168fdca7d50e73d8a4df5e01d1c08c21.tar.gz
serverdata-36a0f913168fdca7d50e73d8a4df5e01d1c08c21.tar.bz2
serverdata-36a0f913168fdca7d50e73d8a4df5e01d1c08c21.tar.xz
serverdata-36a0f913168fdca7d50e73d8a4df5e01d1c08c21.zip
add the `any()` function (used by two MRs)
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/main.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 80548731..59beff05 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -59,6 +59,11 @@ function script addremovemapmask {
return;
}
+// returns a randomly picked argument from the given ones
+function script any {
+ return getarg(rand(getargcount()));
+}
+
// remove spaces at the start and end of string and return result
function script strip {
.@s$ = getarg(0);