summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-23 19:12:10 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-23 19:12:10 +0300
commitbf50409735647a80a7145def628822d5235ea753 (patch)
tree8c3a7007dacc1b40b5d09e7948597132d72e11c8 /src/map/script.c
parentdb2c1615ba8b2a679b81eec2c93d9d68e2c5edf8 (diff)
downloadplugin-bf50409735647a80a7145def628822d5235ea753.tar.gz
plugin-bf50409735647a80a7145def628822d5235ea753.tar.bz2
plugin-bf50409735647a80a7145def628822d5235ea753.tar.xz
plugin-bf50409735647a80a7145def628822d5235ea753.zip
Impliment rif script command.
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index cca62c7..2bc9422 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -355,3 +355,30 @@ BUILDIN(setNpcDir)
return true;
}
+
+BUILDIN(rif)
+{
+ char *str = 0;
+ if (script_getnum(st, 2))
+ {
+ str = script_getstr(st, 3);
+ if (str)
+ script_pushstr(st, aStrdup(str));
+ else
+ script_pushconststr(st, (unsigned char *)"");
+ }
+ else if (script_hasdata(st, 4))
+ {
+ str = script_getstr(st, 4);
+ if (str)
+ script_pushstr(st, aStrdup(str));
+ else
+ script_pushconststr(st, (unsigned char *)"");
+ }
+ else
+ {
+ script_pushconststr(st, (unsigned char *)"");
+ }
+
+ return true;
+}