summaryrefslogtreecommitdiff
path: root/npc/test
diff options
context:
space:
mode:
Diffstat (limited to 'npc/test')
-rw-r--r--npc/test/_import.txt2
-rw-r--r--npc/test/test1.txt38
-rw-r--r--npc/test/test2.txt13
3 files changed, 53 insertions, 0 deletions
diff --git a/npc/test/_import.txt b/npc/test/_import.txt
index 9998f29a..f98cb53b 100644
--- a/npc/test/_import.txt
+++ b/npc/test/_import.txt
@@ -6,3 +6,5 @@ npc: npc/test/npc2.txt
npc: npc/test/npc3.txt
npc: npc/test/npc4.txt
npc: npc/test/npc5.txt
+npc: npc/test/test1.txt
+npc: npc/test/test2.txt
diff --git a/npc/test/test1.txt b/npc/test/test1.txt
new file mode 100644
index 00000000..bcb0e455
--- /dev/null
+++ b/npc/test/test1.txt
@@ -0,0 +1,38 @@
+// Evol scripts.
+// Authors:
+// 4144
+// Description:
+// script tests
+
+function script test1function {
+ .var = .walkmask;
+ if (.var != 3)
+ mes "Error: testing test1 npc variables from function.";
+ .var = getvariableofnpc(.walkmask, "test1");
+ if (.var != 3)
+ mes "Error: testing test1 npc variables from function.";
+ .var = getvariableofnpc(.walkmask, "test2");
+ if (.var != 4)
+ mes "Error: testing test2 npc variables from function.";
+
+ return;
+}
+
+test,10,5,0 script test1 NPC_HAT_BOX,{
+ .var = .walkmask;
+ if (.var != 3)
+ mes "Error: testing test1 npc variables.";
+ .var = getvariableofnpc(.walkmask, "test1");
+ if (.var != 3)
+ mes "Error: testing test1 npc variables from function.";
+ .var = getvariableofnpc(.walkmask, "test2");
+ if (.var != 4)
+ mes "Error: testing test2 npc variables.";
+ test1function;
+ mes "Tests complete.";
+ close;
+
+OnInit:
+ .walkmask = 3;
+ end;
+}
diff --git a/npc/test/test2.txt b/npc/test/test2.txt
new file mode 100644
index 00000000..1afab34e
--- /dev/null
+++ b/npc/test/test2.txt
@@ -0,0 +1,13 @@
+// Evol scripts.
+// Authors:
+// 4144
+// Description:
+// script tests
+
+test,12,5,0 script test2 NPC_HAT_BOX,{
+ close;
+
+OnInit:
+ .walkmask = 4;
+ end;
+}