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 


Is there anyway to check if speedhack is enabled or not?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Tue Dec 25, 2012 11:06 am    Post subject: Is there anyway to check if speedhack is enabled or not? Reply with quote

Hey,
Is there anyway to check if speedhack is enabled or not?
Code:
local sp=speedhack_setSpeed(1)
if sp~=nil then
showMessage("Speedhack is turned on")
else
showMessage("Erm speedhack = Nil")
end


Even speedhack is enabled it still says "Erm speedhack = Nil".

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Dec 25, 2012 11:24 am    Post subject: Reply with quote

If it fails then either the game will crash or the luascript cancels with an error.

But if you really want to be sure then get the mainForm object, and find the component named cbSpeedhack
You can then get the property named Checked and see if it's 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
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Tue Dec 25, 2012 11:52 am    Post subject: Reply with quote

Dark Byte wrote:
If it fails then either the game will crash or the luascript cancels with an error.

But if you really want to be sure then get the mainForm object, and find the component named cbSpeedhack
You can then get the property named Checked and see if it's true

As you probably know, I only cheat in flash games (mainly facebook).
And I use chrome (getForbackgroundProcessor is really useful with chrome),
So if speedhack is not enabled it because it attached to the wrong processor (No crash) if it can enable speedhack then its the right processor (no crash again).

And I'll check it out, thanks.

Ok I tried
And I get trouble with getProperty (I've never used it Razz)

Code:
function CEButton1Click(sender)
speedhack_setSpeed(1)
mf = getMainForm()
local comp = component_getComponent(mf,cbSpeedhack)
local check = getProperty(comp, Checked)
if (check == true) then
showMessage("Its ON")
else
showMessage("Its off")
end
end


Anyhelp will be appriciated..

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Dec 25, 2012 12:06 pm    Post subject: Reply with quote

Quote:
So if speedhack is not enabled it because it attached to the wrong processor

That's a wrong assumption.
You can enable the speedhack on the wrong process, and the speedhack will work.
It just won't have any effect in the game, but it will be working

anyhow,
Code:

mf=getMainForm()
cbSpeedhack=component_findComponentByName(mf, "cbSpeedhack")
checked=getProperty(cbSpeedhack,"Checked")
if (checked==0) then
  showMessage("Its off")
else
  showMessage("Its on")

_________________
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
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Tue Dec 25, 2012 2:37 pm    Post subject: Reply with quote

Dark Byte wrote:
Quote:
So if speedhack is not enabled it because it attached to the wrong processor

That's a wrong assumption.
You can enable the speedhack on the wrong process, and the speedhack will work.
It just won't have any effect in the game, but it will be working

anyhow,
Code:

mf=getMainForm()
cbSpeedhack=component_findComponentByName(mf, "cbSpeedhack")
checked=getProperty(cbSpeedhack,"Checked")
if (checked==0) then
  showMessage("Its off")
else
  showMessage("Its on")

Chrome has child process has no disk access.
And if you don't use the forceinjection it won't work :p.
Unless you go to chrome://plugins and disable PeperFlash (if u got only it then you'll have to download flash from adobe and install it)

Also this
Code:

mf=getMainForm()
cbSpeedhack=component_findComponentByName(mf, "cbSpeedhack")
checked=getProperty(cbSpeedhack,"Checked")
if (checked==0) then
  showMessage("Its off")
else
  showMessage("Its on")

Says all the time "Its on", even when I didn't enable speedhack...
Something is wrong?

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Dec 25, 2012 2:49 pm    Post subject: Reply with quote

Hmm,perhaps it's 1/2 , or a case is wrong causing checked to be nil (which is also not 0)

edit:
Code:


mf=getMainForm()
cbSpeedhack=component_findComponentByName(mf, "cbSpeedhack")
checked=getProperty(cbSpeedhack,"Checked")
if checked=='0' then
  showMessage('off')
else
  showMessage('on')
end

It's a string and lua seems to refuse to handle it as a number (weird)

Anyhow, in the case of chrome, enabling speedhack will raise an exception, thus causes the script to terminate.
Perhaps lua has an ability to capture the error and ignore it,but default behaviour is to terminate the script

_________________
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
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Tue Dec 25, 2012 3:03 pm    Post subject: Reply with quote

Dark Byte wrote:
Hmm,perhaps it's 1/2 , or a case is wrong causing checked to be nil (which is also not 0)

Anyhow, in the case of chrome, enabling speedhack will raise an exception, thus causes the script to terminate.
Perhaps lua has an ability to capture the error and ignore it,but default behaviour is to terminate the script

I tried
Code:
speedhack_setSpeed(1)
mf=getMainForm()
cbSpeedhack=component_findComponentByName(mf, "cbSpeedhack")
checked=getProperty(cbSpeedhack,"Checked")
if (checked<=0) then
  showMessage("Its off")
else
  showMessage("Its on")
end

and got this error
Code:

Error:[string "speedhack_setSpeed(1)..."]:5: attempt to compare string with number


So its a string and not a number?

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
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
Page 1 of 1

 
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