Page 1 of 1

Nujna vasa pomosi

Posted: 2008-10-16 07:27:03
by vertijok

Code: Select all

sub Vertijok()
UO.Print("!!Viberi kirku!!")
UO.Exec('addobject Shovel')
While UO.targeting()
	Wait(3000)
Wend
uo.print('!!Viberi runu damoi!! ') 
uo.exec('addobject runeHome') 
while uo.targeting() 
wait(15000) 
wend 
######################################################################################
uo.print('!!Viberi sunduk s regami!! ') 
uo.exec('addobject Sunduk') 
while uo.targeting() 
wait(100) 
wend 
######################################################################################
uo.print('!!Viberi runu v saxtu!! ') 
uo.exec('addobject runeCave') 
while uo.targeting() 
wait(100) 
wend 
######################################################################################
GoToMine()
repeat 
while gotoxy(2562,491,0)
gotoxy(2558,497,0)
GetOre() 
GoToHome() 
GoToMine()
gotoxy(2560,493,0)
GetOre() 
GoToHome() 
GoToMine()
gotoxy(2563,488,0)
GetOre() 
GoToHome() 
GoToMine()
gotoxy(2565,483,0)
GetOre() 
GoToHome() 
GoToMine()
gotoxy(2570,480,0)
GetOre() 
GoToHome() 
GoToMine()
gotoxy(2575,477,0)
GetOre() 
GoToHome() 
GoToMine()
gotoxy(2578,480,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2573,483,0) 
GetOre() 
GoToHome() 
GoToMine()
gotoxy(2570,486,0) 
GetOre() 
GoToHome() 
end sub 

######################################################################################
sub GoToHome()
gotoxy(2566,481,0) 
gotoxy(2558,505,0) 
gotoxy(2552,505,0) 
gotoxy(2552,501,0)  
gotoxy(2525,501,0) 
gotoxy(2525,515,0)  
gotoxy(2507,515,0) 
gotoxy(2507,542,0) 
uo.say('bank')
wait(3000)
uo.waittargetobject('runeHome') ; домой 
wait(500) 
uo.cast('Recall') 
wait(3000) 
loot() 
wait(3000) 
reccal: 
uo.deletejournal() 
if uo.waiting() then 
uo.canceltarget() 
endif 
end sub 
######################################################################################
sub GoToMine()
med()
regi()
uo.waittargetobject('runeCave') ; V saxtu
wait(500)
uo.cast('Recall') 
goto reccal 
endif
wait(5000)
gotoxy(2558,497,0) 
end sub
######################################################################################
sub Start()
If 	UO.GetGlobal('MiningCheck')=='on' Then
	UO.SetGlobal('MiningCheck','on')
	UO.Exec('Exec Terminate')
Else
	UO.Exec('Exec Select')
	UO.SetGlobal('MiningCheck','on')
EndIf
end sub
##############################
### Копаем руду возле себя ###
##############################
Sub GetOre()
var mx, my, mz, i, j, CheckTime, CheckLag=0
###
var Wait_1 = "You put"
var Wait_2 = "heavy"
var Wait_3 = "Это слишком далеко отсюда."
var Wait_4 = "Тут не осталось руды."
var Wait_5 = "but fail"
var Wait_6 = "Туда Вам не дотянуться"
var Wait_7 = "in rock"
var Wait_8 = "You have found some"
###
var Fizzle_1 = "Тут не осталось руды."
var Fizzle_2 = "Это слишком далеко отсюда."
var Fizzle_3 = "Туда Вам не дотянуться"
var Fizzle_4 = "in rock"
###
mx = UO.GetX('self')
my = UO.GetY('self')
mz = UO.GetZ('self')
For i = mx-3 TO mx+3
	For j = my-3 TO my+3
		Hide()
		UO.Print("Get Coordinate: "+str(mx-i)+" "+str(my-j))
			REPEAT
				CheckLag = CheckLag+1
					
						
					EndIf
				Hide()
					If UO.Waiting() Then 
						UO.Targeting()
					EndIf
				UO.WaitTargeTtile('1341',str(i),str(j),str(mz))
				UO.UseObject('Shovel')
				CheckTime = UO.Timer()
				UO.DeleteJournal()
					REPEAT
						Wait(300)
					Until UO.InJournal(Wait_1) or UO.InJournal(Wait_2) or UO.InJournal(Wait_3) or UO.InJournal(Wait_4) or UO.InJournal(Wait_5) or UO.InJournal(Wait_6) or UO.InJournal(Wait_7) or UO.InJournal(Wait_8) or (CheckTime+150)<UO.Timer() or UO.Dead()
					If UO.InJournal(Wait_8) Then
						
					EndIf
					If CheckLag==10 Then
						CheckLag = 0
						Wait(9000)
					EndIf
			Until UO.InJournal(Fizzle_1) or UO.InJournal(Fizzle_2) or UO.InJournal(Fizzle_3) or UO.InJournal(Fizzle_4) or UO.Dead()
	Next
