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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
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
 


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 05:57 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