Thatsgreat2345 Posted March 29, 2006 Share Posted March 29, 2006 (edited) it would be easier if u just got the process name while 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") $coord = PixelSearch( 77, 540, 77, 540, 0x888888) If Not @error Then call("Close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) EndIf wend Func Close() Send("!{F4}") EndFunc Edited March 29, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 (edited) while 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") $coord = PixelSearch( 77, 540, 77, 540, 0x888888) If Not @error Then call("Close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) EndIf wend Func Close() Send("!{F4}") EndFunc ok looks great but I get error wend 1 Error: "wend" statement with no matching "While" statement hehe thanks for keep trying to help me Edited March 29, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 29, 2006 Share Posted March 29, 2006 while 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") $coord = PixelSearch( 77, 540, 77, 540, 0x888888) If Not @error Then Send("!{F4}") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) EndIf Endif wend Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 it would be easier if u just got the process name while 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") $coord = PixelSearch( 77, 540, 77, 540, 0x888888) If Not @error Then call("Close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) EndIf wend Func Close() Send("!{F4}") EndFunc it would be easier if u just got the process name sounds willing how would I do it Thanks in advance Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 29, 2006 Share Posted March 29, 2006 press ctrl alt delete and open up taskmanager, choose the process tag and find the im guessing its gonna be diablo.exe but just find a process that has to do with diablo , diablo has to be running by the way Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 (edited) press ctrl alt delete and open up taskmanager, choose the process tag and find the im guessing its gonna be diablo.exe but just find a process that has to do with diablo , diablo has to be running by the waygame.exe i thoguht it would be diablo II.exe also but... Edited March 29, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 29, 2006 Share Posted March 29, 2006 while 1 If WinExists("Diablo II") Then HotKeySet("{Space}", "close") $coord = PixelSearch( 77, 540, 77, 540, 0x5C0001) If Not @error Then Send("!{F4}") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) EndIf Endif wend hey could u take a screen shot and upload it so i cant take a look i found one and i have a feelin u got the wrong color Link to comment Share on other sites More sharing options...
greenmachine Posted March 29, 2006 Share Posted March 29, 2006 The colors he posted are all some versions or gray, because when you use Au3Info.exe in DII you see the color of the cursor (a big hand). You have to find the coord and do the pixel checking manually. By the way, 25% of 1000 is 250, not 500. Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 The colors he posted are all some versions or gray, because when you use Au3Info.exe in DII you see the color of the cursor (a big hand). You have to find the coord and do the pixel checking manually.By the way, 25% of 1000 is 250, not 500.teehee sorry your correct, how would I find the pixel manually Thanks in advance Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 (edited) if this will help still go for it Edited May 20, 2006 by Jon Thanks in advance Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 (edited) please any info... Edited March 29, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
greenmachine Posted March 29, 2006 Share Posted March 29, 2006 Just get the locations with the Au3Info, and then move the mouse, and run a script to the the color at that location. Or, make a script to constantly output the pixel color of a pixel at MouseX - 10 and MouseY - 10 (use MouseGetPos) in a traytip, and get the pixel that way. Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 (edited) Just get the locations with the Au3Info, and then move the mouse, and run a script to the the color at that location. Or, make a script to constantly output the pixel color of a pixel at MouseX - 10 and MouseY - 10 (use MouseGetPos) in a traytip, and get the pixel that way.77, 540, 77, 540, 0x888888) ok lets see if I get this right77 move left right, 540 up down0x888888 but since the mouse gets in the way of the health orb how can I get the right pixel, I think this is the pixel atleast maybe if this script worked I could do it push enter in game and it creates a box on my desktop HotKeySet("{ENTER}", "run C:\Documents and Settings\Dietmar franken\Desktop\New AutoIt v3 Script (2).au3")call("MsgBox(64, "Info","")$var = PixelGetColor( 10 , 100 )MsgBox(0,"The decmial color is", $var)MsgBox(0,"The hex color is", Hex($var, 6)) Edited March 29, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
greenmachine Posted March 29, 2006 Share Posted March 29, 2006 (edited) WinActivate ("Diablo II") WinWaitActive ("Diablo II") $Timer = TimerInit () While TimerDiff ($Timer) < 3000 TrayTip ("Pixel Grabbing", "In " & 3 - Int (TimerDiff ($Timer)/1000) & " seconds", 10) Sleep (250) WEnd TrayTip ("", "", 1) $Color = PixelGetColor (77, 540) MsgBox (0, "Pixel Grabbed", "Pixel Color for: (77, 540) is:" & @CRLF & "Dec: " & $Color & @CRLF & "Hex: " & Hex ($Color, 6)) Edited March 29, 2006 by greenmachine Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 WinActivate ("Diablo II") WinWaitActive ("Diablo II") $Timer = TimerInit () While TimerDiff ($Timer) < 3000 TrayTip ("Pixel Grabbing", "In " & 3 - Int (TimerDiff ($Timer)/1000) & " seconds", 10) Sleep (250) WEnd TrayTip ("", "", 1) $Color = PixelGetColor (77, 540) MsgBox (0, "Pixel Grabbed", "Pixel Color for: (77, 540) is:" & @CRLF & "Dec: " & $Color & @CRLF & "Hex: " & Hex ($Color, 6)) While 1 $coord = PixelSearch( 77, 540, 77, 540, 16777215) If Not @error Then call("close") EndIf WEnd Func close() winkill("Diablo II") exit EndFunc well I got this pixel, when I was in diablo and turned on script and went back in diablo it booted me. so I have the wrong pixel or its not reading the pixel if I sent a picture could you get the same pixels or does the game give you different kind of pixel colors. Thanks in advance Link to comment Share on other sites More sharing options...
greenmachine Posted March 29, 2006 Share Posted March 29, 2006 (edited) So this is your code... While 1 $coord = PixelSearch( 77, 540, 77, 540, 16777215) If Not @error Then call("close") EndIf WEnd Func close() winkill("Diablo II") exit EndFunc What that does is kill Diablo II if a pure white pixel is found in that search. I'm assuming that since you say it "booted you" that it found a pixel. I'm also fairly sure pure white isn't what you want to look for if you're checking a red health bar. Use hex format 0xRRGGBB and it'll work better (much easier to read). Oh, and instead of Call ("close"), just do close(). Edited March 29, 2006 by greenmachine Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 29, 2006 Share Posted March 29, 2006 i had that earlier i accidently recopied some code with the call my bad and um have fun with this one cuz im goin on vaca tommorow this shouldnt be that hard and idk why its being so difficult Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 29, 2006 Moderators Share Posted March 29, 2006 IMHO...ThatsGreat... Big applaud... but I'm wondering what this guy has done to make this work himself?? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 (edited) IMHO...ThatsGreat... Big applaud... but I'm wondering what this guy has done to make this work himself?? lol I made this script, well with help If WinExists("Diablo II") Then HotKeySet("{Space}", "close") Else MsgBox(64, "Info", "The game isn´t running!") Exit(0) EndIf Func Close() Send("!{F4}") EndFunc While 1 Sleep(100) WEnd im not a pixel type of guy right now and ill give that a try and see if it works, Thanks everybody that is helping, but alot goes out to green Edited March 29, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted March 29, 2006 Author Share Posted March 29, 2006 (edited) While 1 $coord = PixelSearch( 77, 540, 77, 540, 16777215) If Not @error Then call("close") EndIf WEnd Func close() winkill("Diablo II") exit EndFunc ok lol one last question I hope I replaced 16777215 with 0xRRGGBB and it didn't like it. oh and smoke by you guys giving me scripts I like reading them to learn them . Edited March 29, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
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