Bank Items?
I have searched around but haven't seen anything specific to this question...
How are regular bank items and coin stored (not shared items)?? Are they stored in the database or is it somehow hard coded?? I have looked everywhere in the database but haven't seen anything that would point me in the right direction... Anyone can help with an answer?? I have found where shared items and coin are stored but nothing on regular bank items and coin... |
Coins are in the profile struct BLOB in the database under table character_
I think the inventory of bank items should be in the inventory table GeorgeS |
Quote:
Also what is the structure for the coin held in the BLOB of character_ table?? I can see it is in HEX format but what is the structure that tells the system what item is where? I appreciate the help... |
Here's the relevant profile struct
Quote:
GeorgeS |
Here's the inventory table data
Quote:
|
Much appreciated GeorgeS.... With that info and some investigations on my own I am slowly getting it...
|
Ok I have figured it out mostly...I appreciate the help so far but I have another question...
Sorry for all the questions but when I hit a road block that I just cannot figure out on my own I must ask someone... I got the idea to look at the code for the PEQ PHP editor and found out a lot of what I needed... This block of code in the "player.php" file is obviously what I have been needing but apparently it is somehow lacking.... Code:
$player_array['platinum'] = ord(substr($profile,4720,4)); Any suggestions on what would be a better solution?? |
That does not sound correct. You need to remember these are short integers as in 4 bytes per record (1 word = 4 bytes)
Little endian - as in reverse byte order, so the order is - (example of a conversion 4 HEX bytes => 4 byte integer) 0A 0B 0C 0D 0D*16777216 + 0C*65536 + 0B*256 + 0A*1 So convert the 8 bit -Hex into 8 bit decimal - so that $FF = 255 etc.. and use the formula above. here's my code for the above Code:
Function getbytes_convert32bit(location As Integer, bytes As Integer) GeorgeS |
Also continues - editing directly via sql
Code:
Quote: |
Lastly, here's the entire struct
Code:
struct PlayerProfile_Struct GeorgeS |
Ok that is information overload ATM... Will take me a bit to read through all that and understand it but I will get it...
Mainly what I am trying to do is setup a webpage where players can see all their toons, stats, bank and inventory items and so on... Make it so they can unstick their own toons from their own control panel without assistance... Make it so they can read and send in-game mail from their CP area also... And so on... Am sure none of this is new to most here but I am relatively new to programming so it has been a great learning experience for me... So far the learning curve for the BLOB has outdone anything I expected to do though... I appreciate the help GeorgeS... :-D I will look into that tool of yours for Administration purposes.... That is one of the few tools you make that I didn't download... The PHP PEQ editor from code source is a nice tool but it has some limitations that your tools don't have... The PEQ editor is a quick easy one for fast editing but when I need power I use yours... I very much appreciate those tools and the efforts you put into them... |
All times are GMT -4. The time now is 12:07 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.