Yoko

All sides of Injection
It is currently 2024-03-28 14:59:25

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2006-11-18 19:00:12 
Offline
User avatar

Joined: 2005-07-10 21:53:05
Posts: 457
Это прототип, рабочий вариант канул в небытие в связи с не использованием инжи(с 5хх она не сильно пашет). Но сам принцип ясен из того что есть.

Предназначено для лута сильных мобов при массовом забое. Работает следующим образом при атаке моба запускается лутилка(настроенная под тип этого моба), она ждет смерти моба и подхода к нему или истечения 3х минут, а также смерть охотника. При любом варианте она сама вырубится.

Можно замочить несколько мобов, а потом просто обойти трупы.

Code:
sub main()
   var BodyID = "0x00000000"
   var Type = "0x0000"

   while (true && UO.Dead())
      if (bodyID <> UO.GetSerial("lastattack")) then
         bodyID = UO.GetSerial("lastattack")
         F_StartLoot(UO.GetGraphic("lastattack"), bodyID)
      else
         wait(1000)
      end if
   wend
end sub

sub F_StartLoot(Type, BodyID)
   ;
   if ( Type == "0x0001" ) then
      UO.Exec("F_Loot01 " + BodyID)
   end if
   ;
   if ( Type == "0x0002" ) then
      UO.Exec("F_Loot02 " + BodyID)
   end if

end sub


; размножить :)
sub F_Loot01(BodyID)
   var LTimer = UO.Timer(), i = 0
   var length = 2
   dim item[length]
   item[0] = "0x0000"
   item[1] = "0x0000"

   while (BodyID <> UO.GetSerial("lastcorpse") || UO.Dead() || LTimer + 1800 < UO.Timer()) ; 3 минуты
      wait (300)
   wend

   if ( UO.Dead() || LTimer + 1800 < UO.Timer() ) then
      return
   else
      repeat
         if UO.GetDistance(BodyID) <= 2 then
            ; --- можно вставить резку
            for i to i > length
            UO.FindType(item[i], 0, BodyID)
               if UO.FindCount() then
                  UO.MoveItem("finditem")
                  wait(300)
               end if
            next
         endif
      until UO.Dead() || LTimer + 1800 < UO.Timer() ||
   end if
end sub


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

All times are UTC+02:00


Who is online

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