Posted: 2006-07-15 23:22:46
Grin wrote:ground - с маленкой буквы...
Скрипт похорошему надо переписать... всякие лишни репиты и венды весячие...
Ет видел. пока черновая просто. сё будет
All sides of Injection
https://yoko.uokit.com/
Grin wrote:ground - с маленкой буквы...
Скрипт похорошему надо переписать... всякие лишни репиты и венды весячие...
Code: Select all
sub test()
VAR shmot='0x0000' ; tip smota
VAR count=0 ; s4et4ik
VAR sunduk='0x00000000' ; serial sunduka s pustimy meshkami
VAR sunduk2='0x00000000' ; serial sunduka s polnimi meshkami
VAR meshok='0x0000' ; tip meshka
VAR curent ; serial meshka v kototii kidaem
VAR waittime=500 ; vremya pausy
VAR max=100 ; kol-vo predmetov
UO.UseObject(sunduk)
UO.UseObject(sunduk2)
While NOT UO.Dead()
UO.FindType(meshok,-1,sunduk)
wait(waittime)
curent=UO.GetSerial('finditem')
UO.Moveitem('finditem',1.sunduk2)
wait(waittime)
For count=1 to max
UO.Findtype(shmot,-1,'ground')
wait(waittime)
If UO.Findcount() Then
UO.Moveitem('finditem',1,curent)
wait(waittime)
Else
count=count-1
Endif
Next
Wend
end sub
Grin wrote:ground - с маленкой буквы...
Скрипт похорошему надо переписать... всякие лишни репиты и венды весячие...
Code: Select all
Sub get_amount(Type, Color, Cont)
var item_amount = 0
UO.UseObject(Cont)
CheckLag()
UO.IgnoreReset()
repeat
UO.FindType(Type, Color, Cont)
if UO.FindCount()>0 Then
if UO.GetQuantity('finditem')==0 Then
item_amount = item_amount + 1
else
item_amount = item_amount + UO.GetQuantity('finditem')
end if
UO.Ignore('finditem')
UO.FindType(Type, Color, Cont)
end if
until UO.FindCount()<1
UO.IgnoreReset()
return item_amount
end sub
Code: Select all
Sub getGoods(tGood,cGood,qGood,resPack,destPack)
var t,z
t = get_amount(tGood,cGood,uo.getSerial(destPack))
while t < qGood
z = grabContainer(tGood,cGood,qGood-t,resPack)
if (z + t) == 0 then
return false
end if
if z == 0 then
return true
end if
t = get_amount(tGood,cGood,uo.getSerial(destPack))
wend
return true
end sub