Jump to content

Red Pixel


trung
 Share

Recommended Posts

hey guys im playing tantra and i need help with the healing right quick

im using this code right now

HotKeySet("[", "Start")

HotKeySet("]", "Pause")

HotKeySet("\", "Leave")

While 1

Sleep(1000)

WEnd

Func Start()

$x = 167

$y = 647

While 1

If PixelGetColor($x, $y) < 0xEA0E05 Then Send("1")

Wend

EndFunc

Func Pause()

While 1

Sleep(1)

WEnd

EndFunc

Func Leave()

Exit

EndFunc

the pixel is the red im using

and i need help

i was wondering if there is a way to turn that red into any red.....

forinstance

the red i have can sumtimes change and i have to retake the pixel

is there a way to sai

if the spot is not "red" then press one ( it turns to a dark color thats y i have <)

instead of a specific red

i need it to sai any red

thnkx!

Link to comment
Share on other sites

hey guys im playing tantra and i need help with the healing right quick

im using this code right now

HotKeySet("[", "Start")

HotKeySet("]", "Pause")

HotKeySet("\", "Leave")

While 1

Sleep(1000)

WEnd

Func Start()

$x = 167

$y = 647

While 1

If PixelGetColor($x, $y) < 0xEA0E05 Then Send("1")

Wend

EndFunc

Func Pause()

While 1

Sleep(1)

WEnd

EndFunc

Func Leave()

Exit

EndFunc

the pixel is the red im using

and i need help

i was wondering if there is a way to turn that red into any red.....

forinstance

the red i have can sumtimes change and i have to retake the pixel

is there a way to sai

if the spot is not "red" then press one ( it turns to a dark color thats y i have <)

instead of a specific red

i need it to sai any red

thnkx!

Well...hmm... how many reds are there? And is pink a red? What about flourescent puce? .... Ah that IS the question now isn't it? Considering reds range from 0x220000 to 0xff0000 as long as the green and blue portions each stay approximately below 0x50 respectively..... Isn't the moon made of green cheese? And why doesn't your program do anything when I try to run it? Ah....I see ... Everything's in a function.

And now to make sense....

Find the upper range of your red, and your lower range of your red. Convert from Hex to Decimal.

$pixel = PixelGetColour($x,$y)If $pixel <= Dec($UpperRed) and $pixel >= Dec($LowerRed) then   ; Do whateverEndif

Unfotunately, I am on a system that doesn't recognize the @CRLF ....

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

like this?

i thikn i did it rong lol

its not working

HotKeySet("[", "Start")

HotKeySet("]", "Pause")

HotKeySet("\", "Leave")

While 1

Sleep(1000)

WEnd

Func Start()

$x = 167

$y = 647

$pixel = PixelGetColor($x,$y)

$UpperRed = 15502970

$LowerRed = 10687511

While 1

If $pixel <= dec($UpperRed) and $pixel >= dec($LowerRed) then Send("1")

Wend

EndFunc

Func Pause()

While 1

Sleep(1)

WEnd

EndFunc

Func Leave()

Exit

EndFunc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...