View previous topic :: View next topic |
Author |
Message |
astromite How do I cheat? Reputation: 0
Joined: 12 Mar 2016 Posts: 7
|
Posted: Mon Apr 04, 2016 12:36 pm Post subject: Press key in a condition. |
|
|
Hello, can you guys help me to port this code to run in cheat engine?
$memvalue=memvalue (value in a specific address)
if $memvalue == "xyz" {
press somekey};
I'll put manually the memory location in the var. I just need CE press a key when the address get a specific value
|
|
Back to top |
|
|
Derpicus Newbie cheater Reputation: 1
Joined: 30 Mar 2016 Posts: 15
|
Posted: Mon Apr 04, 2016 12:38 pm Post subject: Re: Press key in a condition. |
|
|
astromite wrote: | Hello, can you guys help me to port this code to run in cheat engine?
$memvalue=memvalue (value in a specific address)
if $memvalue == "xyz" {
press somekey};
I'll put manually the memory location in the var. I just need CE press a key when the address get a specific value |
Are you looking to send keys with focus, no focus, or? Also, is it an application that uses direct-x, or is it something else?
|
|
Back to top |
|
|
astromite How do I cheat? Reputation: 0
Joined: 12 Mar 2016 Posts: 7
|
Posted: Mon Apr 04, 2016 12:40 pm Post subject: |
|
|
No focus, I want to disable the "function key" of my keyboard. (It's like a caps lock key).
|
|
Back to top |
|
|
astromite How do I cheat? Reputation: 0
Joined: 12 Mar 2016 Posts: 7
|
Posted: Mon Apr 04, 2016 11:32 pm Post subject: |
|
|
Well, searching in the forum, I found some codes that can help me.
The last and definitive question is:
how to keypress?
I need a combination of lctrl lshit and esc. Only this now.
I want to send this to Windows, not a specific window/application.
|
|
Back to top |
|
|
Redouane Master Cheater Reputation: 3
Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Tue Apr 05, 2016 4:57 am Post subject: |
|
|
astromite wrote: | Well, searching in the forum, I found some codes that can help me.
The last and definitive question is:
how to keypress?
I need a combination of lctrl lshit and esc. Only this now.
I want to send this to Windows, not a specific window/application. |
Maybe this?
|
|
Back to top |
|
|
astromite How do I cheat? Reputation: 0
Joined: 12 Mar 2016 Posts: 7
|
Posted: Tue Apr 05, 2016 9:59 am Post subject: |
|
|
Works here! Thank you guys!
|
|
Back to top |
|
|
astromite How do I cheat? Reputation: 0
Joined: 12 Mar 2016 Posts: 7
|
Posted: Thu Apr 07, 2016 11:32 pm Post subject: |
|
|
Sup guys.
I had another question, my code works and all but I run it with:
table>show cheat table>execute script.
There is a hotkey or a way to set a key to run it?
Also, it's possible to stop the execution of the script instead of waiting all the proccess end?
Thanks in advance.
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4289
|
Posted: Fri Apr 08, 2016 9:58 am Post subject: |
|
|
Code: | local derp = function()
-- your script you want to run
end
derpHK = createHotkey(derp, VK_F2) -- see defines.lua for all keycodes
derpHK.DelayBetweenActivate = 1000 -- optional
-- to destroy the hotkey:
derpHK.destroy()
derpHK = nil |
In what context is the script running? If you have a timer, you can set the Enabled property to false to temporarily disable it. If you don't plan on enabling it ever again, you should call its destroy() function to clean up the memory.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
astromite How do I cheat? Reputation: 0
Joined: 12 Mar 2016 Posts: 7
|
Posted: Fri Apr 08, 2016 12:04 pm Post subject: |
|
|
Thank you for your response.
The context is: spamming skills/attacks and auto heal in certains enemys. , but when the potz is over, I need to stop to get more. But I only die, because this is the condition to stop running the script (while hp => 1)
Also, I tried what you said here but it doesn't work, I'm dumb or something like?
I made this ways:
local rpt = function()
//code//
end
rptHK = createHotkey(rpt,VK_F10)
rptHK.destroy()
rptHK = nil
I executed it in that way I said (table>show cheat table>execute script).
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4289
|
Posted: Fri Apr 08, 2016 12:57 pm Post subject: |
|
|
astromite wrote: | spamming skills/attacks and auto heal in certains enemys. , but when the potz is over, I need to stop to get more. But I only die, because this is the condition to stop running the script (while hp => 1) |
This makes no sense. What is your script even suppose to do? It seems significantly different from what you said in your first post.
If you destroy the timer right after you make it, then it's not going to exist when you want to use it. The only reason why I had those last two lines of code in there is to show you how to destroy it. That's why I put "to destroy the hotkey:" above it.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Apr 08, 2016 6:09 pm Post subject: |
|
|
Code: | mytimer=createTimer(nil, false)
mytimer.Interval=1
mytimer.OnTimer=function(timer)
if hp >= 1 then
-- do whatever
else
timer.Enabled = false
end
end
createHotkey(function()
mytimer.Enabled = not mytimer.Enabled
end, VK_F10) |
|
|
Back to top |
|
|
|