Yoko

All sides of Injection
It is currently 2025-11-10 14:07:40

All times are UTC+02:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 2006-09-14 11:49:26 
Offline

Joined: 2006-09-14 08:55:52
Posts: 12
Location: Moscow
Прошу помощи соединить 2 скрипта

луталка по типу режем и собираем из трупа

Code:
sub Loot4() 
   VAR i,Exit 
   DIM Loot[18]
   
 
Loot[0]=0x0EED ; gp
Loot[1]=0x0F7B ; BM
Loot[2]=0x0F7A ; BP
Loot[3]=0x0F84 ; GA
Loot[4]=0x0F85 ; GI
Loot[5]=0x0F86 ; MR
Loot[6]=0x0F88 ; NS
Loot[7]=0x0F8C ; SA
Loot[8]=0x0F8D ; SS
Loot[9]=0x13FA ;two handed axe
Loot[10]=0x1413 ;arm
Loot[11]=0x1415 ;arm
Loot[12]=0x1411 ;arm
Loot[13]=0x1410 ;arm
Loot[14]=0x1414 ;arm
Loot[15]=0x0E21 ;ban
Loot[16]=0x0F78 ;batw
Loot[17]=0x0F8B ;pumise

UO.SetReceivingContainer('0x4000C313') ;ID backpacka
   uo.waittargetobject('lastcorpse')
   uo.UseType('0x0F51')
   For i=0 to 17
      Exit=0
      repeat
       UO.FindType(Loot[i],-1,'lastcontainer')           
        if UO.GetQuantity('finditem') then
         UO.Grab('0','finditem')
          wait(100)
          Else
         Exit=1
        endif
      until Exit==1 OR uo.injournal("loot")
   Next 
UO.UnSetReceivingContainer()
end sub



и прекрасная атачилка нападалка убивалка


Code:
sub att() 
#***********
#(C) Cooper
#***********
VAR monst=0x0006 #Tèï ìîíñòðà
VAR feathers=0x1bd1
VAR dagger=0x0F51
VAR backpack=0x4000C313
UO.Set('finddistance','3')
while UO.GetHP('self') < 500
UO.FindType(monst, '-1', 'ground')
if UO.FindCount() > 0 then
UO.DeleteJournal()
UO.Attack('finditem')
wait (500)
repeat
wait(700)
else
wait(100)
endif
wend
end sub




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


Top
   
 Post subject:
PostPosted: 2006-09-14 12:32:23 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Code:
sub wOOt()
while true
Loot4()
wait(1000)
att()
wend
end sub

:roll:

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


Top
   
 Post subject:
PostPosted: 2006-09-14 13:27:44 
Offline

Joined: 2006-09-14 08:55:52
Posts: 12
Location: Moscow
спасибо.
попробовал - не работает.
работает только скрипт атачилка.
а хотелось бы код луталки вставить в код атачилки и без цикла а только 1 тип чтоб лутал.
то есть чтоб вот так работало

repeat
ищем птицу
атачим
бьём
режем труп
лутаем из трупа перья
endrepeat

тогда останется только мышкой бегать от птицы к птице


Top
   
 Post subject:
PostPosted: 2006-09-14 13:31:05 
Offline

Joined: 2006-09-14 08:55:52
Posts: 12
Location: Moscow
возможно придется между

бьём
режем труп

вставить ищем последний труп?

бьём
ищем последний труп
режем труп

то есть типа взять из журнала айди последнего увиденного тела и на него применить кинжал?


Top
   
 Post subject:
PostPosted: 2006-09-14 13:35:42 
Offline

Joined: 2006-09-14 08:55:52
Posts: 12
Location: Moscow
UO.SetReceivingContainer('0x4000C313') ;ID backpacka
uo.waittargetobject('lastcorpse')
uo.UseType('0x0F51')
UO.FindType(0x1bd1,'lastcontainer')
if UO.GetQuantity('finditem') then
UO.Grab('0','finditem')
wait(100)
UO.UnSetReceivingContainer()

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


Top
   
 Post subject:
PostPosted: 2006-09-14 14:40:59 
Offline

Joined: 2006-09-14 08:55:52
Posts: 12
Location: Moscow
или вот так ?

Code:
sub att() 
#***********
#(C) Cooper
#***********
VAR monst=0x0006 #Tèï ìîíñòðà
VAR feathers=0x1bd1
VAR dagger=0x0F51
VAR backpack=0x4000C313
var baggg
var weapon='0x0F51' # òèï àòàêóþùåãî îðóæèÿ
var i

 DIM garp[3]
 
   garp[0]='0x1BD1'
   garp[1]='0x0eed'
   garp[2]='0x1BFB'
   garp[3]='0x1F3F'

UO.Set('finddistance','3')
while UO.GetHP('self') < 500
UO.FindType(monst, '-1', 'ground')
if UO.FindCount() > 0 then
UO.DeleteJournal()
UO.Attack('finditem')
for i = 0 to 3
    uo.warmode(0)
    baggg=uo.getserial('lastcorpse')
    uo.useobject(baggg)
    uo.Waittargetobject(baggg)
    wait(700)
    uo.usetype(dagger)
    wait(700)
    uo.findtype(garp[i],-1,baggg)
    if uo.findcount()>0 then
      uo.grab(-1,'finditem')
      Wait(600)
    endif
    uo.ignore('finditem')
