diff options
author | jesusalva <cpntb1@ymail.com> | 2018-02-12 19:02:21 -0200 |
---|---|---|
committer | jesusalva <cpntb1@ymail.com> | 2018-02-12 19:02:21 -0200 |
commit | f1a88e12b190e055f9c4db6ca4711cfdd810720e (patch) | |
tree | 59701eb0a875deac27df87de7a4923fe495d8494 | |
parent | daa2aa38b085b51281c9d2069e5e30cd29a5ef8b (diff) | |
download | serverdata-f1a88e12b190e055f9c4db6ca4711cfdd810720e.tar.gz serverdata-f1a88e12b190e055f9c4db6ca4711cfdd810720e.tar.bz2 serverdata-f1a88e12b190e055f9c4db6ca4711cfdd810720e.tar.xz serverdata-f1a88e12b190e055f9c4db6ca4711cfdd810720e.zip |
Arnea instance system seems to be working partly.
I still need to destroy them, and manage the fights.
-rw-r--r-- | npc/003-13/_import.txt | 1 | ||||
-rw-r--r-- | npc/003-13/arnea.txt | 80 |
2 files changed, 81 insertions, 0 deletions
diff --git a/npc/003-13/_import.txt b/npc/003-13/_import.txt index 510fd0d6f..9385569ae 100644 --- a/npc/003-13/_import.txt +++ b/npc/003-13/_import.txt @@ -1,3 +1,4 @@ // Map 003-13: duel map // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/003-13/arnea.txt", "npc/003-13/_warps.txt", diff --git a/npc/003-13/arnea.txt b/npc/003-13/arnea.txt new file mode 100644 index 000000000..6ff4375ca --- /dev/null +++ b/npc/003-13/arnea.txt @@ -0,0 +1,80 @@ +// TMW2 Scripts +// Author: +// 4144 +// Jesusalva +// Description: +// Arena for Duels and PVP (temporary map) + +003-13,30,27,0 script Arnea#003-13 NPC_ELF_F,{ + 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: " + instance_id(); + mes "Map ID: " + instance_mapname("003-13"); + if (instance_id() >= 0) + { + mes "npc in instance named: " + instance_npcname(.name$); + next; + goto L_Manage; + } + else + { + mes "npc not in instance"; + } + close; + +L_Manage: + mesn; + switch (select( + "warp back", + rif(getcharid(3) == $@ARENA_INSTANCES[replacestr(instance_mapname("003-13"), "003-13@a", "")] || getgmlevel(),"delete"), + "cancel")) + { + case 1: + warp "003-5", 33, 40; + break; + case 2: + if (instance_id() < 0) + { + mes "Error: not in an instance"; + break; + } + .@ArenaToFree=replacestr(instance_mapname("003-13"), "003-13@a", ""); + //mes .@ArenaToFree; + //next; + $@ARENA_INSTANCES[.@ArenaToFree]=-1; + warp "003-5", 33, 40; + //instance_destroy(instance_id()); // TODO FIXME + break; + case 3: + break; + } + close; +OnInit: + .@npcId = getnpcid(0, .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); + + .sex = G_FEMALE; + .distance = 9; + // 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; + +} |