EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Doors for Newer Zones (https://www.eqemulator.org/forums/showthread.php?t=25420)

trevius 06-10-2008 06:42 PM

Ya, I got the dev kit and have used it and it seemed to work ok I think. I did get alot of warnings about not being able to find certain things from some of the lib files like the zlib, but I didn't get any errors.

I will probably try it out again and see if I can get a windows server just for me to test on maybe tonight. I know it works for me to run on a second server from the same IP, but I am the only one able to connect to it (due to no port forwarding for port 9000 since it is used by my Linux server). Which is perfectly fine for testing purposes.

Maybe I can write a batch file to move all of the required files for the emu to run from the dev kit directory to my normal eqemu directory so I don't have to move them all manually each time. Should be pretty easy and I didn't think about that until now hehe.

Angelox 06-11-2008 10:00 AM

this works - I made all original changes posted here by trevius and Scorpious2k, including i removed all the extra "/*0016*/ char unknown0016[16];" i saw while changing the 32's.
So now we have a few fixes that WORK;

-the Azone fix
-the Flee fix
-and this newest door fix

Scorpious2k; are we going to get all this put into the source so everyone can try it out, or am I "pipe dreaming"? I ask you because it seems you're the "last Mohican" to these forums :)

BTW THANK YOU Scorpious2k and trevius!!!

Scorpious2k 06-11-2008 11:58 AM

Quote:

Originally Posted by Angelox (Post 150426)
Scorpious2k; are we going to get all this put into the source so everyone can try it out, or am I "pipe dreaming"?

Get me a concise list of the changes and I will get them in.

Quote:

BTW THANK YOU Scorpious2k and trevius!!!
This was all the work of Trevius, he deserves all the thanks.

trevius 06-11-2008 04:22 PM

Quote:

Originally Posted by Scorpious2k (Post 150433)
Get me a concise list of the changes and I will get them in.

This was all the work of Trevius, he deserves all the thanks.

Woot, thanks for testing it Angelox! I wasn't able to get to it last night due to some other stuff I was working on with getting ready to leave for vacation tomorrow.

And even though I started the work on it, it certain couldn't have been completed without the catch from S2K! So, I certainly don't deserve all of the credit lol. Nice catch! Once you mentioned it, it made perfect sense that those 16 chars were there all along, but weren't being used for some reason, so they just stuck a filler in there to fill the gap (probably because they thought it was used for something else that was unknown). Should have been 32 from the start hehe.

I will get the fleeing code added and this doors fix into my next code release probably tonight and post a link in the same thread that I have been posting my unofficial 1110 updates in. This will be version 1110d when I get it done and include all of the prior code as well.

I can also add the azone patch if I can figure that out. Is that patch even used for anything on the server, or is it just a stand-alone utility for making the maps? I am just curious if that helps actually deal with the maps when the server is running or if it is completely separate.

You are more than welcome to review my post linked below and use any of them for the official code 1111 release if you want. I will leave the win32 compile up to the devs if they want to use my source version, mainly because I am a little iffy on how my windows compiles go with the setup I use. The post describes everything that has been added to the code. I have tested everything accept for the IP limiting and it all works and the server has no other bugs so far from any of the code changes.

I am certainly not a coder, but I can definitely add in updates that actual coders have submitted and test them pretty thoroughly since my server gets a decent amount of players relative to most servers (120+ at peak times).

I can't wait to get those doors changes in! I already have all of the <16 char doors placed in Dreadspire and will add the >16 char ones when I get this added. I will post the door table info for Dreadspire when I have it all done so anyone else can use it if they like.

Also, if anyone knows the sql to change the name field in the doors table from 16 char to 32 char, please post it so I can make note of that for anyone using the new 1110d code when I get it done. I always just use Navicat, so I am mysql illiterate lol. Otherwise, I will just explain how to do it in Navicat for anyone that wants to.

Angelox 06-11-2008 05:08 PM

I forgot about that, here it is;
Code:

ALTER TABLE `doors` MODIFY COLUMN `name` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
Azone patch is for the source, I don't think it compiles under windows - but need to have it there.

LostZaphod 06-12-2008 09:54 AM

Quote:

Originally Posted by Angelox (Post 150450)
Azone patch is for the source, I don't think it compiles under windows - but need to have it there.

Instructions for compiling on for windows.
Make Derision's modifications "http://www.rama.demon.co.uk/azone.patch" to the original azone (Build 1110).
Does any one have the watermap patch? If so please PM it to me.

For Windows Compile, you will have to add files to the project (file.cpp, zon.cpp, ter.cpp, pfs.cpp)

Add to azone.cpp near #include "ter.hpp" (you many have to add the path to the project for zlib)

#ifdef WIN32
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "zlib.lib")
#endif

Add to pfs.cpp near #include <string.h>
#ifdef WIN32
#include <winsock2.h>
#endif

Change global.hpp, put #ifndef around #include <netinet/in.h>
#ifndef WIN32
#include <netinet/in.h>
#endif

Move some variable definitions from wld.c to wld.h
unsigned short d6size;
char *encstr;
float f1, f2, f3, f4;

Build Azone, this will create Azone.exe (copy this to c:\temp)

Use this SQL to make a batch file, save the csv file to c:\temp\kopy.bat (run in mysql query browser, and save as csv. then delete all double quotes)

select CONCAT(CONCAT('copy \\umEQE\\', short_name),'.EQG c:\\temp') as name from zone union all select CONCAT(CONCAT('copy \\umEQE\\', short_name),'.S3D c:\\temp') as name from zone

make sure you change \\umEQE\\ to the directory of where you installed EQ Titanium (NOTE in mysql \\ means \ )
Save the Visual Basic Script as c:\temp\RunAzone.vbs

make sure the directory c:\temp exists and only has these files (kopy.bat, Azone.exe, RunAzone.vbs)

run kopy.bat (start, run, type "cmd", cd \temp, kopy)
run RunAzone.vbs (double click)
'copy the newly created map files to your server's map directory (you may want to back up first)
Code:

'**********************************************************************
'  Visual Basic Script
'**********************************************************************
Function Main()
        Dim objshell
        Set objShell = CreateObject("WScript.Shell")
        startloc = objShell.CurrentDirectory
        CheckFiles startloc
End Function

Function CheckFiles(startloc)
        Dim fso, f, f1, fc, s, thefilename, ext
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set f = fso.GetFolder(startloc)
        Set fc1 = f.Files
        for each f1 in fc1
                thefilename= LCase(f1.Name)
                ext = right(thefilename,3)
                if(InStr(thefilename,"_") = 0) then
                        if ext = "s3d"and (thefilename <> "tutoriala.s3d" and thefilename <> "tutorialb.s3d" ) then
                                thefilename = Replace(thefilename,".s3d","")
                                Run startloc & "\Azone.exe " & chr(34)  & thefilename & chr(34)
                        else
                                if ext = "eqg" then
                                        thefilename = Replace(thefilename,".eqg","")
                                        Run startloc & "\Azone.exe " & chr(34) & thefilename & chr(34)
                                end if
                        end if                                               
                end if
        next
End Function

Sub Run(ByVal sFile)
        Dim shell
        Set shell = CreateObject("WScript.Shell")
        shell.Run Chr(34) & sFile & Chr(34), 1, true
        Set shell = Nothing
End Sub


main()
msgbox("done")


Scorpious2k 06-13-2008 05:54 PM

Quote:

Originally Posted by LostZaphod (Post 150483)
Move some variable definitions from wld.c to wld.h
unsigned short d6size;
char *encstr;
float f1, f2, f3, f4;

I would just move them to the top of the function, but other than that NICE WORK!!!

If you can get it to me in some kind of a package I will move it to live.

Scorpious2k 06-13-2008 05:58 PM

Quote:

Originally Posted by trevius (Post 150449)
You are more than welcome to review my post linked below and use any of them for the official code 1111 release if you want. I will leave the win32 compile up to the devs if they want to use my source version, mainly because I am a little iffy on how my windows compiles go with the setup I use. The post describes everything that has been added to the code. I have tested everything accept for the IP limiting and it all works and the server has no other bugs so far from any of the code changes.

And where is this post? Am I missing something?

Aramid 06-14-2008 09:16 AM

Quote:

Originally Posted by Scorpious2k (Post 150572)
And where is this post? Am I missing something?

I believe he was referring to this one: http://www.eqemulator.net/forums/showthread.php?t=25391

Angelox 06-14-2008 01:23 PM

Diff/patch files for door fix
 
Scorpious2k, I hope you can use this;

zonedump.h
Code:

