Хел (мининг)

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
keSHLz
Posts: 41
Joined: 2007-03-30 11:49:39
Contact:

Хел (мининг)

Post by keSHLz »

воопщем кароче скрипт на мининг но фишка такая у меня 2 минера кагда их монстр убивает то один ресаеться и сам идет дальше капать а второй добегает до креста и стоит там (нересаеться )потом идет капать гостом и опять бежит к кресту и нересаеться мб кто поправит или улучшит чем буду благодарен )деньгой на телефон )если че стукните в асю 353899862

Code: Select all

 
Sub Main() 
UO.SetGlobal('process','no')
repeat
if UO.GetGlobal('process')=='no' then
UO.DeleteJournal() 
UO.Exec('exec Lumb')
endIf
Wait(3000)
until (1==0) 
EndSub 

Sub Lumb() 
Var Tl,T,X,Y,Z,srl
var wei
UO.SetGlobal('process','yes') 
Var F=File(FileName) 
F.Open() 
Beg:

DeleteJournal('no mine') 
Tl=safecall F.Readln() 
Tl=Trim(Tl) 
If Tl=='File read error' Then 
  GoTo Ext 
EndIf 
T=GetNumb(Tl,0) 
X=GetNumb(Tl,1) 
Y=GetNumb(Tl,2) 
Z=GetNumb(Tl,3) 
UO.Print('next mine') 
UO.Print('Tile '+Tl) 
GoToTile(X,Y,1,False) 
Repeat 
uo.DeleteJournal()  
UO.WaitTargetTile(Str(T),Str(X),Str(Y),Str(Z)) 
While uo.Waiting()
 
Emil()
If Uo.life < 1 Then
Ress() 
wait(5000)
If Uo.life < 1 Then
Ress() 
wait(5000)
endif
GoToTile(X,Y,1,false)
UO.WaitTargetTile(Str(T),Str(X),Str(Y),Str(Z)) 
wait(2000)
Uo.usetype('Kirka')
Uo.waittargetself()
endif


WEND
repeat
Wait(1000)
if Uo.life < 1 then
Ress()
wait(5000)
endif
If UO.InJournal("You got hit") or UO.InJournal("is attacking you") then
alarm()
if Uo.life > 1 then
return()
endif
if Uo.life < 1 then
Ress()
wait(5000)
endif
If Uo.life < 1 Then
Ress() 
wait(5000)
endif
wait(1000)
GoToTile(X,Y,1,false)
UO.WaitTargetTile(Str(T),Str(X),Str(Y),Str(Z)) 
Emil()
UO.DeleteJournal()
endif
If UO.InJournal("far") or UO.InJournal("away") then
uo.usetype('0x0E85')
uo.waittargetself()
uo.deletejournal()
endif
#if uo.count(Ore)>170 then
wei = ( UO.Str * 3 ) - 30
if UO.Weight > wei then
Drop()
wait(1000)
GoToTile(X,Y,1,false)
wait(1000)
UO.WaitTargetTile(Str(T),Str(X),Str(Y),Str(Z)) 
UO.UseObject(UO.ObjAtLayer('Rhand'))
endif
Until UO.InJournal("There is no ore here to mine.") or UO.InJournal("There is no ore here to mine")
Until UO.InJournal("There is no ore here to mine.") or UO.InJournal("There is no ore here to mine")
If UO.InJournal("There is no ore here to mine.") or UO.InJournal("There is no ore here to mine") then
Goto Beg
EndIf 
Ext: 
F.Close() 
UO.SetGlobal('process','no') 
EndSub 


###############################################################
#??????????? ??? ???? ?)
###############################################################
sub Exist()
#############Iron
If UO.Count(0x1BF2, 0x0000) > 0 Then
ProDrop(0x1BF2, 0x0000)
EndIF
############Rasty 
If UO.Count(0x1BF2,0x0750) > 0 Then
ProDrop(0x1BF2,0x0750)
EndIF
############Bronze
If UO.Count(0x1BF2, 0x0488) > 0 Then
  ProDrop(0x1BF2, 0x0488)
EndIF
############Old Copper
If UO.Count(0x1BF2, 0x0949) > 0 Then
  ProDrop(0x1BF2, 0x0949)
EndIF
############Dull Copper
If UO.Count(0x1BF2, 0x060A) > 0 Then
  ProDrop(0x1BF2, 0x060A)
EndIF
############Copper 
If UO.Count(0x1BF2, 0x0641) > 0 Then
  ProDrop(0x1BF2, 0x0641)
EndIF
############Pirit 
If UO.Count(0x1BF2, 0x09EE) > 0 Then
  ProDrop(0x1BF2, 0x09EE)
EndIF
############Silver
If UO.Count(0x1BF8, 0x0482) > 0 Then
  ProDrop(0x1BF8, 0x0482)
