Tibia/ Random actions

Ask gaming related questions (AHK v1.1 and older)
JoaoPValejo
Posts: 2
Joined: 02 Dec 2018, 15:50

Tibia/ Random actions

02 Dec 2018, 16:01

Hi. I'm starting to use AHK, i want do creat a script to randomize some actions, like move every x minutes, where x is the randomized number.
There is a function to do this? Or i need to creat an equation?
User avatar
Maestr0
Posts: 136
Joined: 05 Dec 2013, 17:43

Re: Tibia/ Random actions

02 Dec 2018, 16:22

What you want is Random: https://autohotkey.com/docs/commands/Random.htm

Code: Select all

loop
{
	Move, 0, 0
	Random, OutputVar , 100, 100000	; between 100ms and 100,000ms
	sleep %outputvar% ; waits for the random amount from the previous line and then resumes the loop
}
JoaoPValejo
Posts: 2
Joined: 02 Dec 2018, 15:50

Re: Tibia/ Random actions

02 Dec 2018, 17:04

Maestr0 wrote:
02 Dec 2018, 16:22
What you want is Random: https://autohotkey.com/docs/commands/Random.htm

Code: Select all

loop
{
	Move, 0, 0
	Random, OutputVar , 100, 100000	; between 100ms and 100,000ms
	sleep %outputvar% ; waits for the random amount from the previous line and then resumes the loop
}
And how do i select a button(left, right) to do the action?
User avatar
Maestr0
Posts: 136
Joined: 05 Dec 2013, 17:43

Re: Tibia/ Random actions

03 Dec 2018, 03:29

JoaoPValejo wrote:
02 Dec 2018, 17:04
And how do i select a button(left, right) to do the action?
Your initial question did not mention clicking (left,right).
This information (and a lot more besides) is in the manual, I suggest you read it: https://autohotkey.com/docs/commands/Click.htm

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 31 guests