This is the ingame sequence of what it's suppose to do: 1, left mouse click, 2, 1
1) Melee weapon drawn ( this is the 1)
2) Attack with first melee move set ( left mouse click )
3) Ranged Weapon drawn ( this is the 2, that will cancel the rest of melee combos )
4) Finally back to having melee weapon drawn ( 1 )
The is code I spent days piecing together that somewhat works but not quite:
Code: Select all
xbutton2::
Loop
{
GetKeyState, state, xbutton2, p
if state = U
break
; Otherwise:
Send, {1}
Send, {LButton}
Send, {2}
Send, {1}
Sleep, 30
}
But the problem with this, after the first iteration run it doesn't end with melee weapon drawn (1) again when I have the side mouse button held the second time and the times then after. The second plus times leaves me with ranged weapon drawn (2). And what's worst it randomly fires off the ranged weapon (same left mouse click). You can sort of mimmick the problem if you test it out on a notepad and you'll see what I mean. I ended up removing the last " send, {1} " after " send, {2} " in order lessen the random ranged fire, however I will always have ranged weapon drawn (2) afterwards. Any help with fixing my broken code or sharing their working one would be immensely appreciated. This actually kept me up for the past few nights because I dunno why it wouldn't work.