summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjesusalva <cpntb1@ymail.com>2018-02-12 21:08:52 -0200
committerjesusalva <cpntb1@ymail.com>2018-02-12 21:08:52 -0200
commita0c564de99be2122aab4536ca1b6d0ab65eddb84 (patch)
tree28dea0203082a9ce17c81982a510b229e132fe20
parentf1a88e12b190e055f9c4db6ca4711cfdd810720e (diff)
downloadserverdata-a0c564de99be2122aab4536ca1b6d0ab65eddb84.tar.gz
serverdata-a0c564de99be2122aab4536ca1b6d0ab65eddb84.tar.bz2
serverdata-a0c564de99be2122aab4536ca1b6d0ab65eddb84.tar.xz
serverdata-a0c564de99be2122aab4536ca1b6d0ab65eddb84.zip
This HORROBLE hack can fix Arnea in a normal gameplay, but is full of breaches.
For a test server it can meet demands, but we'll need to fix it sometime
-rw-r--r--npc/003-13/arnea.txt3
-rw-r--r--npc/003-5/_import.txt1
-rw-r--r--npc/003-5/_warps.txt2
-rw-r--r--npc/003-5/arnea.txt4
-rw-r--r--npc/003-5/broken_old_arnea.txt124
-rw-r--r--npc/003-5/doors.txt22
6 files changed, 155 insertions, 1 deletions
diff --git a/npc/003-13/arnea.txt b/npc/003-13/arnea.txt
index 6ff4375ca..4cf07ca14 100644
--- a/npc/003-13/arnea.txt
+++ b/npc/003-13/arnea.txt
@@ -47,6 +47,9 @@ L_Manage:
//next;
$@ARENA_INSTANCES[.@ArenaToFree]=-1;
warp "003-5", 33, 40;
+ DESTROY_ME=1;
+ DESTROY_MY_ID=instance_id();
+ //instance_detachmap("003-13");
//instance_destroy(instance_id()); // TODO FIXME
break;
case 3:
diff --git a/npc/003-5/_import.txt b/npc/003-5/_import.txt
index df1250d0c..3cc7e2b9e 100644
--- a/npc/003-5/_import.txt
+++ b/npc/003-5/_import.txt
@@ -1,4 +1,5 @@
// 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/doors.txt",
"npc/003-5/_warps.txt",
diff --git a/npc/003-5/_warps.txt b/npc/003-5/_warps.txt
index 5e4345780..1997c1c85 100644
--- a/npc/003-5/_warps.txt
+++ b/npc/003-5/_warps.txt
@@ -1,3 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 003-5: Tulimshar Jeweler warps
-003-5,38,41,0 warp #003-5_38_41 0,0,003-1,96,145
+//003-5,38,41,0 warp #003-5_38_41 0,0,003-1,96,145
diff --git a/npc/003-5/arnea.txt b/npc/003-5/arnea.txt
index bec00ba4d..73412b486 100644
--- a/npc/003-5/arnea.txt
+++ b/npc/003-5/arnea.txt
@@ -6,6 +6,10 @@
// Arena for Duels and PVP (003-13,31,31)
003-5,33,37,0 script Arnea NPC_ELF_F,{
+ if (DESTROY_ME) {
+ DESTROY_ME=0;
+ instance_destroy(DESTROY_MY_ID);
+ }
mesn;
mesq l("Welcome to the Arena. Select your action");
menu
diff --git a/npc/003-5/broken_old_arnea.txt b/npc/003-5/broken_old_arnea.txt
new file mode 100644
index 000000000..ccd4c68b5
--- /dev/null
+++ b/npc/003-5/broken_old_arnea.txt
@@ -0,0 +1,124 @@
+// TMW2 Scripts
+// Author:
+// 4144
+// Jesusalva
+// Description:
+// Arena for Duels and PVP (temporary map)
+
+003-5,33,37,0 script Arnea NPC_ELF_F,{
+ mesn;
+ mesq l("Welcome to the Arena. Select your action");
+ menu
+ l("Create new arena"), L_NewArena,
+ l("Join existing arena"), L_JoinArena,
+ l("Information"), L_Info,
+ l("Leave"), L_Quit;
+
+L_NewArena:
+ mes "";
+ mesn;
+ if (Zeny < .price) {
+ mesq l("You need @@ GP to use this arena.", .price);
+ } else {
+ mesq l("Okay, which arena will you rent? Cost is @@ GP.", .price);
+ menu
+ rif($@ARENA_INSTANCES[0] < 0, l("Arena 1")), -,
+ rif($@ARENA_INSTANCES[1] < 0, l("Arena 2")), -,
+ rif($@ARENA_INSTANCES[2] < 0, l("Arena 3")), -,
+ rif($@ARENA_INSTANCES[3] < 0, l("Arena 4")), -,
+ rif($@ARENA_INSTANCES[4] < 0, l("Arena 5")), -,
+ l("Give Up"), L_Quit;
+
+ $@ARENA_INSTANCES[@menu-1]=getcharid(3);
+ .@ARENA_INSTID = instance_create("003-5@"+(@menu), getcharid(3), IOT_CHAR);
+ if (.@ARENA_INSTID >= 0)
+ {
+ mes "new instance id: " + str(.@ARENA_INSTID);
+ .@instanceMapName$ = instance_attachmap("003-5", .@ARENA_INSTID, 0, "003-5@" + (@menu-1));
+ if (.@instanceMapName$ == "")
+ {
+ mes "Error: instance attach map error";
+ } else {
+ mes "Attached instance map name: " + .@instanceMapName$;
+ instance_set_timeout(1000000, 1000000, .@ARENA_INSTID);
+ instance_init(.@ARENA_INSTID);
+ set Zeny, Zeny-1000;
+ }
+ } else {
+ $@ARENA_INSTANCES[@menu-1]=-1;
+ mes l("An error happened.");
+ }
+ }
+ goto L_Quit;
+
+
+L_Info:
+ 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);
+ if (instance_id() >= 0)
+ mes "instance id: " + instance_id();
+ close;
+
+L_JoinArena:
+ mes "";
+ mesn;
+ if (Zeny < .price) {
+ mesq l("You need @@ GP to use this arena.", .price);
+ } else {
+ mesq l("Okay, which arena will you join? Cost is @@ GP.", .price);
+ //menu
+ // rif(has_instance2("003-5@0") >= 0, l("Arena 1")), -,
+ // rif(has_instance2("003-5@1") >= 0, l("Arena 2")), -,
+ // rif(has_instance2("003-5@2") >= 0, l("Arena 3")), -,
+ // rif(has_instance2("003-5@3") >= 0, l("Arena 4")), -,
+ // rif(has_instance2("003-5@4") >= 0, l("Arena 5")), -,
+ // l("Give Up"), L_Quit;
+ menu
+ rif(4 >= 0, l("Arena 1")), -,
+ rif(3 >= 0, l("Arena 2")), -,
+ rif(5 >= 0, l("Arena 3")), -,
+ rif(3 >= 0, l("Arena 4")), -,
+ rif(4 >= 0, l("Arena 5")), -,
+ l("Give Up"), L_Quit;
+ warp "003-5@"+(@menu-1), 0,0;
+ //instance_warpall("003-5", 30, 31, (@menu-1)); // We can't hold a value so big as ARENA_INSTID
+ }
+ close;
+
+
+L_Quit:
+ 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;
+ .price=1000;
+ // test instance id
+ setarray $@ARENA_INSTANCES, -1,-1,-1,-1,-1; // Controls Owners
+ setarray $@ARENA_INFOS$, "","","","",""; // Controls Owners
+ 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;
+
+}
diff --git a/npc/003-5/doors.txt b/npc/003-5/doors.txt
new file mode 100644
index 000000000..1b4492356
--- /dev/null
+++ b/npc/003-5/doors.txt
@@ -0,0 +1,22 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+
+003-5,38,41,0 script LeaveArena NPC_HIDDEN,0,0,{
+
+OnTouch:
+ if (DESTROY_ME) goto L_Warn;
+
+ goto L_Warp;
+
+L_Warn:
+ mesn "Narrator";
+ mes col(l("You are not allowed to leave until you inform Arnea that you're done."), 1);
+ close;
+
+L_Warp:
+ warp "003-1", 96, 145;
+ closedialog;
+ close;
+}
+