diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-16 21:17:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-16 21:17:27 +0300 |
commit | ca394780592681df18d39c914f26e23e51c8dde2 (patch) | |
tree | 79da9de507fbbfa65b3cfee0ceef272679766128 /src/emap/scriptdefines.h | |
parent | 05cd56e147848c626f841c8369b572943bc7b48d (diff) | |
download | evol-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.h | 10 |
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) \ |