summaryrefslogtreecommitdiff
path: root/npc/003-5
diff options
context:
space:
mode:
authorjesusalva <cpntb1@ymail.com>2018-02-11 18:08:17 -0200
committerjesusalva <cpntb1@ymail.com>2018-02-11 18:08:17 -0200
commit983babd6f5e572c1f96054dafb918d8415552870 (patch)
tree7f2d76afb8635d1f5a9ed78a407273b14c32fa82 /npc/003-5
parenta59ba233131b883dc76ca1d124c4c16e22891893 (diff)
downloadserverdata-983babd6f5e572c1f96054dafb918d8415552870.tar.gz
serverdata-983babd6f5e572c1f96054dafb918d8415552870.tar.bz2
serverdata-983babd6f5e572c1f96054dafb918d8415552870.tar.xz
serverdata-983babd6f5e572c1f96054dafb918d8415552870.zip
Include an instance test called Arnea for later
Diffstat (limited to 'npc/003-5')
-rw-r--r--npc/003-5/_import.txt1
-rw-r--r--npc/003-5/arnea.txt105
2 files changed, 106 insertions, 0 deletions
diff --git a/npc/003-5/_import.txt b/npc/003-5/_import.txt
index b37bbfb80..df1250d0c 100644
--- a/npc/003-5/_import.txt
+++ b/npc/003-5/_import.txt
@@ -1,3 +1,4 @@
// Map 003-5: Tulimshar Jeweler
// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/003-5/arnea.txt",
"npc/003-5/_warps.txt",
diff --git a/npc/003-5/arnea.txt b/npc/003-5/arnea.txt
new file mode 100644
index 000000000..7797360bb
--- /dev/null
+++ b/npc/003-5/arnea.txt
@@ -0,0 +1,105 @@
+// TMW2 Scripts
+// Author:
+// 4144
+// Jesusalva
+// Description:
+// Arena for Duels and PVP (temporary map)
+
+003-5,33,37,0 script Arnea NPC_ELF_F,{
+ .@ARENA_INSTID=has_instance2("003-5@" + getcharid(3));
+ mesn;
+ mesq l("Welcome to the Arena. Select your action");
+ switch (select("create", "warp", "info", "warp back", "delete", "back"))
+ {
+ case 1:
+ if (.@ARENA_INSTID >= 0)
+ {
+ mes "Error: either already in instance, or not authorized.";
+ break;
+ }
+ .@ARENA_INSTID = instance_create("003-5@instance", getcharid(3), IOT_CHAR);
+ if (.@ARENA_INSTID < 0)
+ {
+ mes "Error: creating instance";
+ break;
+ }
+ mes "new instance id: " + str(.@ARENA_INSTID);
+ .@instanceMapName$ = instance_attachmap("003-5", .@ARENA_INSTID, 0, "003-5@" + getcharid(3));
+ if (.@instanceMapName$ == "")
+ {
+ mes "Error: instance attach map error";
+ break;
+ }
+ mes "Attached instance map name: " + .@instanceMapName$;
+ instance_set_timeout(1000000, 1000000, .@ARENA_INSTID);
+ instance_init(.@ARENA_INSTID);
+ break;
+ case 2:
+ warp "003-5@" + getcharid(3), 30, 31;
+ 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;
+ mes "char id 3: " + getcharid(3);
+ mes "instance id: " + .@ARENA_INSTID;
+ if (instance_id() >= 0)
+ {
+ mes "npc1 in instance named: " + instance_npcname("npc1");
+ .@npcId = getnpcid(0, instance_npcname(.name$));
+ setunitdata(.@npcId, UDT_HEADTOP, 2907);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, 1305);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, 2204);
+ setunitdata(.@npcId, UDT_WEAPON, 3509);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 18);
+ }
+ else
+ {
+ mes "npc1 not in instance";
+ }
+ break;
+ case 4:
+ warp "003-5", 30, 31;
+ break;
+ case 5:
+ if (.@ARENA_INSTID < 0)
+ {
+ mes "Error: 003-5 instance was not created";
+ break;
+ }
+ instance_destroy(.@ARENA_INSTID);
+ break;
+ case 6:
+ break;
+ }
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, "Arnea");
+ setunitdata(.@npcId, UDT_HEADTOP, 2907);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, 1305);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, 2204);
+ setunitdata(.@npcId, UDT_WEAPON, 3509);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 18);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ .alwaysVisible = true;
+ // test instance id
+ end;
+
+OnInstanceInit:
+ .@npcId = getnpcid(0, instance_npcname(.name$));
+ setunitdata(.@npcId, UDT_HEADTOP, 2907);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, 1305);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, 2204);
+ setunitdata(.@npcId, UDT_WEAPON, 3509);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 18);
+ end;
+
+}