Jump to content

Reading Events From World of Warcraft


dfdub
 Share

Recommended Posts

First of all, yes I am aware of the WoW development thread. However, after several days of research in these forums, I am still pretty confused as to how I can recognize events that occur in WoW. I have coded some pretty complex scripts that use visual cues within the game, yet this severely limits what I can do.

The events I need appear in the chat text and/or the combat log. Does anyone know where this information is sent? Is it all piled into one big MPQ or XML file? Do I need to extract data from the MPQ and place it into an XML before I parse through? I am not looking for a handout, just a nudge in the right direction.

Link to comment
Share on other sites

If you're attempting to do something you can't do via WoW's embedded Lua engine, you're violating WoW's ToS and putting yourself at great risk to get banned. Given that you haven't provided any details of what you want to do, I can't say whether or not what you want to do is possible in Lua. I wouldn't expect much (competent) help on the AutoIt front, either. Those of us who know WoW/AutoIt well enough to help, won't; those who will help, won't know enough about AutoIt/WoW to be of use.

Link to comment
Share on other sites

Thanks for the lecture. Just so you know, I'd be more than happy to share my knowledge... it gives me such a warm and fuzzy feeling to know that this community is willing to give back.

Here is what I am trying to do, but per your response, I am sure my next post will be in vain.

Link to comment
Share on other sites

I am currently using visual cues in wow to recognize events. (zero LUA) Example: These basic functions verify that you have joined a party.

global $xcolor = 278
global $ycolor = 291
;===============================================;

func SetColor()
    $lastwin=WinGetTitle("")
    WinActivate("World of Warcraft")
    $RGB = PixelGetColor($xcolor, $ycolor)
    WinActivate($lastwin)
EndFunc

;===============================================;

Func Status($InParty)
local $currentcolor;value of current pixel color
    $lastwin=WinGetTitle("")
    WinActivate("World of Warcraft")
    $currentcolor = PixelGetColor($xcolor, $ycolor)
    if $currentcolor = $RGB Then
        $InParty = 1
    Else
        $InParty = 0
    EndIf
    Return $InParty
    WinActivate($lastwin)
EndFunc
;===============================================;

Very basic. As you can see, the x and y coordinates of the pixel I was locating are hard coded. This presents an obvious problem if I decide to resize/move the window or if I use a different resolution. I decided to try using pixel search.

func FindColor()
    $lastwin=WinGetTitle("")
    WinActivate("World of Warcraft")
    $coord=PixelSearch(230, 120, 310, 210, 0xFF9C48, 1))
    WinActivate($lastwin)
EndFunc

Func Status($InParty)
local $currentcolor;value of current pixel color
    $lastwin=WinGetTitle("")
    WinActivate("World of Warcraft")
    $currentcolor = PixelGetColor($coord[0], $coord[1])
    if $currentcolor = $RGB Then
        $InParty = 1
    Else
        $InParty = 0
    EndIf
    Return $InParty
    WinActivate($lastwin)
EndFunc

Same scenario, except instead of using the hard coded x and y, I am using coord[] array. Unfortunately, if i resize or move the window, the color changes. Wonderful. So now I move on to plan C.

func SetColor()
$percx=.05
$percy=.18
$wowinfo=WinGetPos("World of Warcraft")
$partylocx=($wowinfo[3]*$percx)+$wowinfo[1]
$partylocy=($wowinfo[2]*$percy)+$wowinfo[0]
endfunc
Func Status($InParty)
local $currentcolor;value of current pixel color
    $lastwin=WinGetTitle("")
    WinActivate("World of Warcraft")
    $currentcolor = PixelGetColor($partylocx, $partylocy)
    if $currentcolor = $RGB Then
        $InParty = 1
    Else
        $InParty = 0
    EndIf
    Return $InParty
    WinActivate($lastwin)
EndFunc

As you know, WinGetPos() returns an array with 4 values- (the x and y location of the window and the width and height.) With a little math, one can easily locate the party icon pixel without hard coding any variables. The ONLY variable here is the percentage distance the party icon is from the edge of your screen. Unfortunately this percentage changes very very slightly with different resolutions. There is more flexibility with this route but it is still not perfect.

My question: Is there any way of moving away from this method of visual integration and reading the actual events stored somewhere? Am I forced to move on to LUA to accomplish this?

Link to comment
Share on other sites

All you've done is explain how you do things in AutoIt. You still haven't stated why you are doing these things. Okay, so you want to know when you join a party. Why? Nobody can answer whether or not you should be using Lua until you state what you want to do in reaction to the events.

Link to comment
Share on other sites

Oh, hell no...

You are not going to make one of those freakin' automated "Join party bots that dump ads for selling 1,000,00 gold or level 70 characters for $49.95 with a website to visit and then disbands" are you? If so: You die now...die and got to hell!

That is...if that is what you are planning to do.

Otherwise...we need more info.

Edited by sshrum

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Link to comment
Share on other sites

No no no. I would never do such a thing. However I DO want to run around in circles and say "Hello, Welcome to my Party!". (/sarcasm) And as it stands now.. it works great. Just wondering if there is another way of recognizing the event JOINED_PARTY.

I am also more interested in solving my file_compare script since it is not working correctly... so for now... this will have to wait.

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