Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
Gui, Add, Button, x10 y280 w250 h30, Start
Gui, Add, Button, x270 y280 w50 h30, Help
Gui, Add, Text, x20 y80 w120 h20, Script Delay:
Gui, Add, GroupBox, x10 y10 w310 h110 +Center, Script Settings
Gui, Add, Text, x20 y29 w120 h20, Script Hotkey
Gui, Add, Text, x20 y59 w120 h20, Weapon Type:
Gui, Add, DropDownList, x150 y29 w160 h200 vAttack, XButton1||XButton2|Numpad1|Numpad2|Numpad3|F1|F2|F4|`|LWin
Gui, Add, DropDownList, x150 y59 w160 h200 vWeapon, Staff||Hatchet
Gui, Add, Slider, x150 y90 w160 h20 Range50-500 ToolTipLeft vTimeSlider, 200
Gui, Add, GroupBox, x10 y130 w310 h80 +Center, In Game Keybindings
Gui, Add, Text, x20 y149 w120 h20, Ability:
Gui, Add, Text, x20 y179 w120 h20, Active Weapon Swap:
Gui, Add, CheckBox, x20 y240 w120 h20 vDodge, Faster Dodge
Gui, Add, CheckBox, x150 y240 w160 h20 vRan, Randomise Delay
Gui, Add, GroupBox, x10 y220 w310 h50 +Center, Additional Options
Gui, Add, Hotkey, x150 y150 w150 h20 vSpam, q
Gui, Add, Hotkey, x150 y180 w150 h20 vSwap, .
Gui, Show, x500 y430 h320 w330, Calculator
Return
ButtonStart:
Gui, Submit, NoHide
Hotkey, %Attack%, RapidFire
GuiControlGet, vButton,, Button1
If vButton = Start
{
GuiControl, Text, Button1, Stop
Suspend, off
}
Else
{
GuiControl, Text, Button1, Start
Suspend, on
}
Return
Rapidfire:
While GetKeyState(Attack,"P")
{
If Weapon = Staff
{
Send, {LButton}
Sleep, %TimeSlider%
Send, %Spam%
If Ran = 1
{
Random, RanSleep, 40, 85
Sleep, %RanSleep%
}
Else
{
Sleep, 75
}
Send, %Swap%
If Ran = 1
{
Random, RanSleep, 40, 85
Sleep, %RanSleep%
}
Else
{
Sleep, 75
}
}
Else
{
Send, {LButton}
Sleep, %TimeSlider%
Send, {RButton}
If Ran = 1
{
Random, RanSleep, 40, 85
Sleep, %RanSleep%
}
Else
{
Sleep, 75
}
}
}
Return
Shift::
If Dodge = 1
{
Sleep, 75
Send, X
}
Return
ButtonHelp:
MsgBox, Weapon Type: Weapon you will be using, for Life or Fire staff you will need to carry two of the same type. For Hatchet the offhand weapon doesn't matter.`n`nWeapon Swap Delay: The delay between starting a light attack and trying to cancel the animation. Adjust this to suit your latency, for staff if you are swapping weapons but not attacking increase the time value, if you use the ability decrease the time value. For hatchet will will just have to test to see what time value works.`n`nAbility: This is only necessary for staff. You want to choose an ability you don't want to use and also one with a low cool down time and the rapid fire will only work while your choosen ability is off cooldown.`n`nActive Weapon Swap: Again this is only necessary for staff, you need to set a hotkey in game as its off by default ESC>Settings>Key Bindings>Action<Swap Active Weapon.`n`n`n`nCurrently the script will run while holding the side mouse button1, if you want to change it you need to edit the script, find and replace both instances of XButton1 with your desired key, if you want to use left mouse button make sure you remove it from any other in game key bindings or you'll end up spamming attack. Check autohotkey.com/docs/KeyList.htm for correct key name format.
Return
GuiClose:
ExitApp