A while ago i changed my script.
Now u just have to press the key you want to have mapped.
If needed i could write better description
Code:
; ----------------------- wc3 ----------------------
#UseHook
;Right Shift mapped to "ß´" (toggle healthbar) when one of the keys (del, end, bilddown) is mapped to something.
RShift::
if ismapped>0 ;
{
if healthBar = ;
{
send {ß down}
send {´ down}
healthBar = "on";
}
else
{
healthBar = ;
send {ß up}
send {´ up}
}
}
if ismapped = ;
{
send {RShift down}
}
return
RShift up::
if ismapped = ;
{
send {RShift up}
}
return
;Right Control mapped to "a" (attack) when the keys (del, end, bilddown) are mapped to something.
RControl::
if ismapped>0 ;
{
send a
}
if ismapped = ;
{
send {RControl down}
}
return
RControl up::
if ismapped = ;
{
send {RControl up}
}
return
; Numpad0 mapped to F1 (own hero hotkey)
Numpad0::
if ismapped>0 ;
{
send {F1}
}
if ismapped = ;
{
send {Numpad0}
}
return
; abilities mappings:
;DEL is Pressed
Del::
if ismapped = 1 ;
{
send {%delkey%}
}
if delkey = ; no mapping
{
send {Del}
}
return
;End is Pressed
End::
if ismapped = 1 ;
{
send {%endkey%}
}
if ismapped = ; no mapping
{
send {End}
}
return
;PgDn is Pressed
PgDn::
if ismapped = 1 ;
{
send {%PgDnkey%}
}
if ismapped = ; no mapping
{
send {PgDn}
}
return
#UseHook off
;hotkey mapping to del
^Del::
Input, delkey, L1
ismapped = 1
return
;hotkey mapping to end
^End::
Input, endkey, L1
ismapped = 1
return
;hotkey mapping to PgDn
^PgDn::
Input, PgDnkey, L1
ismapped = 1
return
;Reset keys
^!END::
delkey =
endkey =
PgDnkey =
ismapped =
return