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 


Help making simple speedhack for games

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
MxSmack
Newbie cheater
Reputation: 0

Joined: 16 Apr 2012
Posts: 10

PostPosted: Mon Apr 16, 2012 7:22 pm    Post subject: Help making simple speedhack for games Reply with quote

Hey there guys,

Lately I've been playing some sandbox games that have some action and I would like to make a trainer to be able to slowdown the game.


I'm asking for help because I'm pretty sure I'm going on the wrong direction and my attempts to find information were a fail or I just could not understand it.


So here it is what I've done step by step:

1.Opened Cheat Engine
while the game was opened (Just Cause 2)

2.Opened the process in CheatEngine (justcause2.exe)

3.Clicked Edit -> Settings -> Hotkeys

4.In speedhack speed 1 set my hot key as "Caps Lock"
and speed for 0.20 to slowdown the game.

5.In speedhack speed 2 set my hot key as "Q"
and speed for 1.00 to set it to normal speed.

But after this I don't know what to do to turn it into a trainer it really works with cheat engine working but I would rather have this
without cheat engine working and as an independent trainer.

I bet that is a lot of very skilled people in this forum who will this this is easy and would be able to help me.

Thank you so much in advance I hope somebody reply soon. Very Happy
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Tue Apr 17, 2012 3:58 am    Post subject: Reply with quote

The speedhack hotkeys in settings are for your install specific


If you wish to make a trainer do something like this:
Code:

strings_add(getAutoAttachList(), "yourgame.exe")

function sh020()
  speedhack_setSpeed(0.20)
end

function shNormal()
  speedhack_setSpeed(1)
end

createHotkey("sh020",VK_CAPITAL)
createHotkey("shNormal",VK_Q)


