Yoko

All sides of Injection
It is currently 2024-03-28 16:55:37

All times are UTC+02:00




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
 Post subject: таймер
PostPosted: 2013-01-19 14:00:31 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
хай, подскажите пожалуйста. Вот есть таймер - отсчитывает 500 секунд до нуля. А как сделать, чтобы во время сейва мира он не отчитывал!


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-19 16:43:23 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
Code:
sub timer(seconds)
    var msg_e = 'ave complete', msg_s = 'orld save has been', timer, ws_timer
    timer = uo.timer()
    deljournal(msg_s+'|'+msg_e)
    while seconds * 10 + timer > uo.timer()
        if uo.injournal(msg_s) then
            ws_timer = uo.timer()
            while not uo.injournal(msg_e)
                wait(100)
            wend
            timer = timer + uo.timer() - ws_timer
        end if
    wend
end sub

sub deljournal(msg)
    while uo.injournal(msg)
        uo.setjournalline(uo.injournal(msg) - 1, '')
    wend
end sub


такой вариант актуален, только если после сейва приходит сообщение


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-19 18:29:38 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
ну спасиб! вот это отвечает:
Code:
if uo.findcount()>0 then
      CheckLag()
      uo.grab('all','finditem')
      wait(500)
     endif
    until uo.findcount()==0
   uo.ignorereset()
   uo.UnSetReceivingContainer()
UO.Print('Ждем '+str(Whtime)+ ' секунд.')
Wtime = Whtime
wait(1000)
while Wtime > 0
wait(1000)
Wtime = Wtime - 1
UO.Print('Осталось '+str(Wtime)+ ' секунд.')
wend
if Wtime == 0 then
Wtime = Whtime
end if

end sub


это то да?


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-19 18:46:12 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
ZeroDX, тоесть то что ты дал это надо в скрипт вставить?


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-20 05:12:06 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
для начала проверь сообщения
Code:
msg_e = 'ave complete', msg_s = 'orld save has been'


потом вставь то, что я дал в своей скрипт. а для вызова используй timer()


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-20 13:39:34 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
на шарде такие сообщения вначале идёт:
World is saving...
а потом после:
World data saved in N second


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-21 12:30:44 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
ставишь чеклаг и все

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-21 17:51:01 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
спасибо за ответ! а можешь пожалуйста написать?


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-21 17:52:04 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
так?
Code:
sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(150)
until uo.InJournal('backpack')
end sub


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-22 10:13:49 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Code:
sub checklag() 
   repeat
      UO.DeleteJournal()
      UO.Click('backpack')
   until backpack()==1
endsub
sub backpack()
   var n
   for n=0 to 200
      if uo.injournal('a backpack') then
         return 1
      endif
      wait(200)
   next
endsub

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject: Re: таймер
PostPosted: 2013-01-22 10:54:15 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Маньяки :roll:

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 16 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited