вот мой ..но он не пашет
Code:
sub main()
var mx, my, mz, i, j
repeat
uo.addobject("Shovel",0x400D47A7) # ID лопаты или, чем ты, там, копаешь
na4:
; gotoxy(5136,1181) #точка копки
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-4 to mx+4
for j = my-4 to my+4
while not UO.Hidden()
UO.Warmode("0")
UO.UseSkill("Hiding")
wait(4000)
wend
UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock")
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Useobject("Shovel")
while not UO.InJournal("You put") and not UO.InJournal("heavy") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in rock")
wait(500)
endif
wend
UO.DeleteJournal()
if uo.Weight>740 then # максимальный вес
loot()
goto na4
endif
next
next
until uo.dead()
end sub
sub unloadore()
VAR TempX,TempY,i,Exit
VAR UnloadX=5518, UnloadY=1434
VAR UnloadCont='0x401d7b11' # Ид сундука
DIM Ore[5]
TempX=UO.GetX()
TempY=UO.GetY()
While UO.GetEasyUO(99)=='1'
wait(3000)
Wend
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
UO.SetReceivingContainer(UnloadCont) ; storecontainer
wait(500)
For i=0 to 3
Exit=0
repeat
UO.FindType(Ore[i])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
end sub