• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

/zone ... an alternate approach

Cosmic

New member
Joined
Jun 21, 2005
RedCents
30¢
Since turning yourself into a corpse doesn't make you zone anymore, I started looking at how zoning works.

Most zone-changing events are started from the server side (gate,translocate,portal, clicking a door, etc) but when you walk across a zoneline, the entire process is started from the client.

The procedure in question is at 0x004ab5a1 and has 8 parameters.

Param1: int
Param2: String
Param3: int
Param4: int
Param5: float?
Param6: float?
Param7: float?
Param8: int?

Parameter 1: ZoneId

Parameter 2: string that doesn't seem to matter. probably logged somewhere for debugging. example:"old teleport: zone#4, 00004Teleport found! Zone nbr = 4 XYZ = -350.0, 999999.0, 999999.0 HD = 999"

Parameter 3 affects where you pop into the zone. set it to 0 and you go to 0,0,0. Set it to 1 and you go to the succor point. Probably far more complicated than that.

Parameter 4: cause of zone request (2=vehicle xfer, 3=summon, 5=goto player, 7=portal spell, 8=/zone, 9=resurrect, 10=death)

Parameter 5-7:the Y,X,and Z floats.

Parameter 8: the heading converted to an int

Anywho, if you are crazy ballsy and want to use this, here are the code snippets and where to put em:

in EQClasses.cpp add:
Rich (BB code):
#ifdef CDisplay__DoTheZone
FUNCTION_AT_ADDRESS(char * CDisplay::DoTheZone(int, char *, int,int,int,int,int,int),CDisplay__DoTheZone);
#endif

in EQClasses.h add:
Rich (BB code):
EQLIB_OBJECT char * CDisplay::DoTheZone(int,char*,int,int,int,int,int,int);

in eqgame.h add:
Rich (BB code):
#define CDisplay__DoTheZone		0x4AB5A1

in your favorite /zone plugin:
Rich (BB code):
static int once=0;
if (once==0)
{
   once=1;
   char aa[100]="test";
   pDisplay->DoTheZone(ZoneToGoTo,aa,1,0,0,0,0,0);
}
else
{
   once=0;
}

This assumes that you have set a variable "ZoneToGoTo" properly in your plugin. For some reason, when this call fires off, it causes the last command entered to be executed again, so the static is just there to cause it to ignore the double call.

If you try to zone to a non-adjacent zone, it will fail with often bizarre results.

Caveat Emptor. Because of the number of unknown parameters, this is probably fairly obvious on the server side. If you get banned, don't blame me.

If I didn't suck at assembly, I'd try to find a safer way to call it.

--piggy
 
Last edited:
a plugin version MQ2PiggyZone

Here is a plugin version that might be easier for folks to use.

updated 10/13/2005: Updated for EQ patch. Minor .ini upgrade

updated 10/08/2005: Got sick of people complaining about cut/paste errors, so i'm just distributing the .zip from now on. Its still just got the .cpp and .ini in it. Just watch the date to see if you have the latest and greatest version.

updated 10/08/2005: There has been some confusion with DoN zones because MAX_ZONES in EQData.h is wrong in many people's compiles. This value should be 0x171 at the moment. I had hardcoded this at one point, but really people need to fix the value in the EQData.h. So I took my hardcode out. If you get a message that says you can't get to corathus, you probably have an old MAX_ZONES value. Updated the ini with a couple fixes as well.

updated 10/07/2005(again): No longer uses MQ2 OnZoned (which was failing to fire reliably. Should reduce stalling greatly. Now targets NPC to whom the magic phrases are uttered (fixes PoDiscord issue). Updated .ini thanks again to Tone. Added a .zip with the .cpp and .ini file in it for folks having problems cutting and pasting.

updated 10/07/2005: Now with NPC support! (Magus,Translocator) Extra section in .ini defines where the NPCs are and where they can go. Also updated .ini with Tone's expansion info. Thanks Tone!

updated 10/02/2005: Now takes bind point into consideration for chain-zone path determination. Updated .ini zonemap. Now includes OldWorld, Kunark, Luclin, Velious, and PoK.

updated 9/30/2005: Added automatic chain zoning with Floyd-Warshall shortest path logic!
/zone <ShortZoneName> - attempts to take you through all the adjacent zones required to get you to that zone.
/zone force <ShortZoneName> - just trys to go to that zone directly (will crash if not adjacent)
/findpath <ShortZoneName> - display what I think the shortest path will be without actually zoning anywhere
All of these commands still supports the fuzzy matching on long zone names in case you can't remember the short zone name.
This REQUIRES a special section in your .INI file. Its attached below

I will update the INI file over time. Right now it ONLY contain the old world zones. Feel free to complete it yourself or wait. I will try get through at least an expansion per day. Feel free to post errors/omissions. The syntax should be obvious. DO NOT RENUMBER ANYTHING ON THE LEFT HAND SIDE.

updated 9/28/2005: Added waypoint support
/zone setwp <waypointname> - marks your current position in the zone you are in as a waypoint
/zone clearwp <waypointname> - removes waypoint
/zone setwp default - marks your current position as the new default (instead of the succor point) position.
/zone <zoneshortname> <waypointname> -zones you to an adjacent zone at the loc specified by the waypoint.
/zone <zoneshortname> <garbage> - lists all of the waypoints you have set for that zone.

updated 9/27/2005:
Uses Pulse to get around re-entry issues. Might help the peeps who still crash.
Now supports /fade in instanced zones!
/zone with no parameters will list all of the zone names.
/zone with a partial name lists all similar zone names

updated (again) 9/24/2005. bug fixed. now compiles under VS6 properly.

updated 9/24/2005 to *hopefully* fix crash bug

Updated 9/23/2005 to include /fade and /gate
 
Last edited:
well it crashed me but it DID zone me I went from pot to poknowledge crashed when I loged back in I was in poknowledge
 
went from skyfire to veeshan with a level 65 with no key crashed but logged on and was in vp. Gonna stop doing it now crashing over and over again must set some kind of logs off =p
 
Sorry it crashed you =(

I've been using it for a couple days without any problems.

Still looking for a cleaner call tho.

-piggy
 
Bardscorpse_01: still need to change the MQ2 files to get it to work?

no. the plugin code is completely stand-alone. The other stuff in the first post is more for illustration and for how it would be done if it were part of MQ proper instead of a plugin.

so just use the plugin =)


I'm still working on the other parameters.

-piggy
 
Did not work, trying to determine why.

EDIT: Ok, worked that time, crashed on Zone too. Is that your EXACT code Cosmic?
 
I'd imagine it will. Hey, who knows, maybe it will be better than the old ZS with that sort of thing. Personally though I want it just to speed up moving bot chars from zone to zone. I finished my chainshift plugin right before the patch and it went bye bye :(
 
Some asshole submitted this to KenetixEQ, so if Cosmic wants credit for his work too bad some one already took it.
 
I updated the plugin to include /fade and /gate now. Gate was tricky because the MQ2 devs got the ZoneBoundX and ZoneBoundY backwards =P

As for someone submitting my code to KenetixEQ, all I have to say is: I'm not wearing any pants.

<Pithy remark here>

-piggy
 
Assuming that it works...

...I think I love you...

Now I'm getting out of this thread before Tone comes back
 
cronc? nevah! =p no offence, I think he wants to let people try to figure it out themselves, noone would ever learn anything if everything was handed to them
 
Yes, I do and will. This expansion patch was a tough one and I have some unresolved crashes still, plus I'm pretty much expecting more eqgame.exe patches soon.

cronic
 
If this plugin is causing you to crash, please post your compiler version. It seems to either always work or always crash for different people. No-one has reported any in-between behavior where it crashes sometimes and works othertimes, so I am guessing its a version issue with the compiler.

-piggy
 
By the way, you've actually found CEverQuest::MoveToZone, which is just out of date in the MQ zip. I would imagine that having your routine a member of the wrong class could cause some bizarre behavior.

Also, short of changing the MQ command hook to compensate for flaws in EQ, you're stuck with the strange command looping that you described.

cronic
 
MQ2CadeWarp has these features (no I'm not taking credit, just added it to my warp) but if you don't love me...:(
 
Well, Cosmic, it may have something to do with each individual machine. I have 2 machines side by side and when I use Cronic's inspect plugin on one machine, I instantly crash from game right after inspect window opens, but when I use it on my main machine it works fine. Same exact compile as well.
 
Re: /zone ... an alternate approach (/fade &amp; /gate too)

Cosmic said:
Parameter 4: cause of zone request (2=vehicle xfer, 3=summon, 5=goto player, 7=portal spell, 8=/zone, 9=resurrect, 10=death)

Would it be possible to make it think you are accepting a resurrection and go directly to a zone?

For example, if you die and you need to get back to recover your corpse, you could type /rez and it would zone you back in on top of your corpse?

Or how about that monk that is laying there next to your corpse.... He could type /rez and trigger the server into thinking your corpse has recieved a rez?

Just a couple ideas I was thinking while reading this. Would sure save a lot of time loading several zones to get back to where you were if that could be done.

Other than that, very impressive stuff Cosmic. Thanks a TON for sharing with us! I see a bit of potential in this. :)
 
Crash Fix?

I updated the plugin. Hopefully it won't crash on anyone anymore. I never got it to crash, but I did notice that my cheezy lock code wasn't protecting the /zone or /gate commands properly so I re-wrote it. its still cheezy, but it is no longer reentrant on the GetZoneID call.

Let me know if it still crashes anyone.

-piggy
 
Both zone and gate crash me. I get the "MQ blocking crash info being sent to Sony" (not CTD), but when I log back in the transfer did take place.

Haven't been able to experiment too much to determine if it's a combination of factors external to the plugin.
 
VS6 fix done. no more crashes

I finally found my copy of VS6! yay!

Basically, VS.NET is smarter than VS6 and handled the stack correctly after my hack version of the call.

VS6 was not so forgiving, so rather than figure it out, I just made a knock-off version of the CEverQuest class that included the function I needed.

Anywho, I have tested it and it works under both VS6 and VS.NET now.

If you are STILL having problems, let me know.

-piggy
 
Seems to be working perfectly to me.

Now all I got to figure out is how to find the offset of this function for updates.

Very good work guys.
 
If this is confirmed as working and a way is found to update it, I will intergrate this in with my compile
 
I still CTD, but least it does zone/gate me as others have said. Thx for getting it this far!

Cade, what else is in mq2piggyback.dll? In that, what does this do for piggybacking? :)

Thx again.
 
Holy Shit! It works!!! OMFG I just got /zone and /gate ....you guys rock! Just compiled and tested it tonight.

I am attaching a copy of the compiled version for ppl (till Cade and ST update theirs :P)
 
Last edited:
You dudes rock! Thanks for the coding, thanks for the compile. Worked fine for me. This was a tough release to get our arms around; the persistence of all who have contributed is greatly appreciated.
 
/zone ... an alternate approach

Users who are viewing this thread

Back
Top
Cart