Jump to content

WoW Target and Click Script?


Recommended Posts

Hello. I am new to AutoIt, and I've been doing my best to create a script for World of Warcraft without asking for help, but I just havent had much luck. This is what I am trying to accomplish:

1) Locate a character by name whenever they are near.

2) Target that character with a left click.

3) Right click to talk to that character.

That is all I want it to do, but for the life of me I can't figure it out. I'm not expecting anyone to write it for me, but if you could perhaps tell me what script commands I would need to use? I'm looking through the help file, but still no luck in figuring it out yet.

Any help would be greatly appreciated. Thank you.

Link to comment
Share on other sites

Hello. I am new to AutoIt, and I've been doing my best to create a script for World of Warcraft without asking for help, but I just havent had much luck. This is what I am trying to accomplish:

1) Locate a character by name whenever they are near.

2) Target that character with a left click.

3) Right click to talk to that character.

That is all I want it to do, but for the life of me I can't figure it out. I'm not expecting anyone to write it for me, but if you could perhaps tell me what script commands I would need to use? I'm looking through the help file, but still no luck in figuring it out yet.

Any help would be greatly appreciated. Thank you.

Ok, #1 is a little bit complicated, in wow, there isn't actually text on the screen its an image in the shape of text, so in order to have autoit be able to identify things by name, it would either require memory editing(Unsure that this would work either) or the use of an OCR (Optical Character Recognizer).

However, it is possible to do this in another way if the things you are "Targeting" are unique in color

But regardless, functions you want to pay extra close attention to in the help file include

PixelSearch

PixelGetColor

MouseClick

Hope this helps

Link to comment
Share on other sites

Ok, #1 is a little bit complicated, in wow, there isn't actually text on the screen its an image in the shape of text, so in order to have autoit be able to identify things by name, it would either require memory editing(Unsure that this would work either) or the use of an OCR (Optical Character Recognizer).

However, it is possible to do this in another way if the things you are "Targeting" are unique in color

But regardless, functions you want to pay extra close attention to in the help file include

PixelSearch

PixelGetColor

MouseClick

Hope this helps

Well, I wouldnt mind having it type out the "/target character" to target the character, but then I need it to right click on the character. How difficult would it be to get it to do that?

Link to comment
Share on other sites

Well, I wouldnt mind having it type out the "/target character" to target the character, but then I need it to right click on the character. How difficult would it be to get it to do that?

If the character is a unique color it would be EASY

Just pixelsearch for the color and right mouseclick it

Edited by Paulie
Link to comment
Share on other sites

If the character is a unique color it would be EASY

Just pixelsearch for the color and right mouseclick it

I ripped some of this off from a WoW Anti-AFK script I saw on the forums, so props to its writer. This is what I have so far:

WinWaitActive("World of Warcraft")

HotKeySet("{PAUSE}", "Start")

HotKeySet("!{PAUSE}","Quit")

TogglePause()

func Start()

HotKeySet("{PAUSE}")

HotKeySet("{PAUSE}", "TogglePause")

ToolTip('Entry Started.',0,0)

While 1

PixelSearch ( 0, 0, 1280, 1024, 2631457 [, 0] [, 1]] )

MouseDown("left")

MouseUp("left")

Sleep(1000)

MouseDown("right")

MouseUp("right")

Sleep(Random(120000,240000))

WEnd

EndFunc

Func TogglePause()

ToolTip('Entry Stopped.',0,0)

HotKeySet("{PAUSE}")

HotKeySet("{PAUSE}", "Start")

While 1

Sleep(100)

WEnd

EndFunc

func Quit()

I don't know if I have the syntax correct. I am using a 1280 by 1024 resolution so I guessed that the pixelsearch maximum would be between 0,0 and 1280,1024. Is that correct? If so, will this continuously check across the screen until it finds the pixel shade, then left click it and right click it? Also, what I want it to do is perform this check every 5 minutes. I would need to put some sort of loop call into it, right? I tried running this and it gives me an error. Any help you can give me on that? Thanks again!

Edited by wowzergz
Link to comment
Share on other sites

Hi all,

Just wanted to tell you that I also have been busy writing a bot for WoW, and so far I managed pretty far as it walks around, gets user health and target health and is able to attack.

BTW, to target, you can simply use an in-game macro

just send the keystroke /script AttackNearestTarget()

One of the biggest issues to me is to receive the targets health

So far I managed, but it is still very buggy as it does not use memory reading (I just dont know the locations of the health offsets...anyone?) but it simply tells the health and mana using macros from the game, then it selects the text from chat, copies them to clipboard, and uses them in autoit. Works well, just that it has a delay (about 2 sec) which is crucial...

I'd send you the source but Im not at my own PC atm. I'll send it later!

Link to comment
Share on other sites

One of the biggest issues to me is to receive the targets health

So far I managed, but it is still very buggy as it does not use memory reading (I just dont know the locations of the health offsets...anyone?) but it simply tells the health and mana using macros from the game, then it selects the text from chat, copies them to clipboard, and uses them in autoit. Works well, just that it has a delay (about 2 sec) which is crucial...

I have a tiny little group that writes some macros for various games, one of which is WoW. We have stopped development on our grinding/killing/farming bot to finish up some other projects that are further along. However.... here is the direction we were going with the health issue. We use the same sort of idea with a Guild Wars macro too. I am not at my computer so I may be off a little bit, but atleast this is how I will be doing it once we start development again...

Assumptions:

We are assuming that we will be attacking this NPC until dead. We are also assuming that players have different UI mods that may change locations of certain check points.

Basic Health Detection:

1. We have the user target an NPC so it's portrait and health bars are displayed.

2. Have the user click some button on our GUI to set the location of the health bar....

- Set WoW to focus....

- Sleep for a few seconds or wait until the WoW client is in focus...

- Get the coords of the mouse (GetCursorPos? am tired and am forgetting)...

- Get the color of the health bar at that coordinate...

- Loop and subtract 1 from the X until we no longer find the color of the bar...

- Add 2 to that X location so we get just the end of the health bar...

3. Now when the character is attacking the NPC, it loops and PixelCheckSums that pixel. Once it changes, we assume the NPC is dead now. Which it should be. If it is not, just have the character continue to attack for a couple more seconds just for good measure.

So, in concept, you are now relying on near real-time detection of the color change instead of the copy-paste-read that you are doing right now, so that will eliminate the 2 second pause. It will probably be a while before we start our project up, but if you want some help, just PM me about it.

Link to comment
Share on other sites

you should make a mod for WoW with a few RED PIXELS on his head as example.

then you will be able to make it with Pixelsearch, i really recommend you to learn the AutoIt basics before you make things like this.

but Watch Out! Warden's Safebot will probably Ban you aswell because its not legal to use 3rd party programs.

-Ace Loc

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

  • 2 months later...

Ok i got this from another sight but wonder if it will work

ok this isnt a keylogger only if rapidshare has injected 1

readme

OK

1 test_wow-erki.au3

MsgBox(4096, "Erkis bot", "Full version", 10)

mousemove(363, 340)

MouseClick("left")

MouseClick("left")

Send("Bajs") ==== change accname yourshit

sleep(500)

Mousemove(361, 399)

MouseClick("left")

MouseClick("left")

send("Bajs")===== change pass your****

sleep(1500)

mousemove(373, 444)

MouseClick("left")

MouseClick("left")

sleep(15000)

mousemove(363, 577)

MouseClick("left")

MouseClick("left")

sleep(20000)

run("run.exe")

Save changes into Erkis--wow_free_version.exe

like 250 stacks water food in slot 4 if you are rogue/warrior

1 ranged spell/gun

2 normal attack

3sit macro

4 water

Looks like key logger to me

Edited by hippo
Link to comment
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
 Share

  • Recently Browsing   0 members

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