Next
REPEAT
end sub
######################################################################################
sub loot() 
hide()
uo.UseSkill('Stealth') 
wait(3000) 
begin: 
if uo.waiting() then 
uo.canceltarget() 
endif 
VAR a,Exit 
VAR UnloadCont='0x412546E4' ; ID sunduka 
DIM Ore[5] 
Ore[0]=0x19B9 ; 4 and more ore 
Ore[1]=0x19B7 ; 1 ore 
Ore[2]=0x19BA ; 2 ore 
Ore[3]=0x19B8 ; 3 ore 
UO.SetReceivingContainer(UnloadCont) 
wait(500) 
For a=0 to 3 
Exit=0 
repeat 
UO.FindType(Ore[a]) 
if UO.GetQuantity('finditem')>0 then 
UO.Grab('0','finditem') 
wait(1500) 
Else 
Exit=1 
endif 
until Exit==1 
Next 
UO.UnSetReceivingContainer() 
uo.print('vigruzili vsiu rudu pora kopati dalise???')
end sub 
#######################
### Прячимся в хайд ###
#######################
sub hide()
while not UO.Hidden() 
UO.Warmode("0") 
uo.print("Nikaimsia") 
UO.UseSkill("Hiding") 
wait(4000) 
wend 
######################################################################################

######################################################################################
sub med()
VAR LastTimer 
UO.DeleteJournal() 
while UO.Mana<UO.Int 
LastTimer=UO.Timer() 
UO.UseSkill('Meditation') 
repeat 
wait(100) 
until UO.InJournal("You are") OR UO.InJournal("You lose") OR UO.Timer()>LastTimer+200 
UO.DeleteJournal() 
wait(200) 
wend 
end sub
######################################################################################
sub regi() 
VAR r, q, n, amount = 5
Dim reg[4] 
reg[1] = '0x0F7A' 
reg[2] = '0x0F7B' 
reg[3] = '0x0F86' 
reg[4] = '0x0E21'

 For r = 1 to 4 
 if uo.count( reg[r] )<>amount then 
  q = amount - uo.count( reg[r] ) 

   if q <> 0 then 
     if q > 0 then 

      uo.useobject("Sunduk")
      
      wait(250) 
     

      uo.findtype( reg[r] , -1 ,"Sunduk") 

       If uo.findcount() == 0 then 
        uo.msg('Ia vzial regi!') 
        return 
       endif 

      uo.moveitem('finditem', STR(q) ) 
      wait(1000) 
        else 

      q = q*-1 
     uo.findtype( reg[r] ) 
     uo.moveitem('finditem', STR(q) ,"Sunduk")
     
     wait(1000) 

     endif 
   endif 

 endif 
 next 

  While uo.Count('0x0F09','0x0060') < 2 
   uo.findtype('0x0F09','0x0060',"Sunduk") 
   if uo.FindCount() then 
     uo.moveitem('finditem') 
     checklag() 
     wait(1000) 
   endif 
  wend 

uo.print('Vziali regi ...') 
end sub 
######################################################################################
####################################
### Смотрим скока накопали руды. ###
####################################
Sub InfoOre()
var i, ii, a, LogsTime=PrintTime()
Dim Ore[3]
    Ore[0] = '0x19B9' ; 4 and more ore
    Ore[1] = '0x19B8' ; 3 ore
    Ore[2] = '0x19BA' ; 2 ore
    Ore[3] = '0x19B7' ; 1 ore

Dim NameOre[13]
    NameOre[0]  = 'Iron'
    NameOre[1]  = 'Cooper'
    NameOre[2]  = 'Agapite'
    NameOre[3]  = 'Golden'
    NameOre[4]  = 'Orion'
    NameOre[5]  = 'Verite'
    NameOre[6]  = 'Dwarf'
    NameOre[7]  = 'Silver'
    NameOre[8]  = 'Shadow'
    NameOre[9]  = 'Valorite'
    NameOre[10] = 'Crystal'
    NameOre[11] = 'Magma'
    NameOre[12] = 'Obsidian'
    NameOre[13] = 'Mytheril'

