Page 1 of 1

Проверочка

Posted: 2009-04-08 18:13:20
by Egrace
If [меня скинули с коня] then

Code: Select all

Sub Mount()
VAR DistChar
uo.set( 'finddistance', '1' )
start:
If [меня скинули с коня] then ##сюда смотреть
UO.findtype('0x00E2', '-1', '1')
wait(10)
if UO.findcount() > 0 then
DistChar = UO.GetDistance( 'finditem' )
 repeat
   wait(10)
 until DistChar <= 1
wait(10)
  UO.useobject('finditem')
endif
endif
goto start
end sub

Как заменить [меня скинули с коня]??

Posted: 2009-04-08 18:19:23
by Destruction
uo.objAtLayer("Horse")

Posted: 2009-04-08 19:04:06
by Egrace
мм... так скрипт получается на много проще
Кому интересно, вот что получилось:

Code: Select all

Sub Mount()
uo.deletejournal()
uo.Print('КОНЯ ПОКАЖИ ')
uo.Exec('addobject Horse')
while uo.Targeting()
wait(100)
wend
repeat
 repeat
   wait(10)
 until uo.objAtLayer("Horse")
 if UO.getdistance('Horse') <= 1 then
  UO.useobject ('Horse')
 endif
until UO.gethp() == 0
endsub

Posted: 2009-04-08 20:04:56
by Destruction
UO.gethp() == 0

Не показатель смерти.

Показатель смерти - uo.dead()

Posted: 2009-04-11 23:36:21
by Egrace
Мне хватает UO.getHP == 0 :)