Yoko

All sides of Injection
It is currently 2025-10-28 06:24:57

All times are UTC+02:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Help ! English plz
PostPosted: 2006-02-09 22:09:39 
Offline

Joined: 2006-02-01 19:58:29
Posts: 14
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


Top
   
 Post subject:
PostPosted: 2006-02-09 22:15:53 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Ok, bind "exec MyHeal;" for Alt+S and try the next script:
Code:
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.


Last edited by Destruction on 2006-02-09 23:06:27, edited 7 times in total.

Top
   
 Post subject:
PostPosted: 2006-02-09 22:24:17 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Тебе надо не только за инглишь извенятся но и за скрипты%))
Code:
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


Top
   
 Post subject:
PostPosted: 2006-02-09 22:26:23 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Sorry for my clumsy script :)

But both script not works.

Please wait until i create works script.

2Green:
Code:
uo.exec('Heal') 

Ну канешна :-))
Code:
uo.terminate('Heal') 

Почему-то не убивает. Проверю инж.

А setGlobal повешенный первым вообще хрень делает полную, его лучше убрать, поменять всё на EasyUO - сие работает с реестром.


Top
   
 Post subject:
PostPosted: 2006-02-09 22:51:43 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Ok, i write script, i'm test the next script and he works.

I edit my first post.
Code:
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


Last edited by Destruction on 2006-02-09 23:01:39, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2006-02-09 22:59:04 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
по старой памяти забыл что терминейт не реализован отдельной командой.. а первый глобал просто инициализировал переменую что в прочем не важно...


Top
   
 Post subject:
PostPosted: 2006-02-09 23:02:57 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Grin wrote:
по старой памяти забыл что терминейт не реализован отдельной командой.. а первый глобал просто инициализировал переменую что в прочем не важно...

Вот оно так хреново инициализирует, теперь знай !

Я еще раз исправил скрипт - посмотри как НАДО инициализировать глобальную переменную, чтобы не было проблем.

Согласен, первым ошибся я :-)

А терминейт не работал потому, что у меня был script.dll from Beyonder.

Я вот подумал, русский язык в этом топике смотриться так, как будто мы у человека за спиной шепчимся.. Неправильно это..


Top
   
 Post subject:
PostPosted: 2006-02-09 23:11:26 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Дест;)
Твой метод тыка сюда не годиться...
Code:
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


Top
   
 Post subject:
PostPosted: 2006-02-10 07:24:56 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Grin wrote:
Дест;)
Твой метод тыка сюда не годиться...
Code:
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

Моё не метод тыка, моё верный способ.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited