summaryrefslogtreecommitdiff
path: root/npc/custom
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-13 23:53:31 -0200
committershennetsind <ind@henn.et>2014-01-13 23:53:31 -0200
commit18291e8b8834d74e5775baeb296104cfaebe9e54 (patch)
treeb9d8497fa0d2ea73453534a7ccb6bcf5c0d33386 /npc/custom
parente1a0059919dbc4f5c7e803a496b8d150c0a070f5 (diff)
parent9832e82b0e8dbda38bf4feb18e48cf5335e213ee (diff)
downloadhercules-18291e8b8834d74e5775baeb296104cfaebe9e54.tar.gz
hercules-18291e8b8834d74e5775baeb296104cfaebe9e54.tar.bz2
hercules-18291e8b8834d74e5775baeb296104cfaebe9e54.tar.xz
hercules-18291e8b8834d74e5775baeb296104cfaebe9e54.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'npc/custom')
-rw-r--r--npc/custom/test.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/npc/custom/test.txt b/npc/custom/test.txt
index b3579d4c3..07523f008 100644
--- a/npc/custom/test.txt
+++ b/npc/custom/test.txt
@@ -494,6 +494,32 @@ OnInit:
callsub(OnCheck, "array shrink", .@x[1], 0);
callsub(OnCheck, "array shrink and getarraysize", getarraysize(.@x), 0);
+
+ // Constants
+ callsub(OnCheck, "'true' constant", true, 1);
+ callsub(OnCheck, "'false' constant", false, 0);
+ callsub(OnCheck, "'PORING' mob ID", PORING, 1002);
+ callsub(OnCheck, "'NV_BASIC' skill ID", NV_BASIC, 1);
+ callsub(OnCheck, "'Red_Potion' item ID", Red_Potion, 501);
+ callsub(OnCheck, "'Monster's_Feed' item ID", Monster's_Feed, 528);
+
+
+ // setd/getd
+ .@x = 1; .@x$ = ".@x";
+ callsub(OnCheck, "getd", getd(".@x"), 1);
+ callsub(OnCheck, "getd arguments", getd(.@x$), 1);
+ .@y = 0; .@y$ = ".@y";
+ setd(".@y", .@x);
+ callsub(OnCheck, "setd", .@y, 1);
+ setd(.@y$, 2);
+ callsub(OnCheck, "setd arguments", .@y, 2);
+ set getd(".@x"), getd(".@y");
+ callsub(OnCheck, "set getd", .@x, .@y);
+ .@y = 1;
+ setd(".@x", getd(".@y"));
+ callsub(OnCheck, "setd getd", .@x, .@y);
+
+
if (.errors) {
debugmes "Script engine self-test [ FAILED ]";
debugmes "**** The test was completed with " + .errors + " errors. ****";