Мужики подскажите за мининг или подкорректируйте!!!

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Newbie1988
Posts: 2
Joined: 2008-01-10 09:00:47
Contact:

Мужики подскажите за мининг или подкорректируйте!!!

Post by Newbie1988 »

У меня несколько просьб!
1)Распишите,что к чему и каждая кманда что значит!
2)У нас на шарде убрали такую функцию,когда таргет на себя кликаешь он не копает,а пишет ибо "You start mining...You cannot mine
that" - можете переделать чтобы он по координатам кликал?!?
3)Или можете сами прописать макрос на мининг?Координаты копалки 1826,1029,0

sub main()
var i,Tl,T,X,Y,Z
var maxMineTime=50000
var times=0
var timeout=0
UO.Print('Mine next tile')
DIM Tiles[273]
Tiles[1]= "400 4756 3775 0"
Tiles[2]= "400 4757 3775 0"
Tiles[3]= "400 4758 3775 0"
Tiles[4]= "400 4759 3775 0"
Tiles[5]= "400 4760 3775 0"
Tiles[6]= "400 4760 3774 0"
Tiles[7]= "400 4759 3774 0"
Tiles[8]= "400 4758 3774 0"
Tiles[9]= "400 4757 3774 0"
Tiles[10]= "400 4756 3774 0"
Tiles[11]= "400 4757 3773 0"
Tiles[12]= "400 4758 3773 0"
Tiles[13]= "400 4759 3773 0"
Tiles[14]= "400 4760 3773 0"
Tiles[15]= "400 4761 3773 0"
Tiles[16]= "400 4762 3773 0"
Tiles[17]= "400 4763 3773 0"
Tiles[18]= "400 4764 3773 0"
Beg:
for i=1 to 18
Tl=Tiles[i]
Tl=Trim(Tl)
T=GetNumb(Tl,0)
X=GetNumb(Tl,1)
Y=GetNumb(Tl,2)
Z=GetNumb(Tl,3)
if uo.weight > 200 then
drop()
end if
DeleteJournal('There is no ore here to mine')
DeleteJournal('That is too far away')
DeleteJournal('You cannot mine that')
DeleteJournal('You got hit')
GoToTile(x,y,1,True)
Repeat
timeout=0
times = times +1
if times>15 then
wait(maxMineTime)
times = 0
endif
timeout=timeout+200
Wait(200)
UO.WaitTargetTile(Str(T),Str(X),Str(Y),Str(Z))
uo.usetype('0x0E85')
While not (UO.InJournal("There is no ore here to mine")) or uo.dead() or (UO.InJournal("That is too far away") or UO.InJournal("You got hit by an earth elemental") or timeout>maxMineTime or UO.InJournal("I am already doing something else") or UO.InJournal("You cannot mine that") or UO.InJournal("You got hit"))
Wait(100)
If UO.InJournal("attacking you") or UO.InJournal("You got hit by") then
uo.DeleteJournal()
UO.Set('finddistance','3')


UO.FindType('0x0033',-1,'ground')
If UO.FindCount()>0 Then
GoToTile(4760,3773,0,False)
wait(150)
GoToTile(4760,3772,0,False)
UO.Print('Kill slim')
UO.FindType('0x0033',-1,'ground')
UO.GetStatus("finditem")
wait(500)
uo.disarm()
wait(300)
uo.equipt("Lhand",'0x0F47')
UO.WarMode(1)
UO.Attack("laststatus")
while check("0x0033")==true
gotoTile(UO.GetX("laststatus"),UO.GetY("laststatus"),1,False)
wait(1000)
wend
uo.disarm()
UO.WarMode(0)
wait(500)
uo.equipt("Lhand",'0x0E85')
endif

