Yoko

All sides of Injection
It is currently 2025-12-03 07:21:05

All times are UTC+02:00




Post new topic  Reply to topic  [ 27 posts ]  Go to page 1 2 Next
Author Message
PostPosted: 2005-05-04 07:34:02 
Offline
User avatar

Joined: 2004-10-07 15:42:12
Posts: 53
Location: Москва
Всем доброго времени суток. Вот я гамлю в уо уже больше 2 лет. Прокачал крафтовые скилы.... скриптов было много, в том числе и от сюда, но..... встала необходимость постоять в шахте (не вип. у меня есть випка, и к ней отличный скрипт) и покапать.... и о ужас... нету нормального скрипта. Я сразу сюда... Тема "Добывающие скрипты" - "Миниг" - 5 или 7 скриптов.... ни один не подходит.... либо для 3-4 шахт либо для випки....... ПОИСК - результатов как ни странно не дал... Да, есть скрипты но либо с ошибками, либо нужно делать глобальные изменения......

Большая просьба выложить скрипт.... Чар стоит в шахте и копает вокруг себя на расстоянии 3 клеток. по достижении веса - скрипт останавливается.... не надо ни реколов, ни выгрузки.... Обычная простенькая копалка, думаю она будет полезна не только мне. Спасибо!


Top
   
PostPosted: 2005-05-04 07:50:18 
Offline
Expert!
User avatar

Joined: 2004-07-04 00:14:58
Posts: 1284
DIKIY wrote:
Большая просьба выложить скрипт.... Чар стоит в шахте и копает вокруг себя на расстоянии 3 клеток. по достижении веса - скрипт останавливается.... не надо ни реколов, ни выгрузки.... Обычная простенькая копалка, думаю она будет полезна не только мне. Спасибо!
ваша Дикость... не тупи.
из своего скрипта на Випку выдерни соответствующую процедуру и фсё.


Top
   
PostPosted: 2005-05-04 07:53:35 
Offline
User avatar

Joined: 2004-10-07 15:42:12
Posts: 53
Location: Москва
Sfagnum wrote:
DIKIY wrote:
Большая просьба выложить скрипт.... Чар стоит в шахте и копает вокруг себя на расстоянии 3 клеток. по достижении веса - скрипт останавливается.... не надо ни реколов, ни выгрузки.... Обычная простенькая копалка, думаю она будет полезна не только мне. Спасибо!
ваша Дикость... не тупи.
из своего скрипта на Випку выдерни соответствующую процедуру и фсё.

Сфаг.... ну я же писал... не умею я так глубоко модернезировать... я пока так и сделал но он вываливается с ошибками, т.е. нужно следить постоянно ))) Поэтому и прошу )


Top
   
 Post subject:
PostPosted: 2005-05-04 08:05:16 
Offline
Expert!
User avatar

Joined: 2004-07-04 00:14:58
Posts: 1284
Держи лентяй ;)
в копает лопатой. найдёшь... переделывай под кирку ;)
Code:
sub Dig()
var mx = UO.GetX("self"), my = UO.GetY("self"), mz = UO.GetZ("self"),TileNum='1339', t=0
var i,j,s
   tohide()
   if UO.Dead() then
      return
   end if
   if UO.ContainerOf('objTools') <> UO.GetSerial('backpack') then
      if findShovel() == 0 then
         return
      end if
   end if
   for i = -4 to 4
         for j = -4 to 4
            UO.Print("Now Mining In: "+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")
               tohide()
               CheckLag()
               UO.Waittargettile("1341", str(i), str(j), str(mz))
               UO.UseObject('objTools')
               s = 0
               while not UO.InJournal("You put") 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") and not UO.InJournal("OOPS") and not UO.InJournal("attacking you") and s < 500
                  wait(500)
                  s = s + 1
               wend               
               if UO.InJournal("but fail") then
                  wait(1000)
               end if               
            wend
            UO.DeleteJournal()
         next
      next
   return 1
end sub

Sub findShovel()
var tShovel
   UO.UseObject('backpack')
   if UO.Count('0x0F3A') > 0 then
      tShovel='0x0F3A'
   else
      tShovel='0x0F39'
   end if
   if UO.Count(tShovel) > 0 then
      UO.FindType(tShovel,'-1','backpack')
      UO.AddObject('objTools','finditem')
   else
      UO.Print('чего то лопаты нет...')
      return 0
   end if
   return 1
end sub

Sub tohide()
   while NOT UO.Hidden() and not UO.Dead()
      UO.DeleteJournal()
      UO.Warmode('0')
      UO.UseSkill('Hiding')
      repeat
         wait(50)
      until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied') or UO.Dead()         
   wend    
end sub

Sub CheckLag()
   UO.DeleteJournal()
   UO.Click('backpack')
   repeat
      wait(50)
   until UO.InJournal('backpack')
end sub


Last edited by Sfagnum on 2005-05-04 15:52:42, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2005-05-04 08:06:30 
Offline
Expert!
User avatar

Joined: 2004-07-04 00:14:58
Posts: 1284
ЗЫ. и ещё зверюга... ;)
сменил бы ты свою аватару... а то код сильно сужает...


