From a59ba233131b883dc76ca1d124c4c16e22891893 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Sun, 11 Feb 2018 15:35:46 -0200 Subject: Safe --- npc/003-1/michel.txt | 4 ++-- 1 file changed, 2 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; } -- cgit v1.2.3-60-g2f50 From 983babd6f5e572c1f96054dafb918d8415552870 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Sun, 11 Feb 2018 18:08:17 -0200 Subject: Include an instance test called Arnea for later --- npc/003-5/_import.txt | 1 + npc/003-5/arnea.txt | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 npc/003-5/arnea.txt 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; + +} -- cgit v1.2.3-60-g2f50