Help with this script (Tibia Auto healer)

Ask gaming related questions (AHK v1.1 and older)
victor8082
Posts: 8
Joined: 18 Feb 2020, 12:58

Help with this script (Tibia Auto healer)

15 Mar 2020, 06:00

Hello, I do not understand the language of autohotkey very well or any, but through a video lesson that teaches how to heal alone in the game Tibia (I will leave the video lesson here in the topic so you can base yourself and understand better ..) I I've been trying to edit a script, which the author adapted for his monitor, so I've been trying to adapt for mine but it didn't work ... the MAXIMO what happens is to keep pressing without for the "8" key (which would be the cure key) , in other words, it doesn't work for me ..
Well come on, what I changed and I think the right thing was the color "of the pixel", I can't say very well but this code
Code: Select all - Toggle Line numbers

0x61BEDD
,it is part of a LINE of the script that I will leave it in one piece for you .. With the "color" that he provided I did not get any answer .. but with the color that I adapted which is the
Code: Select all - Toggle Line numbers

0x8D43A
I had the answer to at least heal him, that is, press the "8" key but WITHOUT STOPPING .. so I don't know much more to explain .. if you can help me I would be very grateful .. I know there are many who play Tibia who know a lot about AUtohotkey, but unfortunately they are charging to help others .. I will leave below the script of the author of the video, and below my script (adapted from him) and his video, I ask that if anyone wants to help watch the video to help please ..
and on the lines that I changed the pixel, if you watch the video lesson you saw that it changes from monitor to monitor, then the author himself teaches how and says he should change the pixels .. my ONLY change was later on "0x .... "which I think is the color it is based on to cure ..

video lesson on youtube>www.youtube.com/watch?v=If6hWLOyqso

video lesson author script

Code: Select all

Coordmode, Pixel, Tibia
Coordmode, Mouse, Tibia
b::
MsgBox, Start


Check-healing:
FoundX := 0
FoundY := 0
PixelSearch, FoundX, FoundY, 189, 6, 952, 14, 0x6A6AD2, 3, Fast 
If (ErrorLevel = 2)
Goto, Check-Healt
    

If (ErrorLevel = 1)
Goto, Check-Healt

x :=  FoundX 
y :=  FoundY 
Controlsend, , 5, Tibia
Sleep, 900


Goto, Check-healing

Check-Healt:
FoundX := 0
FoundY := 0
PixelSearch, FoundX, FoundY, 189, 6, 952, 14, 0x61BEDD, 3, Fast
If (ErrorLevel = 2)
Goto, Check-Mana
    

If (ErrorLevel = 1)
Goto, Check-Mana

x :=  FoundX 
y :=  FoundY 
Controlsend, , 8, Tibia
Sleep, 900
Goto, Check-Mana



Check-Mana:

FoundX := 0
FoundY := 0
PixelSearch, FoundX, FoundY, 1382, 7, 1729, 13, 0x2A2B2A, 3, Fast
If (ErrorLevel = 2)
Goto, Check-healing
    

If (ErrorLevel = 1)
Goto, Check-healing

x :=  FoundX 
y :=  FoundY 
Controlsend, , 9, Tibia
Sleep, 900
Goto, Check-healing


a::Pause
my script (adapted from him) >

Code: Select all

Coordmode, Pixel, Tibia
Coordmode, Mouse, Tibia
b::
MsgBox, Start


Check-healing:
FoundX := 0
FoundY := 0
PixelSearch, FoundX, FoundY, 5, 445, 518, 804, 0x8D43A, 3, Fast 
If (ErrorLevel = 2)
Goto, Check-Healt
    

If (ErrorLevel = 1)
Goto, Check-Healt

x :=  FoundX 
y :=  FoundY 
Controlsend, , 5, Tibia
Sleep, 10

Goto, Check-healing

Check-Healt:
FoundX := 0
FoundY := 0
PixelSearch, FoundX, FoundY, 5, 445, 518, 804,  0x8D43A, 3, Fast
If (ErrorLevel = 2)

If (ErrorLevel = 1)
Goto, Check-Mana

x :=  FoundX 
y :=  FoundY 
Controlsend, , 8, Tibia
Sleep, 900
Goto, Check-Mana



Check-Mana:

FoundX := 0
FoundY := 0
PixelSearch, FoundX, FoundY, 1382, 7, 1729, 13, 0x2A2B2A, 3, Fast
If (ErrorLevel = 2)
Goto, Check-healing
    

If (ErrorLevel = 1)
Goto, Check-healing

x :=  FoundX 
y :=  FoundY 
Controlsend, , 9, Tibia
Sleep, 900
Goto, Check-healing


a::Pause

:wtf: :wtf:
Tibiando89
Posts: 8
Joined: 18 Mar 2020, 09:22

Re: Help with this script (Tibia Auto healer)

18 Mar 2020, 09:30