Top
   
 Post subject:
PostPosted: 2005-05-04 08:12:22 
Offline
User avatar

Joined: 2004-10-07 15:42:12
Posts: 53
Location: Москва
Чуть позже, свою морду форумовскую выложу...


Top
   
 Post subject:
PostPosted: 2005-05-04 08:14:04 
Offline
User avatar

Joined: 2004-10-07 15:42:12
Posts: 53
Location: Москва
Sfagnum wrote:
Держи лентяй ;)
в копает лопатой. найдёшь... переделывай под кирку ;)


Спасибо, сёдня проверю.....

Большая просьба модераторов выложить этот скрипт в соответствующий раздел!


Top
   
 Post subject:
PostPosted: 2005-05-04 15:33:17 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
DIKIY wrote:
Sfagnum wrote:
Держи лентяй ;)
в копает лопатой. найдёшь... переделывай под кирку ;)


Спасибо, сёдня проверю.....

Большая просьба модераторов выложить этот скрипт в соответствующий раздел!

Только по итогам теста!

ПС: мб топик, а не раздел?

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2005-05-04 15:47:58 
Offline
User avatar

Joined: 2004-10-07 15:42:12
Posts: 53
Location: Москва
Destruction wrote:
DIKIY wrote:
Sfagnum wrote:
Держи лентяй ;)
в копает лопатой. найдёшь... переделывай под кирку ;)


Спасибо, сёдня проверю.....

Большая просьба модераторов выложить этот скрипт в соответствующий раздел!

Только по итогам теста!

ПС: мб топик, а не раздел?


Да, в топик. Скрипт нуждается в доработке.
1. Нужно добавить в переменнтые tShovel.
2. Как только чар попадает на клетку, где отсутствует руда - скрипт останавливается


Top
   
 Post subject:
PostPosted: 2005-05-04 15:51:42 
Offline
Expert!
User avatar

Joined: 2004-07-04 00:14:58
Posts: 1284
DIKIY wrote:
Да, в топик. Скрипт нуждается в доработке.
1. Нужно добавить в переменнтые tShovel.
2. Как только чар попадает на клетку, где отсутствует руда - скрипт останавливается
1 - да, согласен
2. - ты не прав. я описАлся в одно месте - ща пофиксю.

[fixed]


Top
   
 Post subject:
PostPosted: 2005-05-04 16:25:25 
Offline

Joined: 2005-04-07 11:14:58
Posts: 3
Здравствуйте уважаемые.
Очень нужен скрипт на копание в одной точке в радиусе 4 клеток по кругу и с командой приемного контейнера по айдишнику.Ветер просил дать мне такой скрипт,так как он не может зайти на форум по причине отсутствия инета.


Top
   
 Post subject:
PostPosted: 2005-05-04 17:05:11 
Offline
Expert!
User avatar

Joined: 2004-07-04 00:14:58
Posts: 1284
а что по твоему здесь выложено? :roll:


Top
   
 Post subject:
PostPosted: 2005-05-04 17:21:38 
Offline

Joined: 2005-04-07 11:14:58
Posts: 3
Sfagnum wrote:
а что по твоему здесь выложено? :roll:


Извените,а разве он выкладывает руду в сундук?


Top
   
 Post subject:
PostPosted: 2005-05-04 18:44:19 
Offline
User avatar

Joined: 2004-10-07 15:42:12
Posts: 53
Location: Москва
Сфаг, останавливается на моменте, если в клетке нет руды "There is no nothing here to mine for"..... точнее он очень долго думает, чтобы передти к следующему квадрату!


Top
   
 Post subject:
PostPosted: 2005-05-04 23:19:58 
Offline
Expert!
User avatar

Joined: 2004-07-04 00:14:58
Posts: 1284
DIKIY wrote:
Сфаг, останавливается на моменте, если в клетке нет руды "There is no nothing here to mine for"..... точнее он очень долго думает, чтобы передти к следующему квадрату!
ты уверен что правильно сообщение написал?


Top
   
 Post subject:
PostPosted: 2005-05-04 23:20:30 
Offline
Expert!
User avatar

Joined: 2004-07-04 00:14:58
Posts: 1284
Артём wrote:
Sfagnum wrote:
а что по твоему здесь выложено? :roll:
Извените,а разве он выкладывает руду в сундук?
10$ ибо нех.


Top
   
 Post subject:
PostPosted: 2005-05-05 03:39:34 
Offline
User avatar

Joined: 2004-10-07 15:42:12
Posts: 53
Location: Москва
Вот готовый проверянный мною скрипт!
Code:

;******************************************
;*** MINING From DIKIY,SAVAGE & SFAGNUM ***
;******************************************
; Чар копает киркой вокруг себя стоя в хайде на 4 клетки.
; при достижении максимального веса описанного в переменной "maxweight=XXX" - скрипт
; переходит к плавилке, плавит всю выкопанную руду по 1 штучке. Затем остановка.
; Предназначен для копки в шахте минока - для Нубов для прокачки мининга :o)
sub Dig()
var mx = UO.GetX("self"), my = UO.GetY("self"), mz = UO.GetZ("self"),TileNum='1339', t=0
var i,j,s ,maxweight=150
   tohide()
   if UO.Dead() then
      return
   end if
   if UO.ContainerOf('objTools') <> UO.GetSerial('backpack') then
      if findShovel() == 0 then
         return
      end if
   end if
   repeat
      for i = -4 to 4
         for j = -4 to 4
            UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
         
 while not UO.InJournal("no ore here") and not UO.InJournal("Try mining") and not UO.InJournal("You can't")and not uo.injournal("is nothing")and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock")
               tohide()
               CheckLag()
               UO.Waittargettile("1341", str(i), str(j), str(mz))
               UO.UseObject('objTools')
               s = 0
                  while not UO.InJournal("You put") and not UO.InJournal("Try mining") and not UO.InJournal("You can't") and not UO.InJournal("location") and not uo.injournal("is nothing") and not UO.InJournal("no ore") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in rock") and not UO.InJournal("OOPS") and not UO.InJournal("attacking you") and s < 500
                  wait(500)
                  s = s + 1
               wend   
       
               if UO.Weight>=maxweight then
smelt()

      endif
               if UO.InJournal("but fail") then
                  wait(1000)
               end if               
            wend
            UO.DeleteJournal()
         next
      next
       until false
   return 1
end sub

Sub findShovel()
var tShovel
   UO.UseObject('backpack')
   if UO.Count('0x0E85') > 0 then
      tShovel='0x0E85'
   else
      tShovel='0x0F39'
   end if
   if UO.Count(tShovel) > 0 then
      UO.FindType(tShovel,'-1','backpack')
      UO.AddObject('objTools','finditem')
   else
      UO.Print('чего то лопаты нет...')
      return 0
   end if
   return 1
end sub

Sub tohide()
   while NOT UO.Hidden() and not UO.Dead()
      UO.DeleteJournal()
      UO.Warmode('0')
      UO.UseSkill('Hiding')
      repeat
         wait(50)
      until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied') or UO.Dead()         
   wend     
end sub

Sub CheckLag()
   UO.DeleteJournal()
   UO.Click('backpack')
   repeat
      wait(50)
   until UO.InJournal('backpack')
end sub



