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

10-12-2007, 06:07 PM
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
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
|

10-12-2007, 07:46 PM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
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
|

10-16-2007, 08:39 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
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.
|

10-17-2007, 10:51 AM
|
Demi-God
|
|
Join Date: Jul 2006
Posts: 1,552
|
|
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?
|

10-17-2007, 03:14 PM
|
Developer
|
|
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
|
|
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)
|
 |
|
 |

10-18-2007, 02:30 AM
|
Forum Guide
|
|
Join Date: Sep 2003
Location: California
Posts: 1,474
|
|
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
|
 |
|
 |

10-22-2007, 03:48 AM
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
Quote:
Originally Posted by AndMetal
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
|

10-22-2007, 02:59 PM
|
Developer
|
|
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
|
|
*chomps at bit*
Dax
__________________
Daxum
Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
|

10-22-2007, 05:43 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Quote:
Originally Posted by gernblan
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).
|

10-23-2007, 03:00 AM
|
Discordant
|
|
Join Date: May 2004
Posts: 290
|
|
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.
|

10-23-2007, 03:11 AM
|
Demi-God
|
|
Join Date: Jul 2006
Posts: 1,552
|
|
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. 
|
 |
|
 |

10-24-2007, 08:20 AM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Quote:
Originally Posted by Theeper
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.
|
 |
|
 |

10-23-2007, 12:49 PM
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
Quote:
Originally Posted by AndMetal
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
|

10-22-2007, 03:48 AM
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
Quote:
Originally Posted by GeorgeS
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
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 12:32 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |