Code:
sub GetRes(TYPE,COLOR,BAG,Quant)
uo.useobject(BAG)
wait(500)
uo.findtype(TYPE,COLOR,BAG)
if uo.findcount()> 0 then
uo.moveitem('finditem',Quant,'backpack')
end if
wait(1000)
end sub
This is easy to use!
When you need something
Code:
GetRes(Type of Item,Color of Item,From where,HowMuch)
Code:
GetRes(0x0000,0x0000,0x00000000,100)
You should learn a bit Injectoin.
Code:
uo.FindType(Type of logs,Color of logs,Where)
if uo.findcount()<10 then
uo.getres(0x0000,0x0000,0x00000000,100)
end if
To eat in hour you need other scp!
Code:
Sub eat()
while not uo.dead()
uo.usetype('Milk Type')
uo.usetype('Beacon Type')
wait(3600000)
wend
end sub
To your last Question, I think you need script killelem() and WalkN
Code:
sub killelem()
VAR LastTimer, Elem ,i
LastTimer=UO.Timer()
UO.DeleteJournal()
UO.FindType('0x000E',-1,'ground')
Elem=UO.GetSerial('finditem')
UO.Exec('warmode 1')
UO.Attack(Elem)
;WalkN(0,0,Elem)
UO.Say('Dye, mother fucker!')
repeat
wait(2000)
until UO.InJournal('Body') OR LastTimer+300<UO.Timer() or uo.dead(Elem)
UO.Exec('warmode 0')
wait(100)
LastTimer=UO.Timer()
if UO.Life<50 and UO.Count('0x0E21') then
repeat
UO.BandageSelf()
wait(4000)
until UO.Life>170 OR LastTimer+300<UO.Timer()
endif
loot()
end sub
Code:
sub WalkN(x,y,Target)
VAR i,StepSucess
VAR dx,dy,Exit=0
While Exit<>1
If Target<>"" Then
dx=UO.GetX(Target)-UO.GetX()
dy=UO.GetY(Target)-UO.GetY()
; UO.Print("Target locked!")
If UO.GetDistance(Target)<2 Then
Exit=1
Endif
Else
dx=x-UO.GetX()
dy=y-UO.GetY()
If dx==0 AND dy==0 Then
Exit=1
Endif
Endif
If dx<>0 AND dy<>0 Then
If dx>0 AND dy>0 Then
StepSucess=Go(3,40,300);SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300);SW - LeftArrow
Endif
Endif
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300);SW - LeftArrow
StepSucess=Go(3,40,300);SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
Endif
Endif
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300);SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
StepSucess=Go(7,38,300);WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300);SE - DownArrow
Endif
Endif
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300);WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(3,40,300);SE - DownArrow
StepSucess=Go(5,37,300);SW - LeftArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
Endif
Endif
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
StepSucess=Go(2,34,300);E - PgDown
If StepSucess==-1 Then
StepSucess=Go(3,40,300);SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
Endif
StepSucess=Go(2,34,300);E - PgDown
Endif
Endif
If dx<0 Then
StepSucess=Go(6,36,300);W - Home
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300);SW - LeftArrow
Endif
StepSucess=Go(6,36,300);W - Home
Endif
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
StepSucess=Go(4,35,300);S - End
If StepSucess==-1 Then
StepSucess=Go(3,40,300);SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300);SW - LeftArrow
Endif
StepSucess=Go(4,35,300);S - End
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300);N - PgUp
If StepSucess==-1 Then
StepSucess=Go(1,39,300);NE - RightArrow
If StepSucess==-1 Then
StepSucess=Go(7,38,300);WN - UpArrow
Endif
StepSucess=Go(0,33,300);N - PgUp
Endif
Endif
Endif
Wend
end sub