таймер
Posted: 2013-01-19 14:00:31
хай, подскажите пожалуйста. Вот есть таймер - отсчитывает 500 секунд до нуля. А как сделать, чтобы во время сейва мира он не отчитывал!
Code: Select all
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
Code: Select all
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
Code: Select all
msg_e = 'ave complete', msg_s = 'orld save has been'
Code: Select all
sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(150)
until uo.InJournal('backpack')
end sub
Code: Select all
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