diff options
author | gumi <mekolat@users.noreply.github.com> | 2017-06-06 13:55:07 -0400 |
---|---|---|
committer | gumi <mekolat@users.noreply.github.com> | 2017-07-20 18:13:54 -0400 |
commit | e3b63461ab6e3564e975da56793b5d2fa8064300 (patch) | |
tree | 72dc04b20cccf6d59fe7ef71e84fd30b4918623f /npc/functions/main.txt | |
parent | 3c9b5c41881137456750d9f8bd5124b09c057100 (diff) | |
download | serverdata-e3b63461ab6e3564e975da56793b5d2fa8064300.tar.gz serverdata-e3b63461ab6e3564e975da56793b5d2fa8064300.tar.bz2 serverdata-e3b63461ab6e3564e975da56793b5d2fa8064300.tar.xz serverdata-e3b63461ab6e3564e975da56793b5d2fa8064300.zip |
more framework functions
Diffstat (limited to 'npc/functions/main.txt')
-rw-r--r-- | npc/functions/main.txt | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 59beff05..ffac13bd 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -59,35 +59,6 @@ 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); - if (.@s$ == "") - return ""; - .@start = 0; - .@end = getstrlen(.@s$) - 1; - for (.@i = .@start; .@i < .@end; .@i++) - { - if (charat(.@s$, .@i) != " ") - break; - else - .@start++; - } - for (.@i = .@end; .@i >= .@start; .@i--) - { - if (charat(.@s$, .@i) != " ") - break; - else - .@end--; - } - return substr(.@s$, .@start, .@end); -} - // Function to show narrator text. Accepts string args. // If first arg is a number N, then it represents bit flags. // Bit flags : |