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 


Progress bar (just visual)

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

Joined: 19 May 2020
Posts: 2

PostPosted: Sun Sep 27, 2020 8:37 am    Post subject: Progress bar (just visual) Reply with quote

Can someone make a simple program that when you press the button and the progress bar fills up gradually and when it reaches max it stays like full for 2 secs and goes back to empty, and when i press the button again it does the same. Please let me download it. Thanks.
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Sun Sep 27, 2020 9:52 am    Post subject: Reply with quote

Of course!

Code:
-- create a Form with 1 button, 1 progressbar and 1 label
sck = UDF1.CEButton1
push = UDF1.CEProgressBar1
cum = UDF1.CELabel1

push.Min = 0
push.Max = 10
push.Step = 1
push.Position = 0
sck.Enabled = true
local i = 0

function sucker()
 push.Position = i
 cum.Caption = 'Cum on... '..i..' seconds'
 i = i + 1
 if i > 11 then
    suck_timer.Enabled = false
    sleep(2000)
    cum.Caption = 'Cum on'
    push.Position = 0
    sck.Enabled = true
  end
end

suck_timer = createTimer()
suck_timer.Enabled = false
suck_timer.Interval = 500
suck_timer.OnTimer = sucker

function letsuck()
 sck.Enabled = false
 suck_timer.Enabled = true
end

UDF1.Show()
sck.OnClick = letsuck

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1525

PostPosted: Sun Sep 27, 2020 9:54 am    Post subject: Reply with quote

Code:
if f then f.destroy() end --UDF1 or CETrainer (Form)
f=createForm()
f.Position=poDesktopCenter

local pb=createProgressBar(f) -- UDF1.CEProgressbar1
pb.Left=35 pb.Top=50 pb.Width=250 pb.Max=100 pb.Position=0

local bt=createButton(f)
bt.Left=120 bt.Top=100 bt.caption="Start"

if t1 then t1.Destroy() end
t1=createTimer() --UDF1.Timer1
t1.Interval=100 t1.Enabled=false

if t2 then t2.Destroy() end
t2=createTimer() --UDF1.Timer2
t2.Interval=12000  -- + 2 sec and start or 14000 + 4 sec
t2.Enabled=false

local pbIndex=1

t1.OnTimer=function()  --function UDF1_Timer1Timer(sender)
if pbIndex==1 then
pb.Position=pb.Position + 1
bt.caption="% "..tonumber(pb.Position)
if pb.Position==100 then t1.Enabled=false end
end
if pbIndex==2 then
pb.Position=pb.Position - 1
bt.caption="% "..tonumber(pb.Position)
if pb.Position==0 then bt.caption="Start" t1.Enabled=false end
end
end

t2.OnTimer=function()  --function UDF1_Timer2Timer(sender)
pbIndex=2
t2.Enabled=false
t1.Enabled=true
end

bt.OnClick=function() --function UDF1_Button1Click(sender)
pbIndex=1
t1.Enabled=true
t2.Enabled=true
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
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