Funciona para tibia RL actual con battleye? Yo realice unas pruebas y la pantalla sale todo en negro para tibia (Por Battleeye)
pabalonche
Posts: 1
Joined: 03 Sep 2023, 19:54

Re: Help with this script (Tibia Auto healer)

03 Sep 2023, 20:21

Hey, there!

In case anyone is interested, I made my own version of an auto healer and auto mana potter, at least for a knight.

It checks for dark grey on two squares in the health bar and one square in the mana bar in order to decide what to do.

You can pause/unpause it with numpad6.

I hope it helps!

Code: Select all

charName = YourCharNameHere

CoordMode, Pixel, Client										;ignore window title bar for pixelsearch

loop 															;loop forever
{
	IfWinActive, Tibia - %charName%								;only works if the Tibia client is active and logged
	{
		PixelSearch,,, 680, 7, 700, 11, 0x2B2B2B, 3, Fast 		;look for gray color on first health threshold
		healthStatus1 := ErrorLevel 							;if 0 = first health flag detected
		PixelSearch,,, 560, 7, 580, 11, 0x2B2B2B, 3, Fast 		;look for gray color on second health threshold
		healthStatus2 := ErrorLevel 							;if 0 = second health flag detected
		PixelSearch,,, 890, 7, 910, 11, 0x2B2B2B, 3, Fast 		;look for gray color on mana threshold
		manaStatus := ErrorLevel 								;if 0 = mana flag detected

		if (healthStatus1 = 0)									;if the first health flag is detected
		{
			if(healthStatus2 = 0)								;and if it also detects the second health flag
			{
				ControlSend,, {2}, Tibia - %charName%			;use supreme health potion
				sleep 50 										;wait 0.05s for input stability
				ControlSend,, {1}, Tibia - %charName%			;use exura med ico
			}
			else 												;if only the first health flag is detected
			{
				ControlSend,, {1}, Tibia - %charName%			;send exura med ico
				if (manaStatus = 0)								;if the mana flag is detected
				{
					sleep 50 									;wait 0.05s for input stability
					ControlSend,, {3}, Tibia - %charName%		;use strong mana potion
				}
			}
		}
		else 													;if no health flag is detected
		{
			if (manaStatus = 0)									;and the mana flag is detected
				ControlSend,, {3}, Tibia - %charName%			;use strong mana potion
		}

		sleep 160												;wait 0.16s for next cycle
	}
	sleep 50 													;wait 0.05s
}

numpad6::Pause 													;use numpad6 to pause/unpause

LuisPro
Posts: 5
Joined: 30 Oct 2020, 16:39

Re: Help with this script (Tibia Auto healer)

15 Nov 2023, 03:33

pabalonche wrote:
03 Sep 2023, 20:21
Hey, there!

In case anyone is interested, I made my own version of an auto healer and auto mana potter, at least for a knight.

It checks for dark grey on two squares in the health bar and one square in the mana bar in order to decide what to do.

You can pause/unpause it with numpad6.

I hope it helps!

Code: Select all

charName = YourCharNameHere

CoordMode, Pixel, Client										;ignore window title bar for pixelsearch

loop 															;loop forever
{
	IfWinActive, Tibia - %charName%								;only works if the Tibia client is active and logged
	{
		PixelSearch,,, 680, 7, 700, 11, 0x2B2B2B, 3, Fast 		;look for gray color on first health threshold
		healthStatus1 := ErrorLevel 							;if 0 = first health flag detected
		PixelSearch,,, 560, 7, 580, 11, 0x2B2B2B, 3, Fast 		;look for gray color on second health threshold
		healthStatus2 := ErrorLevel 							;if 0 = second health flag detected
		PixelSearch,,, 890, 7, 910, 11, 0x2B2B2B, 3, Fast 		;look for gray color on mana threshold
		manaStatus := ErrorLevel 								;if 0 = mana flag detected

		if (healthStatus1 = 0)									;if the first health flag is detected
		{
			if(healthStatus2 = 0)								;and if it also detects the second health flag
			{
				ControlSend,, {2}, Tibia - %charName%			;use supreme health potion
				sleep 50 										;wait 0.05s for input stability
				ControlSend,, {1}, Tibia - %charName%			;use exura med ico
			}
			else 												;if only the first health flag is detected
			{
				ControlSend,, {1}, Tibia - %charName%			;send exura med ico
				if (manaStatus = 0)								;if the mana flag is detected
				{
					sleep 50 									;wait 0.05s for input stability
					ControlSend,, {3}, Tibia - %charName%		;use strong mana potion
				}
			}
		}
		else 													;if no health flag is detected
		{
			if (manaStatus = 0)									;and the mana flag is detected
				ControlSend,, {3}, Tibia - %charName%			;use strong mana potion
		}

		sleep 160												;wait 0.16s for next cycle
	}
	sleep 50 													;wait 0.05s
}

numpad6::Pause 													;use numpad6 to pause/unpause

Hello, Its works for you on windows 11?

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: MTM, Rohwedder and 58 guests