Jump to content

Auto Healer


Recommended Posts

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
Link to comment
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
Link to comment
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...

Link to comment
Share on other sites

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
Link to comment
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.

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
Link to comment
Share on other sites

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
Link to comment
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.

Link to comment
Share on other sites

  • 3 years later...

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
Link to comment
Share on other sites

  • Developers

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

  • 7 years later...
  • Developers

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 

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

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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