summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-01 20:45:37 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-01 20:45:37 -0300
commit77f418ccc63ea813488f96b0c28366abb5a9dbbd (patch)
treef7bbb487125e731c20ceadd05e02a593f2edf305
parentc2b002b6c7167455bcf1b8aedfebd74857bff990 (diff)
downloadserverdata-77f418ccc63ea813488f96b0c28366abb5a9dbbd.tar.gz
serverdata-77f418ccc63ea813488f96b0c28366abb5a9dbbd.tar.bz2
serverdata-77f418ccc63ea813488f96b0c28366abb5a9dbbd.tar.xz
serverdata-77f418ccc63ea813488f96b0c28366abb5a9dbbd.zip
This is for Crazyfefe: Improve Emergency Exit intelligence.r08.3_190301
Now when you are flushed out of the world, you'll end up in the closest town for you. Ships override location when you enter so it should be ok
-rw-r--r--npc/000-1/exit.txt17
-rw-r--r--npc/003-1/_import.txt1
-rw-r--r--npc/003-1/town.txt9
-rw-r--r--npc/009-1/_import.txt1
-rw-r--r--npc/009-1/town.txt10
-rw-r--r--npc/012-1/_import.txt1
-rw-r--r--npc/012-1/town.txt12
-rw-r--r--npc/017-1/_import.txt1
-rw-r--r--npc/017-1/town.txt9
-rw-r--r--npc/020-1/_import.txt1
-rw-r--r--npc/020-1/town.txt10
-rw-r--r--npc/024-1/_import.txt1
-rw-r--r--npc/024-1/town.txt10
-rw-r--r--npc/items/teleporter.txt4
14 files changed, 86 insertions, 1 deletions
diff --git a/npc/000-1/exit.txt b/npc/000-1/exit.txt
index c21a7ee60..b1d738471 100644
--- a/npc/000-1/exit.txt
+++ b/npc/000-1/exit.txt
@@ -8,11 +8,26 @@
OnTouch:
OnTalk:
OnTalkNearby:
- if (getsavepoint(0) != "000-1") warp getsavepoint(0), getsavepoint(1), getsavepoint(2);
+ // Switch LOCATION$ and warp to nearest town's Soul Menhir
+ .@lx=array_find($@LOCAMASTER_LOC$, LOCATION$);
+ if (.@lx >= 0) {
+ warp $@LOCMASTER_MAP$[.@lx], $@LOCMASTER_X[.@lx], $@LOCMASTER_Y[.@lx];
+ end;
+ }
+
+ //if (getsavepoint(0) != "000-1") warp getsavepoint(0), getsavepoint(1), getsavepoint(2);
+ if (getsavepoint(0) != "000-1") warp "Save", 0, 0;
if (getsavepoint(0) != "000-1") end;
savepoint "002-1", 53, 38;
warp "002-1", 53, 38;
end;
+OnInit:
+ setarray $@LOCMASTER_LOC$, "Candor", "Tulim", "Halin", "Hurns", "LoF", "Nival"; // 018-5 Lilit 024-1 Frostia
+ setarray $@LOCMASTER_MAP$, "005-1", "003-1", "009-1", "012-1", "017-1", "020-1";
+ setarray $@LOCMASTER_X, 34, 40, 26, 86, 119, 56;
+ setarray $@LOCMASTER_Y, 101, 49, 30, 69, 87, 62;
+ end;
+
}
diff --git a/npc/003-1/_import.txt b/npc/003-1/_import.txt
index 26d57714e..991cdc513 100644
--- a/npc/003-1/_import.txt
+++ b/npc/003-1/_import.txt
@@ -37,5 +37,6 @@
"npc/003-1/soul-menhir.txt",
"npc/003-1/swezanne.txt",
"npc/003-1/tinris.txt",
+"npc/003-1/town.txt",
"npc/003-1/wateranimation.txt",
"npc/003-1/well.txt",
diff --git a/npc/003-1/town.txt b/npc/003-1/town.txt
new file mode 100644
index 000000000..9b99ca1ff
--- /dev/null
+++ b/npc/003-1/town.txt
@@ -0,0 +1,9 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Reset LOCATION$ when entering a town
+
+003-1,60,157,0 script #LocTulim NPC_HIDDEN,4,0,{
+ LOCATION$="Tulim"; end;
+}
diff --git a/npc/009-1/_import.txt b/npc/009-1/_import.txt
index e91e09873..abe8b2d99 100644
--- a/npc/009-1/_import.txt
+++ b/npc/009-1/_import.txt
@@ -10,3 +10,4 @@
"npc/009-1/mapflags.txt",
"npc/009-1/soul-menhir.txt",
"npc/009-1/teleporter.txt",
+"npc/009-1/town.txt",
diff --git a/npc/009-1/town.txt b/npc/009-1/town.txt
new file mode 100644
index 000000000..df037528d
--- /dev/null
+++ b/npc/009-1/town.txt
@@ -0,0 +1,10 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Reset LOCATION$ when entering a town
+
+009-1,71,24,0 script #LocHalin NPC_HIDDEN,4,1,{
+ LOCATION$="Halin"; end;
+}
+009-1,55,72,0 duplicate(#LocHalin) #LocHalinB 3,1,NPC_HIDDEN
diff --git a/npc/012-1/_import.txt b/npc/012-1/_import.txt
index c6acc50ba..c9898eea0 100644
--- a/npc/012-1/_import.txt
+++ b/npc/012-1/_import.txt
@@ -21,4 +21,5 @@
"npc/012-1/soul-menhir.txt",
"npc/012-1/statue.txt",
"npc/012-1/terezin.txt",
+"npc/012-1/town.txt",
"npc/012-1/wateranimation.txt",
diff --git a/npc/012-1/town.txt b/npc/012-1/town.txt
new file mode 100644
index 000000000..036b203f9
--- /dev/null
+++ b/npc/012-1/town.txt
@@ -0,0 +1,12 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Reset LOCATION$ when entering a town
+
+012-1,78,49,0 script #LocHurns NPC_HIDDEN,3,1,{
+ LOCATION$="Hurns"; end;
+}
+012-1,78,80,0 duplicate(#LocHurns) #LocHurnsS 3,1,NPC_HIDDEN
+012-1,54,61,0 duplicate(#LocHurns) #LocHurnsW 1,2,NPC_HIDDEN
+012-1,127,60,0 duplicate(#LocHurns) #LocHurnsE 1,2,NPC_HIDDEN
diff --git a/npc/017-1/_import.txt b/npc/017-1/_import.txt
index 04083c2fc..ea4bbb1a3 100644
--- a/npc/017-1/_import.txt
+++ b/npc/017-1/_import.txt
@@ -15,4 +15,5 @@
"npc/017-1/signs.txt",
"npc/017-1/soul-menhir.txt",
"npc/017-1/stranger.txt",
+"npc/017-1/town.txt",
"npc/017-1/wateranimation.txt",
diff --git a/npc/017-1/town.txt b/npc/017-1/town.txt
new file mode 100644
index 000000000..74ca14256
--- /dev/null
+++ b/npc/017-1/town.txt
@@ -0,0 +1,9 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Reset LOCATION$ when entering a town
+
+017-1,219,91,0 script #LocLoF NPC_HIDDEN,1,1,{
+ LOCATION$="LoF"; end;
+}
diff --git a/npc/020-1/_import.txt b/npc/020-1/_import.txt
index 8aacf29bc..d297b38d2 100644
--- a/npc/020-1/_import.txt
+++ b/npc/020-1/_import.txt
@@ -5,4 +5,5 @@
"npc/020-1/misc.txt",
"npc/020-1/serge.txt",
"npc/020-1/siege.txt",
+"npc/020-1/town.txt",
"npc/020-1/wateranimation.txt",
diff --git a/npc/020-1/town.txt b/npc/020-1/town.txt
new file mode 100644
index 000000000..4796d0cbb
--- /dev/null
+++ b/npc/020-1/town.txt
@@ -0,0 +1,10 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Reset LOCATION$ when entering a town
+
+020-1,71,102,0 script #LocNival NPC_HIDDEN,2,0,{
+ LOCATION$="Nival"; end;
+}
+012-1,106,55,0 duplicate(#LocHurns) #LocNivalB 1,1,NPC_HIDDEN
diff --git a/npc/024-1/_import.txt b/npc/024-1/_import.txt
index 5cad72414..c31784210 100644
--- a/npc/024-1/_import.txt
+++ b/npc/024-1/_import.txt
@@ -4,3 +4,4 @@
"npc/024-1/guard.txt",
"npc/024-1/mapflags.txt",
"npc/024-1/teleporter.txt",
+"npc/024-1/town.txt",
diff --git a/npc/024-1/town.txt b/npc/024-1/town.txt
new file mode 100644
index 000000000..f3ddc20c7
--- /dev/null
+++ b/npc/024-1/town.txt
@@ -0,0 +1,10 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Reset LOCATION$ when entering a town
+
+/*024-1,x,y,0 script #LocFrostia NPC_HIDDEN,2,0,{
+ LOCATION$="Frostia"; end;
+}*/
+
diff --git a/npc/items/teleporter.txt b/npc/items/teleporter.txt
index 2b95adc0f..8e5715c94 100644
--- a/npc/items/teleporter.txt
+++ b/npc/items/teleporter.txt
@@ -70,18 +70,22 @@ OnUse:
case 2:
warp "017-1", 120, 89;
TELEPORTER_TIME=loftel_time(50, .@x);
+ LOCATION$="LoF";
break;
case 3:
warp "024-1", 155, 82;
TELEPORTER_TIME=loftel_time(360, .@x);
+ LOCATION$="Frostia";
break;
case 4:
warp "009-1", 113, 91;
TELEPORTER_TIME=loftel_time(360, .@x);
+ LOCATION$="Halin";
break;
case 5:
warp "Save", 0, 0;
TELEPORTER_TIME=loftel_time(30, .@x);
+ LOCATION$="Save";
break;
}
closedialog;