Hotkey

Ask for help

Moderators: Murderator+, Murderator

Post Reply
dman
Posts: 3
Joined: 2011-08-12 10:22:49

Hotkey

Post by dman »

hey how do i make hotkey for a script?
so i can play the script by pressing F12
dman
Posts: 3
Joined: 2011-08-12 10:22:49

Re: Hotkey

Post by dman »

okay i got that one.
but how i say in script that stop if key is pressed
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Hotkey

Post by ZeroDX »

Use global

Code: Select all

sub Switcher()
  If UO.GetGlobal('variable') <> '1' then
    UO.SetGlobal('variable', '1')
   else
    UO.SetGlobal('variable', '0')
  Endif
Endsub

sub main()
  While true
    If val(UO.GetGlobal('variable')) then
      UO.Exec('exec main11111')
      While val(UO.GetGlobal('variable'))
        Wait(100)
      Wend
      UO.Exec('terminate main11111')
     else
      Wait(100)
    Endif
  Wend
Endsub

sub main11111()
  ...
Endsub
Golden
Posts: 17
Joined: 2009-04-14 11:36:23

Re: Hotkey

Post by Golden »

in hotkeys

exec NAMESCRIPT

terminate NAMESCRIPT

easy dude
Mr Imposter
Posts: 7
Joined: 2011-08-18 05:29:42

Re: Hotkey

Post by Mr Imposter »

I use hotkey scripts daily.

The best way to use them is autoload.sc (automaticly loads with injection)

So save you needed scripts in this script. I have F12 hotkey (Uo - Say - ",exec hidden")

In the autoload.sc

sub hidden()
While TRUE
check not in war mode
uo skill blah bla
end sub..

Same for my meditation.

Then it gets down to a bit more.. Eg.

Self killing script. (phy immue creatures) etc etc..

Hope you have some fun with this
Post Reply