Yoko

All sides of Injection
It is currently 2025-11-23 02:54:35

All times are UTC+02:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 2010-02-11 15:08:38 
Offline
User avatar

Joined: 2009-03-06 21:52:25
Posts: 89
Это скрипт на стрижку овец - он был сделал для Антараса, а я играю на Abyss переделал его вроде правельно но всёравно он не хочет работать после того как он срезает шерсть с овечек, после этого больше нечего не происходит... Заранее спасибо!

Code:
sub Skinning()
var pile='0x0DF8'
var leather='0x0DF8'
var cotton='0x0DF8'
var k
uo.Set('finddistance','15')
#Scripts Writer#Antares#
#02/08/07#
DIM sheep[2]

sheep[0]=0x00CF
sheep[1]=0x00DF

  while uo.Weight < 420
   
    uo.FindType(sheep[0],'-1','ground')     
    if uo.FindCount() then
      WalkN(uo.GetX('finditem'),uo.GetY('finditem'),uo.GetSerial('finditem'))
      k=0
      if uo.GetDistance('finditem') <= 2 then
        uo.Click('finditem')
        wait(100)
        repeat
          wait(100)
          k=k+1
        until uo.InJournal('a sheep') || k>50
        uo.WaitTargetObject('finditem')
        uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
        wait(500)
        if uo.InJournal('You put') then
          uo.Print('You get a pile of wool. There are '+STR(uo.Count(pile))+ ' piles of wool.')
        end if         
        k=0
        uo.DeleteJournal()
        uo.Click('finditem')
        wait(100)
        repeat
          wait(100)
          k=k+1
        until uo.InJournal('a lamb') || k>50 || uo.InJournal('You must wait for the wool')       
      end if
    else
      uo.Print('There are no sheep. Start to kill lambs.')
      uo.FindType(sheep[1],'-1','ground')
      if uo.FindCount() then
        WalkN(uo.GetX('finditem'),uo.GetY('finditem'),uo.GetSerial('finditem'))
        k=0
        uo.DeleteJournal()
        if uo.GetDistance('finditem') <= 1 then
          uo.Click('finditem')
          wait(100)
          repeat
            wait(100)
            k=k+1
          until uo.InJournal('a lamb') || k>50
          if k<50 then
            uo.WarMode(true)
            uo.Attack('finditem')
            uo.DeleteJournal()
            k=0
            wait(100)
            repeat
              wait(100)
              k=k+1
            until uo.InJournal('Body of lamb') || k>100
            if uo.InJournal('Body of lamb') && k<100 then
              uo.usetype('0x13F6')
              uo.WarMode(false)
              uo.WaitTargetObject('lastcorpse')
              uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
              uo.DeleteJournal()
              k=0
              wait(100)   
              repeat
                wait(100)
                k=k+1
              until uo.InJournal('You carve') || k>50
              uo.Click('lastcorpse')
              wait(250)
              if uo.InJournal('0 items') || uo.InJournal('1 items') then
                if uo.InJournal('1 items') then
                  wait(500)
                  uo.FindType(leather,'-1','lastcorpse')
                  if uo.FindCount() then
                    uo.moveitem('finditem')
                    wait(500)
                    uo.Print('There are '+STR(uo.Count(leather))+' leather in a backpack.')
                  end if
                else
                  uo.FindType(cotton,'-1','lastcorpse')
                  if uo.FindCount() then
                    uo.moveitem('finditem')
                    wait(500)
                    uo.Print('There are '+STR(uo.Count(cotton))+' cotton in a backpack.')
                  end if
                end if
              end if
            else
              uo.Print('There are no body. 0_0')
            end if
          end if
        end if
      end if
    end if
    wait(1000)
  wend
 
end sub


Top
   
PostPosted: 2010-02-11 15:29:25 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
На Арбузе стриженная овца называется "a lamb"?

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


Top
   
PostPosted: 2010-02-11 15:42:34 
Offline
User avatar

Joined: 2009-03-06 21:52:25
Posts: 89
Mirage wrote:
На Арбузе стриженная овца называется "a lamb"?

Да, шас сделал вот так заработало теперь убивает их, но не режит труп. Незнаю в чём дело опять.
Quote:
Когда овца умирает труп называеться "Body of lamb" в нём 0 итемов.


Code:
sub Skinning()
var pile='0x0DF8'
var leather='0x0DF8'
var cotton='0x0DF8'
var k
uo.Set('finddistance','15')
#Scripts Writer#Antares#
#02/08/07#
DIM sheep[2]

