What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Plugin Development: Frames

jackwetson

New Member
Joined
May 1, 2010
Messages
4
Reaction score
0
Heyup peeps,

I'm working on a plugin that does stuff when it detects frames basically. I've got most of the frams sorted but the only one I can't find anything on is the one which pops up to accept and instance port... is this not in the API?
 
add an event, chances are theres an event that fires when it pops, so you can just use that to tell when its up.
 
Any idea how to do this, sorry i dont really know....

Here's an example.

Code:
Lua.Events.AttachEvent("LFG_PROPOSAL_SHOW", HandleProposalShow);
Code:
private bool _acceptDungeonInvite;
private void HandleProposalShow(object sender, LuaEventArgs args)
{
    _acceptDungeonInvite = PartyBotSettings.Instance.AcceptDungeonInvites;
}

// Do we need to accept a dungeon invite?
new Decorator(
    ret => _acceptDungeonInvite,
    new Sequence(
        new Action(ret => Logging.Write("[PartyBot] Accepting dungeon invite")),
        new Action(ret => Lua.DoString("AcceptProposal()")),

        // Wait until we are inside the dungeon
        new WaitContinue(
            30,
            ret => StyxWoW.Me.IsInInstance,
            new Action(
                delegate
                    {
                        _acceptDungeonInvite = false;
                    }))
        )),
don't forget to detach the event

Code:
Lua.Events.DetachEvent("LFG_PROPOSAL_SHOW", HandleProposalShow);
Here's a good reference for different events.
http://www.wowwiki.com/Events_%28API%29
 
Last edited:
you need to make sure you Attach and De-Attach the events properly, or your going to have issues later on, and issues when the event is popping and your plugin isnt running. just make sure you do it right.
 
Back
Top