Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-05-2002, 01:15 PM
DeletedUser
Fire Beetle
 
Join Date: Sep 2002
Posts: 0
Default Re: Raw_data question

Quote:
Originally Posted by Trumpcard
Hey,
Im building a php tool for admin'ing the database so a remote GM can make db changes on the fly.

One question though about the items data. Ive mapped out the item structs from the code, so when I retrieve the data via a SQL query, I know where in the array the data is at, so I know where and how to mess with the BLOB.

Now, the value that comes through the query looks is an ACSII character.. Do I just convert that ASCII character back to it's numeric representation, and vice versa to insert it back in, or is there anything special that needs to be done with it?

Any help would be appreciated!
I can tell you from making a Player profile editor in php for image (checkout http://www.cyberjunky.net/~hogie/), it is possible to read the binary data. Use the unpack() command to do it since all the data is that way. You will also need a function to give you "clean" strings from the string fields (since they are null terminated).... Here is the one I use

Code:
function GetNullTermString($string) {
        $string2 = "";
        for ($i=0;$i<=strlen($string);$i++) {
                 if (ord(substr($string,$i,1)) == 0)
                        return $string2;
                else
                        $string2 = $string2.substr($string,$i,1);
        }
        return $string2;
}
That function will do wonders for your string names.

To insert back in, you would have to pack() each part of the raw_data back and then insert it as 1 long one.

BTW, so you know, item changes will NOT show up until the zone is reloaded (as in, stopped and started again from command line). The same is true with npc_type and such, those are only read once during bootup.

-Hogie
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:34 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3