Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


CheckBox
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
milosmml7777
Cheater
Reputation: 0

Joined: 31 Dec 2015
Posts: 39
Location: The Abyss

PostPosted: Mon Jan 04, 2016 7:50 pm    Post subject: CheckBox Reply with quote

How do i freeze

this ---> ([["GGXXACPR_Win.exe"+00513578]])+0x1c
and
this ---> ([[GGXXACPR_Win.exe+517F84]]

using a CheckBox?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25791
Location: The netherlands

PostPosted: Tue Jan 05, 2016 2:36 am    Post subject: Reply with quote

easiest is add those two addresses to the addresslist and then set the Active property of the memory record to 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
View user's profile Send private message MSN Messenger
milosmml7777
Cheater
Reputation: 0

Joined: 31 Dec 2015
Posts: 39
Location: The Abyss

PostPosted: Tue Jan 05, 2016 3:48 am    Post subject: Reply with quote

em....
Thanks but im new to lua, and i am not a PRO at cheat engine.
So i do not have a clue what you are trying to say....
And
I am using a trainer. (and(i am experienced with GM(GAME MAKER)))
I know what Addresslist is and what MemoryRecord is, but i do not know how to use it.
Is there any other way you can help me?
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Tue Jan 05, 2016 6:53 am    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?p=5576412
_________________
Back to top
View user's profile Send private message
milosmml7777
Cheater
Reputation: 0

Joined: 31 Dec 2015
Posts: 39
Location: The Abyss

PostPosted: Wed Jan 06, 2016 4:45 pm    Post subject: Reply with quote

I get an error...
i did this:
Code:
function CECheckbox2Click(sender)
 if (checkbox_getState(CETrainer.CECheckbox2) == 1) then
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,0)
    memoryrecord_freeze(CheatEntry)
  else
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,0)
    memoryrecord_unfreeze(CheatEntry)
  end
end

but i get this img when i check it
And yes, i did execute the script before i checked it.



Screenshot_4.png
 Description:
 Filesize:  9.27 KB
 Viewed:  14889 Time(s)

Screenshot_4.png


Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Jan 06, 2016 5:26 pm    Post subject: Reply with quote

Code:
local addresslist = getAddressList()
Back to top
View user's profile Send private message
milosmml7777
Cheater
Reputation: 0

Joined: 31 Dec 2015
Posts: 39
Location: The Abyss

PostPosted: Wed Jan 06, 2016 5:29 pm    Post subject: Reply with quote

Zenzer i have that code when i posted this.
Code:
form_show(CETrainer)
strings_add(getAutoAttachList(),"GGXXACPR_Win.exe")
function CECheckbox1Click(sender)
local addresslist=getAddressList()
 if (checkbox_getState(CETrainer.CECheckBox1) == 1) then
    writeInteger("GGXXACPR_Win.exe+517FD2",1)
  else
   writeInteger("GGXXACPR_Win.exe+517FD2",0)
end
end
--SOL RAGE
function CECheckbox2Click(sender)
 if (checkbox_getState(CETrainer.CECheckbox2) == 1) then
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,11)
    memoryrecord_freeze(CheatEntry)
  else
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,11)
    memoryrecord_unfreeze(CheatEntry)
  end
end


Last edited by milosmml7777 on Wed Jan 06, 2016 5:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Jan 06, 2016 5:38 pm    Post subject: Reply with quote

Not in the right place, apparently.
Place it at the top of the function.
...or don't make it local.
Back to top
View user's profile Send private message
milosmml7777
Cheater
Reputation: 0

Joined: 31 Dec 2015
Posts: 39
Location: The Abyss

PostPosted: Wed Jan 06, 2016 5:42 pm    Post subject: Reply with quote

Same thing happens again.

Last edited by milosmml7777 on Wed Jan 06, 2016 5:45 pm; edited 2 times in total
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Wed Jan 06, 2016 5:43 pm    Post subject: This post has 1 review(s) Reply with quote

and where did you place that code?


Anyway:
this
Code:

function CECheckbox2Click(sender)
local addresslist = getAddressList()
 if (checkbox_getState(UDF1.CECheckbox2) == 1) then
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,0)
    memoryrecord_freeze(CheatEntry)
  else
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,0)
    memoryrecord_unfreeze(CheatEntry)
  end
end




or this (modern way)
Code:
function CECheckbox2Click(sender)
  local addresslist = getAddressList()
  local CheatEntry=addresslist.getMemoryRecordByID(0)
  CheatEntry.Active = UDF1.CECheckbox2.Checked
end

(we read Checked property instead of State)

_________________
Back to top
View user's profile Send private message MSN Messenger
milosmml7777
Cheater
Reputation: 0

Joined: 31 Dec 2015
Posts: 39
Location: The Abyss

PostPosted: Wed Jan 06, 2016 5:46 pm    Post subject: Reply with quote

sorry i pasted the wrong code in the previous anwser.
here is the full code:
Code:

--GGXX--
function CEButton1Click(sender)
--player1--
--HP
writeInteger(readInteger([["GGXXACPR_Win.exe"+00513578]])+0x1c, getProperty(CETrainer_CEEdit1,"Text"))
--ATTACK
writeInteger([[GGXXACPR_Win.exe+517F84]], getProperty(CETrainer_CEEdit2,"Text"))
--DEFENSE
writeInteger([[GGXXACPR_Win.exe+517F88]], getProperty(CETrainer_CEEdit3,"Text"))
--SPEED
writeInteger([[GGXXACPR_Win.exe+517F8C]], getProperty(CETrainer_CEEdit4,"Text"))
--TENSION RATE
writeInteger([[GGXXACPR_Win.exe+517F94]], getProperty(CETrainer_CEEdit5,"Text"))
--BURST RATE
writeInteger([[GGXXACPR_Win.exe+517FA8]], getProperty(CETrainer_CEEdit6,"Text"))
--JUMP
writeInteger([[GGXXACPR_Win.exe+517FBC]], getProperty(CETrainer_CEEdit7,"Text"))
--AIR DASH
writeInteger([[GGXXACPR_Win.exe+517FB8]], getProperty(CETrainer_CEEdit8,"Text"))
--VAMPIRE
end
form_show(CETrainer)
strings_add(getAutoAttachList(),"GGXXACPR_Win.exe")
function CECheckbox1Click(sender)
--Vampire
 if (checkbox_getState(CETrainer.CECheckBox1) == 1) then
    writeInteger("GGXXACPR_Win.exe+517FD2",1)
  else
   writeInteger("GGXXACPR_Win.exe+517FD2",0)
end
end
--SOL RAGE
function CECheckbox2Click(sender)
addresslist=getAddressList()
 if (checkbox_getState(CETrainer.CECheckbox2) == 1) then
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,11)
    memoryrecord_freeze(CheatEntry)
  else
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,11)
    memoryrecord_unfreeze(CheatEntry)
  end
end

When SOL RAGE gets checked, it gives me an error.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Jan 06, 2016 6:14 pm    Post subject: Reply with quote

Sounds like CETrainer.CECheckbox2 isn't the correct name.
Your other function shows CETrainer.CECheckBox1.
Did you mean to capitalize the B?
Back to top
View user's profile Send private message
milosmml7777
Cheater
Reputation: 0

Joined: 31 Dec 2015
Posts: 39
Location: The Abyss

PostPosted: Wed Jan 06, 2016 6:31 pm    Post subject: Reply with quote

CETrainer.CECheckBox1 is working and in the script it is capitalized and its name is not (wtf)
CETrainer.CECheckbox2 is not working and in the script it is capitalized and its name is capitalized as well......
and when i uncheck it gives me the error from before.



Screenshot_5.png
 Description:
 Filesize:  25.19 KB
 Viewed:  14811 Time(s)

Screenshot_5.png


Back to top
View user's profile Send private message
Fluffer_Nutter
Advanced Cheater
Reputation: 0

Joined: 26 Feb 2015
Posts: 67

PostPosted: Wed Jan 06, 2016 6:41 pm    Post subject: Reply with quote

Might be easier to post the ct file since i just made this using ur script and works fine for me. I don't have GGXXACPR on my PC but im getting no errors.


Capture.PNG
 Description:
 Filesize:  143.17 KB
 Viewed:  14797 Time(s)

Capture.PNG


Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Jan 06, 2016 6:42 pm    Post subject: Reply with quote

So I'm not sure where we're at... which line's giving an error now? Smile
Code:
function CECheckbox2Click(sender)
  addresslist=getAddressList()
  if sender.state == 1 then
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,11)
    memoryrecord_freeze(CheatEntry)
  else
    CheatEntry=addresslist_getMemoryRecordByID(addresslist,11)
    memoryrecord_unfreeze(CheatEntry)
  end
end

Now it sounds like there's no memory record with an ID of 11.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites