View previous topic :: View next topic |
Author |
Message |
mingoyreb How do I cheat? Reputation: 0
Joined: 28 Nov 2021 Posts: 2
|
Posted: Sun Nov 28, 2021 3:32 pm Post subject: Increase one value whenever a different value increases |
|
|
Hi there,
Here's what I'm trying to do: I want to make it, so scoring points increases your current health. I already know how to find the static addresses for health and score, and have some experience scripting.
Basically: Save current score, check regularly if score has increased, and if so, raise health by 10% of the points scored.
I'm trying to see if I can "Doomify" Bulletstorm by making it faster (works great) and having Skillshots heal you, so you don't have to wait for your health to regen passively.
Any help would be much appreciated!
|
|
Back to top |
|
|
LeFiXER Grandmaster Cheater Supreme Reputation: 20
Joined: 02 Sep 2011 Posts: 1053 Location: 0x90
|
Posted: Sun Nov 28, 2021 4:12 pm Post subject: |
|
|
What do you know of Lua? You could use that to implement the logic. You will want to read the score value and the health value. Store the score in a variable to check for increases and if so then increase the health by 10% of the score.
Code: |
[ENABLE]
-- Assuming it's a 4-byte value, if it's float use readFloat() instead
local old_score = readInteger('address_of_score')
-- Create a timer to consistently check for changes to score
local t = createTimer(getMainForm())
t.Interval = 20 -- 20 ms
t.OnTimer = function ()
-- so the timer only runs once, but will require re-activating
if t then t.destroy(); t = nil end
local current_score = readInteger('address_of_score')
if current_score > old_score then
-- We use readInteger, or readFloat whichever is suitable, to get the value of HP
local hp = readInteger('address_of_health')
-- We calculate 10% of the score so we know how much to increase the HP by
local health_to_increase = ((10 / current_score) * 100)
-- We add the two values together and store the new value in hp
hp = hp + health_to_increase
-- Write the new value to the address of hp
writeInteger('address_of_hp', hp)
end
end
[DISABLE]
if t then t.destroy(); t = nil end
|
Something like this. You will have to insert the addresses of score and HP but this should work as intended.
More documentation about which Lua functions are available can be viewed here
|
|
Back to top |
|
|
mingoyreb How do I cheat? Reputation: 0
Joined: 28 Nov 2021 Posts: 2
|
Posted: Mon Nov 29, 2021 4:13 pm Post subject: |
|
|
Wow, that was quick. Yeah, the code makes sense to me. Thank you so much! I'll start tinkering with it tonight.
|
|
Back to top |
|
|
|