Mining with Spirit speak for DRW shard on VIP
Posted: 2004-10-21 22:38:18
Code: Select all
sub main()
var my, mx,i,j
while (not uo.dead())
mx = UO.GetX("self")
my = UO.GetY("self")
tohide()
for i = mx-4 to mx+4
for j = my-4 to my+4
dig(i,j)
UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
next
next
wend
end sub
sub dig(i,j)
VAR Pick="0x0E86"
var MMM
endif
DIM ruda[10] ;Массив с цветами руды которую выкидывать
ruda[0]='0x0000' ; Iron ore
ruda[1]='0x0750' ; Rusty ore
ruda[2]='0x0590' ; Old copper ore
ruda[3]='0x060A' ; Dull copper ore
ruda[4]='0x0088' ; Copper ore
ruda[5]='0x0488' ; Bronze ore
ruda[6]='0x0482' ; Silver ore
ruda[7]='0x0032' ; Gold ore
ruda[8]='0x096B' ; Shadow ore
ruda[9]='0x0014' ; Rose ore
while (not uo.injournal("no ore")) and (not uo.injournal("in rock")) and (not uo.injournal("Iron")) and (not uo.injournal("Rusty")) and (not uo.injournal("hrthtrhr")) and (not uo.injournal("trhtrhr")) and (not uo.injournal ("That is too far"))
tohide()
UO.Waittargettile("1339", str(i), str(j),"0")
;******* Тут у меня тип лопаты/кирки
UO.Usetype (0x0E86)
;-------
uo.deletejournal()
while (not uo.injournal("fail")) and (not uo.injournal("put")) and (not uo.injournal("no ore")) and (not uo.injournal("in rock")) and (not uo.injournal ("That is too far"))
wait(100)
wend
wend
uo.deletejournal()
Spirit()
uo.deletejournal()
;******* Здесь цикл, выкидывается по порядку с массива от ruda[0] до ruda[9]
for MMM=0 to 9
uo.findtype('0x19B9',ruda[MMM],'backpack')
if uo.getquantity('finditem')>1 then
uo.drophere('finditem')
endif
uo.findtype('0x19BA',ruda[MMM],'backpack')
if uo.getquantity('finditem')>1 then
uo.drophere('finditem')
endif
uo.findtype('0x19B8',ruda[MMM],'backpack')
if uo.getquantity('finditem')>1 then
uo.drophere('finditem')
endif
uo.findtype('0x19B7',ruda[MMM],'backpack')
if uo.getquantity('finditem')>1 then
uo.drophere('finditem')
endif
next
wait(500)
;------- Закоментировать до этой строки если выкидывать не будем
endif
end sub
sub Spirit()
uo.print('Пытаемся законнектится в мир мёртвых...')
UO.Useskill('Spirit Speak')
If UO.InJournal("OOPS") then
killelem()
endif
If UO.InJournal("is attacking you") then
killelem()
endif
wait(5000)
end sub
sub tohide()
while NOT UO.Hidden()
UO.DeleteJournal()
if UO.Life<40 then
UO.UseType('0x0F0E','0x0631') ; inviz potion
wait(2000)
else
UO.UseSkill('Stealth')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied')
endif
UO.WarMode('flip')
wait(100)
UO.Warmode(0)
wend
end sub
sub killelem()
UO.UseType('0x0F0E','0x0631') ; Выпить инвизку
repeat
If UO.Mana>=50 then
UO.WaitMenu('What','Daemon')
UO.Cast('Polymorph')
wait(8000)
else
while UO.Mana<50
UO.UseType('0x0F0E','0x09DF') ; выпить ТоталМанку
wait(3000)
wend
endif
until UO.STR>200 ; U'r not morfed char max Strength
repeat
UO.BandageSelf()
wait(4000)
until UO.Life==UO.STR
UO.UseType(0x1B76) ; Одеваем щит
UO.UseType(0x1413) ; Одеваем горжет
UO.DeleteJournal()
UO.WarMode(1)
UO.UseSkill('Meditation') ; Раздетективаем себя
; В закладке "main" должна стоять "Corpse autoopen"
repeat
wait(5000)
until UO.InJournal('Body') OR UO.InJournal('You can')
If UO.InJournal('You can') then
UO.WaitTargetGround('0x19B9') ; 4 and more ore
wait(1500)
UO.Grab('all')
UO.WaitTargetGround('0x0EED') ; gold coins
wait(500)
UO.Grab('all')
UO.Cast('Dispel')
endif
UO.WarMode('flip')
wait(1000)
UO.WarMode(0)
wait(1000)
if UO.Life<UO.STR then ; U'r max HP
repeat
UO.BandageSelf()
wait(4000)
until UO.Life==UO.STR
endif
end sub
sub CheckPause()
if UO.GetEasyUO(99)=="1" then
repeat
wait(100)
until UO.GetEasyUO(99)=="0"
endif
end sub
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(50)
until UO.InJournal('backpack')
end sub
sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(20000) # WorldSave Protection
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.Exec('terminate all')
;UO.Exec('exec autoload')
UO.TextOpen()
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
RFlag = 1
ReconnectTime = '0'
endif
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
EndIf
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
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub