Kód: Vybrat vše
sub miningfools()
var kirk=uo.GetSerial(uo.ObjAtLayer('Rhand'));
var i
var mx=uo.GetX()-2
var my=uo.GetY()-2
var rep=0
var MW=700 ; max weight
if uo.GetGraphic(uo.ObjAtLayer('Rhand'))<>"0x0E85" and uo.GetGraphic(uo.ObjAtLayer('Rhand'))<>"0x0E85" then
uo.findtype(0x0E85)
if uo.findcount()==0 then
uo.print("Nemam lopatu")
return 0
end if
kirk=uo.GetSerial('finditem')
uo.equip('Rhand','finditem')
end if
minstf:
rep=rep+1
if uo.weight>MW then
rozdelrudu()
end if
if uo.dead() then
goto minexf
end if
uo.deletejournal()
uo.exec("waittargettile tilenum "+str(mx)+" "+str(my)+" 0")
uo.useobject(kirk);
i=0
wait(1000)
uo.exec("resend")
repeat
wait(700)
i=i+1
if uo.injournal("is attacking you") then
uo.say("Upps")
end if
until uo.injournal("loosen")or uo.injournal("You put") or uo.injournal("no ore") or uo.inJournal("You can't") or uo.InJournal("Try mining") or i>10
if uo.injournal("no ore")or uo.injournal("You can't")or uo.InJournal("Try mining")or (rep>10) then
wait(2000)
rep=0
my=my+1
if my>uo.GetY()+2 then
my=uo.GetY()-2
mx=mx+1
end if
if mx>uo.GetX()+2 then
goto minexf
else
goto minstf
end if
end if
goto minstf
minexf:
uo.print("konec skriptu")
end sub