Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2010, 06:04 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

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
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #2  
Old 07-26-2010, 11:31 PM
blindaviator
Sarnak
 
Join Date: Jul 2010
Posts: 61
Default

Quote:
Originally Posted by GeorgeS View Post
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
Well I had already checked the inventory table but it only contains character inventory items... It doesn't hold the coin amounts for inventory or regular bank slots...

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...
Reply With Quote
  #3  
Old 07-27-2010, 12:24 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

Here's the relevant profile struct

Quote:
'/*4720*/ sint32 platinum; // Platinum Pieces on player
'/*4724*/ sint32 gold; // Gold Pieces on player
'/*4728*/ sint32 silver; // Silver Pieces on player
'/*4732*/ sint32 copper; // Copper Pieces on player
'/*4736*/ sint32 platinum_bank; // Platinum Pieces in Bank
'/*4740*/ sint32 gold_bank; // Gold Pieces in Bank
'/*4744*/ sint32 silver_bank; // Silver Pieces in Bank
'/*4748*/ sint32 copper_bank; // Copper Pieces in Bank
use little endian byte order to decode

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


http://www.georgestools.chrsschb.com//
Reply With Quote
  #4  
Old 07-27-2010, 12:33 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

Here's the inventory table data

Quote:
Equipped slots
(somebody should make this prettier some day)

SLOT_CHARM = 0,
SLOT_EAR01 = 1,
SLOT_HEAD = 2,
SLOT_FACE = 3,
SLOT_EAR02 = 4,
SLOT_NECK = 5,
SLOT_SHOULDER = 6,
SLOT_ARMS = 7,
SLOT_BACK = 8,
SLOT_BRACER01 = 9,
SLOT_BRACER02 = 10,
SLOT_RANGE = 11,
SLOT_HANDS = 12,
SLOT_PRIMARY = 13,
SLOT_SECONDARY = 14,
SLOT_RING01 = 15,
SLOT_RING02 = 16,
SLOT_CHEST = 17,
SLOT_LEGS = 18,
SLOT_FEET = 19,
SLOT_WAIST = 20,
SLOT_AMMO = 21,


Inventory Slots
NOTE: Numbering for personal inventory goes top to bottom, then left to right
It's the opposite for inside bags: left to right, then top to bottom
Example:
inventory: containers:
1 6 1 2
2 7 3 4
3 8 5 6
4 9 7 8
5 10 9 10



Personal Inventory
Personal inventory slots 22 through 29.
Bags in personal inventory are:
22: 251->260
23: 261->270
24: 271->280
25: 281->290
26: 291->300
27: 301->310
28: 311->320
29: 321->330


Cursor
Cursor is slot 30, and the bag slots for the cursor are 331->340.


Tribute
Tribute items are slots 400->404, these items are not visible, but are counted for stats/effects.


Bank
Bank slots are 2000->2015
Bags in the bank are:
2000: 2031->2040
2001: 2041->2050
2002: 2051->2060
2003: 2061->2070
2004: 2071->2080
2005: 2081->2090
2006: 2091->2100
2007: 2101->2110
2008: 2111->2120
2009: 2121->2130
2010: 2131->2140
2011: 2141->2150
2012: 2151->2160
2013: 2161->2170
2014: 2171->2180
2015: 2181->2190


Shared Bank
Shared bank slots are 2500 and 2501
Bags in the shared bank are:
2500: 2531->2540
2501: 2541->2550
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #5  
Old 07-27-2010, 12:43 AM
blindaviator
Sarnak
 
Join Date: Jul 2010
Posts: 61
Default

Much appreciated GeorgeS.... With that info and some investigations on my own I am slowly getting it...
Reply With Quote
  #6  
Old 07-27-2010, 09:39 PM
blindaviator
Sarnak
 
Join Date: Jul 2010
Posts: 61
Default

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));
The problem is it only returns 2 HEX characters... So if your platinum hits 256 it returns 0... I have looked everywhere and tried everything that makes sense trying to get it to return more than just the 2 characters to no avail... I am semi-new to PHP and cannot figure this one out... It is the first time I have had to deal with BLOB's and pulling HEX from a database...

Any suggestions on what would be a better solution??
Reply With Quote
  #7  
Old 07-27-2010, 09:47 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

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)
Dim result32 As Long
Dim byte1 As Byte
Dim byte2 As Byte
Dim byte3 As Byte
Dim byte4 As Byte
'start position=location  ,  bytes=#bytes to read
Open "profile.bin" For Binary As #1
 
    Get #1, location + 1, byte1: Get #1, location + 2, byte2: Get #1, location + 3, byte3: Get #1, location + 4, byte4
    result32 = (byte4 * 16777216#) + (byte3 * 65536#) + (byte2 * 256#) + (byte1 * 1#)
    getbytes_convert32bit = result32
Close #1
End Function
..btw my program serverstats does profile editing of toons and other things..

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


http://www.georgestools.chrsschb.com//

Last edited by GeorgeS; 07-27-2010 at 09:54 PM..
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 03:53 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