Code: Select all
sub Blacksmithing()
var Exit=0, LastTimer
var food= '0x097B'
var Timer=UO.Timer()
while Exit<>1
ToHide()
if UO.Timer()>(Timer+1200) then
repeat
CheckLag()
uo.UseType(food)
while not uo.InJournal('full') and not uo.InJournal('stuffed') and not uo.InJournal('hungry') and not uo.InJournal('satiated') and not uo.Dead()
wait(100)
wend
until uo.InJournal('too full') or uo.Dead()
Timer=UO.Timer()
wait(3000)
end if
uo.FindType('0x1BEF',-1,'backpack')
if uo.GetQuantity('finditem')<10 then
uo.FindType('0x1BEF','0x0000','0x401C6058')
wait(1000)
uo.Grab('200','finditem')
Endif
wait(1000)
uo.DeleteJournal()
LastTimer=uo.Timer()
uo.WaitMenu('Blacksmithing','Shield','Shield','buckler')
uo.UseType('0x1BEF')
while not uo.InJournal('You put') and not uo.InJournal('You have failed')
wait(500)
wend
if uo.InJournal('You have failed') then
repeat
wait(100)
until uo.Timer()>=LastTimer+100
end if
uo.FindType('0x1B73',-1,'backpack')
wait(500)
if uo.GetQuantity('finditem') then
uo.WaitTargetObject('finditem')
uo.UseObject('0x40058A35')
wait(1000)
end if
wend
end sub
sub ToHide()
while not uo.Hidden()
uo.Useskill('Hiding')
wait(4000)
wend
Трабл состоит в том, что скрипт иногда тупо застревает и не делает ничего, пытался выяснить в каком месте он ступорится - так ничего и не понял... Может где неадо чеклаг или вейт по-больше прописать?