From 36a0f913168fdca7d50e73d8a4df5e01d1c08c21 Mon Sep 17 00:00:00 2001 From: gumi Date: Fri, 27 Jan 2017 21:43:36 -0500 Subject: add the `any()` function (used by two MRs) --- npc/functions/main.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'npc/functions/main.txt') 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); -- cgit v1.2.3-60-g2f50