Sign in to follow this  
Followers 0
Coolrider64n

Auto Healer

14 posts in this topic

#1 ·  Posted (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

HotKeySet ("{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 by Coolrider64n

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

I 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...

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Coolrider64n

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by Coolrider64n

Share this post


Link to post
Share on other sites

Yeah it's old. Do you have a link to the game? I'd like to test it myself if I can.

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by Coolrider64n

Share this post


Link to post
Share on other sites

No replys for 4 hours? Means no1 have no clue of a way around this or a way to solve this. :-(

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Yeah i think your script should be more like this .... cuz it will heal only once i think......

well anyway just test it.....

HotKeySet ("{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

Share this post


Link to post
Share on other sites

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?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0