Yoko

All sides of Injection
It is currently 2026-01-22 09:14:24

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Is this dificult ?
PostPosted: 2006-08-31 02:56:46 
Offline

Joined: 2005-09-08 18:38:12
Posts: 64
Well, i was try to do a script that when i press its hotkey its starts to heal and stop only when i press the hotkey again, but with this script below the functions aren't terminate, the script stops to heal but the funstion T still running, Why ?

Anyone knows how to do what i want ?
plz tell me

thanks

Code:
sub T() #Heal
 var m=uo.mana
 if uo.getglobal('Healing')=='On' then
 uo.setglobal('Healing','Off')
 else
 uo.setglobal('Healling','On')
 end if
 repeat
 m=uo.mana
 uo.cast('Heal','self')
 uo.deletejournal()
 while uo.mana>=m || uo.injournal('fizzles')
 wait(1)
 wend
 until uo.getglobal('Healing')=='Off'
end sub


Top
   
 Post subject:
PostPosted: 2006-08-31 12:23:35 
Offline

Joined: 2006-07-06 08:30:59
Posts: 40
Here you go

Code:
sub he() 
if uo.life < uo.str then
uo.bandageself()
wait(300)
uo.usetype('0x1B76')
wait(300)
uo.msg('.drink_heal_great')
wait(300)
uo.usetype('0x0E2A')
uo.cast('Greater Heal','self')
end if
end sub


Something like your scpt but a bit better,I think


Top
   
 Post subject:
PostPosted: 2006-08-31 16:51:14 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Code:
##########################################
Sub test()
##########################################
   If uo.getglobal('test')=='11' then
   uo.setglobal('test',00)
   uo.print(' !!! -= Test: off =- !!! ')
   uo.exec('terminate test')
   else
   uo.setglobal('test',11)
   uo.print(' !!! -= Test: on =- !!! ')
   end if
#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#

;script
;script
;script

#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#
                                       
   uo.setglobal('test',00)
   uo.print(' !!! -= Test: off =- !!! ')
##########################################
end sub
##########################################

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-08-31 18:15:26 
Offline

Joined: 2005-09-08 18:38:12
Posts: 64
NMY wrote:
Code:
##########################################
Sub test()
##########################################
   If uo.getglobal('test')=='11' then
   uo.setglobal('test',00)
   uo.print(' !!! -= Test: off =- !!! ')
   uo.exec('terminate test')
   else
   uo.setglobal('test',11)
   uo.print(' !!! -= Test: on =- !!! ')
   end if
#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#

;script
;script
;script

#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#
                                       
   uo.setglobal('test',00)
   uo.print(' !!! -= Test: off =- !!! ')
##########################################
end sub
##########################################


Thank you, now it is working... But, can you explain me what is wrong in my Script ? They appears to be the same o.O

thanks


Top
   
 Post subject:
PostPosted: 2006-08-31 18:23:28 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Code:
uo.exec('terminate test')

if you set global OFF it doesnt means that the script must stop his actions, so you must kill it :twisted: :lol:

or:
Code:
sub T() #Heal
 var m=uo.mana
 if uo.getglobal('Healing')=='On' then
 uo.setglobal('Healing','Off')
 return
 else
 uo.setglobal('Healling','On')
 end if
 while uo.getglobal('Healing')<>'Off'
 m=uo.mana
 uo.cast('Heal','self')
 uo.deletejournal()
 while uo.mana>=m || uo.injournal('fizzles')
 wait(1)
 wend
 wend
end sub

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-08-31 21:07:39 
Offline

Joined: 2005-09-08 18:38:12
Posts: 64
NMY wrote:
Code:
uo.exec('terminate test')

if you set global OFF it doesnt means that the script must stop his actions, so you must kill it :twisted: :lol:

or:
Code:
sub T() #Heal
 var m=uo.mana
 if uo.getglobal('Healing')=='On' then
 uo.setglobal('Healing','Off')
 return
 else
 uo.setglobal('Healling','On')
 end if
 while uo.getglobal('Healing')<>'Off'
 m=uo.mana
 uo.cast('Heal','self')
 uo.deletejournal()
 while uo.mana>=m || uo.injournal('fizzles')
 wait(1)
 wend
 wend
end sub


This new way you post does not works o.O


Top
   
 Post subject:
PostPosted: 2006-08-31 21:19:13 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
i know... just use the terminate... gl :wink:

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Limited