Page 1 of 1

Не пойму в чём дело?!

Posted: 2010-02-11 15:08:38
by kostjan
Это скрипт на стрижку овец - он был сделал для Антараса, а я играю на Abyss переделал его вроде правельно но всёравно он не хочет работать после того как он срезает шерсть с овечек, после этого больше нечего не происходит... Заранее спасибо!

Code: Select all

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

Re: Не пойму в чём дело?!

Posted: 2010-02-11 15:29:25
by Mirage
На Арбузе стриженная овца называется "a lamb"?

Re: Не пойму в чём дело?!

Posted: 2010-02-11 15:42:34
by kostjan
Mirage wrote:На Арбузе стриженная овца называется "a lamb"?

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


Code: Select all

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

Re: Не пойму в чём дело?!

Posted: 2010-02-11 15:50:07
by kostjan
Заработало! :D

Re: Не пойму в чём дело?!

Posted: 2010-02-11 16:06:42
by kostjan
Чё то всёравно он как то глючит 1 раз получилось шас опять тупит!

Re: Не пойму в чём дело?!

Posted: 2010-02-12 00:16:10
by Scripts Writer

Code: Select all

              uo.Click('lastcorpse')
              wait(1000)
              if uo.InJournal('0 items') || uo.InJournal('1 items') then

Re: Не пойму в чём дело?!

Posted: 2010-02-15 22:12:55
by kostjan
Прикол в том что он когда срезает с неё кожу, после этого нечего не происходит, докучи шас и не разрезает их... Вобще в шоке, в первой такое дело что со скриптом - сам немогу разобраться! :)

Re: Не пойму в чём дело?!

Posted: 2010-02-16 10:34:50
by Mirage
треть скрипта можо вообще выкинуть. Зачем кликать на труп чтобы определить количество итемов если можно просто порезать и полутать? И будет меньше глюков.

Re: Не пойму в чём дело?!

Posted: 2010-02-16 12:37:29
by kostjan
Mirage wrote:треть скрипта можо вообще выкинуть. Зачем кликать на труп чтобы определить количество итемов если можно просто порезать и полутать? И будет меньше глюков.

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