Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Working on "God Mode" script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Tue Nov 30, 2021 1:12 am    Post subject: Reply with quote

You should use code tags when submitting code. Also, you should use indentation in code because when there isn't any, the code is more difficult to follow. This script will provide what you need.

Code:

[ENABLE]
{$LUA}
godTimer = createTimer(getMainForm())
godTimer.Interval = 50 -- Set to whatever you deem fit, currently set to 50 milliseconds.
godTimer.OnTimer = function(god)
                    if godTimer ~= nil then
                      local base = getAddressSafe("[[[[[Maneater-WinGDK-Shipping.exe+04865DC8]+28]+870]+468]+3A0")
                      local maxHP = readFloat("[" .. base .. "]+D40")
                      local curHP = readFloat("[" .. base .. "]+68")

                      if curHP < maxHP then
                         writeFloat("[" .. base .. "]+68", maxHP)
                      end
                    else return end
                   end


[DISABLE]
{$LUA}
godTimer.destroy()
godTimer = nil


This script assumes that base will be correct.
Back to top
View user's profile Send private message
Frouk
Master Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 489
Location: mov dword ptr [Ukraine]

PostPosted: Tue Nov 30, 2021 2:01 am    Post subject: Reply with quote

This script writes max health in current health only,fatal damage still count as death
_________________
void(__cdecl *Haxing)(HWND hGameWindow)
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Tue Nov 30, 2021 2:09 am    Post subject: Reply with quote

Frouk wrote:
This script writes max health in current health only,fatal damage still count as death


I'm aware. I was adapting the OP's script to fit the logic they wanted. Writing the max health to the current health is a form of invinicibility of which there are many; it is equally acceptable to use the term in this case.

However, you are not wrong. Any damage more than the maximum health will result in death of the player's character.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites