mmlm Posted August 21, 2006 Posted August 21, 2006 can somone tel me what's each number mean in that line ; Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch ( 340, 272, 500, 272, 13947080, 1, 5) what's pure red pixel ??? i tink the 340 272 500 272 it's the area righ??? the 13947080 is the color right? but what the 1 mean and the 5 mean... i try to ask my bot to enter in a game and if the bot see that color in that spot .. that's because he join the game .. but i am not sure about if i write the fonction correctly.. someone plz help me whit that..
Developers Jos Posted August 21, 2006 Developers Posted August 21, 2006 can somone tel me what's each number mean in that line; Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch ( 340, 272, 500, 272, 13947080, 1, 5)what's pure red pixel ???Helpfile is your friend..... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Paulie Posted August 21, 2006 Posted August 21, 2006 (edited) can somone tel me what's each number mean in that line ; Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch ( 340, 272, 500, 272, 13947080, 1, 5) what's pure red pixel ??? i tink the 340 272 500 272 it's the area righ??? the 13947080 is the color right? but what the 1 mean and the 5 mean... i try to ask my bot to enter in a game and if the bot see that color in that spot .. that's because he join the game .. but i am not sure about if i write the fonction correctly.. someone plz help me whit that.. Just checking, coordinates (First 4 parameters) are defined like this x1,y1--------------------------------- |§§§§§§§§§§§§§§§§§§§§| |§§§§§§§§§§§§§§§§§§§§| |§§§§§Your Region§§§§§| |§§§§§§§§§§§§§§§§§§§§| |§§§§§§§§§§§§§§§§§§§§| -----------------------------------x2,y2 I like to use the hex value for the color, not the decimal, if you have the decimal and want the hex, do this $Decimal = 13947080 $HexColor = "0x"&Hex($Decimal) $Search = Pixelsearch(*x1*,*y1*,*x2*,*y2*, $HexColor);Remainimg parameters aren't needed If IsArray($Search) then Mouseclick("left", $Search[0], $Search[1],0) Endif Edit: A pure red pixel in hex looks like this "0xFF0000" Edited August 21, 2006 by Paulie
mmlm Posted August 21, 2006 Author Posted August 21, 2006 ok i tink i am to newb for that.. sorry guy and very tank you for your help.that's what i have nowGlobal $PausedHotKeySet("{END}", "TogglePause")HotKeySet("{HOME}", "Terminate")While 1Sleep(100)WEndFunc TogglePause() $Paused = NOT $PausedWhile $Paused Sleep(100) Mouseclick("left", 719,462) Sleep(2000) Mouseclick("left", 479,309) sleep(50) Mouseclick("left", 479,309) sleep(7000)before in blue is all ok below in red is not ok... ;o)$Decimal = 2170913$HexColor = "0x212021"&Hex($Decimal)$Search = Pixelsearch(196,262,569,239, $HexColor)If IsArray($Search) thenMouseclick("left", $Search[0], $Search[1],0)EndifWEndEndFuncFunc Terminate()ExitEndFuncwhat i want :. i want if he found the color in the area Send("{ENTER}Hi, I am mmlm {ENTER}") if not found the colorrestart to begining to try to enter in other game.can you help me whit that plz
Paulie Posted August 21, 2006 Posted August 21, 2006 $Search = Pixelsearch(196,262,569,239, $HexColor) this is your problem, the second 2 numbers can not be bigger than the first 2 1 CAN NOT > 3 2 CAN'T > 4 in yours, the second parameter is bigger than the fourth one which won't work
mmlm Posted August 21, 2006 Author Posted August 21, 2006 $Search = Pixelsearch(196,262,569,239, $HexColor) this is your problem, the second 2 numbers can not be bigger than the first 2 1 CAN NOT > 3 2 CAN'T > 4 in yours, the second parameter is bigger than the fourth one which won't work x1,y1--------------------------------- |§§§§§§§§§§§§§§§§§§§§| |§§§§§§§§§§§§§§§§§§§§| |§§§§§Your Region§§§§§| |§§§§§§§§§§§§§§§§§§§§| |§§§§§§§§§§§§§§§§§§§§| -----------------------------------x2,y2 I have use the autoit window info... for similar scare in my game the info is x1,y1 = 136,190 and x2,y2 = 608, 413 do i have to inverse the area ? and enter like that (608,413,136,190,$HexColor)
Paulie Posted August 21, 2006 Posted August 21, 2006 x1,y1---------------------------------|§§§§§§§§§§§§§§§§§§§§||§§§§§§§§§§§§§§§§§§§§||§§§§§Your Region§§§§§||§§§§§§§§§§§§§§§§§§§§||§§§§§§§§§§§§§§§§§§§§|-----------------------------------x2,y2I have use the autoit window info...for similar scare in my game the info is x1,y1 = 136,190 and x2,y2 = 608, 413do i have to inverse the area ? and enter like that (608,413,136,190,$HexColor)Use the game coords, those are fine
mmlm Posted August 21, 2006 Author Posted August 21, 2006 that is the error msg i got when he try to find pixel. $HexColor = "0x212021"&Hex($Decimal) $HexColor = "0x212021"&Hex(^error) error: incorrect number of parameter in fonction call
mmlm Posted August 21, 2006 Author Posted August 21, 2006 ok well i enter like that ? (136,190,608,413,$HexColor)
PsaltyDS Posted August 21, 2006 Posted August 21, 2006 (edited) ok well i enter like that ? (136,190,608,413,$HexColor) I don't understand what that variable represents: $Decimal = 2170913 $HexColor = "0x212021" & Hex($Decimal) MsgBox(64, "Debug", "$HexColor = " & $HexColor)oÝ÷ Ù.ëtß¡ÞÄ*%¢ Edited August 21, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
mmlm Posted August 21, 2006 Author Posted August 21, 2006 I don't understand what that variable represents: $Decimal = 2170913 $HexColor = "0x212021" & Hex($Decimal) MsgBox(64, "Debug", "$HexColor = " & $HexColor)oÝ÷ Ù.ëtß¡ÞÄ*%¢ ok like that i have no error but ( the bot enter in game and just continu to click and click and click and click dont talk it's like he dont found the color and restart at the begening what's wrong whit that script. after enter in game it's suppose to look for color pixel and if found (and in game suppose to found that color) talk my last line .... Global $Paused HotKeySet("{END}", "TogglePause") HotKeySet("{HOME}", "Terminate") While 1 Sleep(100) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused Sleep(100) Mouseclick("left", 719,462) Sleep(2000) Mouseclick("left", 479,309) sleep(50) Mouseclick("left", 479,309) sleep(7000) $Decimal = 2170913 $Search = Pixelsearch(136, 190, 608, 413, $Decimal) If IsArray($Search) then Mouseclick("left", $Search[0], $Search[1],0) Endif WEnd EndFunc Func Terminate() Exit EndFunc Send("{ENTER}Hi, I am mmlm {ENTER}")
mmlm Posted August 21, 2006 Author Posted August 21, 2006 after that line $Search = Pixelsearch(136, 190, 608, 413, $Decimal) can we say someting like : If ok then send("{ENTER}Hi, I am mmlm {ENTER}") if not @error Then EndIf WEnd EndFunc Func Terminate() Exit 0 EndFunc
mmlm Posted August 21, 2006 Author Posted August 21, 2006 do i have other method for the bot know is in game.. other then the search color of grass on ground (pixel search) do you know someting for he know is in game and not in lobby ? if he join a game he his on a server like ip 256.4000 but if not and stay on the lobby... can he detect that after like 10 second. or someting like specifik image like the stash or the rock wall that will say is in game. is that possible ??
PsaltyDS Posted August 22, 2006 Posted August 22, 2006 do i have other method for the bot know is in game.. other then the search color of grass on ground (pixel search)do you know someting for he know is in game and not in lobby ?if he join a game he his on a server like ip 256.4000 but if not and stay on the lobby... can he detect that after like 10 second. or someting like specifik image like the stash or the rock wall that will say is in game. is that possible ??From a PM on this thread:THAT'S PRETTY COOL LIKE THAT BUT ONLY ONE TING MISSING FOR NOW IN THAT SCRIPT. AFTER HE QUIT THE GAME i WANT RESTART TO JOIN OTHER GAME .. i MEAN I NEED HE LOOP THAT FONCTION ENTER GAME SPAM EXIT ENTER SPAM EXIT ETC ETC.I'm not much of a gamer, but this doesn't sound like the kind of activity I'd want going on in any online community I was part of. I'm done here, perhaps others will be interested in this kind of thing, but not me. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
BPBNA Posted August 22, 2006 Posted August 22, 2006 Whats with this? $Decimal = 2170913 $HexColor = "0x212021" & Hex($Decimal) MsgBox(64, "Debug", "$HexColor = " & $HexColor)oÝ÷ Ù(hºWg¶+[zØb²X¤xö®'©¢Ë^uæ«'«jëh×6$Decimal = 2170913 $HexColor = "0x" & Hex($Decimal) MsgBox(64, "Debug", "$HexColor = " & $HexColor) I also agree with PsaltyDS... I used to play D2 and those bots were just annoying, I dont think anyone even pays attention to them any more, let alone plays that old game
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now