Yoko

All sides of Injection
It is currently 2024-03-28 14:57:10

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2017-12-31 03:16:20 
Offline

Joined: 2017-12-31 03:13:38
Posts: 3
Доброго времени суток! Имеется скрипт на автолут с резкой, но почему-то он не лутает монстров-людей, обычных игроков и монстров лутает.
Подскажите пожалуйста где проблема ?

Code:
sub fastloot()
   var corpse
   corpse = findcorps()
   if not corpse == 'null' then
      UO.addobject('corpse', corpse)
      lootlag()
      loot()
   else
      uo.print('!!! Corpse is not Found !!!')
      uo.print('!!! Corpse is not Found !!!')
      uo.print('!!! Corpse is not Found !!!')
      uo.ignore('corpse', 'off')
   end if
   uo.msg('.upd')
end sub

sub loot()
   var bag = '0x09AA'; Oei noiee a eioi?o? neeaauaaai eoo.
   var all = 1 ; Anee 1 oi eooeo ana, anee 0 oi eooeo oieuei i?ei?eoaoiua aaue.
   var clear = 1; Anee 1 oi eaii?e?oao aaue ec nienea, anee 0 oi ia eaii?e?oao.
   if uo.findtype(bag,"-1","backpack") then
      uo.addobject('lootpack', 'finditem')
   else
      uo.addobject('lootpack', 'backpack')
   end if
   
   DIM Loot[10] # neieuei aauae a nienea
   var a
   
   # Oeacuaaai oeiu i?ei?eoaoiuo aey eooa aauae.
   # Yoe aaue aoaoo eooeouny a ia?ao? i?a?aau.
   
   Loot[1]="0x1F08"; Necklace
   Loot[2]="0x1088"; Gold Necklace
   Loot[3]="0x1B76"; Heater Shield
   Loot[4]="0x1B75"; Kite Shield
   Loot[5]="0x1B76"; Heater Shield
   Loot[6]="0x1BC3"; Chaos Shield
   Loot[7]="0x1B7A"; Shield of Energy
   Loot[8]="0x14EF"; Recipe
   Loot[9]="0x13F9"; Staff
   Loot[10]="0x0EED"; Gold
   
   loot:
   for a=1 to 10
      uo.findtype(Loot[a],"-1","corpse")
      if UO.FindCount()>0 and Uo.GetDistance("corpse")<=3 then
    ;uo.useobject('finditem')
         uo.moveitem("finditem", "-1", "lootpack")
         wait(1000)
         goto loot
      end if
   next
   if all == 1 then
      if clear == 1 then
         clearloot("corpse")
      end if
      allloot:
      uo.findtype("-1","-1","corpse")
      if uo.findCount() > 0 and Uo.GetDistance("corpse")<=2 then
    ;uo.useobject('finditem')
         uo.moveitem("finditem", "-1", "lootpack")
         wait(1000)
         goto allloot
         wait(200)
      else if uo.findCount() == 0 then
         uo.print('Corpse is now Ignored!')
         uo.ignore("corpse", "on")
      end if
   end if
   skining()
end sub

sub lootlag()
   var timer
   timer = uo.timer()
   repeat
      uo.findtype("-1","-1","corpse")
      wait(50)
   until uo.findcount() > 0 or timer + 3 <= uo.timer()
end sub

sub skining()
   UO.WaitTargetObject('corpse')
   UO.UseType('0x0EC4')
   wait(500)
   allloot:
   clearloot("corpse")
   uo.findtype("-1","-1","corpse")
   if uo.findCount() > 0 and Uo.GetDistance("corpse")<=3 then
      uo.moveitem("finditem", "-1", "lootpack")
      wait(1300)
      goto allloot
      wait(200)
   end if
end sub

sub clearloot(corpse)
   DIM Item[3]
   VAR i
   ##################################################
   # Ooo oeacuaaai oeiu eaii?e?oaiuo aey eooa aauae.#
   ##################################################
   Item[0] = "0x0E20"; Bloody Bandage
   Item[1] = "0x14FB"; Lockpicks
   Item[2] = "0x0F39"; Shovel
   for i=0 to 2
      ignoreitem:
      uo.findtype(Item[i],"-1",corpse)
      if UO.FindCount()>0 and Uo.GetDistance(corpse)<=3 then
         uo.ignore("finditem")
         goto ignoreitem
         # wait(10); ?aneiiiaioe?iaaou anee e?aoeo
      end if
   next
end sub

sub findcorps()
   DIM body[8]
   var a
   Uo.Set('finddistance','3')
   body[1] = '0x0ECA';
   body[2] = '0x2006';
   body[3] = '0x0E40';
   body[4] = '0x0E41';
   body[5] = '0x2DF2'; Priest Chest
   body[6] = '0x2DF1'; Priest Chest
   body[7] = '0x4910'; Ice Level 2 Chest
   body[8] = '0x4911'; Ice Level 2 Chest
   For a = 1 to 8
      Uo.FindType(body[a],'-1','ground')
      If Uo.FindCount()>0 then
         uo.useobject('finditem')
         return Uo.GetSerial('finditem')
      endif
   next
   return 'null'
end sub


Top
   
PostPosted: 2017-12-31 15:09:00 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
какой тип у трупа?

_info

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


Top
   
PostPosted: 2017-12-31 17:25:10 
Offline

Joined: 2017-12-31 03:13:38
Posts: 3
Nmy wrote:
какой тип у трупа?

_info


Тип трупа точно такой-же как и простого человека. Вот к примеру.

ID=0x412A1CFD Type=0x2006 XMYKAOD Name=Adept of Necromancy
Quantity: 401 Colour: 0x0000 Layer: 0 Has: 0
X=5712 Y=967 Z=-5 C=0xFFFFFFFF F=0x00

Мне кажется дело в lastcorpse/lastcontainer
Попробую как буду дома.


Top
   
PostPosted: 2018-01-02 00:41:48 
Offline

Joined: 2017-12-31 03:13:38
Posts: 3
Да, дело было в контейнере. Но бывает подглючивает. Складывает лут не в ту сумку, и бывает из моей сумки выкладывает вещи в сумку с лутом..
Ну в принципе не критично.


Top
   
PostPosted: 2018-01-02 11:11:50 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
я на ките ответил. У тебя там потерялся endif и в принципе можно подоптимизировать.

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


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

All times are UTC+02:00


Who is online

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