1. When you're in Wintergrasp, the minimap button that is normally used to show BG queue information has an option to leave Wintergrasp. Is it possible to make a button that does the same thing? If so, where would I look to find out how? I know how to make the button and all that but not sure how to code leaving.

    Thank you in advance for any help.

  2. When you're in Wintergrasp, the minimap button that is normally used to show BG queue information has an option to leave Wintergrasp. Is it possible to make a button that does the same thing? If so, where would I look to find out how? I know how to make the button and all that but not sure how to code leaving.

    Thank you in advance for any help.

    Use /framestack to find the name of the button. Extract the FrameXML code, as directed in the XML chapter in the book. Then search for the name of that button, and see what code it runs/does in order to accomplish that. The above steps can apply to most "Can I do X questions?" =).

  3. I did the /framestack step and found the frame to be MiniMapBattlefieldFrame. I looked up that Frame and found the LUA code it uses. The only thing I saw that I thought I could use was LeaveBattlefield(). I used /run LeaveBattfield() in WoW and nothing happened. The rest of the "leave" options that were in the MiniMapBattlefieldFrame appear to be variables or something and they don't do anything in WoW. I looked up LeaveBattlefield() on this site as well as Wowwiki and neither really gave much information on it aside from it removing the player from the current battleground and giving them the deserter debuff.

    Also there are a number of XML chapters in the book. Which one specifically are you referring to?

    Forgive my noobness. I'm not sure where to go from here though.

  4. It's very possible that LeaveBattlefield() requires a hardware event and would need to be attached to a button. I was referring to the XML introduction chapter (the only one there is that's solely on XML) but if you looked at the FrameXML code you already have that step so that won't help.

    Try putting your call to LeaveBattlefield() in a button and see if that works.. I'm not really sure how protected that function is.

  5. That didn't seem to work either. On click the button was suppose to LeaveBattlefield() and play a chicken sound so I would know if it worked (chicken seemed appropriate). The button knows how to cluck but it doesn't send me out of WG. I can just use the minimap button.

    Thanks for taking the time to help. I've been impressed every time with the help I've gotten from this site.

  6. I'll try and look at it the next time I have a chance.. but my time is rather limited right now unfortunately =/.

  7. Sorry for the necro, but I thought I would post this since I found a solution. Maybe it will help someone else. HearthAndResurrectFromArea() will port you out of Wintergrasp.

  8. Thanks for reporting back!