Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Autohotkey in wow


  • Please log in to reply
6 replies to this topic
x79animal
  • Members
  • 1021 posts
  • Last active: May 14 2013 04:21 PM
  • Joined: 01 May 2010
I havnt been posting recently cause my friend got my into WoW again -.-

But ive been using some autohotkey within it and it makes the game so much easier but i wanted to know if anyone else wanted to swap ideas on msn about automating wow [not botting but making things alot easier]

[not interested in multiboxing at all]

just some of my ideas [most are actually wrote]

-if afk for 4minutes, jump every 5seconds to prevent afk
-cast lifebloom every 9 seconds on focus (use a 0.9 blockinput cause of GCD)[other healers classes may have something useful like this, shield?]
-cast certain spells in a row (like, dot1 , dot2, dot3)
-spamming a spell (wrath, lighting bolt)
-use a spell everytime its up (natures grasp, flame ward, etc)
-auto-accept bg's and dungeons (using macros)
-auto-strafe
-auto type in pass when loaded [maybe just use hotstring]

my email is <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008
I've been playing RoM lately and haven't been on the forum much either. I haven't had any reason to use AHK with the game yet. It has macros and add ons that pretty much do everything I would want it to do. I could use AHK to do combat for me, but where's the fun in that?
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

girlgamer
  • Moderators
  • 3263 posts
  • Last active: Feb 01 2015 09:49 AM
  • Joined: 04 Jun 2010
This is a simple AFK jump Looper I made to handle the possibility of disconnects when afk for some time. Generally I just set the afk for like 2 minutes but it can go as high as 5 minutes. I added a slider and a debug routine to it so I could check some code out. The times aren't exact but then you don't really need them to be. Because the Debug test delay is fixed at 60 seconds, I disabled (hid) the slider until the debug button flag was flipped back.

#Singleinstance force
SetTitleMatchMode 2
SetKeyDelay, 20,30

ProgName = AFK Controller
ProgVer = V1.0.0

MaxSlider = 300000 ; 5mins
Maxtime := (MaxSlider//2) ; precondition slider at 50%
CancelFlag = False
TgtWin = World of Warcraft
DebugFlag = 0

;------------------------------------------------
; Simple Control GUI
;------------------------------------------------
GuiColor = 0xFfA030
Gui, +resize
Gui, Color, %guicolor%
Gui, Add, Text,,%ProgName% %ProgVer%
Gui, Add, Button,w100, StartAFK
Gui, Add, Button,w100, StopAFK
Gui, Add, Button,w100, Debug Check
Gui, Add, Slider, w100 tooltip TickInterval10 vSleepSliderDat gSleepSliderSbr, 50
y := (MaxTime//1000)
gui, Add, Text, vSliderVal, Sleep Time is %y% sec

Gui, Show, Title, %ProgName%

Return

;------------------------------------------------
GuiClose:
ExitApp

;------------------------------------------------
ButtonStartAFK:
CancelFlag = False
StartTime := A_TickCount
Loop
{	CurTime := A_TickCount
	Elapsed := (CurTime-StartTime)
	ToolTip, Elapsed Time in ms %Elapsed%
	IfGreater, Elapsed, %MaxTime%
	{	Gosub Jump5s
		ToolTip
		Return
	}
	IfEqual, CancelFlag, True
		Break
}
CancelFlag=False
ToolTip
Return

;------------------------------------------------
Jump5s:
Loop
{	IfEqual, CancelFlag, True
		Break
	IfEqual, DebugFlag, 1
	{	MsgBox,,%PgmName%,Simulated Jump,1
	}
	Else
	{
		WinActivate, %TgtWin%
		WinWaitActive, %TgtWin%
		Send, {Space}
	}
	Sleep, 5000		
}
CancelFlag = False
Return

;------------------------------------------------
ButtonStopAFK:
CancelFlag = True
MsgBox,,%PgmName%,AFK Jumper Cancelled,2
Return

;------------------------------------------------
ButtonDebugCheck:
DebugFlag := % ((!DebugFlag) & 1)
MsgBox,,%PgmName%, Debugging/Test is now %DebugFlag%,2
MaxTime = 60000
z := (MaxTime//1000)
GuiControl,,Sliderval, Sleep Time is %z% sec
GuiControl,Show, SleepSliderDat
GuiControl,,SleepSliderDat,20
IfEqual, DebugFlag, 1
	GuiControl,Hide,SleepSliderDat
Return

;------------------------------------------------
; Sleep Slider
;------------------------------------------------
SleepSliderSbr:
GuiControlGet, vTemp,,SleepSliderDat
x := (MaxSlider//100) ; slider limit / 100 for slider scale floored
y := % (vTemp * x)   ; new value for timer delay before jumping
MaxTime = %y%
z := (MaxTime//1000) ; convert to seconds for display
GuiControl,,Sliderval, Sleep Time is %z% sec
Return

;================================================


I don't generally get into BG's. My biggest problem as a healer is that I'm so busy healing others I often miss healing myself. In that case I set up a timer to auto check my health and mana, throw on a fast cure and heal, and go back to working my group. Certain other skills require use to level up so occasionally i go to a quiet place and loop those skills until they max out. Harvesting is a big one for that as is crafting. And then I go back to levelling again.

Some ideas might be:
1) a little routine that scans the mini map looking for nodes to go harvest.
2) an auto self heal timer for those times when I'm too distracted to heal myself.
3) an autofight routine with specific mobs for when you have to kill like x-zillion whatchamacallits and you're bored to the teeth.
4) or something that can feed your pet periodically cause the poor little tyke has decided not to obey commands anymore because it's just too hungry to care.
5) and a nice little routine that checks your arrows/ammo to see if maybe you need to head back to town for refills before you take on that horrendously large group you are hoping will fall down without much of a fight.
6) and how about one that builds your basic macros for you and any of your alts so you dont have to re-invent the wheel every time for each character you have.
7) personally, i tend to move stuff around on my screen so my user interfaces may not be the same from character to character. A biggie for me was to be able to have my script set up the pixel check points for me and warn me if my health and mana are low. Especially if i'm not paying attention to them. It's handy to be able to click where i need a pixel check and have my routine grab the colors and mouse positions and save them off to a <charactername>.ini file that I can use later for configuration.

Just some thoughts. I have some of these already built for a diff game than WoW and, since I just got into ROM, I'm thinking of one that will help write the core lua scripts and macros I need for each of my alts there too.
And like for me, I'm not interested in racing my character to the highest level possible in the shortest possible time or having my scripts play the game for me. Sometimes after pulling an all-nighter I just need a heads up that, hey, there's a node over there you could harvest or, you might want to fill up your quiver before you go wacking some more stuff. Or remind me that I only have 5263 more Dissipated Channeling Scorpion Toadstools to clean out of that farmers field.

The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos -- 1) Good, 2) Fast 3) Cheap -- pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter   KeyLooperDemo   Key Spammer   TinyClickRecorder  GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.
Rock-on%20kitten.gif


x79animal
  • Members
  • 1021 posts
  • Last active: May 14 2013 04:21 PM
  • Joined: 01 May 2010

This is a simple AFK jump Looper I made to handle the possibility of disconnects when afk for some time


Gui's arent my style, i just use something like

[just writing out quick as example]

settimer, check, 1000
return

check:
if a_timephysical > 520000
contrlsend,, {Space}, world of warcraft
return

7) personally, i tend to move stuff around on my screen so my user interfaces may not be the same from character to character. A biggie for me was to be able to have my script set up the pixel check points for me and warn me if my health and mana are low. Especially if i'm not paying attention to them. It's handy to be able to click where i need a pixel check and have my routine grab the colors and mouse positions and save them off to a <charactername>.ini file that I can use later for configuration.


I like this idea especailly, The main issues i have is forgetting to refresh hots and not noticing my own health, i think beeps would wok quite well, you click at 60% of your bar, then it checks there every second to see if its still the same (above 60%) and if it changes it will beep. ill try and throw something together later.

Elesar
  • Members
  • 696 posts
  • Last active: May 08 2015 09:51 PM
  • Joined: 28 Jun 2007
I used to do stuff like this for Vanguard when it was a fresh new game.

I played a Blood Mage, this is a Healer/DPS hybrid class that had TONS of buffs that benefited all classes.

Each buff was originally cast per-target instead of group based, and groups could be up to 6 players...at about 10 buffs depending on level. So that is 60 casts every time we needed to buff the party....that was quickly put into a hotkey and bound to one of my function keys with a modifier. One button buffing made me very happy :D

chukie
  • Members
  • 1 posts
  • Last active: Jun 06 2011 01:34 PM
  • Joined: 18 Feb 2011
Sory for my english its not good at all.

Ill start to use autohotkey a week ago. For fix some issues whit my mouse. Then as curios as i am look thru the forum and fins a ABC(Always be casting) script for a dk dps.

At this moment i got this working, its crude but works, and do a decent dps last night.

Varius level rotations, every lvl include more skills/spells.I use F1 (dont autoattack to F4 autoattack use full skills list)

Numlock pause/re

Autorepeat some key when pressed prior rotation. Util for spellsteals, interrupts or custom rotations.

Automaticly click for skill to require aim. (Those green cricles, That i dont know how to call)

F and G change the last spam skill.In my case its scorch or fireball.Means that if not casting anything better cast one of those. ABC FTW!!!

I use Power Auras wow addon to place some conditionals alerts to do dps. spell availability, debuff on target etc.

Things that need to do. Detect on GCD and on Casting. So dont spam keys when not need to.

#Persistent 

;############################### 
;   VARS 
;###############################
	TECLA = A
	KEYSEND = FALSE
	MODE	= 0
	spamkey := "f"
	cantcheck := 7
	
	OsdColor = EEAA99  
	OsdText  = waiting
	
;SPELLS & CHECKS

	 SPELLNAME1 := "Impact Combustion"
	    CHECKX1 := 5
	    CHECKY1 := 159
	CHECKCOLOR1 := 0xfcfcfc
	       KEY1 := "s"
		  MODE1 := 3
		ACTIVE1 := 1
		
	 SPELLNAME2 := "Combustion"
	    CHECKX2 := 1225
	    CHECKY2 := 928
	CHECKCOLOR2 := 0x004700
	       KEY2 := "q"
		  MODE2 := 3
		ACTIVE2 := 1
		
	 SPELLNAME3 := "Pyroblast"
	    CHECKX3 := 5
	    CHECKY3 := 88
	CHECKCOLOR3 := 0xfcfcfc
	       KEY3 := "d"
		  MODE3 := 1
		ACTIVE3 := 1
		
	 SPELLNAME4 := "Living Bomb"
	    CHECKX4 := 5
	    CHECKY4 := 74
	CHECKCOLOR4 := 0xfcfcfc
	       KEY4 := "e"
		  MODE4 := 2
		ACTIVE4 := 1
		
	 SPELLNAME5 := "Impact"
	    CHECKX5 := 5
	    CHECKY5 := 102
	CHECKCOLOR5 := 0xfcfcfc
	       KEY5 := "s"
		  MODE5 := 1
		ACTIVE5 := 1
		
	 SPELLNAME6 := "Flame Orb"	 
	    CHECKX6 := 5
	    CHECKY6 := 131
	CHECKCOLOR6 := 0xfcfcfc
	       KEY6 := "w"
		  MODE6 := 2
		ACTIVE6 := 1
		
	 SPELLNAME7 := "Mirrors"
	    CHECKX7 := 5
	    CHECKY7 := 115
	CHECKCOLOR7 := 0xfcfcfc
	       KEY7 := "z"
		  MODE7 := 3
		ACTIVE7 := 1
	


	
    
	
;############################### 
;   OSD 
;###############################
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow  
Gui, Color, %OsdColor%
Gui, Font, s32  ; s32 tamaño letra
Gui, Add, Text, vOsdtext cLime, MMMMMMMMMMMMMMMMMMMM  
WinSet, TransColor, %OsdColor% 150
;Gui, Show, xCenter y10 NoActivate  ; NoActivate avoids deactivating the currently active window.



