Предназначено для лута сильных мобов при массовом забое. Работает следующим образом при атаке моба запускается лутилка(настроенная под тип этого моба), она ждет смерти моба и подхода к нему или истечения 3х минут, а также смерть охотника. При любом варианте она сама вырубится.
Можно замочить несколько мобов, а потом просто обойти трупы.
Code: Select all
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