sheep[0]=0x00CF
sheep[1]=0x00DF

  while uo.Weight < 620
   
    uo.FindType(sheep[0],'-1','ground')     
    if uo.FindCount() then
      WalkN(uo.GetX('finditem'),uo.GetY('finditem'),uo.GetSerial('finditem'))
      k=0
      if uo.GetDistance('finditem') <= 2 then
        uo.Click('finditem')
        wait(100)
        repeat
          wait(100)
          k=k+1
        until uo.InJournal('a sheep') || k>50
        uo.WaitTargetObject('finditem')
        uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
        wait(500)
        if uo.InJournal('You put') then
          uo.Print('You get a pile of wool. There are '+STR(uo.Count(pile))+ ' piles of wool.')
        end if         
        k=0
        uo.DeleteJournal()
        uo.Click('finditem')
        wait(100)
        repeat
          wait(100)
          k=k+1
        until uo.InJournal('a lamb') || k>50       
      end if
    else
      uo.Print('There are no sheep. Start to kill lambs.')
      uo.FindType(sheep[1],'-1','ground')
      if uo.FindCount() then
        WalkN(uo.GetX('finditem'),uo.GetY('finditem'),uo.GetSerial('finditem'))
        k=0
        uo.DeleteJournal()
        if uo.GetDistance('finditem') <= 1 then
          uo.Click('finditem')
          wait(100)
          repeat
            wait(100)
            k=k+1
          until uo.InJournal('a lamb') || k>50
          if k<50 then
            uo.WarMode(true)
            uo.Attack('finditem')
            uo.DeleteJournal()
            k=0
            wait(100)
            repeat
              wait(100)
              k=k+1
            until uo.InJournal('Body of lamb') || k>100
            if uo.InJournal('Body of lamb') && k<100 then
              uo.WarMode(false)
              uo.WaitTargetObject('lastcorpse')
              uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
              uo.DeleteJournal()
              k=0
              wait(100)   
              repeat
                wait(100)
                k=k+1
              until uo.InJournal('You carve') || k>50
              uo.Click('lastcorpse')
              wait(250)
              if uo.InJournal('1 items') || uo.InJournal('1 items') then
                if uo.InJournal('1 items') then
                  wait(500)
                  uo.FindType(leather,'-1','lastcorpse')
                  if uo.FindCount() then
                    uo.moveitem('finditem')
                    wait(500)
                    uo.Print('There are '+STR(uo.Count(leather))+' leather in a backpack.')
                  end if
                else
                  uo.FindType(cotton,'-1','lastcorpse')
                  if uo.FindCount() then
                    uo.moveitem('finditem')
                    wait(500)
                    uo.Print('There are '+STR(uo.Count(cotton))+' cotton in a backpack.')
                  end if
                end if
              end if
            else
              uo.Print('There are no body. 0_0')
            end if
          end if
        end if
      end if
    end if
    wait(1000)
  wend
 
end sub


Top
   
PostPosted: 2010-02-11 15:50:07 
Offline
User avatar

Joined: 2009-03-06 21:52:25
Posts: 89
Заработало! :D


Top
   
PostPosted: 2010-02-11 16:06:42 
Offline
User avatar

Joined: 2009-03-06 21:52:25
Posts: 89
Чё то всёравно он как то глючит 1 раз получилось шас опять тупит!


Top
   
PostPosted: 2010-02-12 00:16:10 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
              uo.Click('lastcorpse')
              wait(1000)
              if uo.InJournal('0 items') || uo.InJournal('1 items') then


Top
   
PostPosted: 2010-02-15 22:12:55 
Offline
User avatar

Joined: 2009-03-06 21:52:25
Posts: 89
Прикол в том что он когда срезает с неё кожу, после этого нечего не происходит, докучи шас и не разрезает их... Вобще в шоке, в первой такое дело что со скриптом - сам немогу разобраться! :)


Top
   
PostPosted: 2010-02-16 10:34:50 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
треть скрипта можо вообще выкинуть. Зачем кликать на труп чтобы определить количество итемов если можно просто порезать и полутать? И будет меньше глюков.

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


Top
   
PostPosted: 2010-02-16 12:37:29 
Offline
User avatar

Joined: 2009-03-06 21:52:25
Posts: 89
Mirage wrote:
треть скрипта можо вообще выкинуть. Зачем кликать на труп чтобы определить количество итемов если можно просто порезать и полутать? И будет меньше глюков.

Да я уже всё перепробовал, незнаю вон Автор скрипта отписался может чем и поможет. Я ешё сылаюсь на ту штелу что у меня инжа глючит - в том плане что когда делаеш на животное ,info он не с 1 раза определяет его ID,Type и т.д какбы первый раз тыркаеш он пишет всё по 0x0000, а второй раз уже нормально возможно что это из-за этого ? Какбы Grin - dll делал спецально для Абиса... Или это мало веролятно что из-за этой хрени ?


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

All times are UTC+02:00


Who is online

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