need help with game ( path of exile ) Topic is solved

Ask gaming related questions (AHK v1.1 and older)
theyesman
Posts: 5
Joined: 08 May 2021, 18:30

need help with game ( path of exile )

Post by theyesman » 09 May 2021, 07:18

Hello i am trying to make a code for flasks ( the one where you press a button and it changes everytime and resets after the 1-4 clicks )

like i want my 1 to send 1, then 2 then 3 etc and resets after three or four times
so far no luck as I am not sure how to make Count++ works

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: need help with game ( path of exile )

Post by mikeyww » 09 May 2021, 08:00

Feel free to post your script for feedback about it.

theyesman
Posts: 5
Joined: 08 May 2021, 18:30

Re: need help with game ( path of exile )

Post by theyesman » 09 May 2021, 08:19

okek

Code: Select all

#NoEnv  
SendMode Input  
SetWorkingDir %A_ScriptDir%  
#IfWinActive Path of Exile

Count := 1

#If (Count == 1)
q::q
{	
	Send %Count%
	Count++
	return
}	
#If (Count == 2)
q::t
{
	Send %Count%
	Count++
	return
}
#If (Count == 3)
q::r
{
	Send %Count%
	Count := 1
	return
}
[Mod edit: [code][/code] tags added.]

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: need help with game ( path of exile )  Topic is solved

Post by mikeyww » 09 May 2021, 09:50

Code: Select all

Count := 0
#IfWinActive Path of Exile
$q::
Count := Mod(Count, 3) + 1
Send % (Count = 1 ? "q" : "t") Count
Return
#IfWinActive
Or:

Code: Select all

Count := 0, sequence := "qtt"
#IfWinActive Path of Exile
$q::Send % SubStr(sequence, Count := Mod(Count, 3) + 1, 1) Count
#IfWinActive

theyesman
Posts: 5
Joined: 08 May 2021, 18:30

Re: need help with game ( path of exile )

Post by theyesman » 09 May 2021, 11:19

Thank you alot !!!,
The second one is great but the only issue that it is typing q1 t2 t3, that is 3 presses on my Q button, sadly that is a bannable offense in my game ( any automated system that sends 2 commands within 1 button )

Any idea on how to fix that?

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: need help with game ( path of exile )

Post by mikeyww » 09 May 2021, 12:34

I was trying to interpret your original script. If you post your desired output, I can look at adjusting. Provide a complete example of what should happen.

theyesman
Posts: 5
Joined: 08 May 2021, 18:30

Re: need help with game ( path of exile )

Post by theyesman » 09 May 2021, 12:57

Code: Select all

Count := 0, sequence := "qtwf"
#IfWinActive Path of Exile
$q::Send % SubStr(sequence, Count := Mod(Count, 4) 1, 1) Count
#IfWinActive
that is the script i am using, My q button sends the desired letter with a number, ex: q1 t2

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: need help with game ( path of exile )

Post by mikeyww » 09 May 2021, 13:05

You can remove Count if not needed at the end of the Send.

You may correct the script further if you choose to add back the +.

theyesman
Posts: 5
Joined: 08 May 2021, 18:30

Re: need help with game ( path of exile )

Post by theyesman » 09 May 2021, 13:10

Code: Select all

Count := 0, sequence := "qtwf"
#IfWinActive Path of Exile
$q::Send % SubStr(sequence, Count := Mod(Count, 4) + 1, 1) Count
#IfWinActive
Sorry that is the one i am using, was trying a solution when i removed it

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: need help with game ( path of exile )

Post by mikeyww » 09 May 2021, 13:23

If you do not need the count, then you can remove it from the end of the command.

Post Reply

Return to “Gaming Help (v1)”