Register for your free account! | Forgot your password?

Go Back   elitepvpers › Popular Games › Silkroad Online › SRO Coding Corner
You last visited: Today at 13:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Parsing EliteSro Chardata [ mostly done ]

Discussion on Parsing EliteSro Chardata [ mostly done ] within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,340
Received Thanks: 2,663
Parsing EliteSro Chardata [ mostly done ]

Ok .. Well guys , i mostly parsed the elitesro chardata.
But i can't find out x and y coords , and im not sure if my quests part is true.
Here we go , i paste my code :
PHP Code:
Dim Pos As sPos
        Dim glr 
As UInt32
        Dim type 
As Byte
        bn
.ReadBytes(9) ' ? , model , volume
        Dim Level As Byte = bn.ReadByte
        bn.ReadByte() ' 
highest mastery level
        Dim EXP 
As UInt64 = bn.ReadUInt64
        Dim spbar 
As UInt32 = bn.ReadUInt32
        Dim Gold 
As UInt64 = bn.ReadUInt64
        Dim SkillPoints 
As UInt32 = bn.ReadUInt32
        Dim AP 
As UInt16 = bn.ReadUInt16
        Dim BersPoints 
As Byte = bn.ReadByte
        bn
.ReadUInt32()
        
Dim HP As UInt32 = bn.ReadUInt32
        Dim MP 
As UInt32 = bn.ReadUInt32

        bn
.ReadBytes(9)
        If (
AP > 0) Then
            Log
("You Have " & AP & " Arttiributive Points!")
        
End If

        
'Handle.MainChar._CharName = CharName
        Handle.MainChar._Level = Level
        Handle.MainChar._CurHp = HP
        Handle.MainChar._CurMp = MP
        Handle.MainChar._Sp = SkillPoints
        Handle.MainChar._Gold = Gold
        Handle.MainChar._Ap = AP
        Handle.MainChar._CurrExp = EXP
        Handle.MainChar._Berserk = BersPoints

        Dim InvSize As Byte = bn.ReadByte
        Dim ItemCount As Byte = bn.ReadByte

        For i = 0 To ItemCount - 1

            itemdata.Position(i) = bn.ReadByte
            Dim typeID As UInt32 = bn.ReadUInt32
            itemdata.typeID(typeID) = typeID
           
            If itemdata.pk2name(typeID).Contains("SN_ITEM_EU") Or itemdata.pk2name(typeID).Contains("SN_ITEM_CH") Then
                itemdata.pluslevel(typeID) = bn.ReadByte
                bn.ReadUInt64()
                itemdata.durability(typeID) = bn.ReadUInt32
                itemdata.bluecount(typeID) = bn.ReadByte

                For n = 0 To itemdata.bluecount(typeID) - 1
                    bn.ReadUInt32()
                    bn.ReadUInt32()
                Next

                Log("Item Found : " & itemdata.name(typeID).ToString & "[+" & itemdata.pluslevel(typeID) & "]")
            Else
                itemdata.amount(typeID) = bn.ReadUInt16
                Log("Item Found : " & itemdata.name(typeID).ToString & "Amount : " & itemdata.amount(typeID) & "]")
            End If
            Next

        bn.ReadBytes(3)
        Dim MasteryLevel As Byte
        Dim masteryname As String
        Dim wholemasteries As String = "Masteries : "
Masteries_:
        Do While bn.ReadByte = 1
            glr = bn.ReadUInt32
            MasteryLevel = bn.ReadByte
            Select Case glr
                Case 513
                    masteryname = "Warrior"
                Case 514
                    masteryname = "Wizard"
                Case 515
                    masteryname = "Rogue"
                Case 516
                    masteryname = "Warlock"
                Case 517
                    masteryname = "Bard"
                Case 518
                    masteryname = "Cleric"
            End Select
            wholemasteries = wholemasteries & masteryname & " [" & MasteryLevel & "] "
        Loop
        Log(wholemasteries)
        bn.ReadByte()

        '
## Skills
        
While bn.ReadByte = 1
            Dim skillid 
As UInt32 = bn.ReadUInt32()
            
Log("Skill Found : " & LoadTextDatas.skilldata.name(skillid))
            
Loggers.AddSkills(LoadTextDatas.skilldata.name(skillid))
            
bn.ReadByte()
        
End While
        
'## End Skills

        Dim FinishedQuests As UInt16 = bn.ReadUInt16
        For n = 0 To FinishedQuests - 1
            bn.ReadUInt32()
        Next

        Dim alivequest As Byte = bn.ReadByte

        For x = 0 To alivequest - 1
            Dim questid As UInt32 = bn.ReadUInt32()
            bn.ReadUInt16()
            Dim flag As Byte = bn.ReadByte
            bn.ReadUInt32()
            Dim questnameLen As UInt16 = bn.ReadUInt16()
            Dim questname As String = bn.ReadChars(questnameLen)
            MsgBox(flag)
            If flag = 58 Then
                MsgBox("flagis58")
                bn.ReadBytes(9)
            Else
                bn.ReadBytes(5)
            End If
        Next

        Dim mainid As UInt32 = bn.ReadUInt32
        Dim Xsection As Byte = bn.ReadByte
        Dim Ysection As Byte = bn.ReadByte
        Dim Xcoord As Single = bn.ReadSingle
        Dim Zcoord As Single = bn.ReadSingle
        Dim Ycoord As Single = bn.ReadSingle

        sPos.x = (((Xsection - &H87) * &HC0) + (Xcoord / 10.0!))
        sPos.y = (((Ysection - &H5C) * &HC0) + (Ycoord / 10.0!))
        sPos.z = Zcoord

        //bn.ReadBytes(63)
      
        Dim charNameLen As UInt16 = bn.ReadUInt16
        Dim charName As String = bn.ReadChars(charNameLen)
        MsgBox(charName) 
If the place where i read the xyz coords are true, i always get -25920 for x... so i should read somewhere else but im stuck.Hope u'll helpme ^^
sarkoplata is offline  
Old   #2
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
should be at the correct position if the quests are fine.
but you could also use edxSilkroadLoader and check out the long lines with I believe 14 bytes. after the quests and this is the one you're looking for. This line starts with 3 floats the x z and y position and then there is a short for the angle.
kevin_owner is offline  
Reply


Similar Threads Similar Threads
iBOT chardata error
02/20/2011 - Silkroad Online - 1 Replies
Hey, i have some wierd error "chardata" .. clientless or not im still getting this error with my highlvl char. Anyone know how to fix it? my noobs didnt get this error :mad:
Ibot error chardata Please help!!
02/15/2011 - Silkroad Online - 4 Replies
Hi First of all i want to say that i am from germany and want to apologize for my bad english. Ok now to the main. I use the Ibot Sro Bot and I havenīt anytime a problem except yesterday. I log my Char with the bot and there comes the Error : Error - chardata - 34A6. Can anyone help me out ? Wenn du deutscher bist bitte auf deutsch :) Thank you....
[Request]Parsing the navdata files
11/29/2010 - SRO Coding Corner - 1 Replies
so,I would like to know how to parse the navdata files..if someone could help me that would be great:)
DMap File Parsing
03/02/2008 - Conquer Online 2 - 12 Replies
I finished the app, it correctly parses the DMap files and renders them to the screen (from what i could tell on the ones i tried, its slow because its using PSet plus its in vb, but at this point, i dont care about efficiency, i'll worry about that later, the fact is it works. Refer to: http://www.elitepvpers.com/forum/co2-main-discussio ns-questions/112647-new-bot-development.html for the COBot Project which this is part of. I took this from my reply i made on my new bot i'm developing,...



All times are GMT +1. The time now is 13:18.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.