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 


How to text color flickering continuously

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 111

PostPosted: Thu Sep 13, 2018 12:34 am    Post subject: How to text color flickering continuously Reply with quote

I need a code to do text color flickering continuously
If this is possible, please help me. Thank you Razz
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater
Reputation: 17

Joined: 10 Apr 2015
Posts: 656

PostPosted: Thu Sep 13, 2018 6:31 am    Post subject: Reply with quote

Blinking or flickering ??

maybe :

Code:
f = createForm()
txt = createLabel(f)
txt.caption = 'test blink'
txt.left = 75
txt.top = 75
txt.Font.size = 30

timer2=createTimer(nil, false)
timer2.Interval=500
timer2.OnTimer=function(timer2)

local color2 = 0
 for i=0,3 do
  color2 = color2 * 10 + math.random(255)
 end
  txt.Font.Color = color2
end

timer2.Enabled=true

function stop()
timer2.Enabled=false
timer2.Destroy()
end

f.show()
f.onClose = stop

_________________
Singapore Sling + Johnnie Walker + Some Peanuts....
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 111

PostPosted: Wed Oct 10, 2018 8:50 am    Post subject: Reply with quote

Corroder wrote:
Blinking or flickering ??

maybe :

Code:
f = createForm()
txt = createLabel(f)
txt.caption = 'test blink'
txt.left = 75
txt.top = 75
txt.Font.size = 30

timer2=createTimer(nil, false)
timer2.Interval=500
timer2.OnTimer=function(timer2)

local color2 = 0
 for i=0,3 do
  color2 = color2 * 10 + math.random(255)
 end
  txt.Font.Color = color2
end

timer2.Enabled=true

function stop()
timer2.Enabled=false
timer2.Destroy()
end

f.show()
f.onClose = stop

Cool, it's so beautiful and true what I need Very Happy
how do i apply it to trainer ? Very Happy
Back to top
View user's profile Send private message
Aylin
Expert Cheater
Reputation: 2

Joined: 16 Feb 2017
Posts: 166

PostPosted: Wed Oct 10, 2018 9:52 am    Post subject: Reply with quote

This is the code that will help:

Code:
function CETimer1Timer(sender)
UDF1.CELabel1.font.Color = ((UDF1.CELabel1.font.Color)+100732)
end
function CETimer2Timer(sender)
UDF1.CELabel2.font.Color = ((UDF1.CELabel2.font.Color)+100432)
end


and this is applied, for example on-off function:

https://www.dropbox.com/s/iocwp6t7xv7pqfk/Rainbow1.CT?dl=1

Enjoy it!

_________________
See Hitler ! This Trainer is for you!
http://forum.cheatengine.org/viewtopic.php?t=606786
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 MSN Messenger
Corroder
Grandmaster Cheater
Reputation: 17

Joined: 10 Apr 2015
Posts: 656

PostPosted: Wed Oct 10, 2018 7:41 pm    Post subject: Reply with quote

Code:
black="0x00999999"

f = createForm()
f.width = 100
f.height = 70

tb = createToggleBox(f)
tb.top = 10
tb.left = 10
tb.width = 40
tb.height = 40
tb.Caption = 'OFF'

l = createLabel(f)
l.top = 20
l.left = 60

timer2=createTimer(nil, false)
timer2.Interval=500
timer2.OnTimer=tbChange

function tbChange(sender)
 if (checkbox_getState(tb) == 1) then
  timer2.Enabled=true
  --print('Hack enable')  --- your hack code here
  local color2 = 0
  for i=0,3 do
  color2 = color2 * 10 + math.random(255)
 end
  l.Caption = 'HACK ON'
  l.Font.Color = color2
  tb.Caption = 'ON'
 else
  --print('Hack disable') --- your hack code here
  l.Font.Color = black
  l.Caption = 'HACK OFF'
  tb.Caption = 'OFF'
  timer2.Enabled=false
  end
end

function stop()
 timer2.Enabled=false
 timer2.Destroy()
end


tb.onChange = tbChange
f.onClose = stop
f.show()

_________________
Singapore Sling + Johnnie Walker + Some Peanuts....
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 111

PostPosted: Thu Oct 11, 2018 1:13 am    Post subject: Reply with quote

Aylin wrote:
This is the code that will help:

Code:
function CETimer1Timer(sender)
UDF1.CELabel1.font.Color = ((UDF1.CELabel1.font.Color)+100732)
end
function CETimer2Timer(sender)
UDF1.CELabel2.font.Color = ((UDF1.CELabel2.font.Color)+100432)
end


and this is applied, for example on-off function:

https://www.dropbox.com/s/iocwp6t7xv7pqfk/Rainbow1.CT?dl=1

