Ok, so the official word from one of the dev posts here is that scripts that rebind single keys to single actions (ie. that do not automate sequences of commands) are allowed.
https://forum-en.gw2archive.eu/forum/community/fangen/GuildWars-2-XBox-360-gamepad-script/207414
There’s been a number of mouselook scripts that have been posted, but here’s another one.
Notes:
- You need to edit the start of the script to set up your GW2 exe location and the key you use for basic attack.
- Script will launch GW2 for you when the script starts.
- Middle Click (or Shift-Right Click) will enter Mouselook Mode. (ie. it will hold down the Right Mouse Button)
- Right Click to exit Mouselook mode. You will also need to do this after cutscenes etc.
- LMB during mouselook mode will press the key mapped to basic attack.
- The cursor is locked to the centre of the screen during mouselook mode, allowing you to target AOE attacks by pressing the skill key, aiming the AOE, and then pressing the skill key again to activate.
Again, I hope ANet will implement this sort of thing officially ingame one day.
Here’s the script:
——————————————————————-
#persistent
#IfWinActive, Guild Wars 2
;* This is the key that basic attack is mapped to. (ie. 1) *
AttackKey = 1
IfWinNotExist, Guild Wars 2
{
;* This is the location of the GW2 executable *
run, “C:\Program Files\Guild Wars 2\Gw2.exe”
}
CoordMode, Mouse, Screen
SendMode, Play
+RButton UP::
MButton UP::
MouseMove, A_ScreenWidth / 2, (A_ScreenHeight / 100) * 45
SendInput {RButton down}
return
LButton::
GetKeyState, state, RButton
if state = D
SendInput {%AttackKey% DOWN}
else
SendInput {LButton DOWN}
return
LButton UP::
SendInput {%AttackKey% UP}
SendInput {LButton UP}
return
+Escape::
ExitApp
return