Page 1 of 1
Help ! English plz
Posted: 2006-02-09 22:09:39
by -=SaCi=-
I'm trying to creat a comand to cast a spell on my character until i press the hotkey again:
Like: i press Alt+s, then my character starts cast Heal on itselves, when i press alt+s again it stops!
sub in_mani_foda()
var inmani=1
If inmani==2 then
end if
If inmani==1 then
uo.cast('Heal')
wait(1000)
uo.waittargetself()
uo.say(",exec in_mani_foda")
end if
end sub
I couldn´t find a way to do this
Posted: 2006-02-09 22:15:53
by Destruction
Ok, bind "exec MyHeal;" for Alt+S and try the next script:
Code: Select all
Sub MyHeal()
if uo.getGlobal("Healing") == "N/A" then
uo.setGlobal("Healing","0")
endif
if uo.getGlobal("Healing") == "1" then
uo.setGlobal("Healing","0")
uo.exec('terminate MyHeal')
else
uo.setGlobal("Healing","1")
repeat
uo.print("simple") ; Some action
wait(500)
until uo.dead()
end if
end sub
This script will be stopped when you dead. If you not need it, then replace my cycle.
Sorry for my clumsy English.
Posted: 2006-02-09 22:24:17
by Grin
Тебе надо не только за инглишь извенятся но и за скрипты%))
Code: Select all
uo.setGlobal("Healing","0")
Sub MyHeal()
if uo.getGlobal("Healing") == "1" then
uo.setGlobal("Healing","0")
uo.terminate('Heal')
else
uo.setGlobal("Healing","1")
uo.exec('Heal')
end if
end sub
sub Heal()
while not uo.Dead()
uo.cast("Heal","self")
wait(3000)
wend
end sub
Bind MyHeal
Posted: 2006-02-09 22:26:23
by Destruction
Sorry for my clumsy script
But both script not works.
Please wait until i create works script.
2Green:
Ну канешна

)
Почему-то не убивает. Проверю инж.
А setGlobal повешенный первым вообще хрень делает полную, его лучше убрать, поменять всё на EasyUO - сие работает с реестром.
Posted: 2006-02-09 22:51:43
by Destruction
Ok, i write script, i'm test the next script and he works.
I edit my first post.
Code: Select all
Sub MyHeal()
if uo.getGlobal("Healing") == "N/A" then
uo.setGlobal("Healing","0")
endif
if uo.getGlobal("Healing") == "1" then
uo.setGlobal("Healing","0")
uo.exec('terminate MyHeal')
else
uo.setGlobal("Healing","1")
repeat
uo.print("simple") ; Some action
wait(500)
until uo.dead()
end if
end sub
Posted: 2006-02-09 22:59:04
by Grin
по старой памяти забыл что терминейт не реализован отдельной командой.. а первый глобал просто инициализировал переменую что в прочем не важно...
Posted: 2006-02-09 23:02:57
by Destruction
Grin wrote:по старой памяти забыл что терминейт не реализован отдельной командой.. а первый глобал просто инициализировал переменую что в прочем не важно...
Вот оно так хреново инициализирует, теперь знай !
Я еще раз исправил скрипт - посмотри как НАДО инициализировать глобальную переменную, чтобы не было проблем.
Согласен, первым ошибся я
А терминейт не работал потому, что у меня был script.dll from Beyonder.
Я вот подумал, русский язык в этом топике смотриться так, как будто мы у человека за спиной шепчимся.. Неправильно это..
Posted: 2006-02-09 23:11:26
by Grin
Дест;)
Твой метод тыка сюда не годиться...
Code: Select all
Sub MyHeal()
if uo.getGlobal("Healing") == "1" then
uo.setGlobal("Healing","0")
uo.exec('terminate Heal')
else
uo.setGlobal("Healing","1")
uo.exec('exec Heal')
end if
end sub
sub Heal()
while not uo.Dead()
uo.cast("Heal","self")
wait(3000)
wend
end sub
Posted: 2006-02-10 07:24:56
by Destruction
Grin wrote:Дест;)
Твой метод тыка сюда не годиться...
Code: Select all
Sub MyHeal()
if uo.getGlobal("Healing") == "1" then
uo.setGlobal("Healing","0")
uo.exec('terminate Heal')
else
uo.setGlobal("Healing","1")
uo.exec('exec Heal')
end if
end sub
sub Heal()
while not uo.Dead()
uo.cast("Heal","self")
wait(3000)
wend
end sub
Моё не метод тыка, моё верный способ.