View previous topic :: View next topic |
Author |
Message |
zokz Newbie cheater Reputation: 0
Joined: 21 Aug 2011 Posts: 10
|
Posted: Fri May 25, 2012 10:14 pm Post subject: how can i use button to enable script? 6.1 |
|
|
how can i use button to enable script?
i want to make a trainer with a ON button that turn on the script
but i dont know how to add a button and use it
NOT HOTKEY |
|
Back to top |
|
|
Freiza Grandmaster Cheater Reputation: 22
Joined: 28 Jun 2010 Posts: 662
|
Posted: Sat May 26, 2012 2:28 am Post subject: |
|
|
If you want to code it in Lua.
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
function func()
if( i == 0 ) then
-- PUT YOUR AUTOASSEMBLE SCRIPT HERE (ENABLE SECTION)
autoAssemble( [[alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
sub [ebx+00000464],eax
mov [ebx+00000464],#5000
exit:
jmp returnhere
"Tutorial-i386.exe"+2276B:
jmp newmem
nop
returnhere:]]
);
else
--DISABLE SCRIPT
autoAssemble( [[dealloc(newmem)
"Tutorial-i386.exe"+2276B:
sub [ebx+00000464],eax
//Alt: db 29 83 64 04 00 00]]
);
end
i = (i +1)%2
return true
end |
or 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 |
_________________
|
|
Back to top |
|
|
g4m3rxx Newbie cheater Reputation: 0
Joined: 13 May 2012 Posts: 19 Location: India
|
Posted: Sat May 26, 2012 10:17 am Post subject: |
|
|
This is the thing i want
thank u
But can I use single button for multiple AA?? |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sat May 26, 2012 10:25 am Post subject: |
|
|
yes, just add multiple autoAssemble calls in the function
also, disable scripts don't work well with the autoAssemble script (it won't free the memory)
for aa scripts that can toggle the script needs to be in a memory record and your script needs to set the entry to frozen/unfrozen instead _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
|