

sub mining()
var mx, my, mz, i, j
var ismining, ixx, isheavy
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-3 to mx+3
for j = my -3 to my+3
UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
ismining = 1
while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock") and not UO.InJournal("There is") and not UO.InJournal("Try") and not UO.InJournal("self") and ismining
UO.DeleteJournal()
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Usetype('0x0e85')
if UO.Weight>840 then
UO.recall('0x40023FBD','2')
Return
endif
ixx = 0
ismining=1
while not UO.InJournal("You put") 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") and not UO.InJournal("There is") and ixx <= 100
wait (100)
ixx = ixx + 1
wend
if uo.injournal("Rusty") then
ismining = 0
endif
if uo.injournal("Old Copper") then
ismining = 0
endif
if uo.injournal("Dull Copper") then
ismining = 0
endif
if uo.injournal("the Copper") then
ismining = 0
endif
if uo.injournal("Iron") then
ismining = 0
endif
if not ismining then
uo.print("Not mining here")
endif
wend
UO.DeleteJournal()
next
next
goto allstop
UO.recall('0x40023FBD','2')
allstop:
uo.print("*** Script ended ***")
end sub
sub healing()
UO.SetArm('CWeapon')
UO.Exec("bandageself")
wait(500)
UO.Arm('CWeapon')
end sub
sub plavka()
;uo.moveitem('sumkap.ruda','1')
;wait(500)
while UO.Count('0x19b7')> '0'
UO.DeleteJournal()
uo.moveitem('sumkap.ruda','1')
while NOT UO.Count('0x19b7')> 0
wait(50)
wend
UO.UseType('0x19b7')
UO.UseType('0x19b8')
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You fail")AND NOT UO.InJournal("*You smelt") and not UO.InJournal("There is")
wait(50)
wend
; wait(600)
;uo.moveitem('sumkap.ruda','1')
;wait(200)
wend
end sub
sub hiding()
var x
while UO.life>0
UO.DeleteJournal()
uo.useskill('Hiding')
while NOT UO.InJournal("You have") AND NOT UO.InJournal("You can't") and not UO.InJournal("There is")
wait(50)
wend
;if UO.InJournal("You have") then
wait(4000)
;uo.useskill('Stealth')
;while NOT UO.InJournal("You have") AND NOT UO.InJournal("You can't") and not UO.InJournal("There is")
; wait(50)
wend
;end if
if uo.str>uo.life then
sat("guards")
end if
wend
end sub
sub Reconnect()
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rFlag then
ReconnectTime=MakeTime()
rFlag=0
end if
wait(20000)
uo.Say('')
wait(3000)
uo.Say('')
wait(3000)
uo.Say('')
wait(3000)
uo.LDblClick(357,164)
uo.LClick(616,459)
wait(3000)
wend
wait(3000)
if (rFlag==0) and (ReconnectTime<>'0') then
uo.TextOpen()
uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
rFlag=1
ReconnectTime='0'
end if
until false
end sub
sub MakeTime()
var d,t,ret,i
ret=str(uo.Time())
t=""
for i=0 to Len(ret)
t=ret[Len(ret)-i]+t
if (i==2) or (i==4) then
t=":"+t
end if
next
ret=str(uo.Date())
d=""
for i=0 to Len(ret)
d=ret[Len(ret)-i] + d
if (i==2) or (i==4) then
d="."+d
end if
next
ret=t+" @ "+d
return ret
end sub
sub Terminate()
uo.Print('Âñå ôóíêöèè ñêðèïòà âûêëþ÷åíû!')
uo.DeleteJournal()
uo.Exec('terminate all')
wait(100)
uo.Exec('terminate all')
wait(100)
uo.Exec('terminate all')
wait(100)
end sub
sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
end sub