Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::GeorgeS's Tools

Development::GeorgeS's Tools A forum just for GeorgeS's tools

Reply
 
Thread Tools Display Modes
  #1  
Old 10-12-2007, 06:07 PM
gernblan
Discordant
 
Join Date: Aug 2006
Posts: 394
Default

Allowing it to view and edit player coin would be a GODSEND.

Thank you, so much for doing this tool, I just know that it's going to be awesome!
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
Reply With Quote
  #2  
Old 10-12-2007, 07:46 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

Ok, the read/only part of the tool is done, including viewing/sorting all player owned coin and banked coins too - these and many other parts of the binary struct data are going to be read/write too.

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #3  
Old 10-16-2007, 08:39 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Out of curiosity, what are you using to create this?

I ask because I have created a script to convert the entire profile into a multi-dimensional array in PHP (about 14KB worth of code). It was a pain in the butt for me, so I would hate to see others go through the same thing.

On a side note, I have been thinking about how to edit the profile field, but the checksum is confusing me, mainly because it doesn't match what crc32() in PHP calculates it to. But then again, I've kinda put that one on the back burner.
Reply With Quote
  #4  
Old 10-17-2007, 10:51 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

GeorgeS, I think roja was talking about the perl/html Emu Management scripts that come with the emulator world. Those pages haven't seen a pixel change in the year I've been here - though I have customized quite a few for my own purposes (and soon as I get time to clean up my slop, I hope to share them back to the core devs).

Is it possible to do this kind of editor/viewer in the perl/html?
Reply With Quote
  #5  
Old 10-17-2007, 03:14 PM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

George... I love you. I can't wait for this.

Dax
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
Reply With Quote
  #6  
Old 10-18-2007, 02:30 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

The tool will not be a comprehensive profile editor, just a few selected byte values like last name, coins etc..

Actually I'm using VB, and to convert the entire profile blob came from an idea where I pulled the blob from the database and saved it to a binary file. The file is NOT loaded into memory, but accessed by a byte pointer. Then edited values are saved and the binary file dumped back to the DB.
Actually it's easy.

The tool does much more editing, but account management is a small portion of it's purpose. You can copy toons from one account to another, and even delete and modify toon data stored in the character_ table.

Right now you can
- find out what items drop in a zone by NPC (done)
- Identify if an item drops or is sold or player made (done)
- view NPC in a zone by level/min max/avg levels,spawngroup (done)
- account profile and character editing (as discussed before) (1/2 done)
- modify loot drops by selected npc's (not done)
- tag/poll/monitor accounts for suspicious behaviour (not done)
- view/parse #commands by users (log file parser) - (not done)
- more as time permits..

GeorgeS

__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #7  
Old 10-22-2007, 03:48 AM
gernblan
Discordant
 
Join Date: Aug 2006
Posts: 394
Default

Quote:
Originally Posted by AndMetal View Post
Out of curiosity, what are you using to create this?

I ask because I have created a script to convert the entire profile into a multi-dimensional array in PHP (about 14KB worth of code). It was a pain in the butt for me, so I would hate to see others go through the same thing.

On a side note, I have been thinking about how to edit the profile field, but the checksum is confusing me, mainly because it doesn't match what crc32() in PHP calculates it to. But then again, I've kinda put that one on the back burner.
PLEASE, can you post this?

It would be invaluable.
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
Reply With Quote
  #8  
Old 10-22-2007, 02:59 PM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

*chomps at bit*

Dax
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
Reply With Quote
  #9  
Old 10-22-2007, 05:43 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by gernblan View Post
PLEASE, can you post this?

It would be invaluable.
I just created an entry in the Wiki: ConvertProfile

I commented out all of the unknown fields, but did add in the "code" to read them into the array.

I would also like to note that you will need to add in a value for the $db variable, which allows the connection to the database (I use another included file that stores the db login info for all of the pages I use).
Reply With Quote
  #10  
Old 10-23-2007, 03:00 AM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

Maybe I don't understand this, but wouldn't it be easier to just to create a format and unpack() the whole binary struct ? Especially if you want to repack it and update the DB.

I got about 1/3 of the way through creating the format before I got bored and moved on to something more interesting.
Reply With Quote
  #11  
Old 10-23-2007, 03:11 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

I too took apart the player profile bit by bit, so I could understand it. It's pretty easy to see where things are using the struct, or at least that's where I see the values. And yes, it is huge and mind boggling. I was looking for one variable, which I never found.
Reply With Quote
  #12  
Old 10-24-2007, 08:20 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Theeper View Post
Maybe I don't understand this, but wouldn't it be easier to just to create a format and unpack() the whole binary struct ? Especially if you want to repack it and update the DB.

I got about 1/3 of the way through creating the format before I got bored and moved on to something more interesting.
unpack() is certainly one way to do it. As a matter of fact, I started to work on a version of the same script to utilize unpack, but it can be difficult to modify if the profile blob ever changes, or if you make a mistake somewhere in the script. Not only that, but you would probably run into some issues when you have to create sub-arrays, like for bind points, item materials, item tints, AA's (which current has 240 sub-arrays), languages, spells in the spell book, memorized spells, skills, buffs, group members, tributes, disciplines, leadership abilities, bandoliers, and potion belts (whew!). The easiest way I've found so far to handle those is using for() statements. Otherwise, the script would be about 3x larger than it is right now. But, I do use it to convert data types (to float for example).

As far as efficiency, I'm not sure if unpack would take less time to process. I do know that, on the initial load (query and all), the page takes between 0.8 seconds & 1.3 seconds for PHP to process (including a Magelo-like character viewer), and on subsequent loads (after the query is cached), it takes between 0.3 seconds & 0.7 seconds to process. Of course, my server is a 433 MHz processor w/ 256MB of RAM that I had laying around.

As far as putting it back into the database, that's the easy part. There is a function, bin2asc(), listed on the page that converts the info from binary back to the ASCII format the blob is in. You can then inject it into the original $profileResult using substr_replace() or rebuild it from the array, and post it back into the database. The part I have been having trouble figuring out is the checksum, which I assume is the checksum of the blob, which I also assume prevents you from just injecting the changed info (although I haven't tested this yet). I've found how it is calculated in the source (see the checksum field in profile schema ), but I'm having some trouble understanding it.
Reply With Quote
  #13  
Old 10-23-2007, 12:49 PM
gernblan
Discordant
 
Join Date: Aug 2006
Posts: 394
Default

Quote:
Originally Posted by AndMetal View Post
I just created an entry in the Wiki: ConvertProfile

I commented out all of the unknown fields, but did add in the "code" to read them into the array.

I would also like to note that you will need to add in a value for the $db variable, which allows the connection to the database (I use another included file that stores the db login info for all of the pages I use).
Excellent work so far!
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
Reply With Quote
  #14  
Old 10-22-2007, 03:48 AM
gernblan
Discordant
 
Join Date: Aug 2006
Posts: 394
Default

Quote:
Originally Posted by GeorgeS View Post
Ok, the read/only part of the tool is done, including viewing/sorting all player owned coin and banked coins too - these and many other parts of the binary struct data are going to be read/write too.

GeorgeS
WOOT!!!!!!!!

/bows
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:32 AM.


 

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