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 script help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Fri Jan 27, 2017 7:32 pm    Post subject: Re: Need script help Reply with quote

Are you using pointers to these addresses?
Or in what form you get these addresses.

_________________
...
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Fri Jan 27, 2017 8:26 pm    Post subject: Reply with quote

I just try to imaging the logic, maybe something like this :

Code:
address A = registered symbol named "consume"
address B = registered symbol named "production"
consume:value = 100
production:value = consume + 10

{$lua}
[ENABLE]
if mytimer == nil then
  mytimer=createTimer(nil, false)
  mytimer.Interval=1
  mytimer.OnTimer=function()
    writeInteger("production", readInteger(("consume")+10)
  end
end
mytimer.Enabled=true
[DISABLE]
mytimer.Enabled=false
Back to top
View user's profile Send private message
Soundstream
How do I cheat?
Reputation: 0

Joined: 26 Jan 2017
Posts: 3
Location: Serbia

PostPosted: Sat Jan 28, 2017 11:39 am    Post subject: Re: Need script help Reply with quote

Filipe_Br wrote:
Are you using pointers to these addresses?
Or in what form you get these addresses.


No pointers, i have right adresses ( Green ones ) which i can change and value changes in game.
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Sat Jan 28, 2017 1:48 pm    Post subject: Re: Need script help Reply with quote

Did not the corroder script help you?
If no. Explain better what you want, for example: when you should run the script. All the time, or only when something happens.

_________________
...
Back to top
View user's profile Send private message
Soundstream
How do I cheat?
Reputation: 0

Joined: 26 Jan 2017
Posts: 3
Location: Serbia

PostPosted: Sat Jan 28, 2017 2:29 pm    Post subject: Reply with quote

Sorry guys cuz i didn't answer and explain it well. I make a video, i hope u will understand me better ( i am new member here so i can't add url but u can find video on youtube --> /watch?v=PU91n3pxy_U <-- ( pls don't ban me Surprised )

In this video i show production ( 3mil ) and consumption ( 2.5mil ) i changed it just to see what i talking about and i can change it and game will accept that values ( base adresses ( green ones )). So what i want is when game in time increase second value ( consumption ) i want script automaticly change my production value to be higher than consumption by some value which i can change.. ( by 10-20...100..1000 etc ) to have always gap between that 2 values.. how in time game will change it that will change my other value.
Corroder's script doesn't work for me. I am sorry cuz i am maybe annoying with this, i am just a noob.. Btw adresses r:

26072A0C ---> production
26072C98 ---> consumption
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Sat Jan 28, 2017 3:07 pm    Post subject: Reply with quote

Code:

production = "26072A0C"
consumption = "26072C98"
increase_in = 100

if t1 then t1.destroy(); t1=nil end
t1 = createTimer()
timer_setInterval(t1, 500) -- 500 ms
timer_onTimer(t1, function()
   writeFloat(production, readFloat(consumption)+increase_in)
end)

_________________
...
Back to top
View user's profile Send private message
Soundstream
How do I cheat?
Reputation: 0

Joined: 26 Jan 2017
Posts: 3
Location: Serbia

PostPosted: Sun Jan 29, 2017 10:47 am    Post subject: Reply with quote

Filipe_Br wrote:
Code:

production = "26072A0C"
consumption = "26072C98"
increase_in = 100

if t1 then t1.destroy(); t1=nil end
t1 = createTimer()
timer_setInterval(t1, 500) -- 500 ms
timer_onTimer(t1, function()
   writeFloat(production, readFloat(consumption)+increase_in)
end)


It works! THank you so much!
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