summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/quest_db.conf5
-rw-r--r--npc/test/npc1.txt30
-rw-r--r--npc/test/test1.txt26
3 files changed, 53 insertions, 8 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf
index f841f1f7..040fc4a5 100644
--- a/db/quest_db.conf
+++ b/db/quest_db.conf
@@ -157,4 +157,9 @@ quest_db: (
Id: 32
Name: "ArtisQuests_MonaDad"
},
+
+{
+ Id: 1000
+ Name: "Test_testing1"
+},
)
diff --git a/npc/test/npc1.txt b/npc/test/npc1.txt
index 959154da..d1fcef7f 100644
--- a/npc/test/npc1.txt
+++ b/npc/test/npc1.txt
@@ -94,16 +94,30 @@ L_Start:
break;
case 5:
mes "current";
- .@val0 = getq(ShipQuests_Gugli);
- mes "val=" + .@val0;
- setq ShipQuests_Gugli, 10;
+ .@val1 = getq(ShipQuests_Gugli);
+ .@val2 = getq2(ShipQuests_Gugli);
+ .@val3 = getq3(ShipQuests_Gugli);
+ .@valTime = getqtime(ShipQuests_Gugli);
+ mes "val1=" + .@val1;
+ mes "val2=" + .@val2;
+ mes "val3=" + .@val3;
+ mes "valTime=" + .@valTime;
+ .@val1 ++;
+ .@val2 ++;
+ .@val3 ++;
+ .@valTime ++;
next;
- mes "test 10";
- next;
- .@val = getq(ShipQuests_Gugli);
- mes "val=" + .@val;
- setq ShipQuests_Gugli, .@val0;
+ mes "test " + str(.@val1) + ", " + str(.@val2) + ", " + str(.@val3) + ", " + str(.@valTime);
+ setq ShipQuests_Gugli, .@val1, .@val2, .@val3, .@valTime;
next;
+ .@val1 = getq(ShipQuests_Gugli);
+ .@val2 = getq2(ShipQuests_Gugli);
+ .@val3 = getq3(ShipQuests_Gugli);
+ .@valTime = getqtime(ShipQuests_Gugli);
+ mes "val1=" + .@val1;
+ mes "val2=" + .@val2;
+ mes "val3=" + .@val3;
+ mes "valTime=" + .@valTime;
break;
case 6:
while(1)
diff --git a/npc/test/test1.txt b/npc/test/test1.txt
index 01d43ca3..08ec8f49 100644
--- a/npc/test/test1.txt
+++ b/npc/test/test1.txt
@@ -19,6 +19,7 @@ function script test1function {
}
test,10,5,0 script test1 NPC_HAT_BOX,{
+ mes "Npc vars testing...";
.var = .walkmask;
if (.var != 3)
mes "Error: testing test1 npc variables.";
@@ -29,6 +30,7 @@ test,10,5,0 script test1 NPC_HAT_BOX,{
if (.var != 4)
mes "Error: testing test2 npc variables.";
test1function;
+ mes "Formatting testing...";
if (l("test @@", "") != "test ")
mes "Error: format string 'l(\"test @@\", \"\")': " + l("test @@", "");
if (l("test @@", "1") != "test 1")
@@ -41,6 +43,30 @@ test,10,5,0 script test1 NPC_HAT_BOX,{
mes "Error: format string 'l(\"@@ @@ @@\", \"this\", \"is\", \"test\") != \"this is test\"': " + l("@@ @@ @@", "this", "is", "test");
if (l("data @@ @@ @@ data", "this", "is", "test") != "data this is test data")
mes "Error: format string 'l(\"data @@ @@ @@ data\", \"this\", \"is\", \"test\")': " + l("data @@ @@ @@ data", "this", "is", "test");
+ mes "Quest vars testing...";
+ .@time = 1000;
+ setq Test_testing1, 1, 2, 3, .@time;
+ if (getq(Test_testing1) != 1)
+ mes "Error: quest variable 1 error. Must be 1, but get " + str(getq(Test_testing1));
+ if (getq2(Test_testing1) != 2)
+ mes "Error: quest variable 2 error. Must be 2, but get " + str(getq(Test_testing1));
+ if (getq3(Test_testing1) != 3)
+ mes "Error: quest variable 3 error. Must be 3, but get " + str(getq(Test_testing1));
+ if (getqtime(Test_testing1) != .@time)
+ mes "Error: quest variable 3 error. Must be 3, but get " + str(getqtime(Test_testing1));
+ next;
+ .@time = 2000;
+ setq Test_testing1, 2, 3, 4, .@time;
+ if (getq(Test_testing1) != 2)
+ mes "Error: quest variable 1 error. Must be 2, but get " + str(getq(Test_testing1));
+ if (getq2(Test_testing1) != 3)
+ mes "Error: quest variable 2 error. Must be 3, but get " + str(getq(Test_testing1));
+ if (getq3(Test_testing1) != 4)
+ mes "Error: quest variable 3 error. Must be 4, but get " + str(getq(Test_testing1));
+ if (getqtime(Test_testing1) != .@time)
+ mes "Error: quest variable 3 error. Must be 3, but get " + str(getqtime(Test_testing1));
+ next;
+ setq Test_testing1, 0;
mes "Tests complete.";
close;