View previous topic :: View next topic |
Author |
Message |
GH*master Expert Cheater
Reputation: 8
Joined: 10 Jan 2008 Posts: 159
|
Posted: Fri Feb 25, 2011 6:00 am Post subject: Cheat init, enable and disable (LUA+AA) |
|
|
I'm not sure about this is correcty, but may be useful to someone
Code: | script_Init = "[[
alloc(Requisition,2048)
registersymbil(Requisition)
label(back_Requisition)
registersymbil(back_Requisition)
Requisition:
fstp dword ptr [ebx+00000104]
cmp [ebx+08],3E8
jne back_Requisition
cmp [ebx+00000104],47435000
jg back_Requisition
mov [ebx+00000104],47435000
DOW2.exe+2144A5:
jmp Requisition
nop
back_Requisition:
]]"
script_enable = "[[
DOW2.exe+2144A5:
jmp Requisition
nop
]]"
script_disable = "[[
DOW2.exe+2144A5:
fstp dword ptr [ebx+00000104]
]]"
cheatRequisitionINIT = false;
cheatRequisition = true;
while (true) do
sleep(1000)
if keyUp(45) then
if (cheatRequisitionINIT==false)
autoAssemble(script_Init)
cheatRequisitionINIT = true
continue
end
if (cheatRequisition==true) then
autoAssemble(script_enable)
else
autoAssemble(script_disable)
cheatRequisition = not cheatRequisition
end
end |
Last edited by GH*master on Thu Dec 15, 2011 2:01 am; edited 7 times in total |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25705 Location: The netherlands
|
Posted: Fri Feb 25, 2011 7:36 am Post subject: |
|
|
I would rather create a timer object with interval of 1000 instead of
Code: |
while (true)
sleep(1000)
|
or perhaps a luathread but I have no idea how they work or even if they work
as for the code behind the infinite loop:
1: the if's need then's at the end
2: I have no idea what you mean with " cheatRequisition= cheatRequisition not true "
_________________
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 |
|
 |
GH*master Expert Cheater
Reputation: 8
Joined: 10 Jan 2008 Posts: 159
|
Posted: Fri Feb 25, 2011 9:32 am Post subject: |
|
|
Dark Byte wrote: | 2: I have no idea what you mean with " cheatRequisition= cheatRequisition not true " |
I mean this:
Code: | if (cheatRequisition==true) then
cheatRequisition= false
else
cheatRequisition=true
end |
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25705 Location: The netherlands
|
Posted: Fri Feb 25, 2011 10:00 am Post subject: |
|
|
ah, in that case it is "cheatRequisition = not cheatRequisition"
_________________
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 |
|
 |
hiring_dude Newbie cheater
Reputation: 0
Joined: 28 Nov 2010 Posts: 20
|
Posted: Tue Dec 13, 2011 3:28 pm Post subject: |
|
|
Hi,
i hope it's the good place to post my question since it's related about activation/desactivation of AA script through LUA.
apparently there is only 1 LUA script possible by cheat table.
i also have a lot of AA script and it's not very practical to put my whole AA code in the unique LUA script. Also for debugging/readability reasons i don't particularly want to use the autoAssemble LUA function (too hardcore for me to mix stuff like that) but the memoryrecord table.
after searching the documentation it appear we can access AA script through memoryrecord list. can't we toggle the script "enable/disable" more simply than creating an useless shortcut then memoryrecordhotkey_doHotkey() ?
there is a simple :
boolean = memoryrecord_isActive(memoryrecord);
is there something like :
memoryrecord_setActive(memoryrecord,boolean);
btw what is a CETRAINER File purpose ??
the documentation is quite straight sometime
ps : sorry for my engrish
|
|
Back to top |
|
 |
hiring_dude Newbie cheater
Reputation: 0
Joined: 28 Nov 2010 Posts: 20
|
Posted: Wed Dec 14, 2011 5:58 am Post subject: |
|
|
Ok i think i got the answer..
I'll provide à tutorial soon..
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 204
Joined: 25 Jan 2006 Posts: 8579 Location: 127.0.0.1
|
Posted: Wed Dec 14, 2011 9:45 am Post subject: |
|
|
Just in case you didn't find your answer, these should be what you are looking for:
memoryrecord_freeze(te, updownfreeze OPTIONAL): sets the entry to frozen state. updownfreeze is optional. 0=freeze, 1=allow increase, 2=allow decrease
memoryrecord_unfreeze(te) :unfreezes an entry
_________________
- Retired. |
|
Back to top |
|
 |
hiring_dude Newbie cheater
Reputation: 0
Joined: 28 Nov 2010 Posts: 20
|
Posted: Wed Dec 14, 2011 2:59 pm Post subject: |
|
|
Ohh, right that's exactly what i was searching for !
thanks Wiccaan.
arghh the documentation is quite straight...
so it also toogle AA script.
no need to create a tutorial..
|
|
Back to top |
|
 |
|