Yoko

All sides of Injection
It is currently 2024-03-28 21:56:38

All times are UTC+02:00




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 2012-12-04 13:24:51 
Offline

Joined: 2012-12-03 21:27:14
Posts: 9
Помогите сделать скрипт для копание шахты 20х20 можно увидеть на фото , хотя бы что бы он выкапывал эти клетки без всяких реколов и подобного( ЕСЛИ ЕСТЬ ВОЗМОЖНОСТЬ ЧТОБ ОН КОПАЛ ТОЛЬКО ЦВЕТ МЕТАЛ А НЕ ВЫКАПЫВАЛ ДО КОНЦА ЭТО ВООБЩЕ БУДЕТ СУПЕР )
http://s017.radikal.ru/i437/1212/00/8042e28ee921.jpg

icq 632317873

skype markmark6272

Sub mine()
var x, y, i, t, tmp, inside, goto_x, st, first
VAR ms1 = "There is nothing here to mine for"
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"
VAR ms8 = "You stop"
VAR ms9 = "That is too"
first=UO.GetX()
start:
inside=0
for y=-1 to 1
for x=-1 to 1
repeat
uo.deletejournal()
t = UO.Timer()
UO.Exec ("waittargettile "+" 1340 "+STR(UO.GEtX()+x)+" "+STR(UO.GetY()+y)+" 0")
UO.exec ("usetype 0x0E85")
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 UO.InJournal(ms9) OR ((t + 100) < UO.Timer())
until not UO.InJournal(ms8)
next
next
end sub

sub main()
var i
While UO.Life>0
for i=1 to 7
mine()
uo.press(34)
wait(500)
uo.press(34)
wait(500)
uo.press(34)
next
uo.press(33)
wait(500)
uo.press(33)
wait(500)
uo.press(33)
mine()
for i=1 to 7
uo.press(36)
wait(500)
uo.press(36)
wait(500)
uo.press(36)
next
uo.press(33)
wait(500)
uo.press(33)
wait(500)
uo.press(33)
wend
end sub

нехватает расгрузки


Top
   
PostPosted: 2012-12-04 15:24:11 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Разгрузка:
Code:
var bag = '0x4018A728'  ; сундук куда скидывать руду и откуда брать инструменты
var ore1 = '0x19B7'
var ore2 = '0x19BA'
var ore3 = '0x19B8'
var ore4 = '0x19B9'

Sub putore()
put(ore1,bag)
put(ore2,bag)
put(ore3,bag)
put(ore4,bag)
end sub

Sub PUT(item, cont)
   while UO.Count( item ) > 0
      UO.FindType( item, -1, -1 )
      UO.MoveItem( 'finditem', 0, cont )
      wait(500)
   wend
end sub

Надеюсь помог :mrgreen:


PS не забываем пользоваться тегами и правильно формулировать вопрос :!:

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2012-12-05 20:16:05 
Offline

Joined: 2012-12-03 21:27:14
Posts: 9
Mirage wrote:
Разгрузка:
Code:
var bag = '0x4018A728'  ; сундук куда скидывать руду и откуда брать инструменты
var ore1 = '0x19B7' - это то что он будет складывать?
var ore2 = '0x19BA'
var ore3 = '0x19B8'
var ore4 = '0x19B9'

Sub putore()
put(ore1,bag)
put(ore2,bag)
put(ore3,bag)
put(ore4,bag)
end sub

Sub PUT(item, cont)
   while UO.Count( item ) > 0
      UO.FindType( item, -1, -1 )
      UO.MoveItem( 'finditem', 0, cont )
      wait(500)
   wend
end sub

Надеюсь помог :mrgreen:


PS не забываем пользоваться тегами и правильно формулировать вопрос :!:

Спасибо
С сундуком я понял !
а вот те 4 айдишника(var ore1 = '0x19B7' - это то что он будет складывать?
var ore2 = '0x19BA'
var ore3 = '0x19B8'
var ore4 = '0x19B9') это какую руду он будет складывать в сундук? и ещё вопрос как он поймет что ему надо складывать именно сейчас!


Top
   
PostPosted: 2012-12-05 21:29:31 
Offline

Joined: 2012-10-30 18:07:33
Posts: 9
да эти 4 айдишника типы руды которую будет складывать в сундук ...
чтоб он понял когда выкладываться делай основную процедуру по типу такова:
Code:
##############
sub Shaxta1()#
##############
uo.exec('exec CheckingPlayers')
uo.exec('exec antimacro')
while
gotoxy(771,1690,0)
Mining()
sbros()
gotoxy(776,1690,0)
Mining()
sbros()
gotoxy(779,1686,0)
Mining()
sbros()
gotoxy(774,1686,0)
Mining()
sbros()
gotoxy(769,1686,0)
Mining()
sbros()
gotoxy(769,1681,0)
Mining()
sbros()
gotoxy(774,1681,0)
Mining()
sbros()
gotoxy(779,1681,0)
Mining()
sbros()
gotoxy(784,1681,0)
Mining()
sbros()
gotoxy(779,1676,0)
Mining()
sbros()
gotoxy(774,1676,0)
Mining()
sbros()
gotoxy(776,1671,0)
Mining()
sbros()
gotoxy(769,1676,0)
Mining()
sbros()
gotoxy(764,1676,0)
Mining()
sbros()
gotoxy(764,1681,0)
Mining()
recal()
razgruz()  <--- в этом месте выкладка
wend
end sub

т.е ходит по координатам копает, последнюю координату делаешь рядом с банком и после обкобки идет выкладка.


Top
   
PostPosted: 2012-12-05 23:22:15 
Offline

Joined: 2012-12-03 21:27:14
Posts: 9
Sideus wrote:
да эти 4 айдишника типы руды которую будет складывать в сундук ...
чтоб он понял когда выкладываться делай основную процедуру по типу такова:
Code:
##############
sub Shaxta1()#
##############
uo.exec('exec CheckingPlayers')
uo.exec('exec antimacro')
while
gotoxy(771,1690,0)
Mining()
sbros()
gotoxy(776,1690,0)
Mining()
sbros()
gotoxy(779,1686,0)
Mining()
sbros()
gotoxy(774,1686,0)
Mining()
sbros()
gotoxy(769,1686,0)
Mining()
sbros()
gotoxy(769,1681,0)
Mining()
sbros()
gotoxy(774,1681,0)
Mining()
sbros()
gotoxy(779,1681,0)
Mining()
sbros()
gotoxy(784,1681,0)
Mining()
sbros()
gotoxy(779,1676,0)
Mining()
sbros()
gotoxy(774,1676,0)
Mining()
sbros()
gotoxy(776,1671,0)
Mining()
sbros()
gotoxy(769,1676,0)
Mining()
sbros()
gotoxy(764,1676,0)
Mining()
sbros()
gotoxy(764,1681,0)
Mining()
recal()
razgruz()  <--- в этом месте выкладка
wend
end sub

т.е ходит по координатам копает, последнюю координату делаешь рядом с банком и после обкобки идет выкладка.

спасибо завтра попробую добавить все это к тому что у меня было и сделать выкладку
Кстате немного изменили шахту вот 2ой скрин http://s018.radikal.ru/i524/1212/1f/9b6a819cbac6.gif вот новый скрин чутка извменили


Top
   
PostPosted: 2012-12-06 02:16:29 
Offline

Joined: 2012-10-30 18:07:33
Posts: 9
n1h1 wrote:
спасибо завтра попробую добавить все это к тому что у меня было и сделать выкладку
Кстате немного изменили шахту вот 2ой скрин http://s018.radikal.ru/i524/1212/1f/9b6a819cbac6.gif вот новый скрин чутка извменили

тока не к тому что было прикручивай, возьми этот скрипт за основу, подставь свои координаты, добавь ходилку и процедуры сброса шлаковой руды и выкладку в банк )
или можешь взять за основу этот скрипт, я с него под арбуз переделал себе ...
Code:
sub Na4alokopki()
while gotoxy(3669,2175,0)
Mining()
GoToHome()
GoToMine()
gotoxy(3665,2175,0)
Mining()
GoToHome()
GoToMine()
gotoxy(3661,2175,0)
Mining()
GoToHome()
GoToMine()
gotoxy(3657,2175,0)
Mining()
GoToHome()
GoToMine()
gotoxy(3653,2175,0)
Mining()
GoToHome()
GoToMine()
gotoxy(3649,2175,0)
Mining()
GoToHome()
GoToMine()
gotoxy(3645,2175,0)
Mining()
GoToHome()
GoToMine()
gotoxy(3641,2175,0)
Mining()
GoToHome()
GoToMine()
wend
end sub

sub GoToHome()
gotoxy(3662,2175,0)
gotoxy(3662,2193,0)
gotoxy(3655,2193,0)
gotoxy(3655,2207,0)
gotoxy(3637,2207,0)
gotoxy(3637,2207,0)
gotoxy(3637,2211,0)
loot()
end sub

sub GoToMine()
gotoxy(3637,2209,0)
gotoxy(3655,2207,0)
gotoxy(3655,2193,0)
gotoxy(3662,2193,0)
gotoxy(3662,2175,0)
gotoxy(3669,2175,0)
end sub


sub Mining()
     var x,y,z, n
     VAR LastTimer
  UO.Set('finddistance','2')
    n=0
    z=UO.GetZ("self")
       for x=-2 to 2
       for y=-2 to 2
      UO.Print(str(x)+" "+str(y))
           Repeat
              if UO.InJournal('TORMOZ') then
                pause()
              endif
              UO.DeleteJournal()             
              UO.Warmode("0")
              UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+Y),str(z))
              UO.UseType('0x0E85')
              LastTimer=UO.Timer()
              Repeat
                 wait(500)
              Until UO.InJournal("You put") or UO.InJournal("can't see") or UO.InJournal("heavy") or UO.InJournal("stop") or UO.InJournal("location") or UO.InJournal("no ore") or UO.InJournal("but fail") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("must wait") or UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("where it") OR UO.Timer()>LastTimer+200
              if UO.InJournal("You put") then
                  n=0
              else
                 n=n+1
              endif
           Until UO.InJournal("nothing") or UO.InJournal("elsewhere") or UO.InJournal("no ore here") or UO.InJournal("location") or UO.InJournal("far away") or UO.InJournal("in rock") or UO.InJournal("where it") or n>=5
        next
     next
end sub

sub loot()    ;
begin:
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x400115BA' ; 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()
end sub



sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if
ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>100 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if
if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub


Top
   
PostPosted: 2012-12-06 23:26:41 
Offline

Joined: 2012-12-03 21:27:14
Posts: 9
Сегодня сделал так чтобы он останавливался и давал звук, буду дальше делать..
Code:
Sub mine()
var x, y, i, t, tmp, inside, goto_x, st, first
VAR ms1 = "There is nothing here to mine for"
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"
VAR ms8 = "You stop"
VAR ms9 = "That is too"
first=UO.GetX()
start:
inside=0
for y=-1 to 1
for x=-1 to 1
repeat
uo.deletejournal()
t = UO.Timer()
UO.Exec ("waittargettile "+" 1340 "+STR(UO.GEtX()+x)+" "+STR(UO.GetY()+y)+" 0")
UO.exec ("usetype 0x0E85")
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 UO.InJournal(ms9) OR ((t + 100) < UO.Timer())
until not UO.InJournal(ms8)
next
next
if uo.injournal("heavy") or uo.dead() then
pwavw()                   
Pause()
endif
end sub

sub main()
var i
While UO.Life>0
for i=1 to 9
mine()
uo.press(34)
wait(500)
uo.press(34)
wait(500)
uo.press(34)
next
uo.press(33)
wait(500)
uo.press(33)
wait(500)
uo.press(33)
mine()
for i=1 to 9
uo.press(36)
wait(500)
uo.press(36)
wait(500)
uo.press(36)
next
uo.press(33)
wait(500)
uo.press(33)
wait(500)
uo.press(33)
wend
end sub

sub pwavw();
uo.playwav("C:\Zvuk.wav")
endsub

sub Pause() ;
UO.DeleteJournal()
REPEAT
WAIT(3000)
UO.Print("!!!СКРИПТ НА ПАУЗЕ!!!!")
UNTIL UO.InJournal('GO')
UO.Print("!!!СКРИПТ ПРОДОЛЖЕН!!!!")
endif
end sub

Изучаем правила постинга скриптов и не игнорируем их © Mirage


Top
   
PostPosted: 2012-12-07 20:23:59 
Offline

Joined: 2012-12-03 21:27:14
Posts: 9
теперь стоит вопрос как сделать так чтоб он выкидывал не нужную руду из пака


Top
   
PostPosted: 2012-12-08 10:00:33 
Offline

Joined: 2011-05-23 00:33:30
Posts: 949
Куда выкидывал?

_________________
CodeSweeper


Top
   
PostPosted: 2012-12-09 11:44:51 
Offline

Joined: 2012-12-03 21:27:14
Posts: 9
Incorrect User wrote:
Куда выкидывал?

на землю руду чтоб небыло перевеса каждые 5 минут!
ещё с толкнулся с такой проблемой очень частые краши уже все перепробывал всеровно крашит"


Top
   
PostPosted: 2012-12-09 20:54:50 
Offline

Joined: 2011-05-23 00:33:30
Posts: 949
Попробуй, укажи цвета нужных руд, будет выкидывать кучи только по 4 и более ингов. Скрипт не проверял.
Code:
sub Trash()
  var i, x = uo.getx(), y = uo.gety(), z = uo.getz()
  dim OreColor[10]
  OreColor[0] = 0x0000
  OreColor[1] = 0x0000
  OreColor[2] = 0x0000
  OreColor[3] = 0x0000
  OreColor[4] = 0x0000
  OreColor[5] = 0x0000
  OreColor[6] = 0x0000
  OreColor[7] = 0x0000
  OreColor[8] = 0x0000
  OreColor[9] = 0x0000
  for i = 0 to 9
    uo.findtype(0x19B9, OreColor[i], 'backpack')
    if uo.findcount() then
      uo.moveitem('finditem', 0, 'ground', x y z)
      wait(500)
      uo.ignore('finditem')
    else
      wait(100)
    endif
  next
end sub

_________________
CodeSweeper


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 11 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