Доброго времени суток! Имеется скрипт на автолут с резкой, но почему-то он не лутает монстров-людей, обычных игроков и монстров лутает.
Подскажите пожалуйста где проблема ?
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
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
Если это UORPG - лутать нужно не из 'corpse', а из 'lastcontainer'.
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
да, бывает подглючивает. Складывает лут не в ту сумку, и бывает из моей сумки выкладывает вещи в сумку с лутом..
Ну в принципе не критично.
Логика то скрипта в принципе верная но для инжекта некоторые команды можно упростить.
if uo.findtype(bag,"-1","backpack") then
uo.addobject('lootpack', 'finditem')
else
uo.addobject('lootpack', 'backpack')
end if
uo.FindType(LootType,LootColour,'backpack')
If uo.FindCount()> 0 then
LootID = uo.getSerial('finditem')
uo.setGlobal('LootBag',LootID)
else
uo.setGlobal('LootBag','backpack')
endif
sub skining()
UO.WaitTargetObject('corpse')
UO.UseType('0x0EC4')
wait(500)
endsub
Sub IgnorHair(corpse)
For var hair = 0x203B to 0x204D
UO.FindType(hair, -1, corpse)
if UO.FindCount() then
UO.Ignore('finditem')
endif
next
end sub
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
Русская версия Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)