What's new

Solved Setting Stat Offsets C#

  • Thread starter Authentics
  • Start date
  • Views 96
A

Authentics

Newbie
Messages
1
Reaction score
0
Sorry for the noob question, but I'm trying to make a BO2 Tool and I am having a little trouble getting the stats section to work, how would I call a numericupdown and set the stats accordingly. this is what I'm trying right now but it doesn't seem to work.

Code:
        private void button5_Click(object sender, EventArgs e) //Set Level
        {
            byte[] bytes = BitConverter.GetBytes(this.numericUpDown2.Value);
            jtag.DebugTarget.SetMemory(0x840C0500 + 0x843491B6, 4, bytes);
        }
p3ktHOQ.png

Thank you for any help!
 
C

CeratedSuperior

No sympathy for the Devil; keep that in mind
Messages
1,175
Reaction score
276
Sorry for the noob question, but I'm trying to make a BO2 Tool and I am having a little trouble getting the stats section to work, how would I call a numericupdown and set the stats accordingly. this is what I'm trying right now but it doesn't seem to work.

Code:
        private void button5_Click(object sender, EventArgs e) //Set Level
        {
            byte[] bytes = BitConverter.GetBytes(this.numericUpDown2.Value);
            jtag.DebugTarget.SetMemory(0x840C0500 + 0x843491B6, 4, bytes);
        }
p3ktHOQ.png

Thank you for any help!
You have a few issues here. For the bytes you need to convert the numericupddown value from decimal to UInt32.
Code:
byte[] bytes = BitConverter.GetBytes(Convert.ToUInt32(numericupddown.Value));

Next your address is wrong. Bo2 stats have been posted a few places so try googling the correct offsets. Adding 0x840C0500 + 0x843491B6 gives you a value of 0x1084096B6 which is way tool large of a number to be the address.


*After looking at the addresses I see what happened. You don't need the stat entry since they give the full address for each stat. So XP/Level is 0x843491B6.
 
Top Bottom