sub smelt()
walkn(2573,475,"") ; Координаты плавилки
var ore1 = 0x19B7 #Type 1 рудинки
var ore2 = 0x19BA #Type 2 рудинок
var ore3 = 0x19B8 #Type 3 рудинок
var ore4 = 0x19B9 #Type 4 рудинок или более
var delay = 1200  #Задержка на кидание шмота из бекпака
var lasttimer
ore2:
uo.findtype(ore2)
if uo.findcount() > 0 then
UO.Drop('0',0,0,0,'finditem')
wait(delay)
goto ore2
endif
ore3:
uo.findtype(ore3)
if uo.findcount() > 0 then
UO.Drop('0',0,0,0,'finditem')
wait(delay)
goto ore3
endif
ore4:
uo.findtype(ore4)
if uo.findcount() > 0 then
UO.Drop('0',0,0,0,'finditem')
wait(delay)
goto ore4
endif
repeat
uo.findtype(ore4, "-1", "ground")
if uo.findcount() == 0 then
goto ore4_end
endif
uo.grab("1","finditem")
lasttimer = uo.timer()
repeat
wait(300)
uo.findtype(ore1)
until uo.findcount() > 0 or uo.timer()>lasttimer+500
uo.usetype(ore1)
uo.findtype(ore4, "-1", "ground")
until uo.findcount() == 0
ore4_end:
repeat
uo.findtype(ore3, "-1", "ground")
if uo.findcount() == 0 then
goto ore3_end
endif
uo.grab("1","finditem")
lasttimer = uo.timer()
repeat
wait(300)
uo.findtype(ore1)
until uo.findcount() > 0 or uo.timer()>lasttimer+500
uo.usetype(ore1)
uo.findtype(ore3, "-1", "ground")
until uo.findcount() == 0
ore3_end:
repeat
uo.findtype(ore2, "-1", "ground")
if uo.findcount() == 0 then
goto ore2_end
endif
uo.grab("1","finditem")
lasttimer = uo.timer()
repeat
wait(300)
uo.findtype(ore1)
until uo.findcount() > 0 or uo.timer()>lasttimer+500
uo.usetype(ore1)
uo.findtype(ore2, "-1", "ground")
until uo.findcount() == 0
ore2_end:
repeat
uo.findtype(ore1, "-1", "ground")
if uo.findcount() == 0 then
goto ore1_end
endif
uo.grab("1","finditem")
lasttimer = uo.timer()
repeat
wait(300)
uo.findtype(ore1)
until uo.findcount() > 0 or uo.timer()>lasttimer+500
uo.usetype(ore1)
uo.findtype(ore1, "-1", "ground")
until uo.findcount() == 0
ore1_end:
terminate()
endsub

#======================================thx to SavageV==========
# WalkN(X,Y,Serial) - char is walking by dX and dY step
#    sub using Home, End, PgUp, PgDown keys
#    d'not rebind this key from default action!
#  serial - Serial of target or "" - string
#  walkwait - delay after keypress
#  Example:
#  WalkN(2080,2113,'') - go to coordinates
#  WalkN(0,0,'0x12345678') - go to target position
#--------------------------------------------------------------
sub WalkN(x,y,Target)
 VAR i,StepSucess
 VAR dx,dy,Exit=0
 
 While Exit<>1
  If Target<>"" Then
   dx=UO.GetX(Target)-UO.GetX()
   dy=UO.GetY(Target)-UO.GetY()
   If UO.GetDistance(Target)<2 Then
   Exit=1
   Endif
  Else
   dx=x-UO.GetX()
   dy=y-UO.GetY()
   If dx==0 AND dy==0 Then
   Exit=1
   Endif

  Endif
 
  If dx<>0 AND dy<>0 Then
   If dx>0 AND dy>0 Then
   StepSucess=Go(3,40,300) ;SE - DownArrow
   Endif

   If dx>0 AND dy<0 Then
   StepSucess=Go(1,39,300) ;NE - RightArrow
   Endif

   If dx<0 AND dy>0 Then
   StepSucess=Go(5,37,300) ;SW - LeftArrow
   Endif

   If dx<0 AND dy<0 Then
   StepSucess=Go(7,38,300) ;WN - UpArrow
   Endif

  Endif
 
  If dx<>0 AND dy==0 Then
   If dx>0 Then
   StepSucess=Go(2,34,300) ;E - PgDown
   If StepSucess==-1 Then
    StepSucess=Go(3,40,300) ;SE - DownArrow
    If StepSucess==-1 Then
     StepSucess=Go(1,39,300) ;NE - RightArrow
    Endif
   Endif
   Endif
   If dx<0 Then
   StepSucess=Go(6,36,300) ;W - Home
   If StepSucess==-1 Then
    StepSucess=Go(7,38,300) ;WN - UpArrow
    If StepSucess==-1 Then
     StepSucess=Go(5,37,300) ;SW - LeftArrow
    Endif
   Endif
   Endif
  Endif
  If dx==0 AND dy<>0 Then
   If dy>0 Then
   StepSucess=Go(4,35,300) ;S - End
   If StepSucess==-1 Then
    StepSucess=Go(3,40,300) ;SE - DownArrow
    If StepSucess==-1 Then
     StepSucess=Go(5,37,300) ;SW - LeftArrow
    Endif
   Endif
   Endif
   If dy<0 Then
   StepSucess=Go(0,33,300) ;N - PgUp
   If StepSucess==-1 Then
    StepSucess=Go(7,38,300) ;WN - UpArrow
    If StepSucess==-1 Then
     StepSucess=Go(1,39,300) ;NE - RightArrow
    Endif
   Endif
   Endif
  Endif
 Wend
end sub
sub Go(dir,key,walkwait)
 VAR x,y

 x=UO.GetX()
 y=UO.GetY()

 while UO.GetDir()<>dir
  UO.Press(key)
  wait(walkwait)
  If UO.GetDir()<>dir Then
   CheckLag()
  Endif
 wend

 UO.Press(key)
 wait(walkwait)

 If x==UO.GetX() AND y==UO.GetY() Then
  CheckLag()
 Endif
 
 If x==UO.GetX() AND y==UO.GetY() Then
  return -1
 Else
  return 1
 Endif
end sub
#####################
# ОСТАНОВКА СКРИПТА #
#####################
sub terminate()
var Time
Time = Time()
UO.Print("!!Скрипт ОСТАНОВЛЕН!!")
UO.TextPrint('Скрипт ОСТАНОВЛЕН: '+Time)
uo.TextPrint('ИТОГ КОПКИ:')
uo.TextPrint('ВСЕГО РУДЫ - '+str(uo.Count('0x19B9')+uo.Count('0x19B7')+uo.Count('0x19BA'))+' шт.')
uo.TextPrint('Из неё Айрона - '+str(uo.Count('0x19B9','0x0000'))+' шт.')
uo.TextPrint('Остальная руда - '+str(uo.Count('0x19B9')+uo.Count('0x19B7')+uo.Count('0x19BA')-uo.Count('0x19B9','0x0000'))+' шт.')
UO.UseSkill("Stealth")
uo.concolor('0x002b')
wait(4000)
uo.exec("terminate all")
end sub


sub time()
var hh,mm,ss,hms,t=str(UO.Time())
if len(t)<=2 then
hh="0"
mm="0"
ss=t
endif
if len(t)==3 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-1)
endif
if len(t)==4 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-2)
endif
if len(t)==5 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-1)
ss=right(t,len(t)-3)
endif
if len(t)==6 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-2)
ss=right(t,len(t)-4)
endif
return hh+":"+mm+":"+ss
end sub


всё исправил!


Last edited by DIKIY on 2005-05-05 09:41:42, edited 4 times in total.

Top
   
 Post subject:
PostPosted: 2005-05-05 03:40:46 
Offline
User avatar

Joined: 2004-10-07 15:42:12
Posts: 53
Location: Москва
получился большой по объёму, но собственно копает вокруг себя на 4 клетки. как вес набрал - идёт плавить!


Top
   
 Post subject:
PostPosted: 2005-05-05 07:25:00 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
А ходилка нормально работает? Обходит препятсвия? :roll:


Top
   
 Post subject:
PostPosted: 2005-05-05 07:36:55 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Нормальная ходилка с обходом препятствий - я такую тут видел только одну, в архиве форума от Сергиуса. Единственная, более-менее надежно обходящая препятствия. Естественно, ее код раз в пять длиннее этого...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 27 posts ]  Go to page 1 2 Next

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited