Jump to content

World Of Warcraft Bot Casting


Recommended Posts

I have been playing wow for sometime and find myself tired of hammering the keys to cast a spell. I have tried to make a script but it only sends the key and then sleeps. The problem is when a enemy is pounding on me it interrupts the spell then moves on to the next spell. So what I am shooting for is a script that will send the key then something like a while <> wend which the spell will keep casting until it is done. Thanks :)

$Spell4 = PixelSearch($CastbarX, $CastbarY, $CastbarX, $CastbarY, $CastbarC, 5) 
    If not @error Then
                While $Spell4 <> $castingbarGone
                Send($Spell4Key, 1)
                Wend
    
    EndIf

This is what I have this far i'm trying to plan it out before I build it.

Link to comment
Share on other sites

I have been playing wow for sometime and find myself tired of hammering the keys to cast a spell. I have tried to make a script but it only sends the key and then sleeps. The problem is when a enemy is pounding on me it interrupts the spell then moves on to the next spell. So what I am shooting for is a script that will send the key then something like a while <> wend which the spell will keep casting until it is done. Thanks :)

$Spell4 = PixelSearch($CastbarX, $CastbarY, $CastbarX, $CastbarY, $CastbarC, 5) 
    If not @error Then
                While $Spell4 <> $castingbarGone
                Send($Spell4Key, 1)
                Wend
    
    EndIf

This is what I have this far i'm trying to plan it out before I build it.

Looks like this is in the wrong forum, but while you're here that won't work. Once the script gets into the while/wend loop it will never get out again. You need to add a line to update the current value of spell, ie a repeat of the first line.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Don't do it trough the pixelsearch but trough memory, their is an address that will show what spell you are casting.

Was just gonna say that :)

There's a value that changes to 0 or 1 when you're casting. Do a memory read every 10 or so milliseconds, and if the value = 0, then send a key.

Currently at work and tttomeke's site is down the the current's patch addresses, so can't post it right now. Will do when I get home if you want.

Link to comment
Share on other sites

I wish this be a new topic but somehow I can't create one.

So, everybody questions "How can I send a keystroke to inactive window with no wincontrols and keep it inactive?"

Solution:

$char = "x"
$hwnd = WinGetHandle ("World of Warcraft"); or YOURS window title

DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd, "lparam", $WM_SETFOCUS, "lparam", 0, "lparam", 0)
DllCall("user32.dll", "int", "PostMessage", "hwnd", $hwnd, "lparam", $WM_KEYDOWN, "lparam", Asc($char), "lparam", 0)
DllCall("user32.dll", "int", "PostMessage", "hwnd", $hwnd, "lparam", $WM_KEYUP, "lparam", Asc($char), "lparam", 0)
DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd, "lparam", $WM_KILLFOCUS, "lparam", 0, "lparam", 0)

note the WM_SETFOCUS / WM_KILLFOCUS messages. It's simple, my poor-minded friends.

Link to comment
Share on other sites

I wish this be a new topic but somehow I can't create one.

So, everybody questions "How can I send a keystroke to inactive window with no wincontrols and keep it inactive?"

Solution:

$char = "x"
$hwnd = WinGetHandle ("World of Warcraft"); or YOURS window title

DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd, "lparam", $WM_SETFOCUS, "lparam", 0, "lparam", 0)
DllCall("user32.dll", "int", "PostMessage", "hwnd", $hwnd, "lparam", $WM_KEYDOWN, "lparam", Asc($char), "lparam", 0)
DllCall("user32.dll", "int", "PostMessage", "hwnd", $hwnd, "lparam", $WM_KEYUP, "lparam", Asc($char), "lparam", 0)
DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwnd, "lparam", $WM_KILLFOCUS, "lparam", 0, "lparam", 0)

note the WM_SETFOCUS / WM_KILLFOCUS messages. It's simple, my poor-minded friends.

Well tried that but it says i have to declare $WM_SETFOCUS and so on but I don't even know what they are :)
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...