Yoko
http://forum.yoko.com.ua/

Is this dificult ?
http://forum.yoko.com.ua/viewtopic.php?f=3&t=8667
Page 1 of 1

Author:  Knight1106 [ 2006-08-31 02:56:46 ]
Post subject:  Is this dificult ?

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

Author:  Raisefamous [ 2006-08-31 12:23:35 ]
Post subject: 

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

Author:  Nmy [ 2006-08-31 16:51:14 ]
Post subject: 

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
##########################################

Author:  Knight1106 [ 2006-08-31 18:15:26 ]
Post subject: 

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

Author:  Nmy [ 2006-08-31 18:23:28 ]
Post subject: 

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

Author:  Knight1106 [ 2006-08-31 21:07:39 ]
Post subject: 

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

Author:  Nmy [ 2006-08-31 21:19:13 ]
Post subject: 

i know... just use the terminate... gl :wink:

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/