мининг

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
reidx
Posts: 5
Joined: 2005-06-18 17:10:55

мининг

Post by reidx »

люди, если у кого есть - мининг по координатам, тоесть чтоб самаму марчить клетки в шахте + сброс не нужной руды и реклом домой и обратно ... хэлп ми плз
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

у меня есть )
Kerja
Posts: 11
Joined: 2006-03-06 18:40:48

Post by Kerja »

ну запость чтоли :roll:
[img]http://img442.imageshack.us/img442/5559/dumayu24ju.gif[/img]
reidx
Posts: 5
Joined: 2005-06-18 17:10:55

Post by reidx »

You Must Die wrote:у меня есть )
выложи плз или в асю
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

 #При работе должна быть "отжата" кнопка NumLock 
Var MoveDelay=1000		# Промежуток между шагами 
Var MoveNumber=2		# Количество шагов при смене дислокации 
Var Ep=0.172			# Значение ширины угла хождения при определении направления. Если на пути встречаются сложные и широкие препятствия - увеличить. 0.172 - сбаланчированный. 
var zamahCount=10		# Счётчик количества неудач, после которых забиваем на дерево и идём к следующему.
var colvoZamahov=100  		# Количество попыток получить лог с дерева
var maxweight=730		# 730 Максимальный вес до рекола
var bank='0x400CE667'	# id банка (,info lastcontainer)

sub main()
Dig()
end sub

sub Dig() 
var i 

DIM Cave[50] 														#В скобках указать кол-во деревьев
# ,infotile 
Cave[0]="1346 2642 2166 236"
Cave[1]="1344 2643 2166 236"
Cave[2]="1348 2643 2165 236"
Cave[3]="1344 2644 2164 236"
Cave[4]="1344 2645 2163 236"
Cave[5]="1344 2646 2162 236"
Cave[6]="1350 2646 2161 236"
Cave[7]="1344 2647 2160 236"
Cave[8]="1344 2648 2159 236"
Cave[9]="1344 2649 2158 236"
Cave[10]="1350 2649 2157 236"
Cave[11]="1344 2650 2156 236"
Cave[12]="1344 2651 2155 236"
Cave[13]="1352 2651 2154 236"
Cave[14]="1352 2650 2153 236"
Cave[15]="1349 2649 2152 236"
Cave[16]="1352 2649 2151 236"
Cave[17]="1352 2648 2150 236"
Cave[18]="1349 2647 2149 236"
Cave[19]="1352 2647 2148 236"
Cave[20]="1352 2646 2147 236"
Cave[21]="1346 2646 2146 236"
Cave[22]="1344 2647 2146 236"
Cave[23]="1344 2648 2145 236"
Cave[24]="1344 2649 2144 236"
Cave[25]="1346 2650 2143 236"
Cave[26]="1344 2651 2143 236"
Cave[27]="1344 2652 2142 236"
Cave[28]="1348 2652 2141 236"
Cave[29]="1348 2652 2140 236"
Cave[30]="1348 2652 2139 236"
Cave[31]="1352 2652 2138 236"
Cave[32]="1352 2651 2137 236"
Cave[33]="1352 2650 2136 236"
Cave[34]="1359 2649 2136 236"
Cave[35]="1352 2648 2135 236"
Cave[36]="1352 2647 2134 236"
Cave[37]="1352 2646 2133 236"
Cave[38]="1349 2645 2132 236"
Cave[39]="1348 2645 2131 236"
Cave[40]="1348 2645 2130 236"
Cave[41]="1352 2645 2129 236"
Cave[42]="1344 2645 2128 236"
Cave[43]="1348 2645 2127 236"
Cave[44]="1350 2645 2126 236"
Cave[45]="1349 2645 2125 236"
Cave[46]="1348 2645 2124 236"
Cave[47]="1348 2645 2123 236"
Cave[48]="1352 2645 2122 236"
Cave[49]="1351 2641 2126 236"
Cave[50]="1353 2641 2125 236"



#.... Add more tree here.... 

while 1==1

    for i=0 to 50												#Должно быть равно кол-ву деревьев !!!
        uo.print("We'r going to dig some ore: " + str(i) ) 
        gtt (Cave[i])
        Dig_Cave( Cave[i] ) 
    next 
        
wend
end sub 

sub pereplavka()
uo.print( "Плавим....")
var a
uo.Findtype('0x19B9','','0x400CE63C')
while uo.GetQuantity('finditem')<>0
	uo.Findtype('0x19B9','',0x4029A115)
	if uo.GetQuantity('finditem')<>0 then
			uo.MoveItem('finditem',1,'0x400CE63C')
			wait(500)
	end if

uo.Findtype('0x19B9','','0x400CE63C')
uo.MoveItem('finditem','1','0x4029A115')
wait (1000)
uo.usetype(0x19B7)
wait (500)

uo.Findtype('0x19B9','','0x400CE63C')
wend

#!!!!GoToBank()
end sub

sub IngToBank()

uo.say('bank')
wait (1000)

	uo.Findtype('0x1BEF',0,'0x400CE63C')
	while uo.GetQuantity('finditem')<>0
		uo.Findtype('0x1BEF',0,'0x400CE63C')
		if uo.GetQuantity('finditem')<>0 then
				uo.MoveItem('finditem',1,bank)
				wait(500)
		end if
	wend
GoToCave()	
end sub

sub gtt(Current_Tree)
var x,y
	if Current_Tree[8]==' ' then															#
		x=Current_Tree[5]+Current_Tree[6]+Current_Tree[7]
		if Current_Tree[12]=='' then
			y = Current_Tree[9]+Current_Tree[10]+Current_Tree[11]
		else
			y = Current_Tree[9]+Current_Tree[10]+Current_Tree[11]+Current_Tree[12] 
		endif
	else
		x=Current_Tree[5]+Current_Tree[6]+Current_Tree[7]+Current_Tree[8]
		if Current_Tree[13]=='' then
			y = Current_Tree[10]+Current_Tree[11]+Current_Tree[12]
		else
			y = Current_Tree[10]+Current_Tree[11]+Current_Tree[12]+Current_Tree[13] 
		endif
	endif

gototile(val(x),val(y),2,false)
endsub

###############################################################
# Начинаем копать
###############################################################
sub Dig_Cave(Current_Tree)
var coords

while not UO.Hidden() 
UO.Warmode("0") 
uo.print("hiding...") 
UO.UseSkill("Hiding") 
wait(4000) 
wend 

	uo.deletejournal()
    coords="waittargettile "+ Current_Tree					#Копаем
	uo.exec(coords)								#
	uo.usetype('0x0E86')							#Pick Axe

wait_for_end_chop(Current_Tree)

endsub

################################################################
# Ждём пока выкопает
################################################################
sub wait_for_end_chop(Current_Tree)
var tj=uo.getname()+': You loosen some rocks but fail to find any useable ore.',tj1
var tj2='There is no ore here to mine.'



	for var i=0 to 1500
			tj1=uo.Journal(0)
			if zamahCount==30 then
				uo.print("Нифига мы тут не выкопаем. =( Забиваем на это место и идём дальше...")
				zamahCount=0
				
				return 0
			endif
			if uo.Weight >730 then

#!!!				GoToForge()
				mark_here()
				wait(300)
				recall_home()
				wait(300)
				wait_for_recall()
				wait(1000)
				logs_to_box()
				wait(1000)
				logs_to_box1()
				wait(1000)
				logs_to_box2()
				wait(1000)
				logs_to_box3()
				wait(1000)
				go_yew()
				Dig_Cave(Current_Tree)
				wait(1000)
			end if
			if uo.Journal(0)==tj then
				uo.print('Fuck ! Fucking cave ! Crooked arms !')
				zamahCount=zamahCount+1
				Dig_Cave(Current_Tree)
				wait(1000)
				return 0
			end if
			if tj1[0]=='Y' and tj1[1]=='o' and tj1[2]=='u' and tj1[3]==' ' and tj1[4]=='p' then
				uo.print('Yes ! Good ! Super good ! I have put some ore in my pack...')
				zamahCount=0
				Dig_Cave(Current_Tree)
				wait(1000)
				return 0
			end if
			if uo.Journal(0)==tj2 then
				uo.print('Ooooohhhhh ! Nothing left to chop. Ok, we will go to the next tree and hack it !')
				return 0
			end if

			wait(10)
	next

endsub

sub GoToForge()
var i
DIM WayPoint[150]

WayPoint[0]="4963 1522 1507 0"
WayPoint[1]="4963 1521 1531 40"
WayPoint[2]="4963 1429 1542 30"
WayPoint[3]="4963 1425 1556 30"
WayPoint[4]=""
WayPoint[5]=""
WayPoint[6]=""
WayPoint[7]=""
WayPoint[8]=""
WayPoint[9]=""

    for i=0 to 3												#Должно быть равно кол-ву деревьев !!!
		uo.print("We'r going to dig some ore: " + str(i) ) 
        gtt (WayPoint[i])
    next 
pereplavka()
end sub

sub GoToCave()
var i
DIM WayPoint[150]

WayPoint[0]="4963 1417 1676 6"
WayPoint[1]="4963 1420 1638 20"
WayPoint[2]="4963 1421 1622 20"
WayPoint[3]="4963 1426 1614 20"
WayPoint[4]="4963 1426 1588 20"
WayPoint[5]="4963 1437 1586 20"
WayPoint[6]="4963 1432 1571 30"
WayPoint[7]="4963 1429 1542 30"
WayPoint[8]="4963 1494 1535 30"
WayPoint[9]="4963 1524 1528 40"
WayPoint[10]="4963 1522 1518 23"

    for i=0 to 10												#Должно быть равно кол-ву деревьев !!!
		uo.print("We'r going to dig some ore: " + str(i) ) 
        gtt (WayPoint[i])
    next 
Dig()
end sub

sub GoToBank()
var i
DIM WayPoint[150]

WayPoint[0]="4963 1435 1573 30"
WayPoint[1]="4963 1434 1588 20"
WayPoint[2]="4963 1425 1590 20"
WayPoint[3]="4963 1420 1631 20"
WayPoint[4]="4963 1420 1642 20"
WayPoint[5]="4963 1420 1679 3"
WayPoint[6]=""
WayPoint[7]=""
WayPoint[8]=""
WayPoint[9]=""

    for i=0 to 5												#Должно быть равно кол-ву деревьев !!!
		uo.print("We'r going to dig some ore: " + str(i) ) 
        gtt (WayPoint[i])
    next 

IngToBank()
end sub

sub gz_mode()
var vas=uo.gethp()
	while 1
		if vas>uo.GetHP() then
			uo.say('guards')
			wait(300)
			uo.say('guards')
			wait(300)
			uo.say('guards')
			wait(300)
			uo.say('guards')
			wait(300)
			vas=uo.gethp()
		endif
		vas=uo.gethp()
	wait(30)
	wend
end sub

sub wait_for_recall()

	var tj=uo.getname()+": The spell fizzles.",tj1="You lack sufficient mana for this spell"
	var x=uo.getx(),y=uo.gety()
	uo.print('Ждём рекола...')
	for var i=0 to 200
	
			if uo.Journal(0)==tj then
				uo.print('Fuck ! Fizzle ! Repeat cast...')
				uo.cast('Recall','lasttarget')
				wait(3000)
				wait_for_recall()
				return 0
			end if
			if uo.Journal(0)==tj1 then
				uo.print('Ooohhhh ! Shit ! Where is my mana ? Meditation - rulezzzz...')
				meditation()
				uo.cast('Recall','lasttarget')
				wait_for_recall()
				return 0
			end if
			wait(1)
		next

	wait(3000)

	if uo.Journal(0)==tj or uo.Journal(1)==tj or uo.Journal(2)==tj and x==uo.getx() and y==uo.gety() then
				uo.print("Oooooo =( I'm here again ! Repeat cast !")
				uo.cast('Recall','lasttarget')
				wait(4000)
				wait_for_recall()
	end if
	
endsub

sub wait_for_cast()

	var tj=uo.getname()+": The spell fizzles.",tj1="You lack sufficient mana for this spell"
	for var i=0 to 400
			if uo.Journal(0)==tj then
				uo.print('Fuck ! Fizzle ! Repeat cast...')
				uo.cast('last','lasttarget')
				wait(3000)
				wait_for_cast()
				return 0
			end if
			if uo.Journal(0)==tj1 then
				uo.print('Ooohhhh ! Shit ! Where is my mana ? Meditation - rulezzzz...')
				meditation()
				uo.cast('Recall','lasttarget')
				wait_for_cast()
				return 0
			end if
			wait(10)
		next	

endsub

sub meditation()

	var tj=uo.getname()+": You lose your concentration"
	uo.deletejournal()
	uo.useskill('Meditation')
	wait(1500)

	for var i=0 to 150                #Можно было в одном цикле сделать,
		if uo.journal(0)==tj then	  #но решил с рекурсией не шутить
			meditation()              #из-за глючности инжи.
			return 0
			end if
		wait(10)	
	next
	
	while uo.mana<>uo.int
		if uo.journal(0)==tj then
		meditation()
		return 0
		end if
		wait(10)
		#uo.print("I'm still in trance........"+str(uo.mana)+" "+str(uo.int))
	wend

endsub

sub check_for_fade(a)
uo.print('Проверяем количество оставшихся зарядов...')
var colvo=uo.journal(1)
while '('<>colvo[0]
uo.click(a)
wait(200)
colvo=uo.journal(1)
if '('==colvo[0] then
	if val(colvo[1])<7 then
		if val(colvo[1])==2 or val(colvo[1])==1 then
			return 0
		else
			wait(3000)
			uo.cast('Mark','a')
			wait_for_cast()
		end if
	end if

end if
wend

endsub

sub logs_to_box()
	uo.findtype('0x19B9',-1,'0x40188C12') #Backpack
	if uo.findCount()>0 then
		for var i=0 to uo.findCount()-1
			uo.findtype('0x19B9',-1,'my') # Логи
			uo.moveitem('finditem',-1,'0x404135CE')
			wait(1000)
		next
	endif
endsub
sub logs_to_box1()
	uo.findtype('0x19B8',-1,'0x40188C12') #Backpack
	if uo.findCount()>0 then
		for var i=0 to uo.findCount()-1
			uo.findtype('0x19B8',-1,'my') # Логи
			uo.moveitem('finditem',-1,'0x404135CE')
			wait(1000)
		next
	endif
endsub
sub logs_to_box2()
	uo.findtype('0x19B7',-1,'0x40188C12') #Backpack
	if uo.findCount()>0 then
		for var i=0 to uo.findCount()-1
			uo.findtype('0x19B7',-1,'my') # Логи
			uo.moveitem('finditem',-1,'0x404135CE')
			wait(1000)
		next
	endif
endsub
sub logs_to_box3()
	uo.findtype('0x19BA',-1,'0x40188C12') #Backpack
	if uo.findCount()>0 then
		for var i=0 to uo.findCount()-1
			uo.findtype('0x19BA',-1,'my') # Логи
			uo.moveitem('finditem',-1,'0x404135CE')
			wait(1000)
		next
	endif
endsub

sub recall_home()
	uo.cast('Recall','0x404A7380')
	wait_for_recall()
	check_for_fade('0x404A7380')
endsub

sub mark_here()
	uo.cast('Mark','0x404B21F6')
	wait_for_cast()	
endsub

sub go_yew()
var x=uo.getx()
var y=uo.gety()
uo.cast('Recall','0x404B21F6')
	wait_for_recall()
	wait(1500)
