Firestaff Macro ahk?

11/08/2021 19:11 exploitsabuser#1
does someone have the dual firestaff macro for ahk?
11/08/2021 20:24 SelmaF#2
This has staff, hatchet & faster dodge(with light gear) and randomised sleep.

Because of one of the limitations of AHK(or maybe just my skill) you need to make sure you stop/start the script when you change any of the settings.




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
11/08/2021 21:03 exploitsabuser#3
thx buddy
11/09/2021 08:54 zudis#4
Is it currently works?
11/09/2021 14:56 azer311#5
2 staffs equipped but no matter what delay I use, it either just uses the ability before being able to swap to second staff, or does do the swap without using the ability, but rotates back to staff 1 before staff 2 has the chance to attack.

Have they made a minimum time before you can weapon swap from an active ability?

Hatchet works fine so I can't see how it's purely lag.

ty
11/09/2021 15:21 exploitsabuser#6
if you use the code that SelmaF has posted you also have to change your weapon switch to '' . '' in the game, set the script delay to 280-300, the best thing you can do is test a bit yourself and you need the flamethrower skill on the q skill
11/09/2021 15:28 azer311#7
Quote:
Originally Posted by exploitsabuser View Post
if you use the code that SelmaF has posted you also have to change your weapon switch to '' . '' in the game, set the script delay to 280-300, the best thing you can do is test a bit yourself and you need the flamethrower skill on the q skill
Ahh i see, I was using the pillar of fire skill, thanks for your help will try it out now
11/09/2021 20:07 Robotics#8
Quote:
Originally Posted by SelmaF View Post
This has staff, hatchet & faster dodge(with light gear) and randomised sleep.

Because of one of the limitations of AHK(or maybe just my skill) you need to make sure you stop/start the script when you change any of the settings.




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
For the Hatchet:

- Weapon switch has to be on "." ?
- Do you need the throw skill?
- Zoom in activated?
11/10/2021 22:19 SelmaF#9
Quote:
Originally Posted by Robotics View Post
For the Hatchet:

- Weapon switch has to be on "." ?
- Do you need the throw skill?
- Zoom in activated?
For hatchet the weapon swap and ability doesn't matter, it's only there for fire staff. My AHK skills aren't up to hiding UI elements on variables yet.
11/11/2021 03:21 Haeth#10
For which program is this macro?
11/12/2021 16:08 I Feelz I#11
Quote:
Originally Posted by Haeth View Post
For which program is this macro?
its a stand alone makro, u need AHK for it. just google it.