Page 1 of 1

Помогите со скриптом, пожалуйста.

Posted: 2009-09-14 11:58:09
by exet
Сделал скрипт на автоподбор указанных вещей с пола в радиусе 2х клеток.

Code: Select all

sub Looting()
uo.exec("set finddistance 2")
var l
var a
dim LootingItem[10]
LootingItem[0] = 0x09B0
LootingItem[1] = 0x183D
LootingItem[2] = 0x182C
LootingItem[3] = 0x183B
LootingItem[4] = 0x1831
LootingItem[5] = 0x183E
LootingItem[6] = 0x0E76
LootingItem[7] = 0x0E21
LootingItem[8] = 0x183D
LootingItem[9] = 0x204E
LootingItem[10] = 0x0DE1
for l=0 to 10
uo.findtype(LootingItem[l],-1,"ground")
if uo.FindCount()>0 and uo.GetDistance("finditem")<=3 then
uo.Grab(-1,"finditem")
a=uo.getserial("finditem")
uo.print(a)
end if
next
end sub


так же пробовал писать ограничение так: uo.set('finddistance','2')

Но скрипт все равно ищет всё в приделах экрана.
Не подскажите, как сделать?

Posted: 2009-09-14 12:08:29
by Nmy

Code: Select all

sub Looting() 
uo.set('finddistance','2')
var l
var a
dim LootingItem[10]
LootingItem[0] = '0x09B0'
LootingItem[1] = '0x183D'
LootingItem[2] = '0x182C'
LootingItem[3] = '0x183B'
LootingItem[4] = '0x1831'
LootingItem[5] = '0x183E'
LootingItem[6] = '0x0E76'
LootingItem[7] = '0x0E21'
LootingItem[8] = '0x183D'
LootingItem[9] = '0x204E'
LootingItem[10] = '0x0DE1'
for l=0 to 10
uo.findtype(LootingItem[l],-1,'ground')
if uo.FindCount() then
uo.moveitem('finditem',0,'backpack')
a=uo.getserial("finditem")
uo.print(a)
end if
next
end sub

Posted: 2009-09-14 18:50:49
by Mirage
типы лучше заключить в кавычки

Posted: 2009-09-15 11:16:49
by Nmy
Mirage wrote:типы лучше заключить в кавычки


незаметил :oops: