Anything and all.
Moderators: Murderator+, Murderator
-
mont
- Posts: 23
- Joined: 2006-10-24 01:51:41
- Location: Middle Earth
-
Contact:
Post
by mont »
смысл скрипта такой: пересчитываем овец в заданном радиусе, записываем их айдишники в массив. выдаем количество овец.
Code: Select all
sub main()
dim sheep[256]
var sheepcnt = 0
var nos=0
UO.IgnoreReset()
uo.set( 'finddistance', 2 )
UO.FindType(0x00CF,'0x0000','ground')
while (UO.FindCount())
sheep[sheepcnt] = UO.GetSerial('finditem')
UO.Ignore(sheep[sheepcnt])
# UO.Print("Found sheep: "+str(sheep[sheepcnt]))
sheepcnt = sheepcnt + 1
UO.FindType(0x00CF,'0x0000','ground')
wend
nos=uo.findcount()
uo.print(str(nos))
UO.IgnoreReset()
uo.set( 'finddistance', 32 )
end sub
неважно сколько овец рядом, всегда пишет 0

помогите пжалуйсто

-
Mirage
- Posts: 2802
- Joined: 2009-05-28 09:58:28
- Location: Иваново
-
Contact:
Post
by Mirage »
Попробуй так:
Code: Select all
sub main()
dim sheep[256]
var sheepcnt = 0
var nos=0
UO.IgnoreReset()
uo.set( 'finddistance', 2 )
UO.FindType(0x00CF,'0x0000','ground')
while (UO.FindCount())
sheep[sheepcnt] = UO.GetSerial('finditem')
UO.Ignore(sheep[sheepcnt])
# UO.Print("Found sheep: "+str(sheep[sheepcnt]))
sheepcnt = sheepcnt + 1
UO.FindType(0x00CF,'0x0000','ground')
wend
uo.print('Найдено вец: ' +str(sheepcnt))
UO.IgnoreReset()
uo.set( 'finddistance', 32 )
end sub
-
mont
- Posts: 23
- Joined: 2006-10-24 01:51:41
- Location: Middle Earth
-
Contact:
Post
by mont »
Спасибо