Dim ColorOre[13]
    ColorOre[0]  = '0x0000'
    ColorOre[1]  = '0x0641'
    ColorOre[2]  = '0x0400'
    ColorOre[3]  = '0x084d'
    ColorOre[4]  = '0x048a'
    ColorOre[5]  = '0x07d1'
    ColorOre[6]  = '0x0488'
    ColorOre[7]  = '0x0482'
    ColorOre[8]  = '0x0770'
    ColorOre[9]  = '0x0515'
    ColorOre[10] = '0x0487'
    ColorOre[11] = '0x0486'
    ColorOre[12] = '0x0485'
    ColorOre[13] = '0x048d'
UO.TextOpen()
UO.TextPrint("#####################")
UO.TextPrint("## Время: "+LogsTime+" ##")
UO.TextPrint("#####################")
For i = 0 TO 3
	For ii = 0 TO 13
		
		If a<>0 Then
   			UO.TextPrint(NameOre[ii]+" Ore: "+STR(a))
		EndIf
	Next
Next
UO.TextPrint("#####################")
end sub

Sub GetAmount(Type,Color,Cont)
var item_amount = 0
UO.IgnoreReset()
REPEAT
UO.FindType(Type, Color, Cont)
	If UO.FindCount() Then
		If UO.GetQuantity('finditem')==0 Then
			item_amount = item_amount + 1
		Else
			item_amount = item_amount + UO.GetQuantity('finditem')
		EndIf
		UO.Ignore('finditem')
		UO.FindType(Type, Color, Cont)
	EndIf
Until UO.FindCount()==0 or UO.Dead()
UO.IgnoreReset()
Return item_amount
end sub
##############
### Часики ###
##############
Sub PrintTime()
var HR  = ''
var MIN = ''
var SEC = ''
var CurrentTime = UO.Time()  
If CurrentTime>99999 Then
	HR  = Mid(STR(CurrentTime),0,2)
	MIN = Mid(STR(CurrentTime),2,2)
	SEC = Mid(STR(CurrentTime),4,2) 
Else 
	If CurrentTime > 9999 Then
		HR  = '0'+Mid(STR(CurrentTime),0,1)
		MIN = Mid(STR(CurrentTime),1,2)
		SEC = Mid(STR(CurrentTime),3,2) 
	Else 
		If CurrentTime > 999 Then 
			HR  = '00'
			MIN = Mid(STR(CurrentTime),0,2)
			SEC = Mid(STR(CurrentTime),2,2) 
		Else 
			If CurrentTime > 99 Then
				HR  = '00'
				MIN = '0'+Mid(STR(CurrentTime),0,1)
				SEC = Mid(STR(CurrentTime),1,2) 
			Else 
				If CurrentTime > 9  Then 
					HR  = '00' 
					MIN = '00'  
					SEC = STR(CurrentTime) 
				Else 
				HR  = '00' 
				MIN = '00'  
				SEC = '0'+STR(CurrentTime)          
				EndIf 
			EndIf 
		EndIf 
	EndIf 
EndIf 
Return (HR+':'+MIN+':'+SEC)   
end sub
##################
### РЕКОНЕКТОР ###
##################
Sub Reconnect() 
var ReconnectTime,rFlag 
ReconnectTime = '0' 
rFlag = 1 
REPEAT 
	While UO.ObjAtLayer('Bpack')==''
		If rFlag Then 
			ReconnectTime = PrintTime()
			rFlag = 0 
		EndIf 
		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' 
	EndIf 
Until false 
end sub
pocemu kogda on prohodit vse koordinati kopki skript ostanavlivaita kak zdelati stobi on kopal dalise??? budu blagodarin

Posted: 2008-10-18 09:04:31
by Millerbeer
вместо этого

Code: Select all

GoToMine() 
repeat 
while gotoxy(2562,491,0) 
gotoxy(2558,497,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2560,493,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2563,488,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2565,483,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2570,480,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2575,477,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2578,480,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2573,483,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2570,486,0) 
GetOre() 
GoToHome() 
end sub 
попробуй воткни это

Code: Select all

while not uo.dead()
GoToMine()  
gotoxy(2562,491,0) 
gotoxy(2558,497,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2560,493,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2563,488,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2565,483,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2570,480,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2575,477,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2578,480,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2573,483,0) 
GetOre() 
GoToHome() 
GoToMine() 
gotoxy(2570,486,0) 
GetOre() 
GoToHome() 
wend
end sub 

Posted: 2008-10-19 01:08:37
by vertijok
[quote="Millerbeer"] spasiba sto pomog. Slusai pomogi i s resom stobi esli evo ubiut to stobi on sol k ressu i ne uxodil ot nevo poka ne resniot evo.