Yoko

All sides of Injection
It is currently 2025-11-02 10:54:21

All times are UTC+02:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Хелп по резке
PostPosted: 2008-06-22 16:12:42 
Offline
User avatar

Joined: 2006-10-08 08:37:57
Posts: 87
Вообщем вот скрипт
Code:
sub ChickenKill() 

    Var hrsT, hrsC
    hrsT = "0x00D0" # тип зверька
    hrsC = "0x0000" # его цвет
   UO.Set('finddistance', '14')
repeat
Uo.DeleteJournal()
   UO.FindType(hrsT, hrsC, "ground")
       If UO.FindCount() > 0 Then
         UO.WarMode(1)
         UO.Attack('finditem')
         repeat
         wait(100)
         until UO.InJournal('Body of Chicken')
       Carve()
       wait(1000)
       looting()
       wait(1000)
       Else
       End If
       UO.WarMode(0)
       wait(4000)
until UO.dead()
end sub


Sub looting()
dim Loot[2]
var i
Loot[0]=0x1BD1
Loot[1]=0x1078
for i = 0 to 1
      UO.FindType(Loot[i],'-1', 'lastcorpse')
     if UO.FindCount() > 0 then
      UO.MoveItem('finditem', '-1')
      wait(5000)
   else
   wait(100)
     endif
next
Uo.DeleteJournal()
end sub

sub Carve()
  uo.waittargetobject( 'lastcorpse' )
  uo.usetype( '0x0F51' )
endsub



Дело в том то что он не лутает с куриц кожу (1шт в каждой курице)
Code:
Type=0x1078 кожы

помогите плз)


Top
   
 Post subject:
PostPosted: 2008-06-22 19:44:44 
Offline

Joined: 2006-10-25 09:35:37
Posts: 20
тоже хотел бы такой скрипт работающий, только под овечек, и чтоб еще собирал с них шерсть, потом килл овку, и еще из трупа шерсть.... :lol:


Top
   
 Post subject:
PostPosted: 2008-06-22 19:52:45 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
1. Труп открывается?
2. На овечек скрипт здесь есть. Писал лично под антарес,-там в загоне он ходит, срезает шерсть со взрослых овец, а потом убивает и режет их.


Top
   
 Post subject:
PostPosted: 2008-06-22 19:59:18 
Offline
User avatar

Joined: 2006-10-08 08:37:57
Posts: 87
1.Да труп откываеться.. незнаю почему но не лутает может дело в инже? давно не обновлял ^^
2.З.ы. а ссылочку не дашь? а то Я чёто найти не могу)
3.И ещё хотел спросить есть ли тут ходилка по коориданатам (100% на этот тайл чтобы приходил) а то Я нашёл а он становиться за 4-5 тайла до той точки которая мне нужна(


Top
   
 Post subject:
PostPosted: 2008-06-22 20:38:27 
Offline

Joined: 2006-10-25 09:35:37
Posts: 20
есть только такой
Code:
sub Abs(num)
   if num < 0 then
      return -num
   end if
   return num
end sub

sub Sig(num)
   if num < 0 then
      return -1
   else
      if num == 0 then
         return 0
      endif
   endif
   return 1
end sub
     
sub MoveToXY(x, y, prec)
   var dx, dy
   dim Key[9]
      Key[0]=37
      Key[1]=35
      Key[2]=40
      Key[3]=36
      Key[4]=12
      Key[5]=34
      Key[6]=38
      Key[7]=33
      Key[8]=39
      dx=x-uo.GetX()
      dy=-y+uo.GetY()
   while (Abs(dx) > prec) or (Abs(dy) > prec)
      dx=x-uo.GetX()
      dy=-y+uo.GetY()
      uo.Press(Key[(sig(dy)+1)*3+1+sig(dx)])
      wait(100)
   wend
end sub   

sub MoveTo(object, prec)
   var dx, dy
   dim Key[9]
      Key[0]=37
      Key[1]=35
      Key[2]=40
      Key[3]=36
      Key[4]=12
      Key[5]=34
      Key[6]=38
      Key[7]=33
      Key[8]=39
   while uo.GetDistance(object) > prec
      dx=uo.GetX(object)-uo.GetX()
      dy=-uo.GetY(object)+uo.GetY()
      uo.Press(Key[(sig(dy)+1)*3+1+sig(dx)])
      wait(100)
   wend
end sub   

sub KillIt()

   var animal=0x00CF #тип животного
   var n=1
   var x=uo.GetX()
   var y=uo.GetY()
   var IsLamb
   var MaxWeight = 640
   
   uo.ignorereset()
   uo.forget('far')
   uo.forget('counters')
   uo.SetGlobal('KillCount', 0)

   while not uo.Dead()
      uo.Set('finddistance', n)
      uo.FindType(animal, -1, 'ground')
      if uo.FindCount() then
         wait(100)
         if uo.IsNPC('finditem') then
            IsLamb = 0
           
            while uo.IsNPC('finditem')
               if uo.GetDistance('finditem') > 1 then
                  MoveTo('finditem', 1)
                  if not IsLamb then
                     uo.waittargetobject('finditem')
                     uo.usetype(0x0F51)
                     IsLamb = 1
                  endif
                  uo.attack('finditem')
               end if
               wait(100)
            wend
           
            uo.SetGlobal('KillCount', val(uo.GetGlobal('KillCount'))+1)
            uo.forget('finditem')
            uo.warmode(0)
            uo.waittargetobject('lastcorpse')
            uo.usetype(0x0F51)
           
            while uo.waiting()
               wait(100)
            wend
           
            wait(500)
            if uo.Weight > MaxWeight then
               uo.WaitTargetType(0x1078)
               uo.UseType(0x0F9E)
               while uo.Waiting()
                  wait(100)
               wend
            endif
            uo.grab(-1, 'lastcorpse.0x1078')
            n=1
         else
            uo.Ignore('finditem')
         end if
      else
         n=n+1
         if n > 20 then
            if (uo.GetX() <> x) or (uo.GetY() <> y) then
               MoveToXY(x, y, 1)
            end if
            n=1
         end if
      end if
      wait(100)
   wend
   
end sub

sub Stat()
   uo.charprint(257, 'От ваших рук погибло: '+uo.GetGlobal('KillCount')+' невинных овец')
end sub


но он убивает один раз всех овец на поляне, срезают шерсть с них, труп не режет, и не видит овец которые потом респятся


Top
   
 Post subject:
PostPosted: 2008-06-22 20:57:30 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
http://forum.yoko.com.ua/viewtopic.php?p=64938#64938


Top
   
 Post subject:
PostPosted: 2008-06-22 21:00:24 
Offline

Joined: 2006-10-25 09:35:37
Posts: 20
а все))) скрипт который я запостил тож норм пашет)))))) там просто надо было тип вепона поменять >.< 8)

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


Top
   
 Post subject:
PostPosted: 2008-06-22 21:11:04 
Offline
User avatar

Joined: 2006-10-08 08:37:57
Posts: 87
И ещё хотел спросить есть ли тут ходилка по коориданатам (100% на этот тайл чтобы приходил) а то Я нашёл а он становиться за 4-5 тайла до той точки которая мне нужна (поиск юзал ходилка от BeyondeR`a останавливаеться за 4-5 тайлой(


Top
   
 Post subject:
PostPosted: 2008-06-23 17:05:10 
Offline
User avatar

Joined: 2006-10-08 08:37:57
Posts: 87
Scripts Writer wrote:

у меня в этом скрипте что-то кожу не лутает Type ввёл... шерсть лутает кожу нет очень странно)(


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 1 guest


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