Jump to content

andimarius

Member
  • Posts

    2
  • Joined

  • Last visited

  • Feedback

    0%

About andimarius

Informations

  • Gender
    Male

andimarius's Achievements

Newbie

Newbie (1/16)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Okay, i think I did it. I will try to explain how i did it. Let's suppose i have this player: Name : X Level : 12 Class: Body Warrior (skill_group + job) skill_level: SELECT HEX(skill_level) FROM player WHERE name='X'; 000000000000000400000000000100000000000100000000000400000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000032800000000032800000000000B00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Now, from the above result we need to remove the first four 0s; (in JS I could do something like this : data.substr(4); ) After this, you need to divide every group of the recod, so you can find the spells . To do this you could loop the string by 12 chars at a time. Example: arrayskills=[]; vnum=0; for(let i = 0; i< data.length; i+=12) { arrayskills[vnum]=data.substr(i,12); vnum++; } You loop the new array to remove from the zeros every element. arrayskillsNew[i]=arrayskills[i].substr(9,12); --> This way you will have something like this : [0. 1 . 2 .3][SPELL LEVEL] [ M G P][FROM 0 TO 40 - you need to convert it from HEX to DEC] Based on the index of the first array (vnum) you can find what spell it is by looking in the skilldesc.txt file from the client. That ID is the same as the index of the spell array. The final result could be something like this : for me "id" is the id of the spell and "spell" is the level of the spell xD { "id": 1, "spell": "004" }, { "id": 2, "spell": "001" }, { "id": 3, "spell": "001" }, { "id": 4, "spell": "004" }, { "id": 5, "spell": "001" } I did my best to explain this possible solution. Hope it could be useful for somebody. Sources that helped me to understand how the hex worked: link removed by moderator
  2. Hi 1. Description of the problem / Question : Does somebody know how to read the blob structure of the column skill_level from the tabel Player inside the DB Player? I found some resources on the internet but i still can't do it. I am trying to create a JS script to read player spells. Thanks, Sincerly, Andi
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.