Page 1 of 1

Вставте в скрипт проверку на физл

Posted: 2004-10-31 03:56:15
by OldArtes

Code: Select all

sub FullOrchish()
  UO.DeleteJournal()
  UO.WaitTargetType(0x1BF2)
  UO.UseType(0x13e3)
  UO.Exec("waitmenu 'Blacksmithing' 'Race armor' 'Orcish armor' 'helmet'")
  while UO.InJournal("You put the")==0 and UO.InJournal("You have failed to make")==0
    wait(300)
    wend
    UO.DeleteJournal()
  UO.WaitTargetType(0x1BF2)
  UO.UseType(0x13e3)
  UO.Exec("waitmenu 'Blacksmithing' 'Race armor' 'Orcish armor' 'ringmail tunic'")
  while UO.InJournal("You put the")==0 and UO.InJournal("You have failed to make")==0
    wait(300)
    UO.DeleteJournal()
  UO.WaitTargetType(0x1BF2)
  UO.UseType(0x13e3)
  UO.Exec("waitmenu 'Blacksmithing' 'Race armor' 'Orcish armor' 'leggins'")
  while UO.InJournal("You put the")==0 and UO.InJournal("You have failed to make")==0
    wait(300)
    wend
    UO.DeleteJournal()
  UO.WaitTargetType(0x1BF2)
  UO.UseType(0x13e3)
  UO.Exec("waitmenu 'Blacksmithing' 'Race armor' 'Orcish armor' 'sleeves'")
  while UO.InJournal("You put the")==0 and UO.InJournal("You have failed to make")==0
    wait(300)
    wend
    UO.DeleteJournal()
  UO.WaitTargetType(0x1BF2)
  UO.UseType(0x13e3)
  UO.Exec("waitmenu 'Blacksmithing' 'Race armor' 'Orcish armor' 'gloves'")
  while UO.InJournal("You put the")==0 and UO.InJournal("You have failed to make")==0
    wait(300)
    wend
    UO.DeleteJournal()
  UO.WaitTargetType(0x1BF2)
  UO.UseType(0x13e3)
  UO.Exec("waitmenu 'Blacksmithing' 'Race armor' 'Orcish armor' 'shield'")
  while UO.InJournal("You put the")==0 and UO.InJournal("You have failed to make")==0
    wait(300)
    wend
    UO.DeleteJournal()
  UO.WaitTargetType(0x1BF2)
  UO.UseType(0x13e3)
  UO.Exec("waitmenu 'Blacksmithing' 'Race weapons' 'Orcish Weapons' 'hammerpick'")
  while UO.InJournal("You put the")==0 and UO.InJournal("You have failed to make")==0
    wait(300)
    wend
end sub


Вставте плз проверку на физл в этот скрипт, чтобы если он сфизлил то повторил сковать эту вещ заново.

Posted: 2004-10-31 22:55:55
by volhram
попробуй вынести ожидание сообщений в отдельную процедуру, чтонить типа:
sub wait()
while not UO.InJournal("You put the")
if UO.InJournal("You have failed to make") then
uo.deletejournal()
return 0
endif
uo.deletejournal()
return 1
wend
endsub
вызывай и обрабатывай....чтонить типа:

label=0
while label==0
UO.WaitTargetType(0x1BF2)
UO.UseType(0x13e3)
label=wait()
wend

Posted: 2004-11-03 23:30:52
by OldArtes
Чет у меня ниче невышло всеравно когда физл он делает следущую вещь :(
А да когда я правил скрипт он иногда пишет что несущестувющая неправлина :( (она обчно последнея)

Posted: 2004-11-04 12:46:12
by Edred
У второго while отсутствует wend

Posted: 2004-11-07 00:32:02
by OldArtes
Edred wrote:У второго while отсутствует wend

и что стого я всё поправил уже давно :), ток я чёт неврубился насчет физлами он всё равно не повтряется...

Если можите напишите скрипт полностью... (точнее мой поправте :) )

Posted: 2004-11-07 14:39:16
by Sfagnum

Code: Select all

...
repeat
  UO.DeleteJournal()
  UO.WaitTargetType(0x1BF2)
  UO.UseType(0x13e3)
  UO.Exec("waitmenu 'Blacksmithing' 'Race weapons' 'Orcish Weapons' 'hammerpick'")
  while UO.InJournal("You put the")==0 and UO.InJournal("You have failed to make")==0
    wait(300)
  wend
until UO.InJournal('You put')
...
В таком стиле...

Posted: 2004-11-10 01:53:51
by OldArtes
Воо кулл все работает спасибо!
П.с. Мир не без Жмотов!!