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 


send key inputs at specific pointer value

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

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun May 17, 2020 6:35 am    Post subject: Reply with quote

Copy paste?
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
skgyqls0730
How do I cheat?
Reputation: 0

Joined: 17 May 2020
Posts: 5

PostPosted: Sun May 17, 2020 7:01 am    Post subject: Reply with quote

Corroder wrote:
Copy paste?



I've been referring this, but I don't know.


https ://forum. cheatengine. org/viewtopic.php?t=608926&sid=01cebd0d305a29f8b0db0681e458bc16

_________________
I'm studying a cheat engine
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun May 17, 2020 7:19 am    Post subject: Reply with quote

Yes, but the error said:

..."]:8: syntax error near '10' Error

that means there are mistyping or script syntax error at line 8 on your script.
We don't know what is line 8 contains. Because you do not post complete script and the error is not on your posted script.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
skgyqls0730
How do I cheat?
Reputation: 0

Joined: 17 May 2020
Posts: 5

PostPosted: Sun May 17, 2020 7:30 am    Post subject: Reply with quote

Corroder wrote:
Yes, but the error said:

..."]:8: syntax error near '10' Error

that means there are mistyping or script syntax error at line 8 on your script.
We don't know what is line 8 contains. Because you do not post complete script and the error is not on your posted script.


Can you tell me how to send key inputs at specific pointer value

_________________
I'm studying a cheat engine
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1516

PostPosted: Sun May 17, 2020 7:41 am    Post subject: Reply with quote

You may need to run some tests.
Make sure your code gives you a valid value.

To make a trial without code;
Code:
local value=211
if value > 271 then --If between 271 - 0
print("Key active")
else
print("No command above 271")
end


Now test with code;
Code:
timer.OnTimer = function(timer)
Value=tonumber(AddressList.getMemoryRecordByDescription('PARRY').Value)
--print(Value) --you should see if it is a valid value.
if Value > 271 then
keyDown (0x48)
print("Key active! Value: "..Value)
Sleep 100
keyUp (0x48) --I think it will be necessary to remove the keypress.
--else
--timer.Enabled=false
--print("No command above 271")
end
end

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun May 17, 2020 7:57 am    Post subject: Reply with quote

skgyqls0730 wrote:
Can you tell me how to send key inputs at specific pointer value


No, I can not because I don't know at all about the address/pointer.
But I think the link you provided is the answer.

https://www.cheatengine.org/forum/viewtopic.php?p=5744040&sid=cb793e09e1d55a035f1595abb8a1baaf

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
skgyqls0730
How do I cheat?
Reputation: 0

Joined: 17 May 2020
Posts: 5

PostPosted: Sun May 17, 2020 8:16 am    Post subject: Reply with quote

Aylin wrote:
You may need to run some tests.
Make sure your code gives you a valid value.

To make a trial without code;
Code:
local value=211
if value > 271 then --If between 271 - 0
print("Key active")
else
print("No command above 271")
end


Now test with code;
Code:
timer.OnTimer = function(timer)
Value=tonumber(AddressList.getMemoryRecordByDescription('PARRY').Value)
--print(Value) --you should see if it is a valid value.
if Value > 271 then
keyDown (0x48)
print("Key active! Value: "..Value)
Sleep 100
keyUp (0x48) --I think it will be necessary to remove the keypress.
--else
--timer.Enabled=false
--print("No command above 271")
end
end


Wow thanks !

but Error:[string "..."]:22: attempt to index a nil value (global 'timer')
Script Error

+ i fix it thanks!!

Why does this error

_________________
I'm studying a cheat engine
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun May 17, 2020 8:38 am    Post subject: Reply with quote

Quote:
but Error:[string "..."]:22: attempt to index a nil value (global 'timer')
Script Error

+ i fix it thanks!!

Why does this error


Because of the timer never state or make yet, so the timer present as NIL because it not exists.

And why you delete the first topic post?. You will get a warning 'Delete post on answer'. If continue then you will be banned.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
skgyqls0730
How do I cheat?
Reputation: 0

Joined: 17 May 2020
Posts: 5

PostPosted: Sun May 17, 2020 8:41 am    Post subject: Reply with quote

Corroder wrote:
Quote:
but Error:[string "..."]:22: attempt to index a nil value (global 'timer')
Script Error

+ i fix it thanks!!

Why does this error


Because of the timer never state or make yet, so the timer present as NIL because it not exists.


I succeeded in fixing it
It's input elsewhere. but I can't type the key in the game.

_________________
I'm studying a cheat engine
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