selecting next spell after left click ?

Ask gaming related questions (AHK v1.1 and older)
toenee
Posts: 3
Joined: 01 Jun 2017, 06:02

selecting next spell after left click ?

01 Jun 2017, 06:16

Hi,

I have previously used a simple counter and lbutton up to select one spell after another but since found this script which works much better as it allows for cool downs.

What I cannot work out how to do, is get it to select / load the next spell ready for a left click. Currently is needs two, one left click to select, the second fires the spell, and so on.

Can anyone see a way to improve this, so it will send the next key on release of the left button, so it becomes a smoother operation ?

Thanks in advance.

Code: Select all

#SingleInstance force
#persistent

varc = lbutton

;change value for including or excluding spell from rotation (true means including, false means excluding)
ucaress = true
pmist = true
iswarm = true
dbreath = true
impale = true
fbite = true
lbolt = true

;hotkeys what your rays are bound to in-game (leave blank if you dont use spell)
ucaresskey = 1
pmistkey = 2
iswarmkey = 3
dbreathkey = 4
impalekey = 5
fbitekey = 6
lboltkey = 7

global = true

;hotkey to initiate the macro

lbutton::
if global = false
{
return
}

;first priority spell in cycle. options: impale, pmist, iswarm, dbreath, fbite, ucaress, lbolt / also change the gosub: castimpale, castpmist etc.
else if ucaress = true 
{
gosub castucaress
return
}

;second priority spell in cycle. options: impale, pmist, iswarm, dbreath, fbite, ucaress, lbolt / also change the gosub: castimpale, castpmist etc
else if pmist = true
{
gosub castpmist
return
}

;third priority spell in cycle. options: impale, pmist, iswarm, dbreath, fbite, ucaress, lbolt / also change the gosub: castimpale, castpmist etc
else if iswarmkey = true
{
gosub castiswarm
return
}

;fourth priority spell in cycle. options: impale, pmist, iswarm, dbreath, fbite, ucaress, lbolt / also change the gosub: castimpale, castpmist etc
else if dbreath = true
{
gosub castdbreath
return
}

;fifth priority spell in cycle. options: impale, pmist, iswarm, dbreath, fbite, ucaress, lbolt / also change the gosub: castimpale, castpmist etc
else if impale = true
{
gosub castimpale
return
}

;sixth priority spell in cycle. options: impale, pmist, iswarm, dbreath, fbite, ucaress, lbolt / also change the gosub: castimpale, castpmist etc
else if fbite = true
{
gosub castfbite
return
}

;seventh priority spell in cycle. options: impale, pmist, iswarm, dbreath, fbite, ucaress, lbolt / also change the gosub: castimpale, castpmist etc
else if lbolt = true
{
gosub castlbolt
return
}

castucaress:
global = false
ucaress = false
send, {%ucaresskey%}
sleep, 100
send, {%varc%}
settimer, globaltimer, -500
settimer, ucaresstimer, -13000
return

castpmist:
global = false
pmist = false
send, {%pmistkey%}
sleep, 100
send, {%varc%}
settimer, globaltimer, -500
settimer, pmisttimer, -16000
return

castiswarm:
global = false
iswarm = false
send, {%iswarmkey%}
sleep, 100
send, {%varc%}
settimer, globaltimer, -500
settimer, iswarmtimer, -13000
return

castdbreath:
global = false
dbreath = false
send, {%dbreathkey%}
sleep, 100
send, {%varc%}
settimer, globaltimer, -500
settimer, dbreathtimer, -13000
return

castimpale:
global = false
impale = false
send, {%impalekey%}
sleep, 100
send, {%varc%}
settimer, globaltimer, -500
settimer, impaletimer, -6000
return

castfbite:
global = false
fbite = false
send, {%fbitekey%}
sleep, 100
send, {%varc%}
settimer, globaltimer, -500
settimer, fbitetimer, -9000
return

castlbolt:
global = false
lbolt = false
send, {%lboltkey%}
sleep, 100
send, {%varc%}
settimer, globaltimer, -500
settimer, lbolttimer, -9000
return

globaltimer:
global = true
return

ucaresstimer:
ucaress = true
return

pmisttimer:
pmist = true
return

dbreathtimer:
dbreath = true
return

iswarmtimer:
iswarm = true
return

impaletimer:
impale = true
return

fbitetimer:
fbite = true
return

lbolttimer:
lbolt = true
return

~f2::exitapp
~WheelUp::exitapp
~WheelDown::exitapp
end::exitapp
return
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: selecting next spell after left click ?

15 Jun 2017, 08:57

I can hardly belive it is so simple but try this first:

Code: Select all

; Use this instead of LButton::
LButton Up::
Let me know if you need more.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 75 guests