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 


Need a simple script to change value.

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

Joined: 23 Jul 2020
Posts: 2

PostPosted: Thu Jul 23, 2020 4:28 pm    Post subject: Need a simple script to change value. Reply with quote

Hello guys. I'm all day digging this forum for an answer but I didnt't find it. So I decided to finally create an account.

I have a pointer with a value that starts at 45 and keeps decreasing until it reaches zero.
I need a script to make a 'jump' and speed the process. Let me explain.
So, repeating.... the value starts at 45 and will then decrease. What I need is that, once it reaches 20, CE would set the value to 0.

I tried this (pretty sure the syntax is wrong)

myult = getAddressList().getMemoryRecordByDescription("MyUlt")
value1 = 20
if myult[value1] then
myult.Value = 0
end

Nothing seems to happen when i execute it. I'm using the Lua script.
I have no idea how to use this with auto assemble and compile it. If anyone could send me a beginner friendly tutorial I would appreciate it.

I hope it's clear.
I know it's simple but I'm a complete beginner with cheat engine.
Back to top
View user's profile Send private message
SEKTION
Cheater
Reputation: 0

Joined: 05 Nov 2017
Posts: 39
Location: Behind the keyboard

PostPosted: Sat Aug 08, 2020 6:17 am    Post subject: Reply with quote

So if you have a pointer then try this..
Code:

function myFunc()
  value = readInteger('pointer')  //assuming its an integer value
  if value == 20 then
    writeInteger('pointer',0)
  end
end


put this in a timer and set interval according to how fast the value changes!

_________________
TH3 UND3N14BL3
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