Enjoy it!

Hello , thank you
It worked fine, but something went wrong Sad
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 357

Joined: 09 May 2003
Posts: 20900
Location: The netherlands

PostPosted: Thu Oct 11, 2018 2:44 am    Post subject: Reply with quote

If you use a formdesigner created form and put a timer on that, first execute the script that has the function in it
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
Aylin
Expert Cheater
Reputation: 2

Joined: 16 Feb 2017
Posts: 166

PostPosted: Thu Oct 11, 2018 6:20 am    Post subject: Reply with quote

Sting9x wrote:
Aylin wrote:
This is the code that will help:

Code:
function CETimer1Timer(sender)
UDF1.CELabel1.font.Color = ((UDF1.CELabel1.font.Color)+100732)
end
function CETimer2Timer(sender)
UDF1.CELabel2.font.Color = ((UDF1.CELabel2.font.Color)+100432)
end


and this is applied, for example on-off function:

https://www.dropbox.com/s/iocwp6t7xv7pqfk/Rainbow1.CT?dl=1

Enjoy it!

Hello , thank you
It worked fine, but something went wrong Sad


View my example .CT
If you can't work with an open Timer,
You must set a Stop code for the Timer at the beginning of the form.

Code:
UDF1.CETimer1.Enabled = false


Then with a command in the form
You should put the start function.

Code:
function CELabel1Click(sender) --CEButton1Click etc.
UDF1.CETimer1.Enabled = true
end


I've given all these instances in .CT.

https://www.dropbox.com/s/iocwp6t7xv7pqfk/Rainbow1.CT?dl=1

To work in .CT with an open timer,
there is a little more time for it. Wink

_________________
See Hitler ! This Trainer is for you!
http://forum.cheatengine.org/viewtopic.php?t=606786
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 MSN Messenger
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 111

PostPosted: Thu Oct 11, 2018 7:42 am    Post subject: Reply with quote

Aylin wrote:
Sting9x wrote:
Aylin wrote:
This is the code that will help:

Code:
function CETimer1Timer(sender)
UDF1.CELabel1.font.Color = ((UDF1.CELabel1.font.Color)+100732)
end
function CETimer2Timer(sender)
UDF1.CELabel2.font.Color = ((UDF1.CELabel2.font.Color)+100432)
end


and this is applied, for example on-off function:

https://www.dropbox.com/s/iocwp6t7xv7pqfk/Rainbow1.CT?dl=1

Enjoy it!

Hello , thank you
It worked fine, but something went wrong Sad


View my example .CT
If you can't work with an open Timer,
You must set a Stop code for the Timer at the beginning of the form.

Code:
UDF1.CETimer1.Enabled = false


Then with a command in the form
You should put the start function.

Code:
function CELabel1Click(sender) --CEButton1Click etc.
UDF1.CETimer1.Enabled = true
end


I've given all these instances in .CT.

https://www.dropbox.com/s/iocwp6t7xv7pqfk/Rainbow1.CT?dl=1

To work in .CT with an open timer,
there is a little more time for it. Wink

Thanks, I have successfully applied
Code:
UDF1.CETimer1.Enabled = true

Thank you
Back to top
View user's profile Send private message
Aylin
Expert Cheater
Reputation: 2

Joined: 16 Feb 2017
Posts: 166

PostPosted: Thu Oct 11, 2018 8:17 am    Post subject: Reply with quote

Sting9x wrote:

I tried your way, but still did not work
Please help me, where was it wrong?
Code:
CETrainer.CETimer1Timer.Enabled = false
function CETimer1Timer()
CETrainer.CELabel3.font.Color = ((CETrainer.CELabel3.font.Color)+100732)
end

Thank you


Edit form for CETimer1,
have you set the onClick Command?
The way to do this:
Return to CE master form.
Select from the top row menu:
Table - UDF1 - Edit -
Click on the opened edit:
CETimer1: TCETimer - Events - OnTimer -
Select from the drop-down menu: CETimer1Timer
After this selection, the Script will point to the following function.

Code:
function CETimer1Timer()
CETrainer.CELabel3.font.Color = ((CETrainer.CELabel3.font.Color)+100732) --CELabel3 or 1 2 3 etc
end


Close the edit menu.
In the .CT example that I
See which OnClick command I've given to what function.
Table- UDF1 - Edit: open (Object Inspector)

EDIT:

I saw her fix it.
That's a good result.
Congratulations.
Smile

_________________
See Hitler ! This Trainer is for you!
http://forum.cheatengine.org/viewtopic.php?t=606786
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 MSN Messenger
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 111

