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