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 


Automatically Run Script on open?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Xscor
How do I cheat?
Reputation: 0

Joined: 22 Aug 2018
Posts: 3

PostPosted: Wed Aug 22, 2018 4:56 am    Post subject: Automatically Run Script on open? Reply with quote

Been searching quite a bit today, i have found tutorials on running the script on startup automatically etc. I have tried setting the default process of the .lua as cheatengine however it just opens cheat engine, nothing happens.

Is there a way where i can make it to just run the lua with cheat engine automatically once the lua is opened.

essentially im trying to run the lua with another script such as process.start, which then will automatically run the script.

The LUA script just automatically selects process, searches/ replaces the results with a new value. Bit jibberish but hope what i said makes sense
Back to top
View user's profile Send private message
Lynxz Gaming
Expert Cheater
Reputation: 4

Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: Wed Aug 22, 2018 5:54 am    Post subject: Re: Automatically Run Script on open? Reply with quote

there is autorun folder in cheat engine folder,
all .lua in autorun folder will be automatically run.
you can make new .lua file in there

open a notepad and write a lua script save it as .lua and put it on autorun folder

Code:

--Open file/website
shellExecute("path")
--Select Process
openProcess("game.exe")
--Change address byte
autoAssemble([[
game.exe:
address.exe+12345:
db 90 90
]])

_________________
my english is bad
discord : rynx#9828
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Wed Aug 22, 2018 9:52 am    Post subject: Reply with quote

Put your lua script/file in cheat engine/autorun folder.

example :
C:\Program Files (x86)\Cheat Engine 6.8\autorun\yourscript.lua

then open cheat engine

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

Joined: 22 Aug 2018
Posts: 3

PostPosted: Thu Aug 23, 2018 2:52 am    Post subject: Re: Automatically Run Script on open? Reply with quote

Lynxz Gaming wrote:
there is autorun folder in cheat engine folder,
all .lua in autorun folder will be automatically run.
you can make new .lua file in there

open a notepad and write a lua script save it as .lua and put it on autorun folder

Code:

--Open file/website
shellExecute("path")
--Select Process
openProcess("game.exe")
--Change address byte
autoAssemble([[
game.exe:
address.exe+12345:
db 90 90
]])


Thanks a bunch, i thought the autorun folder for the pc itself as it has one

Thanks for the code also

+ do you know link/ tutorial for preforming unknown initial value scans or even just 4 byte?

would it be

Code:

ms=createMemScan()
ms.firstScan(soExactValue,vt4bytes,0,"number4byte","",0, 0xffffffffffffffff, "", fsmNotAligned, "1", false, false, false, false)
ms.waitTillDone()


i use a search and replace for string


Code:

openProcess("Game.exe")

ms=createMemScan()
ms.firstScan(soExactValue,vtString,0,"bullets","",0, 0xffffffffffffffff, "", fsmNotAligned, "1", false, false, false, false)
ms.waitTillDone()

f=createFoundList(ms);
f.initialize();

resultToWrite=stringToByteTable("0bullets"..string.char(0))

for i=0,f.Count-1 do
  writeString(f.Address[i], "0bullets")
  writeBytes(("0x"..f.Address[i])+4,0)
end

f.destroy()
ms.destroy()
print ('0 bullets active')
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