EndIF
############Gold
If UO.Count(0x1BEC, 0x0000) > 0 Then
  ProDrop(0x1BEC, 0x0000)
EndIF
############Shadow
If UO.Count(0x1BF2, 0x0770) > 0 Then
  ProDrop(0x1BF2, 0x0770)
EndIF
############Verit
If UO.Count(0x1BF2, 0x0947) > 0 Then
  ProDrop(0x1BF2, 0x0947)
EndIF
############Agapit
If UO.Count(0x1BF2, 0x0400) > 0 Then
  ProDrop(0x1BF2, 0x0400)
EndIF
############Blood 
If UO.Count(0x1BF2, 0x04C2) > 0 Then
  ProDrop(0x1BF2, 0x04C2)
EndIF
############Azurit 
If UO.Count(0x1BF2, 0x04DF) > 0 Then
  ProDrop(0x1BF2, 0x04DF)
EndIF
############Mithril
If UO.Count(0x1BF2, 0x052D) > 0 Then
  ProDrop(0x1BF2, 0x052D)
EndIF
############Valorite
If UO.Count(0x1BF2, 0x0515) > 0 Then
  ProDrop(0x1BF2, 0x0515)
EndIF
############Winter
If UO.Count(0x1BF2, 0x0481) > 0 Then
  ProDrop(0x1BF2, 0x0481)
EndIF
############Black Rock Ore
If UO.Count(0x19B9,0x0455) > 0 Then
  ProDrop(0x19B9,0x0455)
EndIF
end sub
###############################################################
#????? ????
###############################################################

###############################################################
#????? ?????? ?????
###############################################################
###############################################################
#????? ???? 2
###############################################################

###############################################################
#????? ?????? ????? 2
###############################################################
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=4
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 
UO.Exec('terminate PermResend') 
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 count()
UO.Print(str(UO.Count(ore)))
end sub

sub Emil()
IF (UO.GetGraphic(UO.ObjAtLayer("Rhand"))) <> '0x0E85' Then
 If UO.Count('0x0E85') > 0 Then
  UO.UseType('0x0E85')
 endif
else
 UO.UseObject(UO.ObjAtLayer('Rhand'))
EndIf
wait(2000)
end sub

sub Clear(T,C)
Var Count = UO.Count(T,C)
UO.FindType(T,C,'backpack') 
Var b = UO.GetSerial("finditem")
UO.FindType(T,C,'ground') 
Var g = UO.GetSerial("finditem")
Wait(500)
UO.MoveItem(b, "0", g,str(uo.getx(g)),str(uo.gety(g)),"0")
Wait(500)
If UO.Count(T,C) == Count Then
 If (UO.Count('finditem')+Count) < 60000 Then
  uo.ignore('finditem')
  ProDrop(T,C)
endIf
endIf
end sub

sub test()
GoToTile(2039,235,0,False)
end sub


sub alarm()
wait(100)
Uo.exec('arm 2')
wait(100)
GoToTile(1990,262,0,False)
GoToTile(1992,262,0,False)
GoToTile(1992,255,0,False)
GoToTile(2001,255,0,False)
wait(100)
GoToTile(2001,260,0,False)
GoToTile(2028,260,0,False)
wait(100)
GoToTile(2031,273,0,False)
GoToTile(2043,271,0,False)
wait(100)
GoToTile(2048,257,0,False)
GoToTile(2026,250,0,False)
GoToTile(2026,245,0,False)
GoToTile(2005,245,0,False)
wait(100)
GoToTile(1994,255,0,False)
GoToTile(1992,262,0,False)
GoToTile(1990,262,0,False)
end sub

sub Ress()
GoToTile(1990,262,0,False)
GoToTile(1992,262,0,False)
GoToTile(1992,255,0,False)
GoToTile(2012,244,0,False)
GoToTile(2027,242,0,False)
GoToTile(2028,235,0,False)
GoToTile(2040,235,0,False)
While UO.Dead()
uo.usefromground(0x0004)
uo.usefromground(0x0004)
uo.usefromground(0x0005)
uo.usefromground(0x0005)
wait(500)
WEND
Wait(10000)
GoToTile(2040,235,0,False)
wait(100)
GoToTile(2028,235,0,False)
GoToTile(2027,242,0,False)
wait(100)
GoToTile(2012,244,0,False)
GoToTile(1992,255,0,False)
wait(100)
GoToTile(1992,262,0,False)
GoToTile(1990,262,0,False)
end sub

