Остановка скрипта

Materials, references, tutorials

Moderators: Murderator+, Murderator

Post Reply
Jaraa
Posts: 45
Joined: 2008-03-03 02:16:35

Остановка скрипта

Post by Jaraa »

Есть какая то команда, чтобы остановить скрипт при наступлении каких то условий? Типа как в пилоте stop_script
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Code: Select all

sub script_killer()
repeat
    wait(100)
until uo.dead()
uo.exec( "terminate myscript" )
endsub
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
Jaraa
Posts: 45
Joined: 2008-03-03 02:16:35

Post by Jaraa »

Destruction wrote:

Code: Select all

sub script_killer()
repeat
    wait(100)
until uo.dead()
uo.exec( "terminate myscript" )
endsub


Code: Select all

sub meditation()
uo.wait(100)
if uo.mana > 100 then
    uo.exec( "terminate meditation" )
end if
until uo.dead()
endsub


Так будет работать? Где можно найти описание функции terminate?
Jaraa
Posts: 45
Joined: 2008-03-03 02:16:35

Post by Jaraa »

Ну repeat там потерялся, почему то не могу отредактировать предыдущий пост.
Post Reply