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

lua command to hide a popup on screen

swiny

New Member
Joined
Dec 19, 2010
Messages
517
Reaction score
73
hey guys,


im after the lua command to hide / close the guild invite box that apears on screen.
its the same command as some 1 inviting you to a group,

you can use lua to accept the group, but u need a command to hide the window.

Any info any one ?
 
You can block all guild invites from the Interface menu, so why use a LUA to remove the frame?
 
hes making a GUILD ACCEPTOR and he wants it to DECLINE when the guild is LESS THAN 25
 
declineAll plugin works for me, although its best to join a guild just to avoid the whispers... and its more beneficial for botting as well.
 
working on a little plugin that accepts a guild over level XX,

just for the perks.

it accepts and does all the crap. just doesnt hide the popup.

i tryed Lua.DoString("StaticPopup_Hide(\"GUILD_INVITE_REQUEST\")"); and all.


Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using Styx;
using Styx.Helpers;
using Styx.Logic.BehaviorTree;
using Styx.Plugins.PluginClass;
using Styx.WoWInternals;

namespace GuildAccept
{
    public class GuildAccept : HBPlugin
    {
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Guild level minimum to join
        /// </summary>
        public static int LevelToJoin = 25;

        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////

        public override string Name { get { return "Guild Accept"; } }
        public override string Author { get { return "SwInY"; } }
        public override Version Version { get { return new Version(1, 0, 0, 0); } }
        public override void Pulse() { }

        public override void Initialize()
        {
            Lua.Events.AttachEvent("GUILD_INVITE_REQUEST", GuildInvite);
        }

        public override void Dispose()
        {
            Lua.Events.DetachEvent("GUILD_INVITE_REQUEST", GuildInvite);
        }

        private void GuildInvite(object sender, LuaEventArgs e)
        {
            // Our Var's

            string GuildName;
            int GuildLevel;

            GuildName = e.Args[1].ToString();
            GuildLevel =  Convert.ToInt32(e.Args[2]);


            if (GuildLevel >= LevelToJoin)
            {
                Write("Accepting - Guild Name: {0}  Guild Level: {1}", GuildName, GuildLevel);
                Lua.DoString("AcceptGuild()");
            }
            else
            {
                Write("Declining - Guild Name: {0}  Guild Level: {1}", GuildName, GuildLevel);
                Lua.DoString("DeclineGuild()");
            }
            Lua.DoString("StaticPopup_Hide(\"GUILD_INVITE_REQUEST\")");
        }


        /// <summary>
        /// Used for our logging
        /// </summary>
        /// <param name="Value"></param>
        /// <param name="args"></param>
        public static void Write(string Value, params object[] args)
        {
            Value = string.Format(Value, args);

            Logging.WriteDebug(Color.Cyan, "[Guild Accept] " + Value);
            Logging.Write(Color.Cyan, "[Guild Accept] " + Value);
        }

    }
}
 
Have you tried /reload UI?

If you've accepted the invite, the popup shouldn't be there and would be an outdated thing... so reloading UI could fix it.
 
i remember it was a small little command, /reload ui is a bit over the top dont ya think lol
 
Tried getting the name of the close button using Fstack and then ButtonName:Click() ?
Or you could use this for the accept button instead of what you currently use to accept ginvite. That should shorten down the code a bit.
 
Last edited:
working on a little plugin that accepts a guild over level XX,

just for the perks.

it accepts and does all the crap. just doesnt hide the popup.

i tryed Lua.DoString("StaticPopup_Hide(\"GUILD_INVITE_REQUEST\")"); and all.


Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using Styx;
using Styx.Helpers;
using Styx.Logic.BehaviorTree;
using Styx.Plugins.PluginClass;
using Styx.WoWInternals;

namespace GuildAccept
{
    public class GuildAccept : HBPlugin
    {
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Guild level minimum to join
        /// </summary>
        public static int LevelToJoin = 25;

        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////

        public override string Name { get { return "Guild Accept"; } }
        public override string Author { get { return "SwInY"; } }
        public override Version Version { get { return new Version(1, 0, 0, 0); } }
        public override void Pulse() { }

        public override void Initialize()
        {
            Lua.Events.AttachEvent("GUILD_INVITE_REQUEST", GuildInvite);
        }

        public override void Dispose()
        {
            Lua.Events.DetachEvent("GUILD_INVITE_REQUEST", GuildInvite);
        }

        private void GuildInvite(object sender, LuaEventArgs e)
        {
            // Our Var's

            string GuildName;
            int GuildLevel;

            GuildName = e.Args[1].ToString();
            GuildLevel =  Convert.ToInt32(e.Args[2]);


            if (GuildLevel >= LevelToJoin)
            {
                Write("Accepting - Guild Name: {0}  Guild Level: {1}", GuildName, GuildLevel);
                Lua.DoString("AcceptGuild()");
            }
            else
            {
                Write("Declining - Guild Name: {0}  Guild Level: {1}", GuildName, GuildLevel);
                Lua.DoString("DeclineGuild()");
            }
            Lua.DoString("StaticPopup_Hide(\"GUILD_INVITE_REQUEST\")");
        }


        /// <summary>
        /// Used for our logging
        /// </summary>
        /// <param name="Value"></param>
        /// <param name="args"></param>
        public static void Write(string Value, params object[] args)
        {
            Value = string.Format(Value, args);

            Logging.WriteDebug(Color.Cyan, "[Guild Accept] " + Value);
            Logging.Write(Color.Cyan, "[Guild Accept] " + Value);
        }

    }
}

That is not the name of the form, use this macro to find the name - Mouse over then Hit Macro:
Code:
/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName())
 
It's easier to just use /fstack to get the name imo :p
 
Back
Top