Проверочка

Ask for help

Moderators: Murderator+, Murderator

Post Reply
Egrace
Posts: 29
Joined: 2009-03-23 18:05:30

Проверочка

Post 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
Как заменить [меня скинули с коня]??
[url=http://uolife.ru][img]http://shard.com.ua/banner2.jpg[/img][/url]
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

uo.objAtLayer("Horse")
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Egrace
Posts: 29
Joined: 2009-03-23 18:05:30

Post 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
[url=http://uolife.ru][img]http://shard.com.ua/banner2.jpg[/img][/url]
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

UO.gethp() == 0

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

Показатель смерти - uo.dead()
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Egrace
Posts: 29
Joined: 2009-03-23 18:05:30

Post by Egrace »

Мне хватает UO.getHP == 0 :)
[url=http://uolife.ru][img]http://shard.com.ua/banner2.jpg[/img][/url]
Post Reply