View previous topic :: View next topic |
Author |
Message |
Yuno Gasai How do I cheat?
Reputation: 0
Joined: 24 Feb 2016 Posts: 3 Location: Japan
|
Posted: Wed Feb 24, 2016 7:41 pm Post subject: I need help with this loop script |
|
|
I'm making this script for Dark Souls.
So I've found the current health and max health using pointer scan.
ActHP gives me a nil error
This is my script:
Code: | timer = createTimer(nil, true)
timer_setInterval(timer, 100)
function HP_Regen()
if (getOpenedProcessID() ~= 0) then
local ActHP = readInteger('[[[[["DARKSOULS.exe"+00EE29E8]+2d4]+f8]+2c0]+28]+0')
local MaxHP = readInteger('[["DARKSOULS.exe"+00F78700]+14]+8')
if (ActHP ~= nil) and (MaxHP ~= nil) then
if (ActHP < MaxHP) then
writeInteger(ActHP, MaxHP)
end
end
end
end
timer_onTimer(timer, HP_Regen) |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Feb 24, 2016 8:12 pm Post subject: |
|
|
Code: | writeInteger('[[[[["DARKSOULS.exe"+00EE29E8]+2d4]+f8]+2c0]+28]+0', MaxHP) |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Yuno Gasai How do I cheat?
Reputation: 0
Joined: 24 Feb 2016 Posts: 3 Location: Japan
|
Posted: Wed Feb 24, 2016 8:16 pm Post subject: |
|
|
Why can't I just do
Code: | writeInteger(ActHP, MaxHP) |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Feb 24, 2016 8:27 pm Post subject: |
|
|
Based on your code, it looks like ActHP is your current health, not the address where your current health is stored.
First parameter to writeInteger() needs to be an address where you wish to write the value.
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Yuno Gasai How do I cheat?
Reputation: 0
Joined: 24 Feb 2016 Posts: 3 Location: Japan
|
Posted: Wed Feb 24, 2016 8:49 pm Post subject: |
|
|
Oh thank you for explaining it to me
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|