--- source-1110/zone/zonedump.h        2008-04-09 04:08:33.000000000 -0400
+++ source-patched/zone/zonedump.h        2008-06-11 06:00:20.000000000 -0400
@@ -189,7 +189,7 @@
 int32        db_id;
 int8        door_id;
 char        zone_name[16];
-char        door_name[16];
+char        door_name[32];
 float        pos_x;
 float        pos_y;
 float        pos_z;

Titanium_structs.h
Code:

--- source-1110/common/patches/Titanium_structs.h        2007-08-27 01:41:44.000000000 -0400
+++ source-patched/common/patches/Titanium_structs.h        2008-06-11 06:05:04.000000000 -0400
@@ -2007,8 +2007,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc

schema.xml
Code:

--- source-1110/utils/schema.xml        2005-04-24 12:21:44.000000000 -0400
+++ source-patched/utils/schema.xml        2008-06-11 07:23:25.000000000 -0400
@@ -1265,7 +1265,7 @@
 <OPTIONSELECT Value="0" />
 </OPTIONSELECTED>
 </COLUMN>
-<COLUMN ID="4909" ColName="name" PrevColName="" Pos="4" idDatatype="20" DatatypeParams="(16)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<COLUMN ID="4909" ColName="name" PrevColName="" Pos="4" idDatatype="20" DatatypeParams="(32)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
 <OPTIONSELECTED>
 <OPTIONSELECT Value="0" />
 </OPTIONSELECTED>

Live_structs.h
Code:

--- source-1110/common/patches/Live_structs.h        2007-02-15 19:04:32.000000000 -0500
+++ source-patched/common/patches/Live_structs.h        2008-06-11 06:04:15.000000000 -0400
@@ -1997,8 +1997,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc

eq_packet_structs.h
Code:

--- source-1110/common/eq_packet_structs.h        2008-04-13 12:11:06.000000000 -0400
+++ source-patched/common/eq_packet_structs.h        2008-06-10 17:42:43.000000000 -0400
@@ -2049,8 +2049,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc

entity.cpp
Code:

--- source-1110/zone/entity.cpp        2008-05-30 18:44:12.000000000 -0400
+++ source-patched/zone/entity.cpp        2008-06-11 05:54:58.000000000 -0400
@@ -664,7 +664,7 @@
                door = iterator.GetData();
                if(door && strlen(door->GetDoorName()) > 3){
                        memset(&nd, 0, sizeof(nd));
-                        memcpy(nd.name, door->GetDoorName(), 16);
+                        memcpy(nd.name, door->GetDoorName(), 32);
                        nd.xPos = door->GetX();
                        nd.yPos = door->GetY();
                        nd.zPos = door->GetZ();

doors.h
Code:

--- source-1110/zone/doors.h        2008-04-09 04:08:33.000000000 -0400
+++ source-patched/zone/doors.h        2008-06-11 08:36:45.000000000 -0400
@@ -56,7 +56,7 @@
 int32        db_id;
 sint8        door_id;
 char        zone_name[16];
-char        door_name[16];
+char        door_name[32];
 float        pos_x;
 float        pos_y;
 float        pos_z;

doors.cpp
Code:

--- source-1110/zone/doors.cpp        2008-04-09 04:08:33.000000000 -0400
+++ source-patched/zone/doors.cpp        2008-06-11 08:35:49.000000000 -0400
@@ -39,7 +39,7 @@
        db_id = door->db_id;
        door_id = door->door_id;
        strncpy(zone_name,door->zone_name,16);
-        strncpy(door_name,door->door_name,16);
+        strncpy(door_name,door->door_name,32);
        pos_x = door->pos_x;
        pos_y = door->pos_y;
        pos_z = door->pos_z;
@@ -458,7 +458,7 @@
                        into[r].db_id = atoi(row[0]);
                        into[r].door_id = atoi(row[1]);
                        strncpy(into[r].zone_name,row[2],16);
-                        strncpy(into[r].door_name,row[3],16);
+                        strncpy(into[r].door_name,row[3],32);
                        into[r].pos_x = (float)atof(row[4]);
                        into[r].pos_y = (float)atof(row[5]);
                        into[r].pos_z = (float)atof(row[6]);

dbmemshare.cpp
Code:

--- source-1110/common/dbmemshare.cpp        2006-03-18 23:09:26.000000000 -0500
+++ source-patched/common/dbmemshare.cpp        2008-06-11 05:59:15.000000000 -0400
@@ -98,7 +98,7 @@
                                                tmpDoor.db_id = atoi(row[0]);
                                                tmpDoor.door_id = atoi(row[1]);
                                                strncpy(tmpDoor.zone_name,row[2],16);
-                                                strncpy(tmpDoor.door_name,row[3],10);
+                                                strncpy(tmpDoor.door_name,row[3],32);
                                                tmpDoor.pos_x = (float)atof(row[4]);
                                                tmpDoor.pos_y = (float)atof(row[5]);
                                                tmpDoor.pos_z = (float)atof(row[6]);


Client62_structs.h
Code:

--- source-1110/common/patches/Client62_structs.h        2007-02-15 19:04:32.000000000 -0500
+++ source-patched/common/patches/Client62_structs.h        2008-06-11 06:02:53.000000000 -0400
@@ -1944,8 +1944,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc

Anniversary_structs.h
Code:

--- source-1110/common/patches/Anniversary_structs.h        2007-08-05 17:13:12.000000000 -0400
+++ source-patched/common/patches/Anniversary_structs.h        2008-06-11 06:03:30.000000000 -0400
@@ -2083,8 +2083,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc

This was done against the current official 1110 source
If it's not right, tell me how it needs to look for you

Scorpious2k 06-15-2008 08:08 PM

This should all be in version 1111 which I updated last night.

Good work all!

Angelox 06-15-2008 10:30 PM

These got left out of the 1111 update;


Titanium_structs.h
Code:

--- source-1110/common/patches/Titanium_structs.h        2007-08-27 01:41:44.000000000 -0400
+++ source-patched/common/patches/Titanium_structs.h        2008-06-11 06:05:04.000000000 -0400
@@ -2007,8 +2007,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc

Live_structs.h
Code:

--- source-1110/common/patches/Live_structs.h        2007-02-15 19:04:32.000000000 -0500
+++ source-patched/common/patches/Live_structs.h        2008-06-11 06:04:15.000000000 -0400
@@ -1997,8 +1997,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc


Client62_structs.h
Code:

--- source-1110/common/patches/Client62_structs.h        2007-02-15 19:04:32.000000000 -0500
+++ source-patched/common/patches/Client62_structs.h        2008-06-11 06:02:53.000000000 -0400
@@ -1944,8 +1944,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc

Anniversary_structs.h
Code:

--- source-1110/common/patches/Anniversary_structs.h        2007-08-05 17:13:12.000000000 -0400
+++ source-patched/common/patches/Anniversary_structs.h        2008-06-11 06:03:30.000000000 -0400
@@ -2083,8 +2083,7 @@
 */
 struct Door_Struct
 {
-/*0000*/ char    name[16];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
-/*0016*/ char    unknown0016[16];
+/*0000*/ char    name[32];            // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade
 /*0032*/ float  yPos;              // y loc
 /*0036*/ float  xPos;              // x loc
 /*0040*/ float  zPos;              // z loc


Scorpious2k 06-17-2008 07:37 PM

Quote:

Originally Posted by Angelox (Post 150711)
These got left out of the 1111 update;

Got it, thanks. Should be there now with a couple of other changes.

Will update in a few minutes.

Angelox 06-22-2008 12:25 AM

I still see one more for the door fix that's not changed yet;
Code:

--- source-1110/utils/schema.xml        2005-04-24 12:21:44.000000000 -0400
+++ source-patched/utils/schema.xml        2008-06-11 07:23:25.000000000 -0400
@@ -1265,7 +1265,7 @@
 <OPTIONSELECT Value="0" />
 </OPTIONSELECTED>
 </COLUMN>
-<COLUMN ID="4909" ColName="name" PrevColName="" Pos="4" idDatatype="20" DatatypeParams="(16)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
+<COLUMN ID="4909" ColName="name" PrevColName="" Pos="4" idDatatype="20" DatatypeParams="(32)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
 <OPTIONSELECTED>
 <OPTIONSELECT Value="0" />
 </OPTIONSELECTED>


trevius 06-22-2008 02:17 AM

LOL, when I put that list together, I did it mainly just by searching for doors and anything set to 16 for the name field. I am not even sure if that schema.xml is still used or what it is used for. But, the doors are definitely working great now, so might not be much reason to change it other than to keep consistency.


All times are GMT -4. The time now is 05:49 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.