If I'm understanding this right, this is an existing cheat that gets the offset for the inventory from the pointer stored in 0x08B4080 and then writes the Item ID for Coin Gun (0x389) to the first item slot (0xA14). You want to instead write an Item ID 1 value higher, so 0x38A, is that right? If I understood that right the code would just be:
Code:
if (cheatEnabled[4]){
offset = READU32(offset + 0x08B4080);
WRITEU32(offset + 0xA14, 0x38A);
offset = 0;
data = 0;
}
You don't even have to use hex, it only uses hex because I assume they copied the code from a GateWay cheat. So you could also write this:
Code:
if (cheatEnabled[4]){
offset = READU32(offset + 0x08B4080);
WRITEU32(offset + 0xA14, 906);
offset = 0;
data = 0;
}
The data value at the bottom is set to 0 at the end of the cheat because the original GateWay cheat ended with D2000000 00000000 which is a terminator code. Officially it seems like you'd actually want this:
Code:
if (cheatEnabled[4]){
offset = READU32(offset + 0x08B4080);
data = 1;
WRITEU32(offset + 0xA14, 0x389 + data);
offset = 0;
data = 0;
}
All the above examples all do the exact same thing.