Coolrider64n Posted March 28, 2006 Share Posted March 28, 2006 (edited) I'm trying to make a auto healer for a game called Kal Online. Its a free MMORPG. Anyway for some reason auto it cant detect colors in D3D. At least in this game. Is there anyway to get it to see the color? Making it printscreen and than having autoit reading off of the print screen? Or some other more simpler way to do this? Heres the code I got so far. Thanks expandcollapse popupHotKeySet ("{F9}", "AutoHeal" ) HotkeySet ("{F10}", "Stop" ) ;********** Auto Heal ********** Func AutoHeal () While (1) Call ("Heal") Call ("Wait1") WEnd EndFunc ;********** Stop ********** ; Stops The Program. Func Stop () While 1 = 1 Sleep (1000) Wend EndFunc ;********** Repeater ********** ; Continuous Loop Of Program. While (1) Sleep (1) WEnd Func Wait1 () While 1 = 1 Sleep (250) WEnd EndFunc ;********** Functions: Heal ********** Func Heal () $Health = PixelGetColor( 90 , 10 ) If Not $Health > 10000000 Then Send ( "5" ) Endif EndFunc Basicaly it just reads a pixel from the health bar and if that pixel changes as your health bar goes down, it press 5 on the keyboard and heals you. Edited March 28, 2006 by Coolrider64n Link to comment Share on other sites More sharing options...
greenmachine Posted March 28, 2006 Share Posted March 28, 2006 A couple things: 1. Instead of using Call("functionName"), just use functionName(). 2. Try using Au3info.exe and see if it catches any colors. This could be a lot simpler: HotKeySet ("{F9}", "Heal" ) HotkeySet ("{F10}", "Stop" ) ;********** Stop ********** ; Stops The Program. Func Stop () While 1 Sleep (1000); sleep only? or Exit? Wend EndFunc ;********** Repeater ********** ; Continuous Loop Of Program. While 1 Sleep (10) WEnd ;********** Functions: Heal ********** Func Heal () $Health = PixelGetColor( 90 , 10 ) If Not $Health > 10000000 Then Send ( "5" ) Endif EndFunc Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 28, 2006 Share Posted March 28, 2006 no it doesnt work thats what his point is, it doesnt catch the colors since its d3d ive tryed for a dif game that uses d3d and it doenst work either Link to comment Share on other sites More sharing options...
greenmachine Posted March 28, 2006 Share Posted March 28, 2006 no it doesnt work thats what his point is, it doesnt catch the colors since its d3d ive tryed for a dif game that uses d3d and it doenst work eitherI don't know what d3d is, but how is it possible that something can't read pixel colors...?Even if it doesn't work, it's better to have more efficient code... Link to comment Share on other sites More sharing options...
Coolrider64n Posted March 28, 2006 Author Share Posted March 28, 2006 (edited) D3D is Direct X. It use to be called Direct 3D untel a updated verison came out. Right now its on Direct X 9. Direct X is a engine to use to make coding a game easyer. It has functions in it so the game programmer doesnt have to make functions for everything. Theres also OpenGL which is used to draw stuff as well. Direct X is made by Microsoft and OpenGL is open source(i think). Mac OS X and up, and linux use opengl to draw its GUI. If anyone has a way/idea to pull colors from Direct X games PLEASE reply. I also set the code up like that because I plan on expanding on it and making a full bot. So instead of writing 50 waits(for pixel scanning and stuff like that) mine as well do it once or twice. Edited March 28, 2006 by Coolrider64n Link to comment Share on other sites More sharing options...
greenmachine Posted March 28, 2006 Share Posted March 28, 2006 Ah, Direct 3D. I just didn't know the shortened version... Hmm... doesn't Diablo II use Direct 3D or Direct X? I could have sworn it did. Link to comment Share on other sites More sharing options...
Coolrider64n Posted March 28, 2006 Author Share Posted March 28, 2006 (edited) Ah, Direct 3D. I just didn't know the shortened version...Hmm... doesn't Diablo II use Direct 3D or Direct X? I could have sworn it did.It most likely does but the D3D verison Diablo 2 uses is probley D3D which is the extremely old and used for 2D games. So its really different from the newer verisons(Thats the logical guess anyway). Also /* */ doesnt work to commit a section of code out. Is there some other way besides ; every line I want to be commited out. Edited March 28, 2006 by Coolrider64n Link to comment Share on other sites More sharing options...
greenmachine Posted March 28, 2006 Share Posted March 28, 2006 Yeah it's old. Do you have a link to the game? I'd like to test it myself if I can. Link to comment Share on other sites More sharing options...
Coolrider64n Posted March 28, 2006 Author Share Posted March 28, 2006 (edited) http://www.kalonline.com/Theres server maintence going on right now so you wont beable to play for 1 hour and 7 minutes. But in the mean time you can download the client. If you have any problems updating the client(which I bet you will) post back and Ill tell you how to get it to work.EDITED: Theres a program kinda like AutoIt but its called AC Tool. AC Tool works for kal online. So it is possible to grab the pixals from kal. Just need to figure out a way. And I dont think I can since I'm not quite that advance. I refuse to use AC Tool though since its no where near as advance and as flexible as AutoIt. Edited March 28, 2006 by Coolrider64n Link to comment Share on other sites More sharing options...
Coolrider64n Posted March 28, 2006 Author Share Posted March 28, 2006 No replys for 4 hours? Means no1 have no clue of a way around this or a way to solve this. :-( Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 28, 2006 Share Posted March 28, 2006 lol i tried awhile back but instead of having a pixel search bot u coudl do something with the memory, or packets of some sort Link to comment Share on other sites More sharing options...
Coolrider64n Posted March 28, 2006 Author Share Posted March 28, 2006 The packets are written in korean and finding memory values for this game are extremely hard. Like the memory is encrypted untel the last second of when its used. If I search for current health values non show up. But I can find the total health value and useless stuff like that. Link to comment Share on other sites More sharing options...
Zibit Posted May 11, 2009 Share Posted May 11, 2009 Yeah i think your script should be more like this .... cuz it will heal only once i think...... well anyway just test it..... expandcollapse popupHotKeySet ("{F9}", "AutoHeal" ) HotkeySet ("{F10}", "Stop" ) while 1 ;********** Auto Heal ********** Func AutoHeal () While (1) Call ("Heal") Call ("Wait1") WEnd EndFunc ;********** Stop ********** ; Stops The Program. Func Stop () While 1 = 1 Sleep (1000) Wend EndFunc ;********** Repeater ********** ; Continuous Loop Of Program. While (1) Sleep (1) WEnd Func Wait1 () While 1 = 1 Sleep (250) WEnd EndFunc ;********** Functions: Heal ********** Func Heal () $Health = PixelGetColor( 90 , 10 ) If Not $Health > 10000000 Then Send ( "5" ) Endif EndFunc wend Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
Developers Jos Posted May 11, 2009 Developers Share Posted May 11, 2009 Yeah i think your script should be more like this .... cuz it will heal only once i think......well anyway just test it.....As said in the other thread... slow down.. that is a 3 yeards old thread you just resurrected , so care to tell us why? 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. Link to comment Share on other sites More sharing options...
Astounding Posted March 12, 2017 Share Posted March 12, 2017 It's been 11 years. Has a solution been found? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 12, 2017 Developers Share Posted March 12, 2017 Yes we have: we updated the forumrules not to discuss game automation anymore so our problem is solved. Please familiarize yourself with these rules. Jos tk1 1 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. Link to comment Share on other sites More sharing options...
Recommended Posts