Yoko

All sides of Injection
It is currently 2024-04-18 14:59:26

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2012-04-10 23:34:19 
Offline

Joined: 2012-03-13 15:09:30
Posts: 48
Есть скрипт лесоруба он подошел и к майнеру, вот только проблема получилась у меня с выгрузкой руды, логи выгружает четко.
Исходный
Code:
var Chest='0x400026BE'
var ResChest='0x400026BE'

sub Drop()
uo.useobject(Chest)
wait(1000)
uo.useobject(ResChest)
uo.findtype('0x1BDD',-1,'backpack')
repeat
   if uo.findcount() then
      uo.MoveItem('finditem','0',Chest)
   endif
   wait(800)
   uo.findtype('0x1BDD',-1,'backpack')
until uo.findcount()==0
wait(1000)
   endif
endif
end sub

(1 вариант) выгружает все предметы из сумки включая ключи и рунбуки, .... .
Code:
var Chest='0x400026BE'
var ResChest='0x400026BE'

sub Drop()
uo.useobject(Chest)
wait(1000)
uo.useobject(ResChest)
uo.findtype((('0x19B7')+('0x19B8')+('0x19B9')+('0x19BA')),-1,'backpack')
repeat
   if uo.findcount() then
      uo.MoveItem('finditem','0',Chest)
   endif
wait(1000)
   uo.findtype((('0x19B7')+('0x19B8')+('0x19B9')+('0x19BA')),-1,'backpack')
until uo.findcount()==0
   endif
endif
end sub

(2 вариант) выгружает руду но как то не правильно 0,1,0,0,3,2,0,0...,
Code:
var Chest='0x400026BE'
var ResChest='0x400026BE'

sub Drop()
uo.useobject(Chest)
wait(1000)
uo.useobject(ResChest)
uo.findtype('0x19B7',-1,'backpack')
repeat
   if uo.findcount() then
      uo.MoveItem('finditem','0',Chest)
   endif
wait(1000)
uo.findtype('0x19B8',-1,'backpack')
repeat
   if uo.findcount() then
      uo.MoveItem('finditem','0',Chest)
   endif
wait(1000)
uo.findtype('0x19B9',-1,'backpack')
repeat
   if uo.findcount() then
      uo.MoveItem('finditem','0',Chest)
   endif
wait(1000)
uo.findtype('0x19BA',-1,'backpack')
repeat
   if uo.findcount() then
      uo.MoveItem('finditem','0',Chest)
   endif
wait(1000)
   uo.findtype('0x19B7',-1,'backpack')
until uo.findcount()==0
   endif
uo.findtype('0x19B8',-1,'backpack')
until uo.findcount()==0
   endif
uo.findtype('0x19B9',-1,'backpack')
until uo.findcount()==0
   endif
until uo.findcount()==0
uo.findtype('0x19BA',-1,'backpack')
   endif
endif
end sub

как исходный вариант поправить чтобы выгружал руду как 1,2,3,4,5,6,7...


Top
   
PostPosted: 2012-04-11 07:35:46 
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 main()
repeat
walker(1874, 267, 0)
UO.UseObject(bag)
wait(1000)
putore()    ; скидываем руду
getinstr()  ; добираем инструменты
walker(1916, 281, 0)
Mine()
walker(1874, 267, 0)
until UO.Dead()
end sub

Sub putore()
put(ore1,bag)
put(ore2,bag)
put(ore3,bag)
put(ore4,bag)
end sub
Sub getinstr()
get(instr, bag, 3, 1)
get(instr, bag, 3, 1)
get(instr, bag, 3, 1)
endsub

Sub GET(item, cont, min, max)
   If UO.Count( item ) < min Then
      UO.FindType( item, '-1', cont )
      if UO.FindCount() > 0 Then
         uo.moveitem('finditem', max, 'backpack')
         checklag()
      else
         UO.CancelMenu()
         return
      endif
   Endif
end sub
Sub PUT(item, cont)
   while UO.Count( item ) > 0
      UO.FindType( item, -1, -1 )
      UO.MoveItem( 'finditem', 0, cont )
      checklag()
   wend
end sub

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


Top
   
PostPosted: 2012-04-11 14:19:16 
Offline

Joined: 2012-03-13 15:09:30
Posts: 48
Твой скрипт норм, просто у меня не получиться вставить в общей скрипт, мне знаний не хватит :?
а можно ли как то изменить именно эту строчку скрипта, чтобы выгружал не все из сумки а только руду?
Code:
uo.findtype((('0x19B7')+('0x19B8')+('0x19B9')+('0x19BA')),-1,'backpack')


Top
   
PostPosted: 2012-04-11 15:46:58 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Не уверен что такое сработает.

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


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

All times are UTC+02:00


Who is online

Users browsing this forum: Google [Bot] and 15 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