 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Wumpbugler How do I cheat?
Reputation: 0
Joined: 19 Apr 2013 Posts: 4 Location: Massachusetts
|
Posted: Sat Apr 20, 2013 1:47 pm Post subject: I need want a value listed in Hex to list in base 10 |
|
|
| I am attempting to create my own (rather simple) cheat table for Kingdoms of Amalur. I used pointer scan to find the base address for my money, the pointer works, I can modify my money and works when I restart the game. BUT, the value listed for the base address is in hexadecimal, as in if I were to change it's value to 10, my money in game would change to 17. When I find the dynamic address for money it is in base 10, I was wondering if there was a way to get the base address to display its value in base 10, so I wouldn't have to use a hex to decimal converter to get the number I want.
|
|
| Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Sat Apr 20, 2013 2:12 pm Post subject: |
|
|
how about an trainer/Decimal To Hex window?
Steps:
Change your pointer descriptions into Money Pointer
Open LUA Engine (Ctrl+Alt+L)
paste there the code below and press execute.
| Code: | f = {}
f[0] = createForm()
f[1] = createLabel(f[0])
f[2] = createButton(f[0])
f[3] = createEdit(f[0])
setProperty(f[0] , "Position", "poScreenCenter")
setProperty(f[0] , "BiDiMode", "bdLeftToRight")
setProperty(f[0] , "Borderstyle", "bsToolWindow")
control_setSize(f[0], 280,30)
control_setSize(f[2], 50,20)
control_setSize(f[3], 75,20)
control_setCaption(f[0], 'Decimal To Hex')
control_setCaption(f[1], 'Enter the desired value')
control_setCaption(f[2], 'Set')
control_setPosition(f[1], 5, 8)
control_setPosition(f[3], 140, 5)
control_setPosition(f[2], 220, 6)
-- rename this according your address description
Address = addresslist_getMemoryRecordByDescription(getAddressList(), "Money Pointer")
function set()
GetVal = tonumber(control_getCaption(f[3]))
if value=='' then return end
value = string.format("%X", GetVal)
memoryrecord_setValue(Address, value)
end
control_onClick(f[2], set) |
Good luck!
_________________
I'm rusty and getting older, help me re-learn lua. |
|
| Back to top |
|
 |
Wumpbugler How do I cheat?
Reputation: 0
Joined: 19 Apr 2013 Posts: 4 Location: Massachusetts
|
Posted: Sat Apr 20, 2013 3:22 pm Post subject: |
|
|
| Thanks, that helped a lot. So, if I was to run into another base address that also listed its value in hex, (lets say health, and I made the description "Health Pointer", as an example) would I just copy and paste that code again, and change it to find "Health Pointer" at line 24?
|
|
| Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Sat Apr 20, 2013 3:24 pm Post subject: |
|
|
hmm it should work =P
test it, tell me if it did or not =)
_________________
I'm rusty and getting older, help me re-learn lua. |
|
| Back to top |
|
 |
Wumpbugler How do I cheat?
Reputation: 0
Joined: 19 Apr 2013 Posts: 4 Location: Massachusetts
|
Posted: Sat Apr 20, 2013 5:26 pm Post subject: |
|
|
If I paste the code twice it gives me two windows, both of which work. After breaking the code several times and a lot of copy and pasting, I came up with a better solution. I added a second button, copied the bottom portion of the code you gave me (from line 23 down), I had to change the variable to 'address2' on line 40 so when I set it to a different pointer (Current Health in my code)it didn't overwrite "Money Pointer" and cause both buttons to write Current Health. With this the user can enter the value they want, then click the button of the stat they want changed to that value. More buttons could easily be added using the same method.
| Code: |
f = {}
f[0] = createForm()
f[1] = createLabel(f[0])
f[2] = createButton(f[0])
f[3] = createEdit(f[0])
f[4] = createButton(f[0])
setProperty(f[0] , "Position", "poScreenCenter")
setProperty(f[0] , "BiDiMode", "bdLeftToRight")
setProperty(f[0] , "Borderstyle", "bsToolWindow")
control_setSize(f[0], 280,60)
control_setSize(f[2], 50,20)
control_setSize(f[3], 75,20)
control_setSize(f[4], 50,20)
control_setCaption(f[0], 'Decimal To Hex')
control_setCaption(f[1], 'Enter the desired value')
control_setCaption(f[2], 'Money')
control_setCaption(f[4], 'Health')
control_setPosition(f[1], 5, 8)
control_setPosition(f[3], 140, 5)
control_setPosition(f[2], 220, 6)
control_setPosition(f[4], 220, 30)
-- rename this according your address description
Address = addresslist_getMemoryRecordByDescription(getAddressList(), "Money Pointer")
function set()
GetVal = tonumber(control_getCaption(f[3]))
if value=='' then return end
value = string.format("%X", GetVal)
memoryrecord_setValue(Address, value)
end
control_onClick(f[2], set)
-- rename this according your address description
Address2 = addresslist_getMemoryRecordByDescription(getAddressList(), "Current Health")
function set2()
GetVal = tonumber(control_getCaption(f[3]))
if value=='' then return end
value = string.format("%X", GetVal)
memoryrecord_setValue(Address2, value)
end
control_onClick(f[4], set2) |
With this the user can enter the value they want, then click the button of the stat they want changed to that value. More buttons could easily be added using the same method.
Copy and Paste is op
|
|
| Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Sat Apr 20, 2013 5:49 pm Post subject: |
|
|
Great, you've learned a little bit LUA and achieved what you want! =)
_________________
I'm rusty and getting older, help me re-learn lua. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|