diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-11 00:42:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-11 02:09:45 +0300 |
commit | 82fca47fc7b00d8755c4333e0016bf555e46d0f8 (patch) | |
tree | 7afa440b66113e9fc24408f344e5340a90d83e8b /src/emap/script.c | |
parent | 64e7b33c9163e387c94f1a11de4e15435c35005c (diff) | |
download | evol-hercules-82fca47fc7b00d8755c4333e0016bf555e46d0f8.tar.gz evol-hercules-82fca47fc7b00d8755c4333e0016bf555e46d0f8.tar.bz2 evol-hercules-82fca47fc7b00d8755c4333e0016bf555e46d0f8.tar.xz evol-hercules-82fca47fc7b00d8755c4333e0016bf555e46d0f8.zip |
Add script command for convert craft string into craft object.
New script command: initcraft var$
Return value: craft object id.
Diffstat (limited to 'src/emap/script.c')
-rw-r--r-- | src/emap/script.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/emap/script.c b/src/emap/script.c index 955e650..f1deb4e 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -25,6 +25,7 @@ #include "emap/script.h" #include "emap/clif.h" +#include "emap/craft.h" #include "emap/lang.h" #include "emap/map.h" #include "emap/scriptdefines.h" @@ -1869,3 +1870,12 @@ BUILDIN(setSkin) send_pc_skin(sd->fd, st->oid, skin); return true; } + +BUILDIN(initCraft) +{ + getSD() + + int var = str_to_craftvar(sd, script_getstr(st, 2)); + script_pushint(st, var); + return true; +} |