UO.FindType('0x000E',-1,'ground')
If UO.FindCount()>0 Then
GoToTile(4760,3773,0,False)
wait(150)
GoToTile(4765,3770,0,False)
wait(4000)
EndIf
UO.FindType('0x001C',-1,'ground')
If UO.FindCount()>0 Then
GoToTile(4760,3773,0,False)
wait(150)
GoToTile(4765,3770,0,False)
wait(4000)
EndIf


goto Beg
EndIf
If uo.life<1 then
wait(10000)
Resss()
goto Beg
endif
Wend
UO.Print('There are '+Str(UO.Count('0x19B9'))+' ores in the backpack')
Until (UO.InJournal("There is no ore here to mine")) or (UO.InJournal("That is too far away") or UO.InJournal("You cannot mine that") or UO.InJournal("You don't see it"))
If UO.InJournal("There is no ore here to mine") or UO.InJournal("That is too far away" or UO.InJournal("You cannot mine that") or UO.InJournal("You don't see it")) Then
UO.Print('There are no ore here to mine')
wait(4500)
next
GoToTile(4759,3774,0,False)
wait(5000)
UO.Exec('exec restart')
End Sub
#------------------------------------------------------
sub check(type)
uo.FindType(type, "-1", "ground")
if uo.findcount()>0 and uo.life>1 then
return true
else
return false
endif
end sub
#------------------------------------------------------
Sub restart()
UO.Exec('terminate main')
wait(5000)
uo.exec("filterspeech on")
uo.exec("filterspeech add 'Where do you want to use the pickaxe?'")
uo.exec("filterspeech add 'Select a place to mine'")
uo.exec("filterspeech add 'You fail to find any ore.'")
uo.exec("filterspeech add 'You start mining...'")
uo.exec("filterspeech add 'You cannot prospect any ore'")
uo.exec("filterspeech add 'You place'")
wait(500)
UO.Exec('exec main')
wait(5000)
end sub
#------------------------------------------------------
sub Drop()
GoToTile(4760,3773,0,False)
Wait(150)
GoToTile(4767,3770,0,False)
Wait(500)
GoToTile(4769,3764,0,False)
Wait(500)
GoToTile(4772,3764,0,False)
Wait(500)
uo.findtype("0x14ED my")
uo.moveitem("finditem","0","0x561379CF")
wait (500)
uo.findtype("0x0F25 my")
uo.moveitem("finditem","0","0x561379CF")
wait (500)
uo.set("finddistance","2")
#uo.textopen()
uo.textclear()
var b,g,BaseTime
BaseTime = MakeTime()
uo.useobject('0x55AAE698')
uo.exec("findtype 0x14ED 0x0000 0x561379CF")
UO.TextPrint('карт 1 lvl '+str(uo.FindCount("0x14ED"))+' @ '+BaseTime)
dim ore[17]
ore[0]="0x0455"
ore[1]="0x0481"
ore[2]="0x052D"
ore[3]="0x0515"
ore[4]="0x0947"
ore[5]="0x0400"
ore[6]="0x04C2"
ore[7]="0x04DF"
ore[8]="0x0770"
ore[9]="0x04AA"
ore[10]="0x09EE"
ore[11]="0x0482"
ore[12]="0x0949"
ore[13]="0x060A"
ore[14]="0x0641"
ore[15]="0x0488"
ore[16]="0x0750"
ore[17]="0x0000"
for var i=0 to 17
UO.FindType("0x19B9",ore[i],"ground")
uo.textprint(''+colortostring(ore[i])+' '+str(uo.GetQuantity("finditem")))
g=UO.GetSerial("finditem")
UO.FindType("0x19B9",ore[i],"my")
If UO.FindCount() == 1 Then
b=UO.GetSerial("finditem")
UO.MoveItem(b, "0", g, str(uo.getx(g)),str(uo.gety(g)),"0")
wait(500)
endif
next
uo.findtype('0x14ED')
while UO.FindCount() > 0
UO.MoveItem('finditem',0,'0x561379CF')
Wait(400)
uo.findtype('0x14ED')
wend
GoToTile(4768,3766,0,False)
Wait(500)
GoToTile(4767,3770,0,False)
Wait(500)
GoToTile(4762,3771,0,False)
Wait(500)
GoToTile(4759,3774,0,False)
Wait(150)
end sub
#------------------------------------------------------
sub colortostring(color)
if color=="0x0455" then
return "BlackRock:"
endif
if color=="0x0481" then
return "Winter: "
endif
if color=="0x052D" then
return "Mithril: "
endif
if color=="0x0515" then
return "Valorite: "
endif
if color=="0x0947" then
return "Verit: "
endif
if color=="0x0400" then
return "Agapit: "
endif
if color=="0x04C2" then
return "BloodRock:"
endif
if color=="0x04DF" then
return "Azurit: "
endif
if color=="0x0770" then
return "Shadow: "
endif
if color=="0x04AA" then
return "Gold: "
endif
if color=="0x09EE" then
return "Pirit: "
endif
if color=="0x0482" then
return "Silver: "
endif
if color=="0x0949" then
return "OCopper: "
endif
if color=="0x060A" then
return "DCopper: "
endif
if color=="0x0641" then
return "Copper: "
endif
if color=="0x0488" then
return "Bronze: "
endif
if color=="0x0750" then
return "Rasty: "
endif
if color=="0x0000" then
return "Iron: "
endif
endsub
#------------------------------------------------------
Sub Resss()
GoToTile(4760,3773,0,False)
Wait(150)
GoToTile(4767,3770,0,False)
Wait(150)
GoToTile(4774,3801,0,False)
Wait(150)
GoToTile(4750,3821,0,False)
Wait(150)
GoToTile(4729,3826,0,False)
Wait(150)
GoToTile(4719,3822,0,False)
Wait(1500)
UO.exec("usefromground 0x0005")
wait(10000)
GoToTile(4751,3825,0,False)
Wait(500)
GoToTile(4773,3805,0,False)
Wait(500)
GoToTile(4773,3770,0,False)
Wait(500)
GoToTile(4763,3770,0,False)
Wait(500)
GoToTile(4759,3774,0,False)
Wait(1000)
endsub
#------------------------------------------------------
#------------------------------------------------------
Var MiningDir="E:\miha\"
Var MoveDelay=160
Var MoveNumber=1
Var Ep=0.172
#------------------------------------------------------
#------------------------------------------------------
Sub GetNumb(C,I)
var J,T,K
J=0
K=1
While K>0
J=J+1
If (Mid(C,J,1)==' ') Or (J>=Len(C)-1) Then
If I==0 Then
T=Val(Left(C,J))
Else
T=GetNumb(Right(C,Len(C)-J-1),I-1)
EndIf
K=0
EndIf
wend
UO.Print(T)
return T
endsub
#------------------------------------------------------
Sub Perp(Dir)
Var D
D=Dir
If Dir==1 Then
D=3
EndIf
If Dir==2 Then
D=4
EndIf
If Dir==3 Then
D=-1
EndIf
If Dir==4 Then
D=-2
EndIf
If Dir==-1 Then
D=-3
EndIf
If Dir==-2 Then
D=-4
EndIf
If Dir==-3 Then
D=1
EndIf
If Dir==-4 Then
D=2
EndIf
RETURN D
EndSub
#------------------------------------------------------------
Sub MoveOnce(Dir,Del,Rev)
Var Num
If Rev Then
Num=MoveNumber+1
Else
Num=MoveNumber
EndIf
If (Num>0) and (Dir<>0) Then
If Dir==1 Then
UO.Press(38,Num,Del)
EndIf
If Dir==2 Then
UO.Press(33,Num,Del)
EndIf
If Dir==3 Then
UO.Press(39,Num,Del)
EndIf
If Dir==4 Then
UO.Press(34,Num,Del)
EndIf
If Dir==-1 Then
UO.Press(40,Num-1,Del)
EndIf
If Dir==-2 Then
UO.Press(35,Num,Del)
EndIf
If Dir==-3 Then
UO.Press(37,Num,Del)
EndIf
If Dir==-4 Then
UO.Press(36,Num,Del)
EndIf
If Rev Then
If Dir<>-1 Then
UO.Press(40,1,Del)
EndIf
EndIf
EndIf
EndSub
#------------------------------------------------------------
Sub GetQDir(x,y)
Var J=0
If X==0 Then
J=1
Else
If (Y/X)<ep Then
J=3
Else
If (X/Y)<ep Then
J=1
Else
J=2
EndIf
EndIf
EndIf
RETURN J
EndSub
#------------------------------------------------------------
Sub GetDir(myx,myy,ox,oy)
Var I,J
J=0
Var X=ox-myx
Var Y=oy-myy
I=GetQDir(Abs(X),Abs(Y))
If X>=0 Then
If Y>=0 Then
If I==1 Then
J=-2
Else
If I==2 Then
J=-1
Else
If I==3 Then
J=4
EndIf
EndIf
EndIf
Else
If I==1 Then
J=2
Else
If I==2 Then
J=3
Else
If I==3 Then
J=4
EndIf
EndIf
EndIf
EndIf
Else
If Y>=0 Then
If I==1 Then
J=-2
Else
If I==2 Then
J=-3
Else
If I==3 Then
J=-4
EndIf
EndIf
EndIf
Else
If I==1 Then
J=2
Else
If I==2 Then
J=1
Else
If I==3 Then
J=-4
EndIf
EndIf
EndIf
EndIf
EndIf
RETURN J
endsub
#------------------------------------------------------------
Sub abs(a)
Var b
If a<0 Then
b=-a
Else
b=a
endif
return b
endsub
#------------------------------------------------------------
Sub PermResend()
Var Mn=9
Repeat
UO.Resend()
Wait(MoveDelay*Mn)
Until (1>2)
EndSub
#------------------------------------------------------------
Sub max(A,B)
Var C
If A>B Then
C=A
Else
C=B
EndIf
Return C
EndSub
#------------------------------------------------------------
Sub GetDistance(X,Y)
return max(abs(X-uo.getx()),abs(Y-uo.gety()))
endsub
#------------------------------------------------------------
Sub GoToTile(OX,OY,N,S)
var myx, myy, MD, J
var Lx1 ,Ly1
var Lx2 ,Ly2
var Sx ,Sy
var T
var Des=N
J=1
MD=MoveDelay*1.5
myx=uo.getx()
myy=uo.gety()
MoveOnce(GetDir(uo.getx(),uo.gety(),ox,oy),MD,False)
Sx=0
Sy=0
Lx1=uo.getx()/2
Ly1=uo.gety()/2
Lx2=Lx1/2
Ly2=Ly1/2
T=UO.Timer()
If (GetDistance(ox,oy)<>N) or ((not S) and GetDistance(ox,oy)>N) Then
UO.Exec('exec PermResend')
EndIf
While ((GetDistance(ox,oy)<>N) or ((not S) and GetDistance(ox,oy)>N)) and (OX>=0) and (OY>=0)
If ((UO.Timer()-T)*15>MoveDelay) Then
T=UO.Timer()
#UO.Print(Str(uo.getx())+' '+Str(uo.gety())+' '+Str(ox)+' '+Str(oy)+' '+Str(GetDir(uo.getx(),uo.gety(),ox,oy))+' '+Str(T))
Lx2=Lx1
Ly2=Ly1
Lx1=myx
Ly1=myy
myx=uo.getx()
myy=uo.gety()
endIf
MD=MoveDelay
If ((OX-uo.getx())*(OX-uo.getx())+(OY-uo.gety())*(OY-uo.gety())>0) Then
MD=MD*3/GetDistance(ox,oy)
EndIf
wait(MD)
If GetDistance(OX,OY)>Des Then
MoveOnce(GetDir(uo.GetX(),uo.GetY(),ox,oy),MD,False)
Else
If S Then
If GetDistance(OX,OY)<Des Then
If GetDistance(OX,OY)<>0 Then
MoveOnce(GetDir(ox,oy,uo.GetX(),uo.GetY()),MD,False)
Else
MoveOnce(GetDir(uo.GetX(),uo.GetY(),Lx2,Ly2),MD,False)
EndIf
EndIf
EndIf
EndIf
If GetDistance(OX,OY)<>Des Then
If (Lx2==uo.getx()) and (Ly2==uo.gety()) Then
If (Sx<>uo.getx()) or (Sy<>uo.gety()) Then
J=1
EndIf
J=J+1
UO.Resend()
Sx = uo.getx()
Sy = uo.gety()
Stun(ox,oy,J)
EndIf
EndIf
Wend
wait(500)
UO.Exec('terminate PermResend')
wait(500)
endsub
#------------------------------------------------------
Sub Stun(X,Y,N)
Var I
Var myx
Var myy
myx = uo.getx()
myy = uo.gety()
For I=1 to N
MoveOnce(perp(GetDir(myx,myy,x,y)),MoveDelay,False)
Next
Wait(MoveDelay)
UO.Resend()
If (myx==uo.getx()) and (myy==uo.gety()) Then
For I=1 to N
MoveOnce(-perp(GetDir(myx,myy,x,y)),MoveDelay,False)
Next
Wait(MoveDelay)
UO.Resend()
EndIf
If (myx==uo.getx()) and (myy==uo.gety()) Then
For I=1 to N
MoveOnce(-GetDir(myx,myy,x,y),MoveDelay,False)
Next
Wait(MoveDelay)
Stun(x,y,N)
EndIf
EndSub
#------------------------------------------------------
Sub DeleteJournal(What)
Var T,J
J=False
If UO.InJournal(What) Then
J=True
UO.DeleteJournal()
EndIf
RETURN J
EndSub
#------------------------------------------------------
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(387,205)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
UO.Exec('terminate main')
UO.Exec('exec main')
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


