View previous topic :: View next topic |
Author |
Message |
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Sun Apr 13, 2014 4:18 pm Post subject: Code a table "Active" with a check and/or clear ch |
|
|
I know it must be possible but I've no clue as to the code steps to either put a check in the "Active" box on cheat engine or clear one that may be there?
I know how to make a entry in the table constant, but that is not what I'm asking
So what would the code steps be?
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Apr 13, 2014 6:06 pm Post subject: |
|
|
Active property of MemoryRecord Class.
Code: | Active: boolean - Set to true to activate/freeze, false to deactivate/unfreeze |
Edit: Hmm, looks like main.lua (documentation file) is not complete. There are few memoryrecord class methods missing:
'getType'
'setType'
'getValue'
'setValue'
'getScript'
'setScript'
'getActive'
'setActive'
'getChild'
'isSelected'
'delete'
'getHotkeyCount'
_________________
Last edited by mgr.inz.Player on Sun Apr 13, 2014 6:16 pm; edited 1 time in total |
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Sun Apr 13, 2014 6:12 pm Post subject: |
|
|
Like this?
AL = getAddressList()
boxtofreeze = addresslist_getMemoryRecordByDescription(AL, "Gold")
boxtofreeze.Status = True
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Apr 13, 2014 6:18 pm Post subject: |
|
|
Like this:
Code: | AL = getAddressList()
boxtofreeze = AL.getMemoryRecordByDescription("Gold")
boxtofreeze.Active = true |
Edit,
Also, I don't see "allow increase", "allow decrease" in new main.lua (from CE6.3)
so, if you want to freeze and allow increase, use this code
Code: | AL = getAddressList()
boxtofreeze = AL.getMemoryRecordByDescription("Gold")
memoryrecord_freeze(boxtofreeze, 1) |
from main.lua from CE6.2:
Code: | memoryrecord_freeze(te, updownfreeze OPTIONAL): sets the entry to frozen state. updownfreeze is optional. 0=freeze, 1=allow increase, 2=allow decrease |
(CE6.3 has almost all old functions from CE6.2)
_________________
Last edited by mgr.inz.Player on Mon Apr 14, 2014 2:27 pm; edited 1 time in total |
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Sun Apr 13, 2014 6:34 pm Post subject: |
|
|
Oh the allow increase might be nice, I'll try that.
Thanks
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Mon Apr 14, 2014 10:25 am Post subject: |
|
|
Using the 1 option the behavior was wildly erratic, increasing much more than the adds from battle/finds during the game.
If 0 sets the freeze what code would unset it---after being set?
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Apr 14, 2014 10:29 am Post subject: |
|
|
bknight2602 wrote: | If 0 sets the freeze what code would unset it---after being set? |
Code: | boxtofreeze.Active = False |
or
Code: | memoryrecord_unfreeze(boxtofreeze) |
_________________
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Mon Apr 14, 2014 11:00 am Post subject: |
|
|
duh, of course.
thanks
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Mon Apr 14, 2014 12:44 pm Post subject: |
|
|
mgr.inz.Player wrote: | bknight2602 wrote: | If 0 sets the freeze what code would unset it---after being set? |
Code: | boxtofreeze.Active = False |
or
Code: | memoryrecord_unfreeze(boxtofreeze) |
|
It should be false, since False seems to lua as variable, and it holds value nil (since it never been defined).
_________________
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Apr 14, 2014 2:24 pm Post subject: |
|
|
@DaSpamer, thats correct.
If look at memoryrecord_setActive function inside LuaMemoryRecord.pas, you will see
Code: | function memoryrecord_setActive(L: PLua_State): integer; cdecl;
var
memrec: TMemoryRecord;
begin
result:=0;
memrec:=luaclass_getClassObject(L);
if lua_gettop(L)>=1 then
memrec.active:=lua_toboolean(L, 1);
end; |
lua_toboolean function should convert nil to false.
But this won't work as expected (True is a non initialized variable):
Code: | boxtofreeze.Active = True |
It is better to not mix False,false,True,true
_________________
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Mon Apr 14, 2014 2:35 pm Post subject: |
|
|
Both appear to work in 9.3
|
|
Back to top |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Tue Apr 15, 2014 11:05 am Post subject: |
|
|
DaSpamer here is the file.
Description: |
|
Download |
Filename: |
HEROES3_63.CT |
Filesize: |
1.43 MB |
Downloaded: |
1153 Time(s) |
|
|
Back to top |
|
|
|