Sleeperzzz123 Posted April 5, 2008 Posted April 5, 2008 Hi guys I was wondering if anyone have ideas to why the script bellow doesnt work The idea was to automate the process of a character on 1 of my comp while I play on the other so i dont have to worry about long durations of leveling If u have not noticed I have a lvl 70 priest and would be quit fun pwning hogger when i play my hunter ^^ Heres the code: WinWaitActive("World of Warcraft") HotKeySet("{PAUSE}", "Start") HotKeySet("!{PAUSE}","Quit") TogglePause() Func Start() HotKeySet("{PAUSE}") HotKeySet("{PAUSE}", "TogglePause") ;ToolTip('AntiAFK started.',0,0) While 1 $colour = "0x08DB03" If PixelGetColor(252, 34) = $colour Then Send("{2}");; This is the code that follows u'r target -- WoW macro Else Send("{1}");; This is a spell i use incase user loses health and needs healing EndIf Sleep(1440) WEnd EndFunc Func TogglePause() ;ToolTip('AntiAFK Stopped.',0,0) HotKeySet("{PAUSE}") HotKeySet("{PAUSE}", "Start") While 1 sleep(100) WEnd EndFunc func Quit() Exit EndFunc The code should have worked by now. The only additional steps i did was add macros
BrettF Posted April 5, 2008 Posted April 5, 2008 Can't you just set your char to follow the other? The just lean over every so often when u need healing... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Sleeperzzz123 Posted April 5, 2008 Author Posted April 5, 2008 Can't you just set your char to follow the other? The just lean over every so often when u need healing... I am just too lazy to do that besides its much easier to be at one 1 comp pressing the attack button and priest for follow wherever u go automated and real lazy xD BTW i believe the problem lies somewhere in this few lines While 1 $colour = "0x08DB03" If PixelGetColor(252, 34) = $colour Then Send("{2}");; This is the code that follows u'r target -- WoW macro Else Send("{1}");; This is a spell i use incase user loses health and needs healing EndIf Sleep(1440) WEnd I cant get it to heal when needed and follow when required to. And No i dont want a macro to include both of this. I am not using my new character like some tank that needs to healed like crazy --> INFO: Macro Heal doesnt work anymore
galpha Posted April 5, 2008 Posted April 5, 2008 Memory reading would be a lot better for this then pixel searching. Basically, you find the struct of your WoWPlayer (the one that needs healing) in the memory via the object manager. When you got it, you can basically monitor with good precision the healing to be done, and other factors, e.g: The number of mobs around him, the mobs that are targetting you (for fade if playing priest), and a lot more. Also, by implementing movement code, you could also make it follow your characgter, without actually using the /follow command. Just a few ideas here. If you're starting though, I suggest you pass on what I said. For more help on the subject, I suggest you pass throught malu05's post on the forums.
Sleeperzzz123 Posted April 5, 2008 Author Posted April 5, 2008 Well it is true that memory reading is much faster and better than pixel finding. However it is much harder for me -- played with it once took me a long time figure things out. I am looking for a cheap solution to my problem and if I have lots of time to spare i can send a better script of it. Anyways the problem now is that everytime i use this code it just follows and doesnt heal when needed i am wondering wether it is a coding problem or the pixel problem. Here is how it is supposed to work Healbot v1.0: 1) a button is activated to follow the user 2) when user is attacked it heals the user just like that 3) if the user's health is full, it will again follow the user this cycle repeats till the [pause] button is clicked again I have to admit the script is flawed that it doesn't follow if u move too fast and u can lose him if there is an obstacle between u and it.
galpha Posted April 5, 2008 Posted April 5, 2008 An other question, do you use 2 computers to healbot? Because if you're using 1, you're not sending controls to the minimized window that way. Also, pixel color searching isn't working on minimized windows AFAIK.
Sleeperzzz123 Posted April 5, 2008 Author Posted April 5, 2008 humph wow thats possible -.- then that case do you have a guide on memory reading i could check out. I would like to learn memory scanning and manipulating it. I have 2 laptops but 1 of them almost gonna break down soon. the other is a dual core and maybe it could be of some use. Keep me posted guys
galpha Posted April 5, 2008 Posted April 5, 2008 There's a lot of things to understand when working with the memory (e.x.: Pointers, linked lists, structs and so on). If you want to see how it's done, I suggest reading the post that malu05 wrote on those forums. It's a 25 page post and has a TON of infos. Also, if you try the sources provided, most of them won't work since the static memory addresses changes every patches. But first, read throught the post and try to get a good understanding of it. If I have time to code it, I'll help you on some stuffs if you want, althought it would be in C#.NET
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