Page 1 of 1

Завершение функции

Posted: 2005-09-18 13:23:53
by Dron D.
Помогите сделать условие грамотнее. Если в дереве нету логов, то выполняется "terminate all"

Code: Select all

sub Lumber()
uo.Print('Выбери топор: ')
uo.Exec('addobject Tree')
while uo.Targeting()
wait(100)
wend

wait(1000)
     UO.DeleteJournal()
     repeat
          uo.press(122)
          repeat
               wait (200)
          until ((UO.InJournal("put")) || (UO.InJournal("hack")))
          UO.DeleteJournal()
          until (UO.InJournal("no logs"))
end sub

Posted: 2005-09-18 14:00:32
by Leo

Code: Select all

if UO.InJournal('There are no logs here to chop.') then
UO.Exec('terminate all')
endif

Posted: 2005-09-18 14:14:48
by Dron D.
Делал ето . Не пашет