PostPosted: Thu Oct 11, 2018 8:51 pm    Post subject: Reply with quote

Aylin wrote:
Sting9x wrote:

I tried your way, but still did not work
Please help me, where was it wrong?
Code:
CETrainer.CETimer1Timer.Enabled = false
function CETimer1Timer()
CETrainer.CELabel3.font.Color = ((CETrainer.CELabel3.font.Color)+100732)
end

Thank you


Edit form for CETimer1,
have you set the onClick Command?
The way to do this:
Return to CE master form.
Select from the top row menu:
Table - UDF1 - Edit -
Click on the opened edit:
CETimer1: TCETimer - Events - OnTimer -
Select from the drop-down menu: CETimer1Timer
After this selection, the Script will point to the following function.

Code:
function CETimer1Timer()
CETrainer.CELabel3.font.Color = ((CETrainer.CELabel3.font.Color)+100732) --CELabel3 or 1 2 3 etc
end


Close the edit menu.
In the .CT example that I
See which OnClick command I've given to what function.
Table- UDF1 - Edit: open (Object Inspector)

EDIT:

I saw her fix it.
That's a good result.
Congratulations.
Smile

Code:
Error:attempt to call a nil value

Help Sad Crying or Very sad
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 19

Joined: 24 Feb 2017
Posts: 619
Location: 'Merica

PostPosted: Thu Oct 11, 2018 8:58 pm    Post subject: Reply with quote

Sting9x wrote:
...
Code:
Error:attempt to call a nil value

Help Sad Crying or Very sad


Dark Byte wrote:
If you use a formdesigner created form and put a timer on that, first execute the script that has the function in it

_________________
Back to top
View user's profile Send private message
Aylin
Expert Cheater
Reputation: 2

Joined: 16 Feb 2017
Posts: 166

PostPosted: Fri Oct 12, 2018 8:18 am    Post subject: Reply with quote

TheyCallMeTim13 wrote:
Sting9x wrote:
...
Code:
Error:attempt to call a nil value

Help Sad Crying or Very sad


Dark Byte wrote:
If you use a formdesigner created form and put a timer on that, first execute the script that has the function in it


@Sting9x, do not overlook the warnings of the Masters.

and EDIT:
You code:
Code:
function CETimer1Timer()  --sender? >>function CETimer1Timer(sender)
CETrainer.CELabel3.font.Color = ((CETrainer.CELabel3.font.Color)+100732)
end


as Code:
Code:
function CETimer1Timer(sender)
CETrainer.CELabel3.font.Color = ((CETrainer.CELabel3.font.Color)+100732)
end

+
Rainbow Label Function Video..

https://www.youtube.com/watch?v=M2PerJGAUUg&list=PL1yPHiegVpRoWx7jy6ecTqmbejos75O37&index=69

_________________
See Hitler ! This Trainer is for you!
http://forum.cheatengine.org/viewtopic.php?t=606786
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 MSN Messenger
TheyCallMeTim13
Wiki Contributor
Reputation: 19

Joined: 24 Feb 2017
Posts: 619
Location: 'Merica

PostPosted: Fri Oct 12, 2018 8:41 am    Post subject: Reply with quote

They aren't using the "sender" parameter (or "timer" which is what actually gets passed for the timer function), so adding the "sender" parameter won't really do anything.

But having the form start the timer before the timer's declared function is set will cause the timer to try and call a null/nil value; thus giving an error message like that.
So, execute/run the script that declares the timer's function first then load the form.

_________________
Back to top
View user's profile Send private message
Sting9x
Expert Cheater
Reputation: 0

Joined: 27 Jul 2016
Posts: 111

PostPosted: Sat Oct 20, 2018 2:37 am    Post subject: Reply with quote

Aylin wrote:
TheyCallMeTim13 wrote:
Sting9x wrote:
...
Code:
Error:attempt to call a nil value

Help Sad Crying or Very sad


Dark Byte wrote:
If you use a formdesigner created form and put a timer on that, first execute the script that has the function in it


@Sting9x, do not overlook the warnings of the Masters.

and EDIT:
You code:
Code:
function CETimer1Timer()  --sender? >>function CETimer1Timer(sender)
CETrainer.CELabel3.font.Color = ((CETrainer.CELabel3.font.Color)+100732)
end


as Code:
Code:
function CETimer1Timer(sender)
CETrainer.CELabel3.font.Color = ((CETrainer.CELabel3.font.Color)+100732)
end

+
Rainbow Label Function Video..

https://www.youtube.com/watch?v=M2PerJGAUUg&list=PL1yPHiegVpRoWx7jy6ecTqmbejos75O37&index=69

Thank you <3
You are wonderful
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