You are on page 1of 4

How to make LUA scripts execute standalone exe?

If you are looking for a way to save Lua scripts to executables, use srlua. if y
ou want to add a GUI to your exe then use iuplua or wxlua.
if you are trying to write a hack for a game or program,then use the Alien libra
ry (to call foreign functions inside dlls).
I do use srlua,but I have never used the Alien library.
Also by using those libraries, your app will be lighter but you'll pay the price
in its development. a GUI designer is much easier to use than a GUI library,bec
ause you'll have to code it yourself.
---===0===--How to prevent lua engine from popping up on print
this code will disable the show on print menu item in the lua engine window, whi
ch will stop it from comming to front, or becoming visible when a lua script pri
nts a message
Code:
getLuaEngine().cbShowOnPrint.Checked=false
getLuaEngine().hide()
Alternative
Code:
getLuaEngine().OnShow = function (sender) return sender.hide(); end;
---===0===--How can I make "invisible" trainers with the current CE version?
the answer is at main.lua
Code:
CETrainer.hide()
open the form designer and then execute
Code:
formname.visible=false
btw... when you generate a trainer "script", the SAVE AS menuclick don't work.
it's a known bug. Just go to the main ce window and click save there (or file->s
ave as)
---===0===--anyhow:
Code:
createHotkey(functionThatSetsSpecificValue, VK_INSERT)
example:
Code:
function functionThatSetsSpecificValue(sender)
writeInteger("[[bla.exe+1234]+12]+13", 123456)
end
createHotkey(functionThatSetsSpecificValue, VK_INSERT)
1: Just add a memoryrecord to your cheattable and assign it a toggle hotkey (rig
htclick, assign hotkey)
Alternatively, get the addresslist (getAddressList() ), then get the memoryrecor

d from the addresslist(e.g: addresslist_getMemoryRecordByDescription(addresslist


, description), then call memoryrecord_freeze(memrec) to freeze and memoryrecord
_unfreeze(memrec) to unfreeze
2:
Code:
function address1Freezer(timer)
writeInteger(0x12345, 123)
end
function freezeAddress1()
if (address1FreezeTimer==nil) then --first time init
address1FreezeTimer=createTimer(nil,false)
timer_setInterval(address1FreezeTimer,100) --set value every 100 millisecond
s
timer_onTimer(address1FreezeTimer, address1Freezer)
end
timer_setEnabled(address1FreezeTimer, true)
end
function unfreezeAddress1()
if (address1FreezeTimer~=nil) then
timer_setEnabled(address1FreezeTimer, false) --stop the freezer
end
end
call freezeAddress1() to freeze and unfreezeAddress1() to unfreeze
---===0===--If you want to toggle cheat script.
Code:
openProcess([[Tutorial-i386.exe]])
local form = createForm( true );
local button = createButton(form)
control_setPosition(button, 100,100)
control_setCaption(button, [[Hack It!]])
control_onClick(button,func)
i = 0
addresslist=getAddressList()
memrec=addresslist_getMemoryRecordByDescription(addresslist,[[Hack It!]])
function func()
if( i == 0 ) then
--ENABLE CHEAT SCRIPT
memoryrecord_freeze(memrec)
else
--DISABLE CHEAT SCRIPT
memoryrecord_unfreeze(memrec)
end
i = (i +1)%2

return true
end
yes, just add multiple autoAssemble calls in the function
also, disable scripts don't work well with the autoAssemble script (it won't fre
e the memory)
for aa scripts that can toggle the script needs to be in a memory record and you
r script needs to set the entry to frozen/unfrozen instead
---===0===--{$lua}
local targetprocess="tutorial-i386.exe" --replace with your target
if readInteger(targetprocess)==nil then --failed reading the memory of the main
process module
if openProcess(targetprocess)==nil then
messageDialog("I'm sorry, but the game needs to be running to be able to use
this feature", mtError, mbOk)
error();
end
end
{$asm}
---===0===--this one works for dxhr version 1.4.651.0
local batteries = 5;
local addr = "[[dxhr.exe+015de1a8]+14]+274";
local f = createForm( true );
local t = createTimer( f, true );
timer_setInterval( t, 1000 );
timer_onTimer( t, function( )
local energy = readFloat(addr)
if (((batteries - 4)*30) == energy)
writeFloat(addr, energy + 0.01);
end
if (((batteries - 3)*30) == energy)
writeFloat(addr, energy + 0.01);
end
if (((batteries - 2)*30) == energy)
writeFloat(addr, energy + 0.01);
end
if (((batteries - 1)*30) == energy)
writeFloat(addr, energy + 0.01);
end
end );

then
then
then
then

this one works for dxhrml "missing link dlc" version 1.4.66.0
local batteries = 5;
local addr = "[[dxhrml.exe+015f1578]+14]+274";
local f = createForm( true );
local t = createTimer( f, true );
timer_setInterval( t, 1000 );

timer_onTimer( t, function( )
local energy = readFloat(addr)
if (((batteries - 4)*30) == energy)
writeFloat(addr, energy + 0.01);
end
if (((batteries - 3)*30) == energy)
writeFloat(addr, energy + 0.01);
end
if (((batteries - 2)*30) == energy)
writeFloat(addr, energy + 0.01);
end
if (((batteries - 1)*30) == energy)
writeFloat(addr, energy + 0.01);
end
end );

then
then
then
then

---===0===--local addr = "[[[[[dxhr.exe+015DE1A8]+14]+270]+6C]+A0]+274";


local f = createForm( true );
local t = createTimer( f, true );
timer_setInterval( t, 1000 );
timer_onTimer( t, function( )
local energy = readFloat(addr);
if energy then
if math.abs(energy % 30.0) < 0.005 then
writeFloat(addr, energy + 0.01);
end
end
end );
---===0===---

You might also like