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

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Dron D.
Posts: 190
Joined: 2004-12-13 01:27:00

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

Post 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
Leo
Expert!
Posts: 791
Joined: 2005-01-15 19:15:05
Location: Dragon World
Contact:

Post by Leo »

Code: Select all

if UO.InJournal('There are no logs here to chop.') then
UO.Exec('terminate all')
endif
Dron D.
Posts: 190
Joined: 2004-12-13 01:27:00

Post by Dron D. »

Делал ето . Не пашет
Post Reply