summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/008-1/confused-tree.txt2
-rw-r--r--npc/test/test1.txt22
2 files changed, 22 insertions, 2 deletions
diff --git a/npc/008-1/confused-tree.txt b/npc/008-1/confused-tree.txt
index 2d5a53631..202fb53ca 100644
--- a/npc/008-1/confused-tree.txt
+++ b/npc/008-1/confused-tree.txt
@@ -303,7 +303,7 @@
}
function seen_me {
- if (playerattached() > 0)
+ if (playerattached() > 0 && htexists(.seen_ht))
{
htput(.seen_ht, strcharinfo(PC_NAME), gettimetick(2));
}
diff --git a/npc/test/test1.txt b/npc/test/test1.txt
index a6e6d4b94..52f788bbc 100644
--- a/npc/test/test1.txt
+++ b/npc/test/test1.txt
@@ -30,7 +30,7 @@ test,10,5,0 script test1 NPC_HAT_BOX,{
if (.var != 4)
mes "Error: testing test2 npc variables.";
test1function;
- mes "Formatting testing...";
+ mes "Formatting testing for sex: " + str(Sex);
if (l("test @@", "") != "test ")
mes "Error: format string 'l(\"test @@\", \"\")': " + l("test @@", "");
if (l("test @@", "1") != "test 1")
@@ -43,6 +43,26 @@ 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");
+ if (l("test") != "test")
+ mes "Error: l(\"test\"): " + l("test");
+ if (Sex == 1)
+ {
+ if (lg("test") != "test#1")
+ mes "Error: lg(\"test\"): " + lg("test");
+ if (lg("test1", "test2") != "test2#1")
+ mes "Error: lg(\"test1\", \"test2\"): " + lg("test1", "test2");
+ if (lg("test1 @@", "test2 @@", "line") != "test2 line#1")
+ mes "Error: lg(\"test1 @@\", \"test2 @@\", \"line\"): " + lg("test1 @@", "test2 @@", "line");
+ }
+ else if (Sex == 0)
+ {
+ if (lg("test") != "test#0")
+ mes "Error: lg(\"test\"): " + lg("test");
+ if (lg("test1", "test2") != "test1#0")
+ mes "Error: lg(\"test1\", \"test2\"): " + lg("test1", "test2");
+ if (lg("test1 @@", "test2 @@", "line") != "test1 line#0")
+ mes "Error: lg(\"test1 @@\", \"test2 @@\", \"line\"): " + lg("test1 @@", "test2 @@", "line");
+ }
mes "Quest vars testing...";
.@time = 1000;
setq Test_testing1, 1, 2, 3, .@time;