Мининг

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Archy_87
Posts: 14
Joined: 2007-09-25 05:40:46
Contact:

Мининг

Post by Archy_87 »

У меня есть макрос на мининг, чар копает вокруг, при весе 625 останавливается. Но мне нужно чтобы перед тем как чар начинал копать он вставал в хайд, а если во время копки расхайдивался то снова вставал и дальше копал... Вот сам скрипт:

Code: Select all

sub minround() 
VAR Kirka = '0x0E85'  ;Тип того чем будем копать
VAR MaxVes = 625  ; максимальнай вес минус 10-15 стоуов
VAR TileNum = '-1'  ; Номер тайла
VAR x, y, t, k 
VAR MaxTime = 100   
VAR ms1 = "There is no ore" 
VAR ms2 = "You can't use" 
VAR ms3 = "You put " 
VAR ms4 = "You loosen some rocks" 
VAR ms5 = "location" 
VAR ms6 = "Try mining" 
VAR ms7 = "You can't see that" 
for y=-2 to 2 
for x=-2 to 2 
 k = 0 
     repeat 
        UO.DeleteJournal() 
        t = UO.Timer() 
        k = k + 1 
        wait(300) 
        UO.WaitTargetTile( TileNum, STR( UO.GetX() + x ), STR( UO.GetY() + y ), 0) 
        UO.UseType( Kirka ) 
        repeat 
           wait(300) 
        until UO.InJournal(ms1) OR UO.InJournal(ms2) OR UO.InJournal(ms3) OR UO.InJournal(ms4) OR UO.InJournal(ms5) OR UO.InJournal(ms6) OR UO.InJournal(ms7) OR ((t +MaxTime) < UO.Timer()) 
        If UO.Weight > MaxVes Then 
           UO.Print(" Overweight!" ) 
           return 
        Endif 
     until ( NOT UO.InJournal(ms4) AND NOT UO.InJournal(ms3) OR (k > 10) ) 
  next 
next 
endsub
Так же у нас появилась новая система антимакроса, скрипт на него уже есть, вопрос в том как его присобачить к моему скрипту на мининг. Вот скрипт на антимакрос:

Code: Select all

sub OneClick() 

   var GumpID = 0 
   var ButtonID = 0 
   var ButtonText 
   var i = 12 
    
   if uo.LastGump('text', 4) <> "0" then 
      i = 13 
   end if 
   GumpID = val(Mid(uo.LastGump('command', i), 16, 4)) 
   ButtonID = 4+GumpID-2225 
   ButtonText = uo.LastGump('command', ButtonID) 
   uo.LClick(Val(Mid(ButtonText, 7, 3)), Val(Mid(ButtonText, 11, 3))) 
   while not uo.LastGump('replyed') 
      wait(100) 
   wend 
    
end sub 

sub AntiMacro() 

   while not uo.Dead() 
      if not uo.LastGump('replyed') then 
         if uo.LastGump('text', 0) == 'Antimacros System' then 
            OneClick() 
         end if 
      endif 
      wait(500) 
   wend 
    
end sub
Подробно о самой системе антимакроса в этом топе: http://forum.yoko.com.ua/viewtopic.php?t=12494

Буду признателен если поможете :roll:
some
Posts: 197
Joined: 2007-05-23 19:51:18

Post by some »

АП
some
Posts: 197
Joined: 2007-05-23 19:51:18

Post by some »

АП
fritz321
Posts: 36
Joined: 2008-03-15 19:28:48

Post by fritz321 »

твой скрипт впадлу перелопачивай... юзай мой...
#########################################################################
sub maining()
var mx, my, mz, i, j

UO.print('Выберите кирку')
UO.exec('addobject kirka')
while uo.targeting()
wait(100)
wend

UO.print('Выберите руну')
uo.exec('addobject rune')
while uo.targeting()
wait(100)
wend

mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
for i = mx-2 to mx+2
for j = my-2 to my+2
hidding()
UO.Print("Копаем в координатах: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock") and not UO.InJournal("Iron Ore") and not UO.InJournal("Copper") and not UO.InJournal("Rusty Ore")
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
uo.findman( -1 )
if uo.findcount() then
recal()
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Useobject("kirka")
while not UO.InJournal("You put") and not UO.InJournal("heavy") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in rock")
wait (1000)
if uo.weight>600 then
recal()
endif

uo.findman( -1 )
if uo.findcount() then
recal()
endif
hidding()
wend
wend
UO.DeleteJournal()
next
next
uo.print("Вы завершили обкопку, перейдите на другой тайл")

end sub
###########################################################################
sub hidding()
while not uo.Hidden()
uo.WarMode("0")
uo.print('Прячемся')
uo.UseSkill("Hiding")
wait(3500)
wend
end sub
###########################################################################
sub recal()
if uo.waiting() then
uo.canceltarget()
endif
uo.print ("Cьебываемся)
uo.waittargetobject('rune')
uo.cast('Recall')
wait(3500)
uo.exec("terminate mining")

end sub
####################################################################################################################
GambiT
Posts: 59
Joined: 2008-01-26 22:35:57

Post by GambiT »

вот мой на копку 5х5 вокргу себя ;) хайд по желанию

Code: Select all

sub main()


var lang = 0 ##### 0 - russian 1 - english 

	if lang == 0 then 
		UO.Print ("Скрипт Мининг 5х5 запущен...")
	else 
		UO.Print ("Script Mining 5x5 is Started...")
	endif
	
	
	var i,j
	var mx = UO.GetX("self")
	var my = UO.GetY("self")
	var mz = UO.GetZ("self")


	
## Начинаем копать ;) Start Mining 

	UO.UseType ("0x097B")
	
	for i = mx-2 to mx+2
		for j = my -2 to my+2
		
#####################################		
### Прячемся . Use hiding

	while not uo.Hidden('self')
		UO.UseSkill('Hiding')
		wait (2000)
	wend
#####################################

			UO.DeleteJournal()
			if UO.dead() then
				return
			endif
			
			if lang == 0 then
				UO.Print("Копаем в: "+str(mx-i)+" "+str(my-j))
			else
				UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
			endif
			
			while not UO.InJournal("Try") and not UO.InJournal("location") and not UO.InJournal("Попробуйте") and not UO.InJournal("far away") and not UO.InJournal("nothing") and not UO.InJournal ("Тут не осталось руды") and not UO.InJournal("дотянуться")
				UO.DeleteJournal()
				UO.Waittargettile("1341", str(i), str(j), str(mz))
				UO.Usetype("0x0E85")
				if UO.dead() then
					return
				endif
				if UO.Weight>624 then
					count()
					return
				endif
				while not UO.InJournal("You put") and not UO.InJournal("location") and not UO.InJournal("Попробуйте") and not UO.InJournal("дотянуться") and not UO.InJournal("no ore") and not UO.InJournal ("Тут не осталось руды") and not UO.InJournal("but fail") and not UO.InJournal("nothing") and not UO.InJournal("Try")
					wait (1000)
				wend
			wend
			UO.DeleteJournal()
		next
	next

	if lang == 0 then
		UO.Print("Всё Выкопано ...")
	else 
		UO.Print("Script Finished ...")
	endif

end sub
fritz321
Posts: 36
Joined: 2008-03-15 19:28:48

Post by fritz321 »

Code: Select all

#########################################################################
sub maining()
var mx, my, mz, i, j

UO.print('Выберите киру')
UO.exec('addobject kirka')
while uo.targeting() 
wait(100)
wend

UO.print('Выберите рунку')
uo.exec('addobject rune')
while uo.targeting() 
wait(100)
wend

start:
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
for i = mx-2 to mx+2
     for j = my-2 to my+2
     hidding()
UO.Print("Копаем в координатах: "+str(mx-i)+" "+str(my-j)) 
while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock") and not UO.InJournal("Iron Ore") and not UO.InJournal("Copper") and not UO.InJournal("Rusty Ore") 
UO.DeleteJournal() 
if uo.waiting() then 
uo.canceltarget() 
endif 
uo.findman( -1 ) 
         if uo.findcount() then 
            recal() 
            uo.exec('terminate mining')
         endif
UO.Waittargettile("1341", str(i), str(j), str(mz)) 
UO.Useobject("kirka") 
while not UO.InJournal("You put") and not UO.InJournal("heavy") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in rock") 
wait (1000) 
if uo.weight>600 then
recal()
endif
 
          uo.findman( -1 ) 
          if uo.findcount() then 
            recal() 
            uo.exec('terminate all')
          endif
hidding()
wend 
wend 
UO.DeleteJournal() 
next 
next 
uo.print("Вы закончили обкобку, передите на другое место и напишите: го")

while not uo.dead()
if uo.injournal("го") then
goto start
endif
uo.findman( -1 ) 
          if uo.findcount() then 
            recal() 
            uo.exec('terminate all')
          endif
          wend
end sub
###########################################################################
sub hidding()
while not uo.Hidden()
uo.WarMode("0")
uo.print('Прячемся')
uo.UseSkill("Hiding")
wait(3500)
wend
end sub
###########################################################################
sub recal()
     if uo.waiting() then
          uo.canceltarget()
     endif
            uo.print ("Сьбываемся")
          uo.waittargetobject('rune')
          uo.cast('Recall')
          wait(3500)
          uo.exec('terminate all')
          
end sub
##################################################################################################################
воть, это финал версион =) для просто обкобки лучший вариант
Post Reply