next
  uo.IgnoreReset()
  uo.usetype(weapon)
  uo.warmode(1)
repeat
wait(700)
else
wait(100)
endif
wend
end sub


но как то не понятно работает открывает постоянно старый труп и атачит и лутает дноаременно что ли
может я где облажался в коде ? (наверняка облажался помогите плиз)


Top
   
 Post subject:
PostPosted: 2006-09-14 14:41:30 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Code:
sub att()
#NMY#
VAR monst=0x0006

UO.Set('finddistance','3')
while true
UO.FindType(monst,'-1','ground')
if UO.FindCount() then
UO.DeleteJournal()
UO.Attack('finditem')
repeat
wait(250)
until uo.injournal('body')
Loot()
endif
wait(250)
wend
end sub

sub Loot()
   VAR n
   DIM Loot[18]

Loot[0]=0x0EED ; gp
Loot[1]=0x0F7B ; BM
Loot[2]=0x0F7A ; BP
Loot[3]=0x0F84 ; GA
Loot[4]=0x0F85 ; GI
Loot[5]=0x0F86 ; MR
Loot[6]=0x0F88 ; NS
Loot[7]=0x0F8C ; SA
Loot[8]=0x0F8D ; SS
Loot[9]=0x13FA ;two handed axe
Loot[10]=0x1413 ;arm
Loot[11]=0x1415 ;arm
Loot[12]=0x1411 ;arm
Loot[13]=0x1410 ;arm
Loot[14]=0x1414 ;arm
Loot[15]=0x0E21 ;ban
Loot[16]=0x0F78 ;batw
Loot[17]=0x0F8B ;pumise

UO.UseObject('lastcorpse')
 CheckLag()
 if (uo.getserial('backpack') <> uo.getserial('lastcontainer')) then
   uo.waittargetobject('lastcorpse')
   uo.UseType('0x0F51')
   wait(200)
   checklag()
   For n=0 to 17
  UO.FindType( Loot[n] , -1 ,'lastcontainer')
 while UO.GetQuantity('finditem') > 0
  UO.Print(' !!! Looting Items: '+str(UO.findcount()))
  uo.moveitem('finditem')
  CheckLag()
  Wait(100)
  UO.FindType( Loot[n] , -1 ,'lastcontainer')
 wend
 Next
Endif
UO.Print(' !!! -= Done =- !!! ')
end sub

Sub CHECKLAG()
   del('backpack')
   uo.click('backpack')
   repeat
   wait(200)
   until uo.injournal('backpack')
   del('backpack')
endsub

Sub DEL(msg)
   while uo.injournal(msg)
   uo.setJournalLine(uo.injournal(msg)-1,"Is Empty!")
   wend
endsub


нетестил...

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


Top
   
 Post subject:
PostPosted: 2006-09-14 14:46:37 
Offline

Joined: 2006-09-14 08:55:52
Posts: 12
Location: Moscow
ну оттестить то мы быстро :)

посмотрите пожалуйста второй код перед вашим ответом


Top
   
 Post subject:
PostPosted: 2006-09-14 14:55:56 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Mr.Denchik wrote:
ну оттестить то мы быстро :)

посмотрите пожалуйста второй код перед вашим ответом

на чужые скрипты глаза ломать неахота... :shock: :roll: :)

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


Top
   
 Post subject:
PostPosted: 2006-09-14 17:02:32 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Mr.Denchik wrote:
ну оттестить то мы быстро :)

посмотрите пожалуйста второй код перед вашим ответом


Code:
sub att() 
#**********
#(C) Cooper
#***********
VAR monst=0x0006 #Tèï ìîíñòðà
VAR feathers=0x1bd1
VAR dagger=0x0F51
VAR backpack=0x4000C313
var baggg
var weapon='0x0F51' # òèï àòàêóþùåãî îðóæèÿ
var i

 DIM garp[4]
 
   garp[0]='0x1BD1'
   garp[1]='0x0eed'
   garp[2]='0x1BFB'
   garp[3]='0x1F3F'

  UO.Set('finddistance','3')
  while UO.GetHP('self') < 500
    UO.FindType(monst, '-1', 'ground')
    if UO.FindCount() > 0 then
      UO.DeleteJournal()
      UO.Attack('finditem')
      for i = 0 to 3
        uo.warmode(0)
        baggg=uo.getserial('lastcorpse')
        uo.useobject(baggg)
        uo.Waittargetobject(baggg)
        wait(700)
        uo.usetype(dagger)
        wait(700)
        uo.findtype(garp[i],-1,baggg)
        if uo.findcount()>0 then
          uo.grab(-1,'finditem')
          Wait(600)
        endif
        uo.ignore('lastcorpse')
      next
      uo.IgnoreReset()
      uo.usetype(weapon)
      uo.warmode(1)
      wait(700)
    else
      wait(100)
    endif
  wend
end sub


Вот правильный синтаксис. Что уже у тебя тут наваяно-сам смотри.


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

All times are UTC+02:00


Who is online

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