Yoko

All sides of Injection
It is currently 2025-12-23 06:08:46

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: timer
PostPosted: 2008-09-17 16:02:49 
Offline

Joined: 2004-11-22 13:20:06
Posts: 9
Code:
until uo.InJournal('put') OR uo.InJournal('fail') OR WAIT 10 sec



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


Code:
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


Top
   
 Post subject:
PostPosted: 2008-09-18 07:12:09 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
uo.timer() returns number, this number increased by 1 each 1/10 sec.

Example:
Code:
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.
Skype: d119060


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 8 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited