timer

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
zars
Posts: 9
Joined: 2004-11-22 13:20:06

timer

Post by zars »

Code: Select all

until uo.InJournal('put') OR uo.InJournal('fail') OR WAIT 10 sec



how to make OR wait10sec? i dont understand what timers do


Code: Select all

until uo.InJournal('put') OR uo.InJournal('fail') OR LastTimer+300<UO.Timer()

i think dont work , but i dont realy know how much time is LastTimer+300<UO.Timer()

please help
sorry for my bed english
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

uo.timer() returns number, this number increased by 1 each 1/10 sec.

Example:

Code: Select all

LastTimer = uo.timer() ; remember current timer value.
repeat
    wait( 100 )
until uo.InJournal( 'message' ) OR LastTimer+300 < uo.timer()

as result - loop wait for 'message' in journal and will break after 30 seconds.
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Post Reply