loop  ; main loop
{
;############################### 
;   repetidor de teclas 
;###############################
;######## FILA 1
	If pressedkey("1")
		{
		OsdText = Manual
		send 1
		sleep 100
		mouseclick
		}
	else if pressedkey("2")
		{
		OsdText = Manual
		send 2
		sleep 100
		mouseclick
		}
	else if pressedkey("3")
		{
		OsdText = Manual
		send 3
		sleep 100
		mouseclick
		}
	else if pressedkey("4")
		{
		OsdText = Manual
		send 4
		}
	else if pressedkey("5")
		{
		OsdText = Manual
		send 5
		}
	else if pressedkey("6")
		{
		OsdText = Manual
		send 6
		}
	else if pressedkey("7")
		{
		OsdText = Manual
		send 7
		}

;######## FILA 2
	else if pressedkey("q")
		{
		OsdText = Manual
		send q
		}
	else if pressedkey("w")
		{
		OsdText = Manual
		send w
		}
	else if pressedkey("e")
		{
		OsdText = Manual
		send e
		}
	else if pressedkey("r")
		{
		OsdText = Manual
		send r
		}
	else if pressedkey("t")
		{
		OsdText = Manual
		send t
		}
	else if pressedkey("y")
		{
		OsdText = Manual
		send y
		}
		
;######## FILA 3
	else if pressedkey("a")
		{
		OsdText = Manual
		send a
		}
	else if pressedkey("s")
		{
		OsdText = Manual
		send s
		}
	else if pressedkey("d")
		{
		OsdText = Manual
		send d
		}
	else if pressedkey("f")
		{
		OsdText = Manual
		send f
		}
	else if pressedkey("g")
		{
		OsdText = Manual
		send g
		}
	else if pressedkey("h")
		{
		OsdText = Manual
		send h
		}
		
		;######## FILA 4
	else if pressedkey("z")
		{
		MouseGetPos, MouseX, MouseY
		PixelGetColor, color, %MouseX%, %MouseY%
		Osdtext := color
		send z
		}
	else if pressedkey("x")
		{
		OsdText = Manual
		send x
		}
	else if pressedkey("c")
		{
		OsdText = Manual
		send c
		}
	else if pressedkey("v")
		{
		OsdText = Manual
		;send v
		}
	else if pressedkey("b")
		{
		OsdText = Manual
		send b
		}
;############################### 
;   FIN REPETIDOR DE TECLAS
;###############################


;############################### 
;   Rotacion
;###############################
	
	else if mode > 0
		{
			counter = 0
			key = spam
			loop
			{
				modetocheck := mode%A_index%
				if mode >= %modetocheck%
				{
					activetocheck := active%A_Index%
					if activetocheck = 1
					{
						mousex := checkx%A_Index%
						mousey := checky%A_Index%
						PixelGetColor, checkcolor, %MouseX%, %MouseY%
						if checkcolor%A_Index% = %checkcolor%
						{
							keytosend := key%A_Index%
							 send %keytosend%
							 key := %keytosend%
							 osdtext := spellname%A_Index%
							 
							 break
						}
					}
				}	
				if A_Index = %cantcheck% 
				{
					break 
				}
			}
			if key = spam
			{
			send %spamkey%
			OsdText = Spamming
			}
		
		}
	else
		{
			osdtext = waiting
		}
		
;############################### 
;   FIN Rotacion
;###############################

		
		
	GuiControl,, OsdText, %mode%-%Osdtext%
	sleep 10
}
return



;############################### 
;   Rutinas y funciones
;###############################

pressedkey(tecla)
{
	GetKeyState, state, %tecla%, P

	if state = D
		{
			Return True
		}
	else
		{
			Return False
		}
}
return

posible(ability)
{ 
   global 
	abilitycolor := %ability%color
	abilityX := %ability%x 
	abilityY := %ability%y 
       
   Pixelgetcolor, a, %abilityx%, %abilityy%
   If a = abilitycolor
   { 
      Return true
   } 
Return false
} 
Return



combat()
{
return true
}
return


	
;############################### 
;   Keys
;###############################

F1::
	MODE	:= 0
Return

F2:: 
	MODE	:= 1
Return

F3::
	MODE	:= 2
Return

F4::
	MODE	:= 3
Return

~*f::
	Spamkey 	:= "f"
return

~*g::
	Spamkey 	:= "g"
return

~*Numlock::pause




OceanMachine
  • Members
  • 790 posts
  • Last active: Aug 23 2013 02:10 PM
  • Joined: 15 Oct 2007
Just to let you all know: I am absolutely file with AHK and WoW, used it for multiboxing, no problem.

However, coding scripts to automate WoW in the way that you describe in your first post (i.e. pressing keys every few minutes with a timer or spamming a spell automatically when its up) is actually against the game's TOS and you risk getting banned.

I'm sure they'll never find out, but I just thought I would let you know.

There are loads of posts about using AHK and other macro programs on the WoW forums, and loads of official Blizzard posts saying it is absolutely fine to use it as long as actions are not automated or triggered from timers. Basically, if you physically press 1 key, you are allowed to perform 1 action in an instance of the game. ONE action, not a string of things. And you have to actually press a key to trigger the portion of code. This means you can remap keys with ahk, broadcast the same keystroke to multiple windows (used for multiboxing) and that's about it. In addition, if you would be able to do the same thing with the in-game macros then you should be fine to do it with AHK.

Note that the in-game marcos to cast spell cycles you must press the button once to cast the first spell, then again to cast the second, etc. You can't use AHK to automatically do something like:
press "\" hotkey which Sends 1 then waits 2.5 secs then sends 2, then waits 3s then sends 4. That is not allowed byt Blizzard.

In would imagine that doing things like automating chat like "pass" would be fine because it doesn't provide you with any advantage.

Just to let you know that you do this at your own risk! :) :)

Warden is watching! or might be..... :twisted:
My code is written for AHK Basic unless otherwise specified. This means it may not work in AHK_L (especially Unicode), due to a few known compatibility issues.