diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-24 17:48:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-24 17:48:55 +0300 |
commit | ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff (patch) | |
tree | 163c40267ec7ad9edf32ec6a3e06a12f6b1132b0 /src/emap/script.c | |
parent | e7cd9086185804d815fb0dc72e3bfd36fdd9a33f (diff) | |
download | evol-hercules-ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff.tar.gz evol-hercules-ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff.tar.bz2 evol-hercules-ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff.tar.xz evol-hercules-ce563a50ff4997f4a3f1ccd8bd1fdec5708b3bff.zip |
Add script function for get return code from craft entry.
New script function: getcraftcode ENTRY
Diffstat (limited to 'src/emap/script.c')
-rw-r--r-- | src/emap/script.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/emap/script.c b/src/emap/script.c index 69c1f4e..bc8c7b2 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -1954,10 +1954,17 @@ BUILDIN(findCraftEntry) BUILDIN(useCraft) { - getSDReturn(0) + getSD() return craft_use(sd, script_getnum(st, 2)); } +BUILDIN(getCraftCode) +{ + getSDReturn(-1) + script_pushint(st, craft_get_entry_code(sd, script_getnum(st, 2))); + return true; +} + BUILDIN(getInvIndexLink) { getSDReturnS("") |