summaryrefslogtreecommitdiff
path: root/src/emap/scriptdefines.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-16 21:17:27 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-16 21:17:27 +0300
commitca394780592681df18d39c914f26e23e51c8dde2 (patch)
tree79da9de507fbbfa65b3cfee0ceef272679766128 /src/emap/scriptdefines.h
parent05cd56e147848c626f841c8369b572943bc7b48d (diff)
downloadevol-hercules-ca394780592681df18d39c914f26e23e51c8dde2.tar.gz
evol-hercules-ca394780592681df18d39c914f26e23e51c8dde2.tar.bz2
evol-hercules-ca394780592681df18d39c914f26e23e51c8dde2.tar.xz
evol-hercules-ca394780592681df18d39c914f26e23e51c8dde2.zip
Add script command for show link to item with cards by inventory index.
New script command: getinvindexlink n
Diffstat (limited to 'src/emap/scriptdefines.h')
-rw-r--r--src/emap/scriptdefines.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/emap/scriptdefines.h b/src/emap/scriptdefines.h
index 69b6e3c..9a21313 100644
--- a/src/emap/scriptdefines.h
+++ b/src/emap/scriptdefines.h
@@ -76,6 +76,16 @@
return false; \
}
+#define getSDReturnS(def) \
+ TBL_PC *sd = script->rid2sd(st); \
+ if (!sd) \
+ { \
+ ShowWarning("player not attached\n"); \
+ script->reportsrc(st); \
+ script_pushstr(st, def); \
+ return false; \
+ }
+
#define getInventoryIndex(idx) \
const int n = script_getnum(st, idx); \
if (n < 0 || n >= MAX_INVENTORY) \