Yoko

All sides of Injection
It is currently 2025-12-03 05:44:28

All times are UTC+02:00




Post new topic  Reply to topic  [ 31 posts ]  Go to page 1 2 Next
Author Message
PostPosted: 2006-11-22 16:20:45 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
такая тема:

данный скрипт работает нормально
что он делает:

открывает банк(он в виде обычного сундука), берет всю руду, перекидывает в банк, в сумку,
но когда предел банка достигается, скрипт пытается пихнуть руду в банк, но она падает в бакпак и на этом зацикливается

ЦЕЛЬ:
*допустим что контрейнер банка уже открыт

итак: берет руду, открывает сумочку в банке, и перетаскивает руду НА руду(которая там предварительно лежит), таким образом руда запихивается...

Code:
sub DropOre() 
var o,exit
dim Ore[14]
Ore[0]=0x19B9
Ore[1]=0x19B7
Ore[2]=0x19BA
Ore[3]=0x19B8
Ore[4]=0x0F11
Ore[5]=0x0F16
Ore[6]=0x0F18
Ore[7]=0x0F15
Ore[8]=0x0F10
Ore[9]=0x0F0F
Ore[10]=0x0F26
Ore[11]=0x1F4C
Ore[12]=0x0EED
Ore[13]=0x0F20
 
if uo.Waiting() then
uo.CancelTarget()
end if
uo.useobject('0x4001CCB1')
wait(500)
for o=0 to 13
exit=0
repeat
uo.FindType(Ore[o])
if uo.GetQuantity('finditem')>0 then
uo.moveitem('finditem', -1 ,'id_сумочки_в_банке')
wait(500)
else
exit=1
end if
until exit==1
next

end sub


Top
   
 Post subject:
PostPosted: 2006-11-22 16:27:56 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
на руду? а смысл? в стопку она от эжтого не сложистя - просто будет 2 предмета друг на друга..
афтар перефразируй что ты хочешь

_________________
"плагины" для инжекта


Top
   
 Post subject:
PostPosted: 2006-11-22 16:31:38 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
нет, у меня стопку ложится :o :)
я немного подумав, понял, есл использовать moveitem то придется каждый раз получать ID каждой стопки руды
ноя не знаю как это сделать


Top
   
 Post subject:
PostPosted: 2006-11-22 16:34:55 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
объясните мне что он хочет?:(

_________________
"плагины" для инжекта


Top
   
 Post subject:
PostPosted: 2006-11-22 16:41:04 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
прдеставь что я -скрипт :D :D :D :)

1открыл банк
2открыл в банке сумочку
3 нашел там руду
4получаю ИД руды, лежащей в сумочке
5 uo.moveitem руды, лежащей в бепаке НАА РУДУ Лежащую в сумоче банка, делается это по полученному ранее ИД

понятно? :roll:

короче говоря моя проблема в том что емкость БАНКА ОГРАНИЧЕНА
А
если положить стопку НА стопку то она положится..,такой финт работает и с рудой


Top
   
 Post subject:
PostPosted: 2006-11-22 16:52:02 
Offline
User avatar

Joined: 2005-07-10 21:53:05
Posts: 457
примерно так
Code:
sub DropOre(bank)
   dim ore[4]
   var ores
   ore[0]=0x19B7 ; 1 ore
   ore[1]=0x19BA ; 2 ore
   ore[2]=0x19B8 ; 3 ore
   ore[3]=0x19B9 ; 4 and more ore

   for var i = 0 to i > 4
      while UO.Count(ore[i])
         ores = UO.GetSerial('^' + ore[i])
         UO.FindType(ore[3], UO.GetColor(ores), bank)
         if UO.FindCount() then
            UO.MoveItem(ores, 0, 'finditem')
         else
            UO.MoveItem(ores, 0, bank)
         endif
      wend
   next
end sub


Last edited by omi4 on 2006-11-22 17:52:26, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2006-11-22 16:55:45 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
пишет Invalid Number of Arguments(послденяя строчка)

и Variable Undefied- Ores
все строчки где есть Ores

чорьте- я в инже мало разбираююсь :(


Top
   
 Post subject:
PostPosted: 2006-11-22 17:00:06 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
ищет руду в паке и перемещает на такой же тип руды в банке
Code:
[code]var sunduk='0x4001CCB1' #сумка в банке

Dim Ore[14]
Ore[0]=0x19B9
Ore[1]=0x19B7
Ore[2]=0x19BA
Ore[3]=0x19B8
Ore[4]=0x0F11
Ore[5]=0x0F16
Ore[6]=0x0F18
Ore[7]=0x0F15
Ore[8]=0x0F10
Ore[9]=0x0F0F
Ore[10]=0x0F26
Ore[11]=0x1F4C
Ore[12]=0x0EED
Ore[13]=0x0F20

sub DropOre()
#############
var i
uo.useobject(sunduk)
checklag()
for i=0 to 13
repeat
uo.FindType(Ore[i],-1,2)
if uo.findcount() then
uo.moveitem('finditem',0,sunduk,itemxyz(i))
wait(500)
end if
until uo.findcount()==0 or uo.dead()
next
uo.print('unloaded')
end sub

sub itemxyz(i)
var xyz='0,0,0'
uo.findtype(Ore[i],-1,sunduk)
if uo.findcount() then
xyz=str(uo.getx('finditem'))+','+str(uo.gety('finditem'))+','+str(uo.getz('finditem'))
end if
return xyz
end sub[/code]

ну че-та типа этого..
не забудь открыть банк перед запуском

_________________
"плагины" для инжекта


Last edited by Mihail on 2006-11-22 18:02:45, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2006-11-22 17:05:42 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
Variable Undefied- FINDITEM
вот здес вот
xyz=str(uo.getx(finditem))+','+str(uo.gety(finditem))+','+str(uo.getz(finditem))


Top
   
 Post subject:
PostPosted: 2006-11-22 17:34:16 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Кавычки поставь, это не переменная, а объект.


Top
   
 Post subject:
PostPosted: 2006-11-22 17:56:27 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
нет(((
он зацикливается

и вот что получеатся
Image


Top
   
 Post subject:
PostPosted: 2006-11-22 18:02:10 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
Code:
var sunduk='0x4001CCB1' #сумка в банке

Dim Ore[14]
Ore[0]=0x19B9
Ore[1]=0x19B7
Ore[2]=0x19BA
Ore[3]=0x19B8
Ore[4]=0x0F11
Ore[5]=0x0F16
Ore[6]=0x0F18
Ore[7]=0x0F15
Ore[8]=0x0F10
Ore[9]=0x0F0F
Ore[10]=0x0F26
Ore[11]=0x1F4C
Ore[12]=0x0EED
Ore[13]=0x0F20

sub DropOre()
#############
var i
uo.useobject(sunduk)
checklag()
for i=0 to 13
repeat
uo.FindType(Ore[i],-1,2)
if uo.findcount() then
uo.moveitem('finditem',0,sunduk,itemxyz(i))
wait(500)
end if
until uo.findcount()==0 or uo.dead()
next
uo.print('unloaded')
end sub

sub itemxyz(i)
var xyz='0,0,0'
uo.findtype(Ore[i],-1,sunduk)
if uo.findcount() then
xyz=str(uo.getx('finditem'))+','+str(uo.gety('finditem'))+','+str(uo.getz('finditem'))
end if
return xyz
end sub

там случайно sunduk в кавычках стоял :oops:

_________________
"плагины" для инжекта


Top
   
 Post subject:
PostPosted: 2006-11-22 18:10:50 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
я прально понимаю что надо переменную сундука и масси в пихнутьв тело скрипта DropOre?
ато иначе пишет Unhandled Exception in parser
далее

checklag- funckion not fuond (удалил строку)

sunduk- Variable Undefied (посадил в кавычки)
ore- Variable Undefied(посадил в кавычки)

теперь тоже самое- также циклится


Top
   
 Post subject:
PostPosted: 2006-11-22 18:15:35 
Offline
User avatar

Joined: 2005-07-10 21:53:05
Posts: 457
Для того чтобы стековать итемы, нужно не кидать по координатам, а кидать в стопку как в контейнер. При этом не забываем про цвет руды… А так кидать можно вечно.


Top
   
 Post subject:
PostPosted: 2006-11-22 18:41:25 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
098 wrote:
checklag- funckion not fuond (удалил строку)

см. прилепленный топ "полезности"
Quote:
sunduk- Variable Undefied (посадил в кавычки)
ore- Variable Undefied(посадил в кавычки)

молодец теперь он ищет предмет с ID=sunduk...


p.s.
Quote:
5 uo.moveitem руды, лежащей в бепаке НАА РУДУ Лежащую в сумоче банка

вот я и спрашивал что значит "НА" руду.. тут не "на" а "в" надо..

p.p.s. кидание в руду лень писать - но используй в скрипте UO.SetReceivingCounatner('ID кучки руды')

_________________
"плагины" для инжекта


Top
   
 Post subject:
PostPosted: 2006-11-22 20:32:05 
Offline
User avatar

Joined: 2005-07-10 21:53:05
Posts: 457
Все что нужно уже написал, разобратся в 15 строках с учебником не проблема


Top
   
 Post subject:
PostPosted: 2006-11-22 22:35:59 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
ладно афтар, сеня я добрый, на:
Code:
var sunduk='0x40001AB7' #сумка в банке 


sub DropOre()
#############
var i, j
Dim Ore[14]
Ore[0]='0x19B9'
Ore[1]='0x19B7'
Ore[2]='0x19BA'
Ore[3]='0x19B8'
Ore[4]='0x0F11'
Ore[5]='0x0F16'
Ore[6]='0x0F18'
Ore[7]='0x0F15'
Ore[8]='0x0F10'
Ore[9]='0x0F0F'
Ore[10]='0x0F26'
Ore[11]='0x1F4C'
Ore[12]='0x0EED'
Ore[13]='0x0F20'
uo.useobject(sunduk)
checklag()
for i=0 to 13
repeat
uo.FindType(Ore[i],-1,2)
if uo.findcount() then
j=uo.getserial('finditem')
uo.setreceivingcontainer(item(uo.getgraphic('finditem'),uo.getcolor('finditem')))
uo.grab('0',j)
wait(500)
uo.ignore('finditem')
end if
until uo.findcount()==0 or uo.dead()
next
uo.ignorereset()
uo.print('unloaded')
end sub

sub item(type,color)
uo.findtype(type,color,sunduk)
if uo.findcount() then
return uo.getserial('finditem')
else
return 'backpack'
end if
end sub

_________________
"плагины" для инжекта


Top
   
 Post subject:
PostPosted: 2006-11-23 10:02:43 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
теперь руда куда пропадает на 10 секунд и опять ложится в бэкпак


Top
   
 Post subject:
PostPosted: 2006-11-23 13:32:10 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
аа вы уже разобрались :roll:

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-11-23 13:41:14 
Offline

Joined: 2006-02-01 20:19:03
Posts: 125
НЕТ
МЫ НЕ РАЗОБРАЛИСЬ ЕЩЕ!
ПЛИЗ ПОМОГИ


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 31 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:  
Powered by phpBB® Forum Software © phpBB Limited