 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
ZxPwds Advanced Cheater
Reputation: 0
Joined: 27 Oct 2015 Posts: 59
|
Posted: Mon Apr 13, 2020 6:23 pm Post subject: Would someone show me an example |
|
|
Hello everybody, My name is zxpwd. I'm trying to make a trainer that would toggle an AA Script in lua if that is at all possible. or if someone can tell me how to do the following in lua.
I want to have it in this hotkey
CTRL + ALT + 1
(function,VK_CONTROL,VK_MENU,0x31)
| Code: | [ENABLE]
Game.exe+35AABC:
db 90 90
[DISABLE]
Game.exe+35AABC:
db 75 11 |
|
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1532
|
Posted: Mon Apr 13, 2020 7:28 pm Post subject: |
|
|
Extracted from the example of atom0s.
I haven't tried it, hope it works.
| Code: | function Hack1(sender)
local script1 = ([[
[ENABLE]
Game.exe+35AABC:
db 90 90
[DISABLE]
Game.exe+35AABC:
db 75 11
]]);
-- Execute and enable the script..
local a, b = autoAssemble(script1, false);
if (a) then
-- Disable the script?
autoAssemble(script1, b);
end
end
htky=createHotkey(Hack1, VK_F8) |
_________________
|
|
| Back to top |
|
 |
ZxPwds Advanced Cheater
Reputation: 0
Joined: 27 Oct 2015 Posts: 59
|
Posted: Mon Apr 13, 2020 8:37 pm Post subject: |
|
|
Hey buddy I appreciate your quick answer
I've edited your hotkey accordingly but it doesn't work?
| Code: |
----------------------------------------------------------------
----------------------START Name ESP------------------------
----------------------------------------------------------------
-- toggleValSetHp
--Ctrl+Alt+7
--UDF1.lblNameEsp.Font.Color=0xfc0b03 -- BLUE
--UDF1.lblNameEsp.Font.Color=0x000000 -- BLACK
function Hack1(sender)
local script1 = ([[
[ENABLE]
Gunz.exe+35AABC:
db 90 90
[DISABLE]
Gunz.exe+35AABC:
db 75 11
]]);
-- Execute and enable the script..
local a, b = autoAssemble(script1, false);
if (a) then
-- Disable the script?
autoAssemble(script1, b);
end
end
htky=createHotkey(Hack1, VK_CONTROL,VK_MENU,0x38) --Ctrl+Alt+8
----------------------------------------------------------------
---------------------END Name ESP---------------------------
----------------------------------------------------------------
|
I've made a label change color on activation to see if it's on or not. would you help me add it aswell?
UDF1.lblNameEsp.Font.Color=0xfc0b03 -- BLUE = on
UDF1.lblNameEsp.Font.Color=0x000000 -- BLACK = off
This is the code but I when I activate it, It doesn't work.
|
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1532
|
Posted: Tue Apr 14, 2020 7:09 am Post subject: |
|
|
| Code: | --local gHotkeyOn = false
function Hack1(sender)
local script1 = ([[
[ENABLE]
Gunz.exe+35AABC:
db 90 90
[DISABLE]
Gunz.exe+35AABC:
db 75 11
]]);
local a, b = autoAssemble(script1, false);
if (gHotkeyOn) then
gHotkeyOn=false
autoAssemble(script1, b);
print("false")
else
gHotkeyOn=true
autoAssemble(script1, b);
print("true")
end
end
htky=createHotkey(Hack1, VK_8) |
| ParkourPenguin wrote: | | Look in defines.lua to see a list of all the key codes (search "VK_"). |
VK_8 .. VK_NUMPAD8
etc.
_________________
|
|
| Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
Posted: Tue Apr 14, 2020 9:07 am Post subject: |
|
|
| Code: | local yourAAScript,yourScriptDisableTable = [==[
[ENABLE]
Gunz.exe+35AABC:
db 90 90
[DISABLE]
Gunz.exe+35AABC:
db 75 11
]==]
function Hack1(sender)
local status
if (type(yourScriptDisableTable)~='table') then
status,yourScriptDisableTable = autoAssemble(yourAAScript);
if (status) then
UDF1.lblNameEsp.Font.Color=0xfc0b03 -- BLUE = on
end
else
status = autoAssemble(yourAAScript,yourScriptDisableTable);
-- we do not care if it managed to disabled; if game process closes before you disable, you might not be able to re activate it, unless you trigger deactivate first;
--if (status) then
yourScriptDisableTable = nil;
UDF1.lblNameEsp.Font.Color=0x000000 -- BLACK = off
--end
end
end
htky=createHotkey(Hack1, VK_CONTROL,VK_MENU,0x38) --Ctrl+Alt+8 |
_________________
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
|
|