var xmax=uo.getx()+10
var ymax=uo.gety()+10
var xmin=uo.getx()-10
var ymin=uo.gety()-10

	if x<xmax and y<ymax and x>xmin and y>ymin then
		go_yew()
	endif
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)*55>MoveDelay) Then 																						#15
   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 
    
      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 NearTile(Obj,Des) 
var ox, oy, myx, myy, MD, J 
var Lx1 ,Ly1 
var Lx2 ,Ly2 
var Sx ,Sy 
var T 
UO.Click(Obj) 
MD=MoveDelay*1.5 
ox=uo.GetX(Obj) 
oy=uo.GetY(Obj) 
J=1 
myx = uo.getx() 
myy = uo.gety() 
Sx=0 
Sy=0 
Lx1=myx/2 
Ly1=myy/2 
Lx2=Lx1/2 
Ly2=Ly1/2 
T=UO.Timer() 
If not (UO.GetDistance(Obj)==Des) Then 
#  UO.Exec('exec PermResend') 
EndIf 
While not (UO.GetDistance(Obj)==Des) 
  ox=uo.GetX(Obj) 
  oy=uo.GetY(Obj) 
  If ((UO.Timer()-T)*15>MoveDelay) Then 
   T=UO.Timer() 
   UO.Print('Go to '+Str(Des)+' to '+UO.GetName(Obj)) 
   UO.Print(Str(UO.GetDistance(Obj))) 
   UO.Print(Str(uo.GetX())+' '+Str(uo.GetY())+' '+Str(uo.GetX(Obj))+' '+Str(uo.GetY(Obj))+' '+Str(GetDir(uo.GetX(),uo.GetY(),uo.GetX(Obj),uo.GetY(Obj)))+' '+Str(T)) 
   Lx2=Lx1 
   Ly2=Ly1 
   Lx1=myx 
   Ly1=myy 
   myx=uo.getx() 
   myy=uo.gety() 
  endIf 
  MD=MoveDelay*1.5 
  If (UO.GetDistance(Obj)>0) Then 
   MD=MD/UO.GetDistance(Obj) 
  EndIf 
  wait(MD) 
  If UO.GetDistance(Obj)>Des Then 
   MoveOnce(GetDir(uo.GetX(),uo.GetY(),uo.GetX(Obj),uo.GetY(Obj)),MD,False) 
  Else 
   If UO.GetDistance(Obj)<Des Then 
    If UO.GetDistance(Obj)<>0 Then 
     MoveOnce(GetDir(uo.GetX(obj),uo.GetY(obj),uo.GetX(),uo.GetY()),MD,False) 
    Else 
     MoveOnce(GetDir(uo.GetX(),uo.GetY(),Lx2,Ly2),MD,False) 
    EndIf 
   EndIf 
  EndIf 
  If UO.GetDistance(Obj)<>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(uo.GetX(Obj),uo.GetY(Obj),J) 
   EndIf 
  EndIf 
Wend 
UO.Exec('terminate PermResend') 
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(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


#================================================================
#   Extra rune (Britain) - Экстренный рекол по заданной руне
#
#----------------------------------------------------------------
sub Erune()
      UO.WaitTargetObject('0x4033C0D6') 
      UO.Cast('Recal')
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  
reidx
Posts: 5
Joined: 2005-06-18 17:10:55

Post by reidx »

круто
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

reidx wrote:круто
Это круто :?:

:roll:
reidx
Posts: 5
Joined: 2005-06-18 17:10:55

Post by reidx »

Destruction wrote:
reidx wrote:круто
Это круто :?:

:roll:
ну да, я даже разобраться нечерта )
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

весьма просто :)

пихаешь тайлы через команду

Code: Select all

 ,infotile
в скриптах log_to_box меняешь Ид сундкука

в скриптах рекол_хоум и ниже чё то, там меняешь ид рун ( 2 руны(1 в хату другая в шахту)).

Извините, мы не ветераны, что хотели-то получите :) спасибо за внимание.гг
Post Reply