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

Need help for a command
http://forum.yoko.com.ua/viewtopic.php?f=1&t=14488
Page 1 of 1

Author:  tippmann [ 2009-03-01 11:42:19 ]
Post subject:  Need help for a command

Hi everybody,
i need a little bit of help for something.

In this exemple:

repeat

if uo.warmode() == uo.warmode(true) then
uo.warmode(false)
endif

UO.useskill('Meditation')
wait(800)

until HERE

I need a command who will be true on a keypress.
exemple: until key press "space"

i want to use a key to interrupt a loop in my script by pressing a key ingame. Thank you

another script exemple:

While not key press "space"
wait(1000)
wend

Author:  Yavanna Kementari [ 2009-03-02 12:05:56 ]
Post subject: 

well I'm using global variables to solve such problems... you can use client macro such as:
say ',exec releaseScript'

and having a function
Code:
sub releaseLoop()
UO.SetGlobal("releaseLoop",STR(not VAL(UO.GetGlobal("releaseLoop"))))
UO.Print("releaseLoop: "+UO.GetGlobal("releaseLoop"))
end sub


in a loop, you'll have:

Code:
repeat
...whatever...
until VAL(UO.GetGlobal("releaseLoop")) == 1
UO.SetGlobal("releaseLoop","0")

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