Then create a form and design it like you wish (or not , if you don't nothing will show)

Then save your table as a .exe (e.g bla.exe, as long as it isn't the same as yourgame.exe)

That will open a exe generator window, give it an icon (you can take as source another .exe, or .ico, and even some dll's)

Now when it's generated your trainer should be working

_________________
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
MxSmack
Newbie cheater
Reputation: 0

Joined: 16 Apr 2012
Posts: 10

PostPosted: Tue Apr 17, 2012 2:34 pm    Post subject: Reply with quote

Dark Byte wrote:
The speedhack hotkeys in settings are for your install specific


If you wish to make a trainer do something like this:
Code:

strings_add(getAutoAttachList(), "yourgame.exe")

function sh020()
  speedhack_setSpeed(0.20)
end

function shNormal()
  speedhack_setSpeed(1)
end

createHotkey("sh020",VK_CAPITAL)
createHotkey("shNormal",VK_Q)


Then create a form and design it like you wish (or not , if you don't nothing will show)

Then save your table as a .exe (e.g bla.exe, as long as it isn't the same as yourgame.exe)

That will open a exe generator window, give it an icon (you can take as source another .exe, or .ico, and even some dll's)

Now when it's generated your trainer should be working


Thank you so much!

At first I was kinda confused but then I realized what to do.

I got to Table -> Show Cheat Table Lua Script
then pasted your code, wrote the name of the execute and it worked.

I would be able to do this without you because I don't know a thing about scripts ( if it is called that way ), but I realize it is difficult to understand.

So once again thank you so much for your help now I can do this to lot's of games you really solved my problem in a efficient way.

Thanks! Very Happy
Back to top
View user's profile Send private message
MxSmack
Newbie cheater
Reputation: 0

Joined: 16 Apr 2012
Posts: 10

PostPosted: Wed Apr 18, 2012 3:31 pm    Post subject: Reply with quote

Hi again,

It is possible to make a code to press for example Caps Lock to turn on
and pressing Caps Lock again would turn it off, is it complicated?

I would appreciate the help.

Again thanks. Smile
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Apr 18, 2012 4:14 pm    Post subject: Reply with quote

you could do that, but it won't correspond to the state of the caps lock light (it sometimes has a delayed hotkey handling, and some keypresses are blatantly ignored if they come too soon)

anyhow:

Code:

strings_add(getAutoAttachList(), "yourgame.exe")

state=false
function togglesh()
  if (state==false) then
    speedhack_setSpeed(0.20)
    state=true
  else
    speedhack_setSpeed(1)
    state=false
  end
end

createHotkey("togglesh",VK_CAPITAL)

_________________
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
MxSmack
Newbie cheater
Reputation: 0

Joined: 16 Apr 2012
Posts: 10

PostPosted: Thu Apr 19, 2012 7:08 am    Post subject: Reply with quote

Dark Byte wrote:
you could do that, but it won't correspond to the state of the caps lock light (it sometimes has a delayed hotkey handling, and some keypresses are blatantly ignored if they come too soon)

anyhow:

Code:

strings_add(getAutoAttachList(), "yourgame.exe")

state=false
function togglesh()
  if (state==false) then
    speedhack_setSpeed(0.20)
    state=true
  else
    speedhack_setSpeed(1)
    state=false
  end
end

createHotkey("togglesh",VK_CAPITAL)


Thanks this is really nice, the light it is not a problem I just chose caps lock to set an example, thank you so much it is much better press one key instead of two.

Thank you so much for your help once again. Very Happy
Back to top
View user's profile Send private message
MxSmack
Newbie cheater
Reputation: 0

Joined: 16 Apr 2012
Posts: 10

PostPosted: Sun Apr 22, 2012 3:49 pm    Post subject: Reply with quote

Hello, I need your help again if you can of course.

I wanted to press the key to speed the game down for a like 5 seconds and
then return to normal, would that be difficult?

Thanks for the help you've been giving. Very Happy
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sun Apr 22, 2012 4:53 pm    Post subject: Reply with quote

This will set the speedhack speed to 0.2 for 5 seconds and disables the hotkey for the duration.
If instead you want it to prolong the speedhack each time you press (so after 3 seconds you press the hotkey again so the total time is 8) then don't disable the hotkey, and instead toggle the timer between disabled and enabled state


Code:

function dummy()
end

function disableSH()
  --print("Disabling the speedhack")
  speedhack_setSpeed(1);

  generichotkey_onHotkey(hk,enableSH) --enable the hotkey again
  timer_setEnabled(t,false)
end

function enableSH()
  --print("Enabling the speedhack")
  generichotkey_onHotkey(hk,dummy) --change the function the hotkey calls to a dummy (alternatively, I could use object_destroy, and recreate it later)
  speedhack_setSpeed(0.20)
  timer_setEnabled(t,true)
end

hk=createHotkey("enableSH",VK_CAPITAL)


t=createTimer(nil,false)
timer_setInterval(t,5000) --5 seconds
timer_onTimer(t,disableSH)

_________________
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
MxSmack
Newbie cheater
Reputation: 0

Joined: 16 Apr 2012
Posts: 10

PostPosted: Sun Apr 22, 2012 6:21 pm    Post subject: Reply with quote

Dark Byte wrote:
This will set the speedhack speed to 0.2 for 5 seconds and disables the hotkey for the duration.
If instead you want it to prolong the speedhack each time you press (so after 3 seconds you press the hotkey again so the total time is Cool then don't disable the hotkey, and instead toggle the timer between disabled and enabled state


Code:

function dummy()
end

function disableSH()
  --print("Disabling the speedhack")
  speedhack_setSpeed(1);

  generichotkey_onHotkey(hk,enableSH) --enable the hotkey again
  timer_setEnabled(t,false)
end

function enableSH()
  --print("Enabling the speedhack")
  generichotkey_onHotkey(hk,dummy) --change the function the hotkey calls to a dummy (alternatively, I could use object_destroy, and recreate it later)
  speedhack_setSpeed(0.20)
  timer_setEnabled(t,true)
end

hk=createHotkey("enableSH",VK_CAPITAL)


t=createTimer(nil,false)
timer_setInterval(t,5000) --5 seconds
timer_onTimer(t,disableSH)


Okay that's good, but I do not understand code, with this code I do not need to indicate the execute of the game?

I just wanted to put an duration for example 5 seconds and disable the key during the speed hack. Thanks Very Happy
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sun Apr 22, 2012 6:43 pm    Post subject: Reply with quote

you of course have to do that if you wish to auto attach to the game
_________________
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
MxSmack
Newbie cheater
Reputation: 0

Joined: 16 Apr 2012
Posts: 10

PostPosted: Sun Apr 22, 2012 6:47 pm    Post subject: Reply with quote

Should I do it like this? I don't know a thing about code, Thanks xD

Code:
strings_add(getAutoAttachList(), "yourgame.exe")

        function dummy()
end

function disableSH()
  --print("Disabling the speedhack")
  speedhack_setSpeed(1);

  generichotkey_onHotkey(hk,enableSH)
  timer_setEnabled(t,false)
end

function enableSH()
  --print("Enabling the speedhack")
  generichotkey_onHotkey(hk,dummy)
  speedhack_setSpeed(0.20)
  timer_setEnabled(t,true)
end

hk=createHotkey("enableSH",VK_CAPITAL)

Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sun Apr 22, 2012 8:14 pm    Post subject: Reply with quote

you forgot the timer creation.
This should work:
Code:

strings_add(getAutoAttachList(), "yourgame.exe")

function dummy()
end

function disableSH()
  --print("Disabling the speedhack")
  speedhack_setSpeed(1);

  generichotkey_onHotkey(hk,enableSH) --enable the hotkey again
  timer_setEnabled(t,false)
end

function enableSH()
  --print("Enabling the speedhack")
  generichotkey_onHotkey(hk,dummy) --change the function the hotkey calls to a dummy (alternatively, I could use object_destroy, and recreate it later)
  speedhack_setSpeed(0.20)
  timer_setEnabled(t,true)
end

hk=createHotkey("enableSH",VK_CAPITAL)


t=createTimer(nil,false)
timer_setInterval(t,5000) --5 seconds
timer_onTimer(t,disableSH)

_________________
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
MxSmack
Newbie cheater
Reputation: 0

Joined: 16 Apr 2012
Posts: 10

PostPosted: Mon Apr 23, 2012 1:35 pm    Post subject: Reply with quote

Dark Byte wrote:
you forgot the timer creation.
This should work:
Code:

strings_add(getAutoAttachList(), "yourgame.exe")

function dummy()
end

function disableSH()
  --print("Disabling the speedhack")
  speedhack_setSpeed(1);

  generichotkey_onHotkey(hk,enableSH) --enable the hotkey again
  timer_setEnabled(t,false)
end

function enableSH()
  --print("Enabling the speedhack")
  generichotkey_onHotkey(hk,dummy) --change the function the hotkey calls to a dummy (alternatively, I could use object_destroy, and recreate it later)
  speedhack_setSpeed(0.20)
  timer_setEnabled(t,true)
end

hk=createHotkey("enableSH",VK_CAPITAL)

t=createTimer(nil,false)
timer_setInterval(t,5000) --5 seconds
timer_onTimer(t,disableSH)


Hahah I was close. =p

Thank you so much for your help, you are awesome! Shocked
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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