Shokarta wrote:Code: Select all
sub grab()
uo.set("finddistance","2")
uo.findtype("0x19B9","-1","ground")
while UO.FindCount() > 0
UO.moveitem("finditem","5","ground") ; 5 ore on the ground
wait(1000)
wend
end sub
It takes first 50 from pack of 500, but then its lifting those 50 from what i already moved

...
where you have a 50 ore? Only 5.
you move the ore to the "ground". Change the "ground" to 'backpack' or ignore it.
for example
Code: Select all
sub main()
GET(OreTYPE, 'ground', 1, 50) ; you have no ore (<1), it is necessary to take 50
PUT(OreTYPE, 'ground') ; you have ore, it is necessary to put it
endsub
var timemove, itemM
Sub GET(item, cont, min, max) ; предмет, откуда, минимум, сколько брать
If UO.Count( item ) < min Then
UO.FindType( item, '-1', cont )
if UO.FindCount() > 0 Then
itemM=UO.GetSerial('finditem')
timemove=UO.Timer()
while UO.ContainerOf(itemM)==cont && timemove+20>UO.Timer()
uo.moveitem('finditem', max, 'backpack')
wait(300)
wend
endif
Endif
end sub
Sub PUT(item, cont)
while UO.Count( item ) > 0
UO.FindType( item, -1, -1 )
itemM=UO.GetSerial('finditem')
timemove=UO.Timer()
UO.MoveItem( 'finditem', 0, cont )
while UO.ContainerOf(itemM)=='my' && timemove+20>UO.Timer()
wait(300)
wend
wend
end sub