summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/003-1/michel.txt4
-rw-r--r--npc/003-5/_import.txt1
-rw-r--r--npc/003-5/arnea.txt105
3 files changed, 108 insertions, 2 deletions
diff --git a/npc/003-1/michel.txt b/npc/003-1/michel.txt
index c6665e932..1a810b3e2 100644
--- a/npc/003-1/michel.txt
+++ b/npc/003-1/michel.txt
@@ -1,13 +1,13 @@
// Author:
// Saulc
-003-1,89,109,0 script Michel NPC_MONA,{
+003-1,89,109,0 script Michel NPC_BACCHUS,{
hello;
OnInit:
.sex = G_MALE;
- .distance = 3;
+ .distance = 5;
end;
}
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;
+
+}