AHoj, mam takovy problem nejak kde jsem skopcil script na vyrobu boards a predelal jej na vyrobu barrel lids. Normal jsi bere boards z bedny po 100 ks predelaje na barel lid a ty pak zpet hodi do bedny. No pracuje perfektne jenom se nekdy obcas zasekne nevite co s tim??
sub barrellid()
start:
uo.deletejournal()
if UO.Count("0x1BD7") <2>100 then # bedna ze ktere se berou logy
# prvni co ma brat, druhe ID bedny odkad ma brat
UO.Moveitem("finditem","100","backpack")
wait(2000)
else
UO.Print("Nejsou logy.")
return
endif
end if
UO.Exec("waitmenu 'Carpentry''Containers''Containers''Barrel Lid'")
UO.usetype("0x1035") #predmet se kterym pracujete
repeat
wait(100)
until UO.injournal("You put the barrel lids in your pack") or uo.injournal("You fail to create the item")
wait(100)
if UO.Count(0x1DB8)>=100 then
UO.Print("Uklizim prkno")
UO.FindType(0x1DB8)
UO.MoveItem("finditem",0,0x4013FB10) # bedna do ktere se berrel lid odlozi
Wait(1500)
endif
goto start
end sub
sub carpentryvika()
UO.AddObject("bedna")
While UO.Targeting()
Wait(100)
Wend
UO.UseObject("bedna")
Wait(1000)
While NOT UO.Dead()
If UO.Count("0x1BD7") < 3 then
UO.Print("Doplnuji Boardy!")
UO.FindType("0x1BD7",-1,"bedna")
If NOT UO.FindCount() then
UO.Print("Nejsou Boardy.")
Return
EndIf
UO.Moveitem("finditem", 100, "backpack")
Wait(500)
If UO.Count("0x1DB8") then
UO.Print("Uklizim Vika")
UO.FindType("0x1DB8", -1, "backpack")
UO.MoveItem("finditem", -1, "bedna")
Wait(500)
EndIf
Endif
UO.DeleteJournal()
UO.WaitMenu("Carpentry","Containers & Cont. parts","Containers & Cont. parts","Barrel Lid")
UO.Usetype("0x1034")
Repeat
Wait(100)
Until UO.InJournal("You put|You fail")
Wait(500)
Wend
end sub