You are viewing our Forum Archives. To view or take place in current topics click here.
I need help on programing thanks
Posted:

I need help on programing thanksPosted:

thepro21
  • New Member
Status: Offline
Joined: Jun 20, 201113Year Member
Posts: 3
Reputation Power: 0
Status: Offline
Joined: Jun 20, 201113Year Member
Posts: 3
Reputation Power: 0
Ex. hex coding
00 77 45 17 27 67 83

What I need help on is a code that will let me do this, the code needs to find 00 77 from a big list then after it finds it it needs to skip 4 bytes and find 83.



BETTER EX.
Find 00 77
After it finds it it's needs to edit the 83.

REASON WHY
Now I would just go and hight light the 83 then get the offset but the coding moves so it's not always there for every one but it is always next to 00 77.

If I don't make any sence post and I'll try to explain more.
Note*I just want the coding for it not some oh well I'll make the mod tool for 50$*
#2. Posted:
M0D1F13D
  • TTG Senior
Status: Offline
Joined: Sep 06, 201014Year Member
Posts: 1,069
Reputation Power: 47
Status: Offline
Joined: Sep 06, 201014Year Member
Posts: 1,069
Reputation Power: 47
I tested a bit and this worked for me. You would read the bytes of the file you're modding into a byte array and then use my code with that byte array.
Edit: You weren't specific as to what language you were using, but this is C#.
int Find(byte[] bytes)
{
    int index = 0;
    byte[] value1 = { 0x00, 0x77 };
    while (true)
    {
        byte[] value2 = {bytes[index], bytes[index + 1]};
        if ((value1[0] == value2[0]) && (value1[1] == value2[1])) break;
        else index += 1;
    }
    return index + 6;
}
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.