Hard Script ! Only english!

Ask for help

Moderators: Murderator+, Murderator

Post Reply
-=SaCi=-
Posts: 14
Joined: 2006-02-01 19:58:29

Hard Script ! Only english!

Post by -=SaCi=- »

Explication

I´m trying to creat a new way to exec my macros!

It´s gonna run this way:

When i press Caps lock: it's sets a global with numeber 1
Than it active all buttons from my pc, like, if i pressa A , i will exec a macro, this for b, c, d, etc...
But when i use it like hotkey, i can´t use it to write !? am i wrong ?

So, i'm trying to script a thing like this!
If caps lock's global = 0
than when i press any key, it copys what i press i add on a global
and when i press enter, i say this global and reset it!

But, i don´t know how :p

For example :


sub Arm_Kryss1()
if uo.getGlobal("Modobatalha") == "1" then
uo.usetype('0x1b76')
uo.usetype('0x1404')
uo.usetype('0x1400')
uo.usetype('0x13b5')
uo.usetype('0x1bc3')
uo.waittargetself()
else
uo.setGlobal("Falando","Falando+'a'") # here i don't know what to do
endif
end sub


And i don't know how i do the comando on Enter, someone here can help me ?
i´m really trying to do this, but i'm not good enought!
vintagepunk
Posts: 26
Joined: 2006-02-13 18:02:06

Post by vintagepunk »

you can use the hotkeys in injection, and create subs for all of your normal macros such as

sub magicarrow()
uo.cast("Magic Arrow")
end sub

but change them so its like this

sub magicarrow()
if uo.getglobal("tilde")==1 then
uo.cast("Magic Arrow")
endif
end sub

and have a macro for for a key like this

sub tilde()
if uo.getglobal("tilde")==0 then
uo.setglobal("tilde","1")
endif
end sub

sub shifttilde()
if uo.getglobal("tilde")==1 then
uo.setglobal("tilde","0")
endif
end sub

now pressing tilde ( ` ) will turn your macros on and pressing shift tilde ( ~) will turn them off
flake
Expert!
Posts: 746
Joined: 2004-08-11 23:56:17
Location: The Citadel
Contact:

Post by flake »

I have solved this problem in the following way:
I bind a script like this:

Code: Select all

Sub Global()
  if uo.getglobal('macro') == 'off' then
    uo.setglobal('macro', 'on')
    uo.print('Macros ON!, fight!)
 else
    uo.setglobal('lmacro', 'off')
    uo.print('Macros OFF, speak!')
  endif
endsub

And bind it, for example on the key F7.
Then all of my PVP macros look like this:

Code: Select all

Sub Light()
  if uo.getglobal('macro') == 'on' then
    uo.cast('Lightning', 'lastattack')
  endif
endsub

And I bind all of those PVP macros in UO options this way:
say: ,exec Light
Then if I wont to talk, I use the Global macro (F7), and all PVP macros are disabled.
Post Reply