summaryrefslogtreecommitdiff
path: root/npc/test
diff options
context:
space:
mode:
Diffstat (limited to 'npc/test')
-rw-r--r--npc/test/_import.txt13
-rw-r--r--npc/test/_mobs.txt15
-rw-r--r--npc/test/mapflags.txt2
-rw-r--r--npc/test/npc1.txt670
-rw-r--r--npc/test/npc2.txt35
-rw-r--r--npc/test/npc3.txt7
-rw-r--r--npc/test/npc4.txt30
-rw-r--r--npc/test/npc5.txt34
-rw-r--r--npc/test/npc6.txt23
-rw-r--r--npc/test/npcmarriage.txt19
-rw-r--r--npc/test/test1.txt76
-rw-r--r--npc/test/test2.txt13
12 files changed, 937 insertions, 0 deletions
diff --git a/npc/test/_import.txt b/npc/test/_import.txt
new file mode 100644
index 000000000..6c7f7e713
--- /dev/null
+++ b/npc/test/_import.txt
@@ -0,0 +1,13 @@
+// Map test: test
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/test/_mobs.txt",
+"npc/test/mapflags.txt",
+"npc/test/npc1.txt",
+"npc/test/npc2.txt",
+"npc/test/npc3.txt",
+"npc/test/npc4.txt",
+"npc/test/npc5.txt",
+"npc/test/npc6.txt",
+"npc/test/npcmarriage.txt",
+"npc/test/test1.txt",
+"npc/test/test2.txt",
diff --git a/npc/test/_mobs.txt b/npc/test/_mobs.txt
new file mode 100644
index 000000000..8bab31019
--- /dev/null
+++ b/npc/test/_mobs.txt
@@ -0,0 +1,15 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map test: test mobs
+test,38,12,1,1 monster Piou 1002,1,1000,1000
+test,38,12,1,1 monster Tortuga 1004,1,1000,1000
+test,44,12,1,1 monster Piou 1002,3,1000,1000
+test,48,10,1,1 monster Tortuga 1004,3,1000,1000
+test,48,10,0,0 monster Piou 1002,1,1000,1000
+test,48,10,0,0 monster Ratto 1005,1,1000,1000
+test,54,10,1,1 monster Piou 1002,3,1000,1000
+test,68,9,0,0 monster Piou 1002,3,1000,1000
+test,68,9,0,0 monster Ratto 1005,1,1000,1000
+test,68,9,1,1 monster Tortuga 1004,3,1000,1000
+test,76,10,1,1 monster Piou 1002,3,1000,1000
+test,76,10,1,1 monster Ratto 1005,1,1000,1000
+test,78,4,1,1 monster Ratto 1005,3,1000,1000
diff --git a/npc/test/mapflags.txt b/npc/test/mapflags.txt
new file mode 100644
index 000000000..6f3199ae8
--- /dev/null
+++ b/npc/test/mapflags.txt
@@ -0,0 +1,2 @@
+test mapflag mask 5
+test mapflag town
diff --git a/npc/test/npc1.txt b/npc/test/npc1.txt
new file mode 100644
index 000000000..a9d15958b
--- /dev/null
+++ b/npc/test/npc1.txt
@@ -0,0 +1,670 @@
+// Evol scripts.
+// Author:
+// 4144
+// Description:
+// test npc1
+
+test,10,10,0 script npc1#door NPC_HIDDEN,0,1,{
+OnTouch:
+ warp "test", 20, 20;
+ close;
+OnUnTouch:
+ doevent "npc1::OnUnTouch";
+}
+
+test,10,10,0 script npc1 NPC_TEST1,3,3,{
+ function areatest
+ {
+ mesn;
+ mes "getareausers(\"test\", 7, 7, 13, 13): " + getareausers("test", 7, 7, 13, 13);
+ mes "getareausers(7, 7, 13, 13): " + getareausers(7, 7, 13, 13);
+ mes "getareausers(\"test\"): " + getareausers("test");
+ mes "getareausers(): " + getareausers();
+ mes "getareausers(\"test\", 1): " + getareausers("test", 1);
+ mes "getareausers(1): " + getareausers(1);
+ next;
+ return;
+ }
+
+L_Start:
+ switch (select("show area", "map", "pc", "change npc direction", "quest test", "cart", "items", "chat", "wall", "craft", "hashtable", "instance", "mercenary", "npc"))
+ {
+ case 1:
+ areatest;
+ break;
+ case 2:
+ while(1)
+ {
+ .@mask = getmapmask("test");
+ mes "current mask: " + str(.@mask);
+ switch (select("show sand:show grass:show fog:hide fog:back"))
+ {
+ case 1:
+ addremovemapmask "test", 4, 8;
+ break;
+ case 2:
+ addremovemapmask "test", 8, 4;
+ break;
+ case 3:
+ addmapmask "test", 2;
+ break;
+ case 4:
+ removemapmask "test", 2;
+ break;
+ case 5:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+
+ case 3:
+ while(1)
+ {
+ switch (select("change sex:setmount 0:setmount 1:setmount 2:test command:back"))
+ {
+ case 1:
+ changecharsex;
+ break;
+ case 2:
+ setmount 0;
+ break;
+ case 3:
+ setmount 1;
+ break;
+ case 4:
+ setmount 2;
+ break;
+ case 5:
+ clientcommand "emote 1";
+ break;
+ case 6:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 4:
+ for (.@f = 0; .@f < 9; .@f ++)
+ {
+ mes "" + .@f;
+ .dir = .@f;
+ next;
+ }
+ break;
+ case 5:
+ mes "current";
+ .@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 " + 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)
+ {
+ switch (select("add cart:remove cart:back"))
+ {
+ case 1:
+ setcart 1;
+ break;
+ case 2:
+ setcart 0;
+ break;
+ case 3:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 7:
+ while(1)
+ {
+ switch (select("refine", "rent", "bound", "named", "cards", "options", "back"))
+ {
+ case 1:
+ .@item = -1;
+ while(1)
+ {
+ switch (select("set item", "refine +1", "refine -1", "refine fail", "back"))
+ {
+ case 1:
+ .@item = requestitemindex();
+ mes "Item index selected: " + str(.@item);
+ break;
+ case 2:
+ successrefindex .@item, 1;
+ break;
+ case 3:
+ downrefindex .@item, 1;
+ break;
+ case 4:
+ failedrefindex .@item;
+ break;
+ case 5:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 2:
+ while(1)
+ {
+ switch (select("rent vneck for 10 seconds",
+ "rent vneck for 30 seconds",
+ "rent vneck for 1 minute",
+ "rent vneck for 5 minutes",
+ "back"))
+ {
+ case 1:
+ rentitem 1301, 10;
+ break;
+ case 2:
+ rentitem 1301, 30;
+ break;
+ case 3:
+ rentitem 1301, 60;
+ break;
+ case 4:
+ rentitem 1301, 300;
+ break;
+ case 5:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 3:
+ while(1)
+ {
+ switch (select("get bound vneck",
+ "back"))
+ {
+ case 1:
+ getitembound2 1301, 1, 1, 0, 0, 0, 0, 0, 0, 1;
+ break;
+ case 2:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 4:
+ while(1)
+ {
+ switch (select("get named vneck",
+ "back"))
+ {
+ case 1:
+ getnameditem 1301, "4144";
+ break;
+ case 2:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 5:
+ .@item = -1;
+ while(1)
+ {
+ switch (select("set item",
+ "remove cards success",
+ "fail, remove both",
+ "fail, remove card",
+ "fail, remove item",
+ "fail, safe",
+ "print all",
+ "remove 0",
+ "back"))
+ {
+ case 1:
+ .@item = requestitemindex();
+ mes "Item index selected: " + str(.@item);
+ break;
+ case 2:
+ successremovecardsindex .@item;
+ break;
+ case 3:
+ failedremovecardsindex .@item, 0;
+ break;
+ case 4:
+ failedremovecardsindex .@item, 1;
+ break;
+ case 5:
+ failedremovecardsindex .@item, 2;
+ break;
+ case 6:
+ failedremovecardsindex .@item, 3;
+ break;
+ case 7:
+ mes "slots=" + str(MAX_SLOTS);
+ for (.@i = 0; .@i < MAX_SLOTS; .@i++)
+ {
+ mes "slot " + str(.@i) + " = " + str(getcardbyindex(.@item, .@i));
+ }
+ mes "item options:";
+ for (.@i = 0; .@i < 5; .@i ++)
+ {
+ mes sprintf("%d: Option: %d, Value: %d", .@i, getitemoptionidbyindex(.@item, .@i), getitemoptionvaluebyindex(.@item, .@i));
+ }
+ break;
+ case 8:
+ removecardbyindex(.@item, 0);
+ break;
+ case 9:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 6:
+ .@item = -1;
+ while(1)
+ {
+ switch (select("set item", "info", "set option 1", "remove options", "back"))
+ {
+ case 1:
+ .@item = requestitemindex();
+ mes "Item index selected: " + str(.@item);
+ break;
+ case 2:
+ mes "Selected item options";
+ for (.@i = 0; .@i < 5; .@i ++)
+ {
+ mes sprintf("%d: Option: %d, Value: %d", .@i, getitemoptionidbyindex(.@item, .@i), getitemoptionvaluebyindex(.@item, .@i));
+ }
+ break;
+ case 3:
+ setitemoptionbyindex(.@item, 0, VAR_MAXHPAMOUNT, 200);
+ setitemoptionbyindex(.@item, 1, VAR_STRAMOUNT, 10);
+ setitemoptionbyindex(.@item, 2, VAR_VITAMOUNT, -5);
+ break;
+ case 4:
+ mes "Remove item options";
+ for (.@i = 0; .@i < 5; .@i ++)
+ {
+ setitemoptionbyindex(.@item, .@i, 0, 0);
+ }
+ break;
+ case 5:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 7:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 8:
+ chatjoin .chat;
+ close;
+ case 9:
+ while(1)
+ {
+ switch (select("set wall 1:set wall 2:set wall 3:delete wall 1:delete wall 2:delete wall 3:back"))
+ {
+ case 1:
+ setcells "test", 14, 11, 17, 11, 3, "wall1";
+ break;
+ case 2:
+ setcells "test", 14, 7, 21, 8, 1, "wall2";
+ break;
+ case 3:
+ setcells "test", 13, 15, 13, 21, 3, "wall3";
+ break;
+ case 4:
+ delcells "wall1";
+ break;
+ case 5:
+ delcells "wall2";
+ break;
+ case 6:
+ delcells "wall3";
+ break;
+ case 7:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 10:
+ while(1)
+ {
+ switch (select("technical:normal:back"))
+ {
+ case 1:
+ setskin "test2";
+ .@var$ = requestcraft(9);
+ mes .@var$;
+ .@craft = initcraft(.@var$);
+ mes "craft id: " + str(.@craft);
+ mes "is craft valid: " + validatecraft(.@craft);
+ .@id = getcraftslotid(.@craft, 0);
+ .@amount = getcraftslotamount(.@craft, 0);
+ mes "first item id: " + .@id;
+ mes "first item name: " + getitemlink(.@id);
+ mes "first item amount: " + .@amount;
+
+ .@id = getcraftslotid(.@craft, 1);
+ .@amount = getcraftslotamount(.@craft, 1);
+ mes "second item id: " + .@id;
+ mes "second item name: " + getitemlink(.@id);
+ mes "second item amount: " + .@amount;
+// dumpcraft .@craft;
+ .@entry = findcraftentry(.@craft, 0);
+ mes "found craft entry: " + .@entry;
+ if (.@entry < 0)
+ {
+ mes "no craft recipe found";
+ }
+ else
+ {
+ mes "use craft";
+ usecraft .@craft;
+ mes "return code: " + getcraftcode(.@entry);
+ }
+ deletecraft .@craft;
+ setskin "";
+ break;
+ case 2:
+ mes "put items what you want to craft";
+ setskin "test2";
+ .@var$ = requestcraft(9);
+ setskin "";
+ .@craft = initcraft(.@var$);
+ if (.@craft < 0)
+ {
+ mes "Craft error.";
+ goto L_Start;
+ }
+ mes "lets see what you can get...";
+ next;
+ if (!validatecraft(.@craft))
+ {
+ mes "inventory was changed.";
+ goto L_Start;
+ }
+ .@entry = findcraftentry(.@craft, 0);
+ if (.@entry < 0)
+ {
+ mes "no craft recipe found";
+ }
+ else
+ {
+ mes "found recipe";
+ usecraft .@craft;
+ mes "return code: " + getcraftcode(.@entry);
+ }
+ deletecraft .@craft;
+ break;
+ case 3:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 11:
+ switch(select("Create new hashtable",
+ "Use existing ID"))
+ {
+ case 1:
+ .@ht = htnew();
+ mes "ID = " + .@ht;
+ break;
+ case 2:
+ mes "Input ID";
+ input .@ht;
+ break;
+ }
+ .@defval = 0;
+ .@defval_str$ = "";
+ .@newval = 0;
+ .@newval_str$ = "";
+ .@key$ = "";
+
+ while(1)
+ {
+ switch (select("Set default string value",
+ "Set default number value",
+ "Get string",
+ "Get number",
+ "Put string",
+ "Put number",
+ "Show hashtable",
+ "Clear hashtable",
+ "Delete hashtable",
+ "Exit"))
+ {
+ case 1:
+ input .@defval_str$;
+ break;
+ case 2:
+ input .@defval;
+ break;
+ case 3:
+ mes "Input key:";
+ input .@key$;
+ mes "htget(" + .@ht + ", \"" + .@key$ + "\") = " + htget(.@ht, .@key$);
+ mes "htget(" + .@ht + ", \"" + .@key$ + "\", \"" + .@defval_str$ + "\") = " + htget(.@ht, .@key$, .@defval_str$);
+ break;
+ case 4:
+ mes "Input key:";
+ input .@key$;
+ mes "htget(" + .@ht + ", \"" + .@key$ + "\") = " + htget(.@ht, .@key$);
+ mes "htget(" + .@ht + ", \"" + .@key$ + "\", " + .@defval + ") = " + htget(.@ht, .@key$, .@defval);
+ break;
+ case 5:
+ mes "Input key:";
+ input .@key$;
+ mes "Input value:";
+ input .@newval_str$;
+ htput(.@ht, .@key$, .@newval_str$);
+ mes "htput(" + .@ht + ", \"" + .@key$ + "\", \"" + .@newval_str$ + "\")";
+ mes "htget(" + .@ht + ", \"" + .@key$ + "\") = " + htget(.@ht, .@key$);
+ break;
+ case 6:
+ mes "Input key:";
+ input .@key$;
+ mes "Input value:";
+ input .@newval;
+ htput(.@ht, .@key$, .@newval);
+ mes "htput(" + .@ht + ", \"" + .@key$ + "\", " + .@newval + ")";
+ mes "htget(" + .@ht + ", \"" + .@key$ + "\") = " + htget(.@ht, .@key$);
+ break;
+ case 7:
+ mes "size = " + htsize(.@ht);
+ .@hti = htiterator(.@ht);
+ for(.@key$ = htinextkey(.@hti); hticheck(.@hti); .@key$ = htinextkey(.@hti))
+ mes "key = " + .@key$ + " value = " + htget(.@ht, .@key$);
+ htidelete(.@hti);
+ break;
+ case 8:
+ htclear(.@ht);
+ mes "htclear(" + .@ht + ")";
+ break;
+ case 9:
+ htdelete(.@ht);
+ mes "htdelete(" + .@ht + ")";
+ break;
+ case 10:
+ goto L_Start;
+ } // switch
+ } // while
+ break;
+ case 12:
+ while(1)
+ {
+ switch (select("create", "warp", "info", "warp back", "delete", "back"))
+ {
+ case 1:
+ if (.instid >= 0)
+ {
+ mes "Error: test instance already created";
+ break;
+ }
+// .instid = instance_create("test@instance", 0, 0);
+ .instid = instance_create("test@instance", getcharid(3), IOT_CHAR);
+ if (.instid < 0)
+ {
+ mes "Error: creating instance";
+ break;
+ }
+ mes "new instance id: " + str(.instid);
+// .@instanceMapName$ = instance_attachmap("test", .instid, 1, "test@map1");
+// .@instanceMapName$ = instance_attachmap("test", .instid, 1);
+ .@instanceMapName$ = instance_attachmap("test", .instid, 0, "test@map1");
+ if (.@instanceMapName$ == "")
+ {
+ mes "Error: instance attach map error";
+ break;
+ }
+ mes "Attached instance map name: " + .@instanceMapName$;
+ instance_set_timeout(1000000, 1000000, .instid);
+ instance_init(.instid);
+ break;
+ case 2:
+ warp "test@map1", 12, 12;
+ break;
+ case 3:
+ mes "npc name: " + .name$;
+ mes "npc ext name: " + .extname$;
+ mes "npc id: " + .id;
+ mes "npc parent id: " + .parent;
+ mes "npc src id: " + .srcId;
+ if (instance_id() >= 0)
+ {
+ mes "npc1 in instance named: " + instance_npcname("npc1");
+ }
+ else
+ {
+ mes "npc1 not in instance";
+ }
+ break;
+ case 4:
+ warp "test", 12, 12;
+ break;
+ case 5:
+ if (.instid < 0)
+ {
+ mes "Error: test instance was not created";
+ break;
+ }
+ instance_destroy(.instid);
+ break;
+ case 6:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 13:
+ while(1)
+ {
+ switch (select("create mercenary for 10 seconds", "create mercenary for 1 min", "create mercenary for 10 min", "back"))
+ {
+ case 1:
+ mercenary_create 1191, 10000;
+ break;
+ case 2:
+ mercenary_create 1191, 60000;
+ break;
+ case 3:
+ mercenary_create 1191, 600000;
+ break;
+ case 4:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ case 14:
+ while(1)
+ {
+ switch (select("set hair 1", "set hair 0", "equip vneck", "unequip vneck", "back"))
+ {
+ case 1:
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 5);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+ break;
+ case 2:
+ .@npcId = getnpcid(0, "npc4");
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 0);
+ break;
+ case 3:
+ .@npcId = getnpcid(0, "npc4");
+ setunitdata(.@npcId, UDT_HEADTOP, 1301);
+ break;
+ case 4:
+ .@npcId = getnpcid(0, "npc4");
+ setunitdata(.@npcId, UDT_HEADTOP, 0);
+ break;
+ case 5:
+ goto L_Start;
+ break;
+ }
+ }
+ break;
+ }
+
+ close;
+
+OnTouch:
+ doorTouch;
+
+OnUnTouch:
+ doorUnTouch;
+
+OnTimer340:
+ doorTimer;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 5;
+ .alwaysVisible = true;
+ waitingroom "test room", 2, "npc1::OnReadyCheck", 1;
+ // test instance id
+ .instid = -10;
+ if (.parent != 0)
+ {
+ setnpcdir 0;
+ }
+ end;
+
+OnWhisperGlobal:
+ mes "cmd: " + @whispervar0$;
+ close;
+
+OnSkillInvoke:
+ skillInvoke[@skillId] = skillInvoke[@skillId] + 1;
+ end;
+
+OnReadyCheck:
+ debugmes "OnReadyCheck";
+ $@bgid1 = waitingroom2bg("testbg", 10, 10, "bgnpc1::OnLogout","bgnpc1:OnDie");
+ debugmes "bgid=" + str($@bgid1);
+ setbgteam $@bgid1, 1;
+ bg_warp $@bgid1, "testbg", 10, 10;
+}
diff --git a/npc/test/npc2.txt b/npc/test/npc2.txt
new file mode 100644
index 000000000..8a2146f11
--- /dev/null
+++ b/npc/test/npc2.txt
@@ -0,0 +1,35 @@
+// Evol scripts.
+// Author:
+// 4144
+// Description:
+// test npc2
+
+test,20,10,0 trader npc2 NPC_HAT_BOX,{
+OnInit:
+ tradertype(NST_MARKET);
+ sellitem 505, -1, 10;
+ sellitem 502, -1, 10;
+ sellitem 513, -1, 10;
+ sellitem 509, -1, 10;
+ sellitem 2000, -1, 10;
+ sellitem 1800, -1, 10;
+ sellitem 3501, -1, 10;
+ end;
+
+OnClock0000:
+ if (shopcount(505) < 10)
+ sellitem 505, -1, 10;
+ if (shopcount(502) < 10)
+ sellitem 502, -1, 10;
+ if (shopcount(513) < 10)
+ sellitem 513, -1, 10;
+ if (shopcount(509) < 10)
+ sellitem 509, -1, 10;
+ if (shopcount(2000) < 10)
+ sellitem 2000, -1, 10;
+ if (shopcount(1800) < 10)
+ sellitem 1800, -1, 10;
+ if (shopcount(3501) < 10)
+ sellitem 3501, -1, 10;
+ end;
+}
diff --git a/npc/test/npc3.txt b/npc/test/npc3.txt
new file mode 100644
index 000000000..82d5fe3f3
--- /dev/null
+++ b/npc/test/npc3.txt
@@ -0,0 +1,7 @@
+// Evol scripts.
+// Author:
+// 4144
+// Description:
+// test npc3
+
+test,25,10,0 cashshop npc3 NPC_SHOP_BAG,505:100,502:-1,513:-1,509:-1,2000:-1,1800:-1,3501:-1
diff --git a/npc/test/npc4.txt b/npc/test/npc4.txt
new file mode 100644
index 000000000..b85d1bf88
--- /dev/null
+++ b/npc/test/npc4.txt
@@ -0,0 +1,30 @@
+// Evol scripts.
+// Author:
+// 4144
+// Description:
+// test npc4
+
+test,25,20,0 script npc4 NPC_PLAYER,{
+ close;
+OnTimer1000:
+ domovestep;
+OnInit:
+ .walkmask = WALK_WATER;
+ initpath "move", 20, 20,
+ "sit", 0, 0,
+ "dir", 6, 0,
+ "move", 25, 20,
+ "emote", 3, 0,
+// "class", 104, 0,
+ "speed", 100, 0,
+ "wait", 2, 0,
+ "move", 22, 10,
+ "rmove", 3, 3,
+// "class", 801, 0,
+ "speed", 200, 0,
+ "wait", 1, 0,
+ "warp", 22, 30,
+ "goto", 0, 0;
+ initialmove;
+ initnpctimer;
+}
diff --git a/npc/test/npc5.txt b/npc/test/npc5.txt
new file mode 100644
index 000000000..faa655e8f
--- /dev/null
+++ b/npc/test/npc5.txt
@@ -0,0 +1,34 @@
+// Evol scripts.
+// Author:
+// Travolta
+// Description:
+// test npc5
+
+function script npc5TestFunc {
+ npctalk getarg(0);
+ return 0;
+}
+
+test,45,25,0 script npc5 NPC_PLAYER,{
+ close;
+
+OnTimer1000:
+ dographmovestep;
+
+OnInit:
+ // .debug = 1;
+ initmovegraph "topleft", 45, 25,
+ "topright", 55, 25,
+ "bottomright", 55, 34,
+ "bottomleft", 45, 34;
+
+ setmovegraphcmd "topleft", "topright", 30, "dir 0; wait 1",
+ "topleft", "bottomright", 20, "class 104",
+ "topleft", "bottomleft", 50, "emote 8; wait 1; warp bottomright",
+ "topright", "bottomleft", 1, "emote 3; wait 5",
+ "bottomleft", "topleft", 25, "dir 2; wait 1; call npc5TestFunc Hello=)",
+ "bottomleft", "bottomright", 10, "speed 40",
+ "bottomright", "bottomleft", 1, "class 801; speed 100; dir 0; emote 1; wait 4";
+ firstmove "wait 1; speed 100; dir 4; emote 7";
+ initnpctimer;
+}
diff --git a/npc/test/npc6.txt b/npc/test/npc6.txt
new file mode 100644
index 000000000..7c4893ad7
--- /dev/null
+++ b/npc/test/npc6.txt
@@ -0,0 +1,23 @@
+// Evol scripts.
+// Authors:
+// 4144
+// Description:
+// test npc1
+
+test,30,10,0 trader npc6 NPC_SHOP_BAG_TEST,{
+ end;
+
+OnCountFunds:
+ setcurrency 10000;
+ end;
+
+OnPayFunds:
+ dispbottom "Hi: price="+@price+" and points="+@points;
+ // check and remove points
+ purchaseok;
+ end;
+OnInit:
+ tradertype NST_CUSTOM;
+ sellitem Acorn, 500;
+ sellitem Bread, 200;
+}
diff --git a/npc/test/npcmarriage.txt b/npc/test/npcmarriage.txt
new file mode 100644
index 000000000..1b7497bdc
--- /dev/null
+++ b/npc/test/npcmarriage.txt
@@ -0,0 +1,19 @@
+// Evol scripts.
+// Author:
+// 4144
+// Description:
+// npc marriage
+
+test,25,14,0 script marriage1 NPC_PLAYER,{
+ marriagemain();
+ close;
+
+OnTimer30000:
+ marriagecheck();
+ end;
+
+OnInit:
+ .sex = G_MALE;
+ .distance = 3;
+ initnpctimer;
+}
diff --git a/npc/test/test1.txt b/npc/test/test1.txt
new file mode 100644
index 000000000..a6e6d4b94
--- /dev/null
+++ b/npc/test/test1.txt
@@ -0,0 +1,76 @@
+// Evol scripts.
+// Author:
+// 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,{
+ mes "Npc vars testing...";
+ .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 "Formatting testing...";
+ if (l("test @@", "") != "test ")
+ mes "Error: format string 'l(\"test @@\", \"\")': " + l("test @@", "");
+ if (l("test @@", "1") != "test 1")
+ mes "Error: format string 'l(\"test @@\", \"1\")': " + l("test @@", "1");
+ if (l("@@", "") != "")
+ mes "Error: format string 'l(\"@@\", \"\")': " + l("@@", "");
+ if (l("@@") != "@@")
+ mes "Error: format string 'l(\"@@\")': " + l("@@");
+ if (l("@@ @@ @@", "this", "is", "test") != "this is test")
+ 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;
+
+OnInit:
+ .walkmask = 3;
+ end;
+}
diff --git a/npc/test/test2.txt b/npc/test/test2.txt
new file mode 100644
index 000000000..6870463c7
--- /dev/null
+++ b/npc/test/test2.txt
@@ -0,0 +1,13 @@
+// Evol scripts.
+// Author:
+// 4144
+// Description:
+// script tests
+
+test,12,5,0 script test2 NPC_HAT_BOX,{
+ close;
+
+OnInit:
+ .walkmask = 4;
+ end;
+}