P.S.-всю голову себе сломал уже :(
Kynep
Expert!
Posts: 1348
Joined: 2006-02-07 08:51:40
Location: г. Старый Оскол
Contact:

Re: Мужики подскажите за мининг или подкорректируйте!!!

Post by Kynep »

Newbie1988 wrote:У меня несколько просьб!
1)Распишите,что к чему и каждая кманда что значит!
2)У нас на шарде убрали такую функцию,когда таргет на себя кликаешь он не копает,а пишет ибо "You start mining...You cannot mine
that" - можете переделать чтобы он по координатам кликал?!?
3)Или можете сами прописать макрос на мининг?Координаты копалки 1826,1029,0

P.S.-всю голову себе сломал уже :(


1) Для этого есть хелп.
2) В этом скрипте он на себя не тыкает, о копает по кордам, опиши точнее
3) Бесплатно тебе ни кто писать не будет
Mihail
Expert!
Posts: 548
Joined: 2005-05-20 20:30:10
Contact:

Re: Мужики подскажите за мининг или подкорректируйте!!!

Post by Mihail »

Newbie1988 wrote:1)Распишите,что к чему и каждая кманда что значит!

автор, ты не страдаешь слабоумием? ты видишь сколько в твоем скрипте строк? ты правда думаешь что те ща наперебой все кинутся раписывать что какая команда значит? тем более что ты сам не соизволил воспользоваться поиском и почитать справочную систему?
:lol:
Unix
Posts: 5
Joined: 2008-01-23 19:27:41

Post by Unix »

ага... спалилась одна сволоч... хочеш я тебя забаню ? :twisted:
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Ужас... средневековья... когото все сжигают...
Post Reply