pimp rate

CItemWeapon::CharmingAdr 0x00429100

that is the function you need to modify in the server for it.. there is a table for the upgrade chance

if ( *(v9 + 112) < 20 && dword_4D5C48[*(v9 + 112)] >= sub_406E10(1, 10000000) )

if ( *(v9 + 100) < 20 && dword_4D5B88[*(v9 + 100)] >= sub_406E10(1, 10000000) )

if you look in ida at these 2 lines.. you can see first it checks the weapons upgrade level... if its under 20... then it checks in the table (*) for the rate against a 1 to 10000000 roll if it succeeded or not.. there are 2 tables for this.. magic and physical weapons ;)


*:
dword_4D5C48 <---
dword_4D5B88 <---

hope it helps you any further :)

p.s. if you really wanted to you can even hexedit the new rates in at those 2 adresses and below it ofc as it is the pointer to both arrays for the rates.. :D..
 
Upvote 0
i already gave you all info you need :) now its up to you to find out how to use the information properly,
you would not learn a thing if i give out everything but i actually already did in this case,

0x004D5B88 is the adress of the first array..
0x004D5C48 is the adress of the second array..

The arrays i am talking about are made out of 4 byte values.. in other words.. 32 bits.. DWORD's... or Integers..

now if you look in the mainserver with HxD for example.. most commonly used hexeditor right?
press ctrl + g.. go to offset D5B88 wich is the first adress i gave you... minus the 0x004 upfront as this hexeditor uses 0x00000000 as its base adress while the kal mainserver bases at 0x00400000 to begin with...

Then.. the first values youll see at your cursor are 80 96 98 00.. this is the first 4 bytes of the array.. to get a proper value out of this you need to read them backwards... so typ in your windows calculator set to programmer into the HEX field 989680 and you will see it turns back with 10.000.000 as a decimal value.. wich is 100% chance for the upgrade system..

Ofcourse since the upgrade system has 20 levels you can just follow along and modify the rest of the values wich are right after eachother.. all of them ofc 4 bytes long :).. the first 4 levels are all 100% chance.. (everybody that plays kal knows this i would presume..) and goes down and down from there on out..

arrayvaluespimp01 - pimp rate - RaGEZONE Forums

added an image to make it clearer.. :) i outlined the first 4 values.. the 20th value.. as well as the actual end of the array.. ^^ now good luck hexing it into whatever rates you like.. all you need to do is math out in decimal what % you want.. convert it to hexdecimal.. turn it backwards.. and hex it over :).. piece of cake right?
 
Last edited:
Upvote 0
i already gave you all info you need :) now its up to you to find out how to use the information properly,
you would not learn a thing if i give out everything but i actually already did in this case,

0x004D5B88 is the adress of the first array..
0x004D5C48 is the adress of the second array..

The arrays i am talking about are made out of 4 byte values.. in other words.. 32 bits.. DWORD's... or Integers..

now if you look in the mainserver with HxD for example.. most commonly used hexeditor right?
press ctrl + g.. go to offset D5B88 wich is the first adress i gave you... minus the 0x004 upfront as this hexeditor uses 0x00000000 as its base adress while the kal mainserver bases at 0x00400000 to begin with...

Then.. the first values youll see at your cursor are 80 96 98 00.. this is the first 4 bytes of the array.. to get a proper value out of this you need to read them backwards... so typ in your windows calculator set to programmer into the HEX field 989680 and you will see it turns back with 10.000.000 as a decimal value.. wich is 100% chance for the upgrade system..

Ofcourse since the upgrade system has 20 levels you can just follow along and modify the rest of the values wich are right after eachother.. all of them ofc 4 bytes long :).. the first 4 levels are all 100% chance.. (everybody that plays kal knows this i would presume..) and goes down and down from there on out..

View attachment 158161

added an image to make it clearer.. :) i outlined the first 4 values.. the 20th value.. as well as the actual end of the array.. ^^ now good luck hexing it into whatever rates you like.. all you need to do is math out in decimal what % you want.. convert it to hexdecimal.. turn it backwards.. and hex it over :).. piece of cake right?

i have searched for those offsets 0x004D5B88 is the adress of the first array..
0x004D5C48 is the adress of the second array.. with no results hm
 
Upvote 0
i know how to hex :) , i did that on the start but it didnt worked thats why i asked about explaining how to do that exactly :)
 
Upvote 0
:w00t: I see someone say they had a piece of cake ??? ...... o.O

Seriously thanks for this in depth information because i want to really learn more about how the hooks, DWORD, and addresses work in kal c++ coding and be able to do more with the mainserver code we have that never was compilable.
 
Upvote 0
@FlyingBurrito always feel free to post a help thread with specific questions if your stuck.. ;) i will still read most of them and support where i can and see fit..

since i am moving country soon and leave my pc behind for a while until i can get it over in 1 piece i wont be able to work and do much with kal, besides that i more or less gave up my plans for my own server a little while ago because of that too..

it also drives me to help others a bit more again as i am not working on my own kal related stuff 24/7 anymore..

i will stick within the kal community ofc.. it is my home out of home and my hobby since i was a little kid..

Who knows maybe when i have the time to sort and go through my stuff i will also start releasing bits and pieces of my work again too,
as it would be a waste to let it rot away on my disk.. and i rather see other people happy with my work instead.. since that has always been my goal.
 
Upvote 0
@FlyingBurrito always feel free to post a help thread with specific questions if your stuck.. ;) i will still read most of them and support where i can and see fit..

since i am moving country soon and leave my pc behind for a while until i can get it over in 1 piece i wont be able to work and do much with kal, besides that i more or less gave up my plans for my own server a little while ago because of that too..

it also drives me to help others a bit more again as i am not working on my own kal related stuff 24/7 anymore..

i will stick within the kal community ofc.. it is my home out of home and my hobby since i was a little kid..

Who knows maybe when i have the time to sort and go through my stuff i will also start releasing bits and pieces of my work again too,
as it would be a waste to let it rot away on my disk.. and i rather see other people happy with my work instead.. since that has always been my goal.

Thank you very much. That would be very appreciated.

I can and LOVE to edit already existing code and make new things out of it but i can not figure out for the life of me how to "start" using the addresses in the correct manner when im trying to code my own projects.

I stripped and rebuilt one by one the add-ons that were in Darns first release of his DARNS ALL IN ONE DLL source he was playing with and i ended up creating a truly never seen system that blows my mind every single time i use it.

I was trying to learn about adding in a license server system to it ( pre made one ofc bc i can not code it by myself and expect it to be secure ).

Like this one actually:




My plan was to be able to use serial keys so my work could not just be traded to just anyone obviously and since it is such a custom crazy system "giving it away" just seemed nuts.

I do not really want to say what it is because i do not want anyone going crazy with my project ideas yet ^^

I do know 100% for a fact that no server has ever coded it and used it in a server ( maybe it has been made and thought of privately ) i can not believe no one thought about it already and has coded it and used it in a server.

I like to code launchers in C# bc C++ hates me LOL

This is one im finishing up for lineage II at the moment. It is just the exe not the whole package. Its actually transparent which u will see if you download the link.


REMOVED

 
Last edited:
Upvote 0
Back