sub Count()
#Irons & Rasty
UO.Print('Iron : '+Str(UO.Count(0x19B9, 0x0000)))
UO.Print('-=-=-=-=-=-=-=-')
UO.Print('Bronze : '+Str(UO.Count(0x19B9, 0x0488)))
UO.Print('Rasty : '+Str(UO.Count(0x19B9, 0x0750)))
UO.Print('-=-=-=-=-=-=-=-')
#Coppers
wait(4000)
UO.Print('-=-=-=-=-=-=-=-')
UO.Print('Old Copper : '+Str(UO.Count(0x19B9, 0x0949)))
UO.Print('Dull Copper : '+Str(UO.Count(0x19B9, 0x060A)))
UO.Print('Copper : '+Str(UO.Count(0x19B9, 0x0641)))
UO.Print('-=-=-=-=-=-=-=-')
#Pitit Types
wait(4000)
UO.Print('-=-=-=-=-=-=-=-')
UO.Print('Pirit : '+Str(UO.Count(0x19B9, 0x09EE)))
UO.Print('Silver : '+Str(UO.Count(0x19B9, 0x0482)))
UO.Print('Shadow : '+Str(UO.Count(0x19B9, 0x0770)))
UO.Print('Gold : '+Str(UO.Count(0x19B9, 0x04AA)))
UO.Print('-=-=-=-=-=-=-=-')
#Verit
wait(4000)
UO.Print('-=-=-=-=-=-=-=-')
UO.Print('Verit : '+Str(UO.Count(0x19B9, 0x0947)))
UO.Print('Agapit : '+Str(UO.Count(0x19B9, 0x0400)))
UO.Print('Blood : '+Str(UO.Count(0x19B9, 0x04C2)))
UO.Print('Azurit : '+Str(UO.Count(0x19B9, 0x04DF)))
UO.Print('-=-=-=-=-=-=-=-')
Wait(4000)
UO.Print('-=-=-=-=-=-=-=-')
UO.Print('Mithril : '+Str(UO.Count(0x19B9, 0x052D)))
UO.Print('Valorite : '+Str(UO.Count(0x19B9, 0x0515)))
UO.Print('Winter : '+Str(UO.Count(0x19B9, 0x0481)))
UO.Print('-=-=-=-=-=-=-=-')
UO.Print('BlackRock : '+Str(UO.Count(0x19B9, 0x0455)))
UO.Print('-=-=-=-=-=-=-=-')
end sub

sub Drop()
GoToTile(1990,262,0,False)
GoToTile(1992,262,0,False)
GoToTile(1992,271,0,False)
GoToTile(1991,271,0,False)
wait(500)
var b
var g
var r
var color
UO.Set('finddistance','2')
DeleteJournal('m')
repeat
UO.FindType(0x19B9)
b=UO.GetSerial("finditem")
color=uo.GetColor("finditem")
If UO.FindCount()<>1 Then
else
UO.Say("m")
endif
UO.FindType(0x19B9, color, "ground")
g=UO.GetSerial("finditem")
Wait(300)
UO.MoveItem(b, "0", g, str(uo.getx(g)),str(uo.gety(g)),"0")
Wait(200)
until UO.InJournal("m") or uo.dead() or uo.getgraphic()=="0x0193"
wait(500)
var v
var f
var e
var colorit
UO.Set('finddistance','2')
DeleteJournal('m')
repeat
UO.FindType(0x0F25)
v=UO.GetSerial("finditem")
colorit=uo.GetColor("finditem")
If UO.FindCount()<>1 Then
else
UO.Say("m")
endif
UO.FindType(0x0F25, colorit, "ground")
f=UO.GetSerial("finditem")
Wait(300)
UO.MoveItem(v, "0", f, str(uo.getx(g)),str(uo.gety(g)),"0")
Wait(200)
UO.Say("m")
until UO.InJournal("m") or uo.dead() or uo.getgraphic()=="0x0193"
wait(1000)
GoToTile(1991,271,0,False)
GoToTile(1992,271,0,False)
GoToTile(1992,262,0,False)
GoToTile(1990,262,0,False)
end sub



sub loot1()
	VAR WaitTime=100
	VAR Exit=1, i
	DIM Loot[2]
Loot[1]="0x0EED"
Loot[2]="0x19B9"
wait (500)
for i = 1 to 2
UO.FindType(Loot[i],"-1","lastcorpse") 
UO.Grab("0","finditem") 
next 
end sub


sub return()
GoToTile(1992,262,0,False)
armslore()
GoToTile(1989,262,0,False)
end sub

sub armslore()
Uo.Useskill('Arms Lore')
uo.waittargettype('0x0e85')
end sub
keSHLz
Posts: 41
Joined: 2007-03-30 11:49:39
Contact:

Post by keSHLz »

че нету добрых людей ?
Mihail
Expert!
Posts: 548
Joined: 2005-05-20 20:30:10
Contact:

Post by Mihail »

тебе в другой раздел (scripting market)
Post Reply