change the warp checks
Forum rules
This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.
Its current use is for the continued development of the server and game it has always served: TMW Classic.
change the warp checks
Currently, there is a lot of special-purpose logic to detect not warping from certain maps.
Instead, each such map should have the "nowarp" and "nowarpto" mapflags (which should be applied in parallel to prevent low-level GMs (those without "warp override", whatever it's stuck) from getting stuck)
I'm pretty sure all the current scripts have fixed destinations, so check nowarp, but future maps may have variable destinations, so nowarpto may need to be used in scripts in future.
Instead, each such map should have the "nowarp" and "nowarpto" mapflags (which should be applied in parallel to prevent low-level GMs (those without "warp override", whatever it's stuck) from getting stuck)
I'm pretty sure all the current scripts have fixed destinations, so check nowarp, but future maps may have variable destinations, so nowarpto may need to be used in scripts in future.
Former programmer for the TMWA server.
Re: change the warp checks
That'd be a useful feature.
Re: change the warp checks
Here's a quick difflet that does the mapflag half of it. It's possibly too much - I just assumed that anything with nosave should also be nowarp.
I also normalized some map names.
This is not tested yet.
And fix the mapflag constants to match the ones actually in the server:
... wait, there are set/remove mapflag functions but not getmapflag? Well, that's an easy fix in the server ... done on the 'test' branch.
I also normalized some map names.
This is not tested yet.
Code: Select all
diff --git i/world/map/npc/009-5/mapflags.txt w/world/map/npc/009-5/mapflags.txt
index f581bca..b7af001 100644
--- i/world/map/npc/009-5/mapflags.txt
+++ w/world/map/npc/009-5/mapflags.txt
@@ -1 +1,3 @@
-009-5.gat mapflag nosave 009-3,162,82;
+009-5.gat mapflag nosave 009-3.gat,162,82
+009-5.gat mapflag nowarp
+009-5.gat mapflag nowarpto
diff --git i/world/map/npc/025-4/mapflags.txt w/world/map/npc/025-4/mapflags.txt
index 1c8999b..d509fa4 100644
--- i/world/map/npc/025-4/mapflags.txt
+++ w/world/map/npc/025-4/mapflags.txt
@@ -1 +1,3 @@
-025-4.gat mapflag nosave 025-3,112,96;
+025-4.gat mapflag nosave 025-3.gat,112,96
+025-4.gat mapflag nowarp
+025-4.gat mapflag nowarpto
diff --git i/world/map/npc/027-3/mapflags.txt w/world/map/npc/027-3/mapflags.txt
index 5f9c091..e039cf3 100644
--- i/world/map/npc/027-3/mapflags.txt
+++ w/world/map/npc/027-3/mapflags.txt
@@ -1 +1,3 @@
-027-3.gat mapflag nosave 027-2,107,31;
+027-3.gat mapflag nosave 027-2.gat,107,31
+027-3.gat mapflag nowarp
+027-3.gat mapflag nowarpto
diff --git i/world/map/npc/027-4/mapflags.txt w/world/map/npc/027-4/mapflags.txt
index 1784cd6..93c6d06 100644
--- i/world/map/npc/027-4/mapflags.txt
+++ w/world/map/npc/027-4/mapflags.txt
@@ -1 +1,3 @@
-027-4.gat mapflag nosave 027-2,107,31;
+027-4.gat mapflag nosave 027-2.gat,107,31
+027-4.gat mapflag nowarp
+027-4.gat mapflag nowarpto
diff --git i/world/map/npc/029-3/mapflags.txt w/world/map/npc/029-3/mapflags.txt
index 845a0f0..c8b206e 100644
--- i/world/map/npc/029-3/mapflags.txt
+++ w/world/map/npc/029-3/mapflags.txt
@@ -1 +1,3 @@
-029-3.gat mapflag nosave 029-1,55,38;
+029-3.gat mapflag nosave 029-1.gat,55,38
+029-3.gat mapflag nowarp
+029-3.gat mapflag nowarpto
diff --git i/world/map/npc/031-4/mapflags.txt w/world/map/npc/031-4/mapflags.txt
index 9e4e8f6..e134d76 100644
--- i/world/map/npc/031-4/mapflags.txt
+++ w/world/map/npc/031-4/mapflags.txt
@@ -1 +1,3 @@
-031-4.gat mapflag nosave 031-3,46,26;
+031-4.gat mapflag nosave 031-3.gat,46,26
+031-4.gat mapflag nowarp
+031-4.gat mapflag nowarpto
diff --git i/world/map/npc/042-2/mapflags.txt w/world/map/npc/042-2/mapflags.txt
index c9f5cc2..0df991e 100644
--- i/world/map/npc/042-2/mapflags.txt
+++ w/world/map/npc/042-2/mapflags.txt
@@ -1 +1,3 @@
-042-2.gat mapflag nosave 042-2,26,26;
+042-2.gat mapflag nosave 042-2.gat,26,26
+042-2.gat mapflag nowarp
+042-2.gat mapflag nowarpto
diff --git i/world/map/npc/056-2/mapflags.txt w/world/map/npc/056-2/mapflags.txt
index 3701e12..c934401 100644
--- i/world/map/npc/056-2/mapflags.txt
+++ w/world/map/npc/056-2/mapflags.txt
@@ -1 +1,3 @@
-056-2.gat mapflag nosave 056-1, 56,62;
+056-2.gat mapflag nosave 056-1.gat,56,62
+056-2.gat mapflag nowarp
+056-2.gat mapflag nowarpto
Code: Select all
diff --git i/world/map/db/const.txt w/world/map/db/const.txt
index 4273717..c20f7c6 100644
--- i/world/map/db/const.txt
+++ w/world/map/db/const.txt
@@ -3,17 +3,27 @@
debug 1
-mf_nomemo 0
-mf_noteleport 1
-mf_nosave 2
-mf_nobranch 3
-mf_nopenalty 4
-mf_pvp 5
-mf_pvp_noparty 6
-mf_pvp_noguild 7
-mf_gvg 8
-mf_gvg_noparty 9
-mf_nozenypenalty 10
+MF_NOMEMO 0
+MF_NOTELEPORT 1
+MF_NOSAVE 2
+MF_NOBRANCH 3
+MF_NOPENALTY 4
+MF_NOZENYPENALTY 5
+MF_PVP 6
+MF_PVP_NOPARTY 7
+MF_PVP_NOGUILD 8
+MF_GVG 9
+MF_GVG_NOPARTY 10
+MF_NOTRADE 11
+MF_NOSKILL 12
+MF_NOWARP 13
+MF_NOPVP 14
+MF_NOICEWALL 15
+MF_SNOW 16
+MF_FOG 17
+MF_SAKURA 18
+MF_LEAVES 19
+MF_RAIN 20
StatusPoint 9 1
BaseLevel 11 1
@@ -115,10 +125,10 @@ bAddSize 1009 // +x% physical damage against a n size (bAddSize,
bSubEle 1010 // +x% damage reduction against a n element (bSubEle,n,x;).
bSubRace 1011 // +x% damage reduction against race n (bSubRace,n,x;).
bAddEff 1012 // Adds a 1/100x% chance to cause effect e to the target when attacking (bAddEff,e,x;).
-bResEff 1013 // Adds a 1/100x% tolerance to an effect (bResEff,e,x;).
+bResEff 1013 // Adds a 1/100x% tolerance to an effect (bResEff,e,x;).
bBaseAtk 1014 // A n bonus to the basic attack power (bBaseAtk,n;).
bAspdRate 1015 // +n% attack speed (bAspdRate,n;).
-bHPrecovRate 1016 // Natural HP recovery ratio increased of n% (bHPrecovRate,n;).
+bHPrecovRate 1016 // Natural HP recovery ratio increased of n% (bHPrecovRate,n;).
bSPrecovRate 1017 // Natural SP recovery ratio increased of n% (bSPrecovRate,n;).
bSpeedRate 1018 // Moving speed increased of n% and only the highest among all is applied (bSpeedRate,n;).
bCriticalDef 1019 // Decreases the chance of being hit by critical hits of n% (bCriticalDef,n;).
Former programmer for the TMWA server.