Beispiel #1
0
 public void ChangeToMacroDetail(CustomCommands macro = null)
 {
     this.ActiveMacro = macro;
     UiThread.RunOnIdle(DoChangeToMacroDetail);
 }
 public MasterViewModel()
 {
     Commands = new CustomCommands();
     Devices  = new ObservableCollection <DeviceViewModel>();
     History  = new HistoryViewModel(Devices);
 }
Beispiel #3
0
        public override void Initialize()
        {
            // Aimsharp.DebugMode();

            Aimsharp.PrintMessage("Perfect Simcraft Series: Ret Paladin - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("Recommended talents: 3313213", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            // Aimsharp.PrintMessage("/xxxxx Prepull 10", Color.Blue);
            // Aimsharp.PrintMessage("--Starts the prepull actions.", Color.Blue);
            // Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);

            Aimsharp.Latency    = 0;
            Aimsharp.QuickDelay = 125;

            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            RacialPower = GetDropDown("Racial Power");

            Spellbook.Add(MajorPower);

            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }
            if (RacialPower == "Bloodelf")
            {
                Spellbook.Add("Arcane Torrent");
            }

            Spellbook.Add("Rebuke");
            Spellbook.Add("Shield of Vengeance");
            Spellbook.Add("Crusade");
            Spellbook.Add("Avenging Wrath");
            Spellbook.Add("Inquisition");
            Spellbook.Add("Blade of Justice");
            Spellbook.Add("Judgment");
            Spellbook.Add("Execution Sentence");
            Spellbook.Add("Divine Storm");
            Spellbook.Add("Templar's Verdict");
            Spellbook.Add("Wake of Ashes");
            Spellbook.Add("Hammer of Wrath");
            Spellbook.Add("Consecration");
            Spellbook.Add("Crusader Strike");

            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Lifeblood");
            Buffs.Add("Memory of Lucid Dreams");
            Buffs.Add("Reckless Force");
            Buffs.Add("Guardian of Azeroth");

            Buffs.Add("Avenging Wrath");
            Buffs.Add("Crusade");
            Buffs.Add("Seething Rage");
            Buffs.Add("Inquisition");
            Buffs.Add("Empyrean Power");
            Buffs.Add("Divine Purpose");

            Debuffs.Add("Razor Coral");
            Debuffs.Add("Conductive Ink");
            Debuffs.Add("Shiver Venom");
            Debuffs.Add("Judgment");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));

            Macros.Add(TopTrinket, "/use " + TopTrinket);
            Macros.Add(BotTrinket, "/use " + BotTrinket);
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));

            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
            CustomCommands.Add("AOE");
            // CustomCommands.Add("Prepull");
            // CustomCommands.Add("LightAOE");
        }
Beispiel #4
0
        public override void Initialize()
        {
            // Aimsharp.DebugMode();

            Aimsharp.PrintMessage("Perfect Simcraft Series: Boomkin - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("Recommended talents: 1333331", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            // Aimsharp.PrintMessage("/xxxxx Prepull 10", Color.Blue);
            // Aimsharp.PrintMessage("--Starts the prepull actions.", Color.Blue);
            // Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);

            Aimsharp.Latency    = 50;
            Aimsharp.QuickDelay = 100;
            Aimsharp.SlowDelay  = 300;

            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            RacialPower = GetDropDown("Racial Power");

            Spellbook.Add(MajorPower);

            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }
            if (RacialPower == "Bloodelf")
            {
                Spellbook.Add("Arcane Torrent");
            }

            Spellbook.Add("Moonkin Form");
            Spellbook.Add("Celestial Alignment");
            Spellbook.Add("Incarnation: Chosen of Elune");
            Spellbook.Add("Moonfire");
            Spellbook.Add("Sunfire");
            Spellbook.Add("Stellar Flare");
            Spellbook.Add("Thorns");
            Spellbook.Add("Warrior of Elune");
            Spellbook.Add("Innervate");
            Spellbook.Add("Force of Nature");
            Spellbook.Add("Fury of Elune");
            Spellbook.Add("Starfall");
            Spellbook.Add("Starsurge");
            Spellbook.Add("New Moon");
            Spellbook.Add("Half Moon");
            Spellbook.Add("Full Moon");
            Spellbook.Add("Lunar Strike");
            Spellbook.Add("Solar Wrath");

            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Lifeblood");
            Buffs.Add("Memory of Lucid Dreams");
            Buffs.Add("Reckless Force");
            Buffs.Add("Guardian of Azeroth");

            Buffs.Add("Moonkin Form");
            Buffs.Add("Celestial Alignment");
            Buffs.Add("Incarnation: Chosen of Elune");
            Buffs.Add("Starlord");
            Buffs.Add("Warrior of Elune");
            Buffs.Add("Lively Spirit");
            Buffs.Add("Blessing of Elune");
            Buffs.Add("Arcanic Pulsar");
            Buffs.Add("Lunar Empowerment");
            Buffs.Add("Solar Empowerment");

            Debuffs.Add("Razor Coral");
            Debuffs.Add("Conductive Ink");
            Debuffs.Add("Shiver Venom");
            Debuffs.Add("Moonfire");
            Debuffs.Add("Sunfire");
            Debuffs.Add("Stellar Flare");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));
            Items.Add("Neural Synapse Enhancer");

            Macros.Add(TopTrinket, "/use " + TopTrinket);
            Macros.Add(BotTrinket, "/use " + BotTrinket);
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");
            Macros.Add("neural", "/use Neural Synapse Enhancer");

            Macros.Add("force cursor", "/cast [@cursor] Force of Nature");
            Macros.Add("cancel star", "/cancelaura Starlord");
            Macros.Add("starfall cursor", "/cast [@cursor] Starfall");
            //Macros.Add("inn player", "/cast [@player] Innervate"); //doesn't work can only hit healers
            Macros.Add("thorns player", "/cast [@player] Thorns");

            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
            CustomCommands.Add("AOE");
            // CustomCommands.Add("Prepull");
            // CustomCommands.Add("LightAOE");
        }
Beispiel #5
0
        public override void Initialize()
        {
            Aimsharp.DebugMode();
            Aimsharp.PrintMessage("Vid Marksman - v 1.0", Color.Yellow);

            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx NoAOE --Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx Potions --Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns --Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);


            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            RacialPower = GetDropDown("Racial Power");
            usableitems = GetString("Use item: Case Sens");
            AzeritePrimalInstinctsEnabled = GetCheckBox("Azerite Primal Instincts");
            AzeriteRapidReloadEnabled     = GetCheckBox(("Azerite Rapid Reload"));
            AzeriteDanceOfDeathRank       = GetSlider("Azerite Dance of Death Rank: ");


            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }

            Spellbook.Add(MajorPower);
            Spellbook.Add("Bestial Wrath");
            Spellbook.Add("Hunter's Mark");
            Spellbook.Add("Kill Command");
            Spellbook.Add("Cobra Shot");
            Spellbook.Add("Multi-Shot");
            Spellbook.Add("Barbed Shot");
            Spellbook.Add("Barrage");
            Spellbook.Add("Dire Beast");
            Spellbook.Add("Stampede");
            Spellbook.Add("Kill Shot");
            Spellbook.Add("Bloodshed");
            Spellbook.Add("Exhilaration");
            Spellbook.Add("Arcane Shot");
            Spellbook.Add("Aspect of the Wild");



            Buffs.Add("Lifeblood");
            Buffs.Add("Beast Cleave");
            Buffs.Add("Trick Shots");
            Buffs.Add("Trueshot");
            Buffs.Add("Memory of Lucid Dreams");


            Debuffs.Add("Razor Coral");
            Debuffs.Add("Hunter's Mark");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(usableitems);

            Macros.Add("ItemUse", "/use " + usableitems);
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");

            CustomCommands.Add("NoAOE");
            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
        }
Beispiel #6
0
 public static void SendCustomCommand(string recipient, CustomCommands cmd, params object[] args)
 {
     SendCustomCommand(new string[] { recipient }, cmd, args);
 }
Beispiel #7
0
        private void ProcessCustomCommand(CustomCommands cmd, int senderID, string senderName, string[] args)
        {
            Exception exception;
            VGen0 method = null;
            VGen0 target = null;
            try
            {
                User user;
                string str2;
                object[] objArray;
                int num3;
                bool flag;
                ClanMember current;
                string str3;
                string[] strArray3;
                string str7;
                CustomCommands commands = cmd;
                if (commands <= CustomCommands.TeamGameEnd)
                {
                    string str6;
                    switch (commands)
                    {
                        case CustomCommands.UpdateSender:
                            if (senderID != User.Current.ID)
                            {
                                goto Label_0447;
                            }
                            this.RemoveChatParticipant(User.Current.Name);
                            this.AddChatParticipant(User.Current);
                            goto Label_0458;

                        case CustomCommands.OnlineStatus:
                            this.SetOnlineStatus(senderName, Convert.ToInt32(args[0]) > 0);
                            return;

                        case ((CustomCommands) 4):
                        case CustomCommands.SetChatEffect:
                        case CustomCommands.UpdateClanMember:
                        case CustomCommands.InviteToClan:
                        case CustomCommands.RequestClanInvite:
                        case CustomCommands.FriendInvite:
                        case CustomCommands.Whisper:
                        case CustomCommands.Ban:
                        case CustomCommands.SystemEvent:
                        case CustomCommands.GameEvent:
                        case (CustomCommands.SetStatus | CustomCommands.EndPrivateMessage):
                        case (CustomCommands.SetChatEffect | CustomCommands.EndPrivateMessage):
                        case (CustomCommands.SetChatEffect | CustomCommands.SystemMessage | CustomCommands.EndPrivateMessage):
                        case (CustomCommands.EmoteUnavailable | CustomCommands.SystemMessage):
                        case (CustomCommands.EmoteUnavailable | CustomCommands.UpdateSender):
                        case (CustomCommands.EmoteUnavailable | CustomCommands.SystemMessage | CustomCommands.UpdateSender):
                        case ((CustomCommands) 0x2c):
                        case (CustomCommands.EmoteUnavailable | CustomCommands.SetStatus):
                        case (CustomCommands.EmoteUnavailable | CustomCommands.SetChatEffect):
                        case (CustomCommands.EmoteUnavailable | CustomCommands.SetChatEffect | CustomCommands.SystemMessage):
                        case (CustomCommands.Unknown | CustomCommands.EndPrivateMessage | CustomCommands.Kick):
                        case (CustomCommands.SystemMessage | CustomCommands.EndPrivateMessage | CustomCommands.Kick):
                        case (CustomCommands.SetStatus | CustomCommands.EndPrivateMessage | CustomCommands.Kick):
                        case (CustomCommands.SetChatEffect | CustomCommands.EndPrivateMessage | CustomCommands.Kick):
                        case (CustomCommands.SetChatEffect | CustomCommands.SystemMessage | CustomCommands.EndPrivateMessage | CustomCommands.Kick):
                        case (CustomCommands.RequestEmotes | CustomCommands.EndPrivateMessage):
                        case (CustomCommands.RequestEmotes | CustomCommands.SystemMessage | CustomCommands.EndPrivateMessage):
                        case (CustomCommands.RequestEmotes | CustomCommands.UpdateSender | CustomCommands.EndPrivateMessage):
                        case (CustomCommands.RequestEmotes | CustomCommands.SystemMessage | CustomCommands.UpdateSender | CustomCommands.EndPrivateMessage):
                        case CustomCommands.AutomatchRequestAlliance:
                        case CustomCommands.AutomatchConfirmAlliance:
                        case CustomCommands.AutomatchCancelAlliance:
                        case CustomCommands.AutomatchEndAlliance:
                        case CustomCommands.AutomatchStatusMessage:
                        case CustomCommands.AutomatchDecline:
                        case CustomCommands.AutomatchAcknowledgeTeam:
                        case CustomCommands.AutomatchTeamMembers:
                        case (CustomCommands.AutomatchTeamMembers | CustomCommands.SystemMessage):
                        case (CustomCommands.AutomatchTeamMembers | CustomCommands.UpdateSender):
                        case (CustomCommands.AutomatchTeamMembers | CustomCommands.SystemMessage | CustomCommands.UpdateSender):
                        case ((CustomCommands) 0x94):
                        case (CustomCommands.AutomatchTeamMembers | CustomCommands.SetStatus):
                            goto Label_12EC;

                        case CustomCommands.SetStatus:
                            goto Label_077A;

                        case CustomCommands.UpdateClan:
                            if (args.Length <= 0)
                            {
                                goto Label_0918;
                            }
                            if (args.Length <= 1)
                            {
                                goto Label_08FF;
                            }
                            objArray = new object[args.Length - 1];
                            num3 = 1;
                            goto Label_08D7;

                        case CustomCommands.ClanMemberOnline:
                            goto Label_0980;

                        case CustomCommands.RefreshFriends:
                            if (args.Length <= 0)
                            {
                                goto Label_0AA4;
                            }
                            if (args.Length <= 1)
                            {
                                goto Label_0A8F;
                            }
                            objArray = new object[args.Length - 1];
                            num3 = 1;
                            goto Label_0A62;

                        case CustomCommands.RemoveFriend:
                            this.RemoveFriend(senderName, senderID, false);
                            return;

                        case CustomCommands.Kick:
                            this.OnRecieveKick(senderName);
                            return;

                        case CustomCommands.AutomatchRequest:
                            SupcomAutomatch.GetSupcomAutomatch().AutomatchRequest(senderID, senderName);
                            return;

                        case CustomCommands.AutomatchAccept:
                            SupcomAutomatch.GetSupcomAutomatch().AutomatchAccept(senderID, senderName);
                            return;

                        case CustomCommands.AutomatchAcknowledge:
                            SupcomAutomatch.GetSupcomAutomatch().AutomatchAcknowledge(senderID, senderName);
                            return;

                        case CustomCommands.AutomatchConfirm:
                            SupcomAutomatch.GetSupcomAutomatch().AutomatchConfirm(senderID, senderName);
                            return;

                        case CustomCommands.AutomatchBusy:
                            SupcomAutomatch.GetSupcomAutomatch().AutomatchBusy(senderID, senderName);
                            return;

                        case CustomCommands.AutomatchLaunch:
                            SupcomAutomatch.GetSupcomAutomatch().AutomatchLaunch(senderID, senderName, args[0], Convert.ToInt32(args[1]), args[2], args[3]);
                            return;

                        case CustomCommands.RequestEmotes:
                        {
                            if ((args.Length <= 0) || !Emote.AllEmotes.ContainsKey(args[0]))
                            {
                                goto Label_0B5A;
                            }
                            Emote data = Emote.AllEmotes[args[0]];
                            Messaging.SendData(senderName, data);
                            return;
                        }
                        case CustomCommands.NetData:
                            if ((args != null) && (args.Length >= 4))
                            {
                                int dataCode = Convert.ToInt32(args[0]);
                                int chunk = Convert.ToInt32(args[1]);
                                int totalChunks = Convert.ToInt32(args[2]);
                                string str5 = args[3];
                                Messaging.RecieveData(senderName, dataCode, chunk, totalChunks, str5);
                            }
                            return;

                        case CustomCommands.EventExit:
                            if ((args != null) && (args.Length > 0))
                            {
                                str6 = args[0];
                                this.DoPlayerExit(str6);
                            }
                            return;

                        case CustomCommands.EventOperator:
                            if ((args != null) && (args.Length > 0))
                            {
                                str6 = args[0];
                                this.DoPlayerExit(str6);
                            }
                            return;

                        case CustomCommands.EventDisconnect:
                            if ((args != null) && (args.Length > 0))
                            {
                                str6 = args[0];
                                this.DoPlayerExit(str6);
                            }
                            return;

                        case CustomCommands.ChangeLocation:
                            goto Label_07F7;

                        case CustomCommands.EndPrivateMessage:
                            this.PMTargets.Remove(senderName);
                            return;

                        case CustomCommands.UpdateUser:
                            goto Label_05D9;

                        case CustomCommands.EnterChannel:
                            goto Label_06AB;

                        case CustomCommands.AddUser:
                            goto Label_0630;

                        case CustomCommands.ChangeName:
                            goto Label_0497;

                        case CustomCommands.EmoteUnavailable:
                            if (args.Length > 0)
                            {
                                this.SystemMessage("<LOC>The emote '{0}' is no longer available from {1}.", new object[] { args[0], senderName });
                            }
                            return;

                        case CustomCommands.PingRequest:
                            Messaging.SendCustomCommand(senderName, CustomCommands.PingResponse, new object[0]);
                            return;

                        case CustomCommands.PingResponse:
                            this.PingResponse(senderName);
                            return;

                        case CustomCommands.PlayerMessage:
                            if ((args.Length <= 0) || !this.TryFindUser(senderName, out user))
                            {
                                return;
                            }
                            str2 = args[0];
                            if (args.Length <= 1)
                            {
                                goto Label_03F6;
                            }
                            objArray = new object[args.Length - 1];
                            num3 = 1;
                            goto Label_03C9;

                        case CustomCommands.AM1:
                            if (args.Length > 0)
                            {
                                this.SetUserVisibility(senderName, bool.Parse(args[0]));
                            }
                            return;

                        case CustomCommands.AutomatchNotifyAllies:
                            SupcomAutomatch.GetSupcomAutomatch().AutomatchNotifyAllies(senderID, senderName, args[0], Convert.ToInt32(args[1]), args[2]);
                            return;

                        case CustomCommands.AutomatchTeamName:
                            if (args.Length >= 2)
                            {
                                SupcomAutomatch.GetSupcomAutomatch().AutomatchNotifyOpponentTeam(senderID, senderName, args[0], args[1]);
                            }
                            return;

                        case CustomCommands.AutomatchDirectChallenge:
                            this.RequestDirectChallenge(senderName);
                            return;

                        case CustomCommands.AutomatchConfirmChallenge:
                            this.ConfirmChallenge(senderName, args[0]);
                            return;

                        case CustomCommands.AutomatchAbortChallenge:
                            SupcomAutomatch.GetSupcomAutomatch().AutomatchAbortChallenge(senderID, senderName);
                            return;

                        case CustomCommands.TeamGameMessage:
                            if ((this.DlgTeamGame != null) && (args.Length > 0))
                            {
                                this.DlgTeamGame.OnMessageRecieved(senderName, args[0]);
                            }
                            return;

                        case CustomCommands.TeamGame:
                            if (args.Length > 0)
                            {
                                this.ReceiveTeamGame(args[0]);
                            }
                            return;

                        case CustomCommands.TeamGameMember:
                            if ((this.DlgTeamGame != null) && (args.Length > 0))
                            {
                                this.DlgTeamGame.UpdateMember(args[0]);
                            }
                            return;

                        case CustomCommands.TeamGameLaunch:
                            if (this.DlgTeamGame != null)
                            {
                                this.DlgTeamGame.GameLaunched = true;
                            }
                            return;

                        case CustomCommands.TeamGameDisband:
                            if (this.DlgTeamGame != null)
                            {
                                this.DlgTeamGame.DisbandTeam();
                            }
                            return;

                        case CustomCommands.TeamGameKick:
                            if (this.DlgTeamGame != null)
                            {
                                if (args.Length <= 0)
                                {
                                    goto Label_11A3;
                                }
                                str7 = args[0];
                                if (!(str7.ToLower() == User.Current.Name.ToLower()))
                                {
                                    goto Label_117B;
                                }
                                this.DlgTeamGame.ReceiveKick();
                            }
                            return;

                        case CustomCommands.TeamGameLeave:
                            if (this.DlgTeamGame != null)
                            {
                                this.DlgTeamGame.RemoveMember(senderName, "<LOC>{0} has left the team game.", new object[] { senderName });
                            }
                            return;

                        case CustomCommands.TeamGameInvite:
                            this.ReceiveTeamInvite(senderName);
                            return;

                        case CustomCommands.TeamGameAcceptInvite:
                            if (this.DlgTeamGame == null)
                            {
                                goto Label_0ED7;
                            }
                            this.DlgTeamGame.AddMember(senderName, senderID);
                            return;

                        case CustomCommands.TeamGameDeclineInvite:
                            if (this.DlgTeamGame == null)
                            {
                                return;
                            }
                            if ((args == null) || (args.Length <= 0))
                            {
                                goto Label_0F92;
                            }
                            str2 = args[0];
                            strArray3 = new string[args.Length - 1];
                            num3 = 1;
                            goto Label_0F6C;

                        case CustomCommands.TeamGameFull:
                            this.SystemMessage("<LOC>{0}'s game is now {1} and you can no longer join it.", new object[] { senderName, "full" });
                            return;

                        case CustomCommands.TeamGameMap:
                            if ((this.DlgTeamGame != null) && (args.Length == 2))
                            {
                                this.DlgTeamGame.ChangeMaps(args[0], args[1]);
                            }
                            return;

                        case CustomCommands.TeamGameStatus:
                            if ((this.DlgTeamGame != null) && (args.Length > 0))
                            {
                                string status = args[0];
                                strArray3 = new string[args.Length - 1];
                                Array.ConstrainedCopy(args, 1, strArray3, 0, strArray3.Length);
                                this.DlgTeamGame.SetStatus(status, strArray3);
                            }
                            return;

                        case CustomCommands.TeamGameAbort:
                            if (this.DlgTeamGame != null)
                            {
                                this.DlgTeamGame.GameLaunched = false;
                            }
                            return;

                        case CustomCommands.TeamGameUnavailable:
                            this.SystemMessage("<LOC>{0}'s game is now {1} and you can no longer join it.", new object[] { senderName, "unavailable" });
                            return;

                        case CustomCommands.TeamGameStart:
                            this.OnTeamAutomatchLaunchGame();
                            return;

                        case CustomCommands.TeamGameEnd:
                            this.OnTeamAutomatchExit();
                            return;
                    }
                }
                else
                {
                    int num;
                    switch (commands)
                    {
                        case CustomCommands.LadderChallengeRequest:
                            num = int.Parse(args[0]);
                            this.RecieveLadderChallengeRequest(senderName, num);
                            return;

                        case CustomCommands.LadderChallengeAccept:
                        {
                            string sessionId = args[0];
                            num = int.Parse(args[1]);
                            this.BeginLadderChallengeMatch(sessionId, num);
                            return;
                        }
                        case CustomCommands.LadderChallengeDecline:
                            if ((!base.Disposing && !base.IsDisposed) && base.IsHandleCreated)
                            {
                                if (method == null)
                                {
                                    method = delegate {
                                        if ((args != null) && (args.Length > 0))
                                        {
                                            string format = args[0];
                                            string[] strArray = new string[args.Length - 1];
                                            for (int j = 1; j < args.Length; j++)
                                            {
                                                strArray[j - 1] = Loc.Get(args[j]);
                                            }
                                            DlgMessage.ShowDialog(string.Format(format, (object[]) strArray));
                                        }
                                        else
                                        {
                                            DlgMessage.ShowDialog(string.Format("<LOC>{0} has declined your ladder challenge.", senderName));
                                        }
                                    };
                                }
                                base.BeginInvoke(method);
                            }
                            return;

                        case CustomCommands.GameLobbyMessage:
                            if ((args != null) && (args.Length >= 1))
                            {
                                uint message = uint.Parse(args[0]);
                                string[] destinationArray = new string[args.Length - 1];
                                Array.ConstrainedCopy(args, 1, destinationArray, 0, destinationArray.Length);
                                this.RecieveGameLobbyMessage(senderName, senderID, message, destinationArray);
                            }
                            return;

                        case CustomCommands.AutomatchAbortDirectChallenge:
                            this.AbortChallenge(senderName, args[0]);
                            return;
                    }
                }
                goto Label_12EC;
            Label_03AB:
                objArray[num3 - 1] = Loc.Get(args[num3]);
                num3++;
            Label_03C9:
                if (num3 < args.Length)
                {
                    goto Label_03AB;
                }
                this.AddChat(user, string.Format(Loc.Get(str2), objArray));
                return;
            Label_03F6:
                this.AddChat(user, Loc.Get(str2));
                return;
            Label_0447:
                this.RefreshChatParticipant(senderName, true);
            Label_0458:
                if (args.Length > 0)
                {
                    this.SetUserStatus(senderName, args[0]);
                }
                this.pnlUserListClan.RefreshData();
                return;
            Label_0497:
                flag = false;
                foreach (User user2 in User.CurrentFriends)
                {
                    if (user2.ID == senderID)
                    {
                        this.SystemMessage("<LOC>Your friend {0} is now known as {1}. This change has been automatically updated on your system.", new object[] { user2.Name, senderName });
                        flag = true;
                        user2.Name = senderName;
                        this.FrmMain_Friends();
                        break;
                    }
                }
                using (IEnumerator<ClanMember> enumerator2 = Clan.CurrentMembers.GetEnumerator())
                {
                    while (enumerator2.MoveNext())
                    {
                        current = enumerator2.Current;
                        if (current.ID == senderID)
                        {
                            if (!flag)
                            {
                                this.SystemMessage("<LOC>Your clan member {0} is now known as {1}. This change has been automatically updated on your system.", new object[] { current.Name, senderName });
                            }
                            current.Name = senderName;
                            this.FrmMain_Clan();
                            return;
                        }
                    }
                }
                return;
            Label_05D9:;
                try
                {
                    if (args.Length > 0)
                    {
                        this.ChatroomQueue.Enqueue(this._UpdateUser, new object[] { args });
                    }
                }
                catch (Exception exception1)
                {
                    exception = exception1;
                    ErrorLog.WriteLine(exception);
                }
                return;
            Label_0630:;
                try
                {
                    if (args.Length > 0)
                    {
                        this.ChatroomQueue.Enqueue(this._AddUser, new object[] { args });
                    }
                    else
                    {
                        ErrorLog.WriteLine("Malformed Add User Command from: {0}", new object[] { senderName });
                    }
                }
                catch (Exception exception2)
                {
                    exception = exception2;
                    ErrorLog.WriteLine(exception);
                }
                return;
            Label_06AB:;
                try
                {
                    if (args.Length > 0)
                    {
                        this.ChatroomQueue.Enqueue(this._AddUser, new object[] { args });
                    }
                    else
                    {
                        ErrorLog.WriteLine("Malformed Enter Channel Command from: {0}", new object[] { senderName });
                    }
                }
                catch (Exception exception3)
                {
                    exception = exception3;
                    ErrorLog.WriteLine(exception);
                }
                return;
            Label_077A:
                str3 = args[0];
                if (this.PlayerChatEffects.ContainsKey(senderName) && (this.PlayerChatEffects[senderName].Status.Name == str3))
                {
                    str3 = "none";
                }
                this.SetUserStatus(senderName, str3);
                this.RecieveChatEffect(senderName, str3);
                return;
            Label_07F7:;
                try
                {
                    if (args.Length == 2)
                    {
                        GPG.Multiplayer.Client.LocationTypes type = (GPG.Multiplayer.Client.LocationTypes) Convert.ToUInt32(args[0]);
                        string str4 = args[1];
                        this.ChangeLocation(senderName, new Location(type, str4));
                    }
                }
                catch (Exception exception4)
                {
                    exception = exception4;
                    ErrorLog.WriteLine(exception);
                }
                return;
            Label_08B9:
                objArray[num3 - 1] = Loc.Get(args[num3]);
                num3++;
            Label_08D7:
                if (num3 < args.Length)
                {
                    goto Label_08B9;
                }
                this.SystemMessage(args[0], objArray);
                goto Label_0918;
            Label_08FF:
                this.SystemMessage(args[0], new object[0]);
            Label_0918:
                if (Clan.Current != null)
                {
                    string[] currentMembersMsgList = Clan.CurrentMembersMsgList;
                    this.FrmMain_Clan();
                    if (Clan.Current == null)
                    {
                        num3 = 0;
                        while (num3 < currentMembersMsgList.Length)
                        {
                            this.RefreshChatParticipant(currentMembersMsgList[num3]);
                            num3++;
                        }
                    }
                }
                else
                {
                    this.FrmMain_Clan();
                }
                return;
            Label_0980:
                if ((Clan.Current != null) && Clan.CurrentMembers.ContainsIndex("name", senderName))
                {
                    bool flag2 = Convert.ToInt32(args[0]) > 0;
                    if (Clan.CurrentMembers.TryFindByIndex("name", senderName, out current))
                    {
                        current.Online = flag2;
                        this.pnlUserListClan.RefreshData();
                    }
                }
                return;
            Label_0A44:
                objArray[num3 - 1] = Loc.Get(args[num3]);
                num3++;
            Label_0A62:
                if (num3 < args.Length)
                {
                    goto Label_0A44;
                }
                this.UpdateFriends(string.Format(args[0], objArray));
                goto Label_0AAE;
            Label_0A8F:
                this.UpdateFriends(args[0]);
                goto Label_0AAE;
            Label_0AA4:
                this.UpdateFriends(null);
            Label_0AAE:
                if (target == null)
                {
                    target = delegate {
                        this.ChatContainers.RemoveItem(senderName);
                        this.AddChatParticipant(DataAccess.GetObjects<User>("GetPlayerDetails", new object[] { senderName })[0]);
                        this.pnlUserListClan.RefreshData();
                    };
                }
                this.ChatroomQueue.Enqueue(target, new object[0]);
                return;
            Label_0B5A:;
                Messaging.SendCustomCommand(senderName, CustomCommands.EmoteUnavailable, new object[] { args[0] });
                return;
            Label_0ED7:
                Messaging.SendCustomCommand(senderName, CustomCommands.TeamGameUnavailable, new object[0]);
                return;
            Label_0F4E:
                strArray3[num3 - 1] = Loc.Get(args[num3]);
                num3++;
            Label_0F6C:
                if (num3 < args.Length)
                {
                    goto Label_0F4E;
                }
                this.DlgTeamGame.SystemMessage(str2, strArray3);
                return;
            Label_0F92:;
                this.DlgTeamGame.SystemMessage("<LOC>{0} has declined your request to join your team.", new object[] { senderName });
                return;
            Label_117B:;
                this.DlgTeamGame.RemoveMember(str7, "<LOC>{0} has been kicked out of your team game.", new object[] { str7 });
                return;
            Label_11A3:
                this.DlgTeamGame.ReceiveKick();
                return;
            Label_12EC:
                if ((cmd >= CustomCommands.TournamentLaunchGame) && (cmd <= CustomCommands.TournamentReservedCmd9))
                {
                    TournamentCommands.ProcessCustomCommand(this, cmd, senderID, senderName, args);
                }
                else if (User.IsUserIgnored(senderID))
                {
                    if (cmd != CustomCommands.GameEvent)
                    {
                        Messaging.SendCustomCommand(senderName, CustomCommands.SystemMessage, new object[] { "<LOC>{0} is not receiving your messages.", User.Current });
                    }
                }
                else if (User.Current.IsDND && !this.CheckDNDOverride(senderName))
                {
                    if (cmd != CustomCommands.GameEvent)
                    {
                        Messaging.SendCustomCommand(senderName, CustomCommands.SystemMessage, new object[] { "<LOC>Could not send message to {0} because user is in Do Not Disturb mode.", User.Current });
                    }
                }
                else if (this.mIsInGame)
                {
                    if (cmd != CustomCommands.GameEvent)
                    {
                        Messaging.SendCustomCommand(senderName, CustomCommands.SystemMessage, new object[] { "<LOC>{0} is playing a game and not receiving messages at this time.", User.Current });
                    }
                }
                else
                {
                    switch (cmd)
                    {
                        case CustomCommands.AutomatchRequestAlliance:
                            DlgSupcomTeamSelection.ProcessCommand(this, cmd, senderID, senderName, args);
                            return;

                        case CustomCommands.AutomatchConfirmAlliance:
                            DlgSupcomTeamSelection.ProcessCommand(this, cmd, senderID, senderName, args);
                            return;

                        case CustomCommands.AutomatchCancelAlliance:
                            DlgSupcomTeamSelection.ProcessCommand(this, cmd, senderID, senderName, args);
                            return;

                        case CustomCommands.AutomatchEndAlliance:
                            DlgSupcomTeamSelection.ProcessCommand(this, cmd, senderID, senderName, args);
                            return;

                        case CustomCommands.AutomatchStatusMessage:
                            DlgSupcomTeamSelection.ProcessCommand(this, cmd, senderID, senderName, args);
                            return;

                        case CustomCommands.AutomatchTeamName:
                        case CustomCommands.AutomatchDirectChallenge:
                        case CustomCommands.AutomatchConfirmChallenge:
                        case CustomCommands.AutomatchAbortChallenge:
                        case CustomCommands.UpdateClan:
                        case CustomCommands.UpdateClanMember:
                        case CustomCommands.ClanMemberOnline:
                            return;

                        case CustomCommands.AutomatchDecline:
                            DlgSupcomTeamSelection.ProcessCommand(this, cmd, senderID, senderName, args);
                            return;

                        case CustomCommands.AutomatchAcknowledgeTeam:
                            DlgSupcomTeamSelection.ProcessCommand(this, cmd, senderID, senderName, args);
                            return;

                        case CustomCommands.AutomatchTeamMembers:
                            if (args.Length == 2)
                            {
                                this.SetStatus(Loc.Get(args[0]) + args[1], new object[0]);
                            }
                            return;

                        case CustomCommands.GameEvent:
                            if (args.Length > 0)
                            {
                                str2 = args[0];
                                if (args.Length <= 1)
                                {
                                    goto Label_16B5;
                                }
                                objArray = new object[args.Length - 1];
                                num3 = 1;
                                while (num3 < args.Length)
                                {
                                    objArray[num3 - 1] = Loc.Get(args[num3]);
                                    num3++;
                                }
                                this.GameEvent(str2, objArray);
                            }
                            return;

                        case CustomCommands.SystemEvent:
                            if (args.Length > 0)
                            {
                                str2 = args[0];
                                if (args.Length > 1)
                                {
                                    objArray = new object[args.Length - 1];
                                    for (num3 = 1; num3 < args.Length; num3++)
                                    {
                                        objArray[num3 - 1] = Loc.Get(args[num3]);
                                    }
                                    this.SystemEvent(str2, objArray);
                                }
                                else
                                {
                                    this.SystemEvent(str2, new object[0]);
                                }
                            }
                            return;

                        case CustomCommands.SetChatEffect:
                            this.SetChatEffect(senderName, args[0]);
                            return;

                        case CustomCommands.InviteToClan:
                        {
                            int clanId = Convert.ToInt32(args[0]);
                            string clanName = args[1];
                            string clanAbbr = args[2];
                            this.RecieveClanInvite(senderName, senderID, clanId, clanName, clanAbbr);
                            return;
                        }
                        case CustomCommands.RequestClanInvite:
                            this.RecieveClanInviteRequest(senderName, senderID);
                            return;

                        case CustomCommands.FriendInvite:
                            this.RecieveFriendRequest(senderName, senderID);
                            return;

                        case CustomCommands.Whisper:
                            goto Label_1737;

                        case CustomCommands.SystemMessage:
                            if (args.Length > 0)
                            {
                                str2 = args[0];
                                if (args.Length > 1)
                                {
                                    objArray = new object[args.Length - 1];
                                    for (num3 = 1; num3 < args.Length; num3++)
                                    {
                                        objArray[num3 - 1] = Loc.Get(args[num3]);
                                    }
                                    this.SystemMessage(str2, objArray);
                                }
                                else
                                {
                                    this.SystemMessage(str2, new object[0]);
                                }
                            }
                            return;
                    }
                }
                return;
            Label_16B5:
                this.GameEvent(str2, new object[0]);
                return;
            Label_1737:
                str2 = null;
                if (args.Length > 0)
                {
                    str2 = args[0];
                }
                this.OnRecieveWhisper(senderName, str2);
            }
            catch (Exception exception5)
            {
                exception = exception5;
                ErrorLog.WriteLine(exception);
            }
        }
Beispiel #8
0
        public override void Initialize()
        {
            Aimsharp.DebugMode();

            Aimsharp.PrintMessage("Ice Series: Assassination Rogue - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            //Aimsharp.PrintMessage(" ");
            // Aimsharp.PrintMessage("/xxxxx Prepull 10", Color.Blue);
            // Aimsharp.PrintMessage("--Starts the prepull actions.", Color.Blue);
            // Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);

            Aimsharp.Latency    = 50;
            Aimsharp.QuickDelay = 125;
            Aimsharp.SlowDelay  = 250;

            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            RacialPower = GetDropDown("Racial Power");

            Spellbook.Add(MajorPower);

            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }
            if (RacialPower == "Bloodelf")
            {
                Spellbook.Add("Arcane Torrent");
            }

            Spellbook.Add("Stealth");
            Spellbook.Add("Garrote");
            Spellbook.Add("Rupture");
            Spellbook.Add("Exsanguinate");
            Spellbook.Add("Toxic Blade");
            Spellbook.Add("Vendetta");
            Spellbook.Add("Marked for Death");
            Spellbook.Add("Vanish");
            Spellbook.Add("Crimson Tempest");
            Spellbook.Add("Envenom");
            Spellbook.Add("Fan of Knives");
            Spellbook.Add("Blindside");
            Spellbook.Add("Mutilate");

            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Lifeblood");
            Buffs.Add("Memory of Lucid Dreams");
            Buffs.Add("Reckless Force");
            Buffs.Add("Guardian of Azeroth");

            Buffs.Add("Stealth");
            Buffs.Add("Subterfuge");
            Buffs.Add("Vanish");
            Buffs.Add("Master Assassin");
            Buffs.Add("Blindside");

            Debuffs.Add("Razor Coral");
            Debuffs.Add("Conductive Ink");
            Debuffs.Add("Shiver Venom");
            Debuffs.Add("Rupture");
            Debuffs.Add("Garrote");
            Debuffs.Add("Deadly Poison");
            Debuffs.Add("Crippling Poison");
            Debuffs.Add("Wound Poison");
            Debuffs.Add("Vendetta");
            Debuffs.Add("Toxic Blade");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));

            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));

            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
            CustomCommands.Add("AOE");
            // CustomCommands.Add("Prepull");
        }
Beispiel #9
0
 public static bool Hook(ClientInfo _cInfo, string _message, string _playerName, string _secondaryName, bool _localizeSecondary)
 {
     if (!string.IsNullOrEmpty(_message) && _cInfo != null && _playerName != "Server" && _secondaryName != "ServerTools")
     {
         if (ChatFlood)
         {
             if (_message.Length > 500)
             {
                 _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Message to long.[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                 return(false);
             }
         }
         if (ChatLog.IsEnabled)
         {
             ChatLog.Log(_message, _playerName);
         }
         if (MutePlayer.Dict.ContainsKey(_cInfo.playerId))
         {
             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, "You are muted.", "Server", false, "ServerTools", false));
             return(false);
         }
         if (AdminNameColoring && !_message.StartsWith("/") && !_message.StartsWith("@") && _secondaryName != "ServerTools1" && GameManager.Instance.adminTools.IsAdmin(_cInfo.playerId))
         {
             _playerName = string.Format("{0}{1} {2}[-]", AdminColor, AdminPrefix, _playerName);
             GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, _message, _playerName, false, "ServerTools1", false);
             return(false);
         }
         if (Badwords.IsEnabled)
         {
             bool   _hasBadWord = false;
             string _message1   = _message.ToLower();
             foreach (string _word in Badwords.List)
             {
                 if (_message1.Contains(_word))
                 {
                     string _replace = "";
                     for (int i = 0; i < _word.Length; i++)
                     {
                         _replace = string.Format("{0}*", _replace);
                     }
                     _message1   = _message1.Replace(_word, _replace);
                     _hasBadWord = true;
                 }
             }
             if (_hasBadWord)
             {
                 GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, _message1, _playerName, false, "ServerTools", false);
                 return(false);
             }
         }
         if (_message.StartsWith("/") || _message.StartsWith("!"))
         {
             bool _announce = false;
             if (_message.StartsWith("!"))
             {
                 _announce = true;
                 _message  = _message.Replace("!", "");
             }
             if (_message.StartsWith("/"))
             {
                 _message = _message.Replace("/", "");
             }
             if (_message.StartsWith("w ") || _message.StartsWith("W ") || _message.StartsWith("pm ") || _message.StartsWith("PM "))
             {
                 if (CustomCommands.IsEnabled)
                 {
                     Whisper.Send(_cInfo, _message);
                     return(false);
                 }
             }
             if (_message.StartsWith("r ") || _message.StartsWith("R ") || _message.StartsWith("RE ") || _message.StartsWith("re "))
             {
                 if (CustomCommands.IsEnabled)
                 {
                     Whisper.Reply(_cInfo, _message);
                     return(false);
                 }
             }
             _message = _message.ToLower();
             if (_message == "sethome")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("!{0}", _message), _playerName, false, "ServerTools", true);
                 }
                 if (TeleportHome.IsEnabled)
                 {
                     TeleportHome.SetHome(_cInfo);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Sethome is not enabled.[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                 }
                 return(false);
             }
             if (_message == "home")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("!{0}", _message), _playerName, false, "ServerTools", true);
                 }
                 if (TeleportHome.IsEnabled)
                 {
                     TeleportHome.TeleHome(_cInfo);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Home is not enabled.[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                 }
                 return(false);
             }
             if (AdminChat.IsEnabled)
             {
                 if (_message.StartsWith("mute ") || _message.StartsWith("unmute "))
                 {
                     if (_message.StartsWith("mute "))
                     {
                         MutePlayer.Add(_cInfo, _message);
                     }
                     if (_message.StartsWith("unmute "))
                     {
                         MutePlayer.Remove(_cInfo, _message);
                     }
                     return(false);
                 }
             }
             if (_message == "commands")
             {
                 string _commands = CustomCommands.GetChatCommands(_cInfo);
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("!{0}", _message), _playerName, false, "ServerTools", true);
                     GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, _commands, "Server", false, "ServerTools", false);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, _commands, "Server", false, "ServerTools", false));
                 }
                 return(false);
             }
             if (_message == "day7")
             {
                 if (Day7.IsEnabled)
                 {
                     if (_announce)
                     {
                         GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("!{0}", _message), _playerName, false, "ServerTools", true);
                     }
                     Day7.GetInfo(_cInfo, _announce);
                     return(false);
                 }
             }
             if (_message == "killme" || _message == "wrist" || _message == "suicide")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("!{0}", _message), _playerName, false, "ServerTools", true);
                 }
                 if (KillMe.IsEnabled)
                 {
                     KillMe.CheckPlayer(_cInfo, _announce);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Killme is not enabled.[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                 }
                 return(false);
             }
             if (_message == "gimme" || _message == "gimmie")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("!{0}", _message), _playerName, false, "ServerTools", true);
                 }
                 if (Gimme.AlwaysShowResponse && !_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("/{0}", _message), _playerName, false, "ServerTools", true);
                 }
                 if (Gimme.IsEnabled)
                 {
                     Gimme.Checkplayer(_cInfo, _announce, _playerName);
                 }
                 else
                 {
                     return(true);
                 }
                 return(false);
             }
             if (_message.StartsWith("clanadd") || _message == "clandel" || _message.StartsWith("claninvite") || _message == "clanaccept" || _message == "clandecline" || _message.StartsWith("clanremove") || _message.StartsWith("clanpromote") || _message.StartsWith("clandemote") || _message.StartsWith("clan") || _message.StartsWith("c") || _message == "clancommands")
             {
                 if (ClanManager.IsEnabled)
                 {
                     if (_message == "clancommands")
                     {
                         ClanManager.GetChatCommands(_cInfo);
                         return(false);
                     }
                     if (_message.StartsWith("clanadd"))
                     {
                         if (_message == "clanadd")
                         {
                             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Usage: /clanadd clanName[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                         }
                         else
                         {
                             _message = _message.Replace("clanadd ", "");
                             ClanManager.AddClan(_cInfo, _message);
                         }
                         return(false);
                     }
                     if (_message == "clandel")
                     {
                         ClanManager.RemoveClan(_cInfo);
                         return(false);
                     }
                     if (_message.StartsWith("claninvite"))
                     {
                         if (_message == "claninvite")
                         {
                             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Usage: /claninvite playerName[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                         }
                         else
                         {
                             _message = _message.Replace("claninvite ", "");
                             ClanManager.InviteMember(_cInfo, _message);
                         }
                         return(false);
                     }
                     if (_message == "clanaccept")
                     {
                         ClanManager.InviteAccept(_cInfo);
                         return(false);
                     }
                     if (_message == "clandecline")
                     {
                         ClanManager.InviteDecline(_cInfo);
                         return(false);
                     }
                     if (_message.StartsWith("clanremove"))
                     {
                         if (_message == "clanremove")
                         {
                             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Usage: /clanremove playerName[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                         }
                         else
                         {
                             _message = _message.Replace("clanremove ", "");
                             ClanManager.RemoveMember(_cInfo, _message);
                         }
                         return(false);
                     }
                     if (_message.StartsWith("clanpromote"))
                     {
                         if (_message == "clanpromote")
                         {
                             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Usage: /clanpromote playerName[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                         }
                         else
                         {
                             _message = _message.Replace("clanpromote ", "");
                             ClanManager.PromoteMember(_cInfo, _message);
                         }
                         return(false);
                     }
                     if (_message.StartsWith("clandemote"))
                     {
                         if (_message == "clandemote")
                         {
                             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Usage: /clandemote playerName[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                         }
                         else
                         {
                             _message = _message.Replace("clandemote ", "");
                             ClanManager.DemoteMember(_cInfo, _message);
                         }
                         return(false);
                     }
                     if (_message == "clanleave")
                     {
                         ClanManager.LeaveClan(_cInfo);
                         return(false);
                     }
                     if (_message.StartsWith("clan"))
                     {
                         if (_message == "clan")
                         {
                             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Usage: /clan message[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                         }
                         else
                         {
                             _message = _message.Replace("clan ", "");
                             ClanManager.Clan(_cInfo, _message);
                         }
                         return(false);
                     }
                     if (_message.StartsWith("c"))
                     {
                         if (_message == "c")
                         {
                             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Usage: /c message[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                         }
                         else
                         {
                             _message = _message.Replace("c ", "");
                             ClanManager.Clan(_cInfo, _message);
                         }
                         return(false);
                     }
                 }
                 else
                 {
                     return(true);
                 }
             }
             if (CustomCommands.IsEnabled && CustomCommands.Dict.Count > 0 && CustomCommands.Dict.ContainsKey(_message))
             {
                 string[] _r;
                 if (CustomCommands.Dict.TryGetValue(_message, out _r))
                 {
                     string _response = _r[0];
                     _response = _response.Replace("{EntityId}", _cInfo.entityId.ToString());
                     _response = _response.Replace("{SteamId}", _cInfo.playerId);
                     _response = _response.Replace("{PlayerName}", _playerName);
                     if (_announce)
                     {
                         GameManager.Instance.GameMessageServer(_cInfo, EnumGameMessages.Chat, string.Format("!{0}", _message), _playerName, false, "ServerTools", true);
                     }
                     if (_response.StartsWith("say "))
                     {
                         if (_announce)
                         {
                             SdtdConsole.Instance.ExecuteSync(_response, _cInfo);
                         }
                         else
                         {
                             _response = _response.Replace("say ", "");
                             _response = _response.Replace("\"", "");
                             _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format(_response), "Server", false, "ServerTools", false));
                         }
                     }
                     else
                     {
                         SdtdConsole.Instance.ExecuteSync(_response, _cInfo);
                     }
                 }
                 return(false);
             }
         }
         if (_message.StartsWith("@"))
         {
             if (_message.StartsWith("@admins ") || _message.StartsWith("@ADMINS "))
             {
                 if (!AdminChat.IsEnabled)
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}AdminChat is not enabled.[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                 }
                 else
                 {
                     AdminChat.SendAdmins(_cInfo, _message);
                 }
                 return(false);
             }
             if (_message.StartsWith("@all ") || _message.StartsWith("@ALL "))
             {
                 if (!AdminChat.IsEnabled)
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}AdminChat is not enabled.[-]", CustomCommands.ChatColor), "Server", false, "ServerTools", false));
                 }
                 else
                 {
                     AdminChat.SendAll(_cInfo, _message);
                 }
                 return(false);
             }
         }
     }
     return(true);
 }
Beispiel #10
0
        public override void Initialize()
        {
            Aimsharp.DebugMode();
            Aimsharp.PrintMessage("Vid Marksman - v 1.0", Color.Yellow);

            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx NoAOE --Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx Potions --Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns --Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);


            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            RacialPower = GetDropDown("Racial Power");
            usableitems = GetString("Use item: Case Sens");
            AzeriteFocusedFireEnabled  = GetCheckBox("Azerite Focused Fire");
            AzeriteSurgingShotsEnabled = GetCheckBox(("Azerite Surging Shots"));
            AzeriteInTheRythmRank      = GetSlider("Azerite In the Rythm Rank: ");


            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }
            if (RacialPower == "Furry")
            {
                Spellbook.Add("Bag of Tricks");
            }

            Spellbook.Add(MajorPower);
            Spellbook.Add("Rapid Fire");
            Spellbook.Add("Hunter's Mark");
            Spellbook.Add("Aimed Shot");
            Spellbook.Add("Steady Shot");
            Spellbook.Add("Multi-Shot");
            Spellbook.Add("Trueshot");
            Spellbook.Add("Barrage");
            Spellbook.Add("Explosive Shot");
            Spellbook.Add("Arcane Shot");
            Spellbook.Add("Kill Shot");
            Spellbook.Add("Bursting Shot");
            Spellbook.Add("Exhilaration");
            Spellbook.Add("Double Tap");
            Spellbook.Add("Chimaera Shot");
            Spellbook.Add("A Murder of Crows");



            Buffs.Add("Lifeblood");
            Buffs.Add("Precise Shots");
            Buffs.Add("Trick Shots");
            Buffs.Add("Trueshot");


            Debuffs.Add("Razor Coral");
            Debuffs.Add("Hunter's Mark");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(usableitems);

            Macros.Add("ItemUse", "/use " + usableitems);
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");

            CustomCommands.Add("NoAOE");
            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
        }
Beispiel #11
0
        public override void Initialize()
        {
            Aimsharp.PrintMessage("Perfect Simcraft Series: Shadow Priest - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("Recommended talents: 3111111", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);


            Aimsharp.Latency    = 0;
            Aimsharp.QuickDelay = 125;
            Aimsharp.SlowDelay  = 300;

            MajorPower = GetDropDown("Major Power");
            TopTrinket = GetDropDown("Top Trinket");
            BotTrinket = GetDropDown("Bot Trinket");

            Spellbook.Add(MajorPower);
            Spellbook.Add("Void Eruption");
            Spellbook.Add("Dark Ascension");
            Spellbook.Add("Void Bolt");
            Spellbook.Add("Mind Sear");
            Spellbook.Add("Shadow Word: Death");
            Spellbook.Add("Surrender to Madness");
            Spellbook.Add("Dark Void");
            Spellbook.Add("Mindbender");
            Spellbook.Add("Shadowfiend");
            Spellbook.Add("Shadow Crash");
            Spellbook.Add("Mind Blast");
            Spellbook.Add("Void Torrent");
            Spellbook.Add("Shadow Word: Pain");
            Spellbook.Add("Vampiric Touch");
            Spellbook.Add("Mind Flay");
            Spellbook.Add("Shadowform");
            Spellbook.Add("Shadow Word: Void");

            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Chorus of Insanity");
            Buffs.Add("Lifeblood");
            Buffs.Add("Harvested Thoughts");
            Buffs.Add("Voidform");
            Buffs.Add("Shadowform");

            Debuffs.Add("Shadow Word: Pain");
            Debuffs.Add("Vampiric Touch");
            Debuffs.Add("Shiver Venom");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));

            Macros.Add(TopTrinket, "/use " + TopTrinket);
            Macros.Add(BotTrinket, "/use " + BotTrinket);
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));
            Macros.Add("crash cursor", "/cast [@cursor] Shadow Crash");

            CustomCommands.Add("AOE");
            CustomCommands.Add("Prepull");
            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
        }
Beispiel #12
0
        public override void Initialize()
        {
            // Aimsharp.DebugMode();

            Aimsharp.PrintMessage("Vid Protection Warrior", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx StormBolt --Queues Storm Bolt up to be used on the next GCD.", Color.Red);
            Aimsharp.PrintMessage("/xxxxx RallyingCry --Queues Rallying Cry up to be used on the next GCD.", Color.Red);
            Aimsharp.PrintMessage("/xxxxx IntimidatingShout --Queues Intimidating SHout up to be used on the next GCD.", Color.Red);
            //Aimsharp.PrintMessage(" ");
            // Aimsharp.PrintMessage("/xxxxx Prepull 10", Color.Blue);
            // Aimsharp.PrintMessage("--Starts the prepull actions.", Color.Blue);
            // Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);

            Aimsharp.Latency    = 50;
            Aimsharp.QuickDelay = 125;
            Aimsharp.SlowDelay  = 250;

            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            RacialPower = GetDropDown("Racial Power");
            FiveLetters = GetString("First 5 Letters of the Addon:");

            Spellbook.Add(MajorPower);

            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }
            if (RacialPower == "Bloodelf")
            {
                Spellbook.Add("Arcane Torrent");
            }

            Spellbook.Add("Intercept");
            Spellbook.Add("Avatar");
            Spellbook.Add("Ignore Pain");
            Spellbook.Add("Demoralizing Shout");
            Spellbook.Add("Last Stand");
            Spellbook.Add("Thunder Clap");
            Spellbook.Add("Ravager");
            Spellbook.Add("Shield Block");
            Spellbook.Add("Shield Slam");
            Spellbook.Add("Devastate");
            Spellbook.Add("Victory Rush");
            Spellbook.Add("Revenge");
            Spellbook.Add("Intimidating Shout");
            Spellbook.Add("Shockwave");
            Spellbook.Add("Storm Bolt");
            Spellbook.Add("Rallying Cry");

            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Lifeblood");
            Buffs.Add("Memory of Lucid Dreams");
            Buffs.Add("Reckless Force");
            Buffs.Add("Guardian of Azeroth");

            Buffs.Add("Victorious");
            Buffs.Add("Avatar");
            Buffs.Add("Ignore Pain");
            Buffs.Add("Shield Block");
            Buffs.Add("Revenge!");

            Debuffs.Add("Razor Coral");
            Debuffs.Add("Conductive Ink");
            Debuffs.Add("Shiver Venom");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));

            Macros.Add(TopTrinket, "/use " + TopTrinket);
            Macros.Add(BotTrinket, "/use " + BotTrinket);
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));
            Macros.Add("StormBoltOff", "/" + FiveLetters + " StormBolt");
            Macros.Add("IntimidatingShoutOff", "/" + FiveLetters + " IntimidatingShout");
            Macros.Add("RallyingCryOff", "/" + FiveLetters + " RallyingCry");
            Macros.Add("ShockWaveOff", "/" + FiveLetters + " ShockWave");

            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
            CustomCommands.Add("AOE");
            // CustomCommands.Add("Prepull");
            CustomCommands.Add("StormBolt");
            CustomCommands.Add("RallyingCry");
            CustomCommands.Add("IntimidatingShout");
            CustomCommands.Add("ShockWave");

            Macros.Add("RavageSelf", "/cast [@player] Ravager");
        }
Beispiel #13
0
        public static void Init()
        {
            GameItems.LoadGameItems();

            if (CustomCommands.IsRunning && !CustomCommands.IsEnabled)
            {
                CustomCommands._fileWatcher.Dispose();
                CustomCommands.IsRunning = false;
            }
            if (!CustomCommands.IsRunning && CustomCommands.IsEnabled)
            {
                CustomCommands.Init();
            }

            if (KillMe.IsEnabled)
            {
                KillMe.Init();
            }

            if (Gimme.IsRunning && !Gimme.IsEnabled)
            {
                Gimme._fileWatcher.Dispose();
                Gimme.IsRunning = false;
            }
            if (!Gimme.IsRunning && Gimme.IsEnabled)
            {
                Gimme.Init();
            }

            if (HighPingKicker.IsRunning && !HighPingKicker.IsEnabled)
            {
                HighPingKicker._fileWatcher.Dispose();
                HighPingKicker.IsRunning = false;
            }
            if (!HighPingKicker.IsRunning && HighPingKicker.IsEnabled)
            {
                HighPingKicker.Init();
            }

            if (InventoryCheck.IsRunning && !InventoryCheck.IsEnabled)
            {
                InventoryCheck._fileWatcher.Dispose();
                InventoryCheck.IsRunning = false;
            }
            if (!InventoryCheck.IsRunning && InventoryCheck.IsEnabled)
            {
                InventoryCheck.Init();
            }

            if (TeleportHome.IsEnabled)
            {
                TeleportHome.Init();
            }

            if (TeleportReturn.IsEnabled)
            {
                TeleportReturn.Init();
            }

            if (Badwords.IsRunning && !Badwords.IsEnabled)
            {
                Badwords._fileWatcher.Dispose();
                Badwords.IsRunning = false;
            }
            if (!Badwords.IsRunning && Badwords.IsEnabled)
            {
                Badwords.Init();
            }

            if (SaveWorld.IsRunning && !SaveWorld.IsEnabled)
            {
                SaveWorld.th.Abort();
                SaveWorld.IsRunning = false;
            }
            if (!SaveWorld.IsRunning && SaveWorld.IsEnabled)
            {
                SaveWorld.Init();
            }

            if (InfoTicker.IsRunning && !InfoTicker.IsEnabled)
            {
                InfoTicker.th.Abort();
                InfoTicker.IsRunning = false;
            }
            if (!InfoTicker.IsEnabled && !Motd.IsEnabled && InfoTicker.IsConfigLoaded)
            {
                InfoTicker._fileWatcher.Dispose();
                InfoTicker.IsConfigLoaded = false;
            }
            if (!InfoTicker.IsRunning && InfoTicker.IsEnabled)
            {
                InfoTicker.Init();
            }

            if (!InfoTicker.IsConfigLoaded && Motd.IsEnabled)
            {
                InfoTicker.Init();
            }

            if (ClanManager.IsEnabled)
            {
                ClanData.Init();
            }
        }
Beispiel #14
0
        public override void Initialize()
        {
            Aimsharp.PrintMessage("Kyber Vengenace DH Shadowlands - v 2.3", Color.Blue);
            Aimsharp.PrintMessage("Recommended talents: 1233221", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx SaveMeta", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of Metamorphosis on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCovenant", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of Covenant abilities on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx Autodisrupt", Color.Blue);
            Aimsharp.PrintMessage("--Toggles Auto interrupt mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx Autoinfernal", Color.Blue);
            Aimsharp.PrintMessage("--Toggles Auto infernal Strike mode on/off.", Color.Blue);
            Aimsharp.PrintMessage("will use 1 charge for added dps and save 1 charge for movement.", Color.Purple);
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);

            Aimsharp.Latency    = 50;
            Aimsharp.QuickDelay = 125;
            Aimsharp.SlowDelay  = 250;

            //Main Skills
            foreach (string skill in VengeanceSpells)
            {
                Spellbook.Add(skill);
            }

            //Covenant
            foreach (string Spell in CovenantAbilities)
            {
                Spellbook.Add(Spell);
            }

            //Buffs
            foreach (string buff in VengeanceBuffs)
            {
                Buffs.Add(buff);
            }

            //Debuffs
            foreach (string debuff in VengeanceDebuffs)
            {
                Debuffs.Add(debuff);
            }


            foreach (string Buff in BloodlustEffects)
            {
                Buffs.Add(Buff);
            }


            Items.Add(GetDropDown("Potion name:"));

            Macros.Add("DPS Pot", "/use " + GetDropDown("Potion name:"));
            Macros.Add("TopTrinket", "/use 13");
            Macros.Add("BottomTrinket", "/use 14");

            Macros.Add("sigil self", "/cast [@player] Sigil of Flame");
            Macros.Add("infernal self", "/cast [@player] Infernal Strike");
            Macros.Add("Elysian self", "/cast [@player] Elysian Decree");

            CustomCommands.Add("SaveMeta");
            CustomCommands.Add("AOE");
            CustomCommands.Add("Autoinfernal");
            CustomCommands.Add("Autodisrupt");
            CustomCommands.Add("SaveCovenant");

            CustomFunctions.Add("GetCovenant", "local spell = 0 local i = 1 while true do local spellName, spellSub = GetSpellBookItemName(i, BOOKTYPE_SPELL) if not spellName then do break end end if spellName == 'Fodder to the Flame' then spell = 4 elseif spellName == 'The Hunt' then spell = 3 elseif spellName == 'Sinful Brand' then spell = 2 elseif spellName == 'Elysian Decree' then spell = 1 end i = i + 1 end return spell");
            CustomFunctions.Add("GetLegendarySpellID", "local power = 0 for i=1,15,1 do local xcs = ItemLocation:CreateFromEquipmentSlot(i) if(C_Item.DoesItemExist(xcs)) then if(C_LegendaryCrafting.IsRuneforgeLegendary(xcs)) then local id = C_LegendaryCrafting.GetRuneforgeLegendaryComponentInfo(xcs)[\"powerID\"] power = C_LegendaryCrafting.GetRuneforgePowerInfo(id)[\"descriptionSpellID\"] end end end return power");
        }
        private void LoadSetupSettings(string make, string model)
        {
            Dictionary <string, string> settingsDict = LoadPrinterSetupFromFile(make, model);
            Dictionary <string, string> macroDict    = new Dictionary <string, string>();

            macroDict["Lights On"]  = "M42 P6 S255";
            macroDict["Lights Off"] = "M42 P6 S0";

            //Determine if baud rate is needed and show controls if required
            string baudRate;

            if (settingsDict.TryGetValue("baud_rate", out baudRate))
            {
                ActivePrinter.BaudRate = baudRate;
            }

            string defaultSliceEngine;

            if (settingsDict.TryGetValue("default_slice_engine", out defaultSliceEngine))
            {
                if (Enum.IsDefined(typeof(ActivePrinterProfile.SlicingEngineTypes), defaultSliceEngine))
                {
                    ActivePrinter.CurrentSlicingEngine = defaultSliceEngine;
                }
            }

            string defaultMacros;

            printerCustomCommands = new List <CustomCommands>();
            if (settingsDict.TryGetValue("default_macros", out defaultMacros))
            {
                string[] macroList = defaultMacros.Split(',');
                foreach (string macroName in macroList)
                {
                    string macroValue;
                    if (macroDict.TryGetValue(macroName.Trim(), out macroValue))
                    {
                        CustomCommands customMacro = new CustomCommands();
                        customMacro.Name  = macroName.Trim();
                        customMacro.Value = macroValue;

                        printerCustomCommands.Add(customMacro);
                    }
                }
            }

            //Determine what if any drivers are needed
            if (settingsDict.TryGetValue("windows_driver", out driverFile))
            {
                string infPathAndFileToInstall = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "Drivers", driverFile);
                switch (MatterHackers.Agg.UI.WindowsFormsAbstract.GetOSType())
                {
                case Agg.UI.WindowsFormsAbstract.OSType.Windows:
                    if (File.Exists(infPathAndFileToInstall))
                    {
                        PrinterSetupStatus.DriverNeedsToBeInstalled = true;
                        PrinterSetupStatus.DriverFilePath           = infPathAndFileToInstall;
                    }
                    break;

                default:
                    break;
                }
            }
        }
Beispiel #16
0
 public MainPage()
 {
     InitializeComponent();
     this.Commands = new CustomCommands(this.pdfViewer);
 }
Beispiel #17
0
 public static void Load()
 {
     if (AutoSaveWorld.IsRunning && !AutoSaveWorld.IsEnabled)
     {
         AutoSaveWorld.Stop();
     }
     if (!AutoSaveWorld.IsRunning && AutoSaveWorld.IsEnabled)
     {
         AutoSaveWorld.Start();
     }
     if (Badwords.IsRunning && !Badwords.IsEnabled)
     {
         Badwords.Unload();
     }
     if (!Badwords.IsRunning && Badwords.IsEnabled)
     {
         Badwords.Load();
     }
     if (ClanManager.IsEnabled)
     {
         PersistentContainer.Instance.Players.GetClans();
     }
     if (!ClanManager.IsEnabled)
     {
         PersistentContainer.Instance.Players.clans.Clear();
     }
     if (CustomCommands.IsRunning && !CustomCommands.IsEnabled)
     {
         CustomCommands.Unload();
     }
     if (!CustomCommands.IsRunning && CustomCommands.IsEnabled)
     {
         CustomCommands.Load();
     }
     if (Gimme.IsRunning && !Gimme.IsEnabled)
     {
         Gimme.Unload();
     }
     if (!Gimme.IsRunning && Gimme.IsEnabled)
     {
         Gimme.Load();
     }
     if (HighPingKicker.IsRunning && !HighPingKicker.IsEnabled)
     {
         HighPingKicker.Unload();
     }
     if (!HighPingKicker.IsRunning && HighPingKicker.IsEnabled)
     {
         HighPingKicker.Load();
     }
     if (InfoTicker.IsRunning && !InfoTicker.IsEnabled)
     {
         InfoTicker.Unload();
     }
     if (!InfoTicker.IsRunning && InfoTicker.IsEnabled)
     {
         InfoTicker.Load();
     }
     if (InventoryCheck.IsRunning && !InventoryCheck.IsEnabled)
     {
         InventoryCheck.Unload();
     }
     if (!InventoryCheck.IsRunning && InventoryCheck.IsEnabled)
     {
         InventoryCheck.Load();
     }
     if (!Watchlist.IsRunning && Watchlist.IsEnabled)
     {
         Watchlist.Load();
     }
     if (Watchlist.IsRunning && !Watchlist.IsEnabled)
     {
         Watchlist.Unload();
     }
     if (!ReservedSlots.IsRunning && ReservedSlots.IsEnabled)
     {
         ReservedSlots.Load();
     }
     if (ReservedSlots.IsRunning && !ReservedSlots.IsEnabled)
     {
         ReservedSlots.Unload();
     }
 }
 public static void ProcessCustomCommand(FrmMain main, CustomCommands cmd, int senderID, string senderName, string[] args)
 {
     VGen0 method = null;
     VGen0 gen2 = null;
     VGen0 gen3 = null;
     VGen0 gen4 = null;
     VGen0 gen5 = null;
     VGen0 gen6 = null;
     EventLog.WriteLine("Running command " + cmd.ToString() + " " + senderID.ToString() + " " + senderName, LogCategory.Get("TournamentCommands"), args);
     if (cmd == CustomCommands.TournamentLaunchGame)
     {
         sDirectorName = senderName;
         sDirectorID = senderID;
         sTournamentID = Convert.ToInt32(args[1]);
         try
         {
             Thread.Sleep(Convert.ToInt32(args[2]));
         }
         catch
         {
         }
         sFaction = args[3].ToLower();
         sMap = args[4];
         foreach (KeyValuePair<string, string> pair in GameItem.MapNameLookup)
         {
             if (pair.Value.ToUpper() == sMap.ToUpper())
             {
                 sMap = pair.Key;
             }
         }
         sMap = SupcomAutomatch.CheckRenameMap(sMap);
         Random random = new Random();
         Thread.Sleep(random.Next(10, 0xfa0));
         if (method == null)
         {
             method = delegate {
                 main.PlayRankedGame(true, args[0], new List<string>(), "", true);
             };
         }
         main.Invoke(method);
     }
     else if (cmd == CustomCommands.TournamentResult)
     {
         if (DlgManageTournament.Current != null)
         {
             if (gen2 == null)
             {
                 gen2 = delegate {
                     DlgManageTournament.Current.UpdateStats(senderID, args[0]);
                 };
             }
             DlgManageTournament.Current.Invoke(gen2);
         }
     }
     else if (cmd == CustomCommands.TournamentChatroom)
     {
         sChatroom = args[0];
         if (gen3 == null)
         {
             gen3 = delegate {
                 main.SystemMessage(Loc.Get("<LOC>You are being rerouted to a new chatroom for the tournament you signed up for."), new object[0]);
                 main.JoinChat(args[0]);
             };
         }
         main.Invoke(gen3);
     }
     else if (cmd == CustomCommands.TournamentRequestStatus)
     {
         if (gen4 == null)
         {
             gen4 = delegate {
                 Messaging.SendCustomCommand(senderName, CustomCommands.TournamentAcknowledgeStatus, new object[] { SupcomAutomatch.GetSupcomAutomatch().State.ToString() });
             };
         }
         main.Invoke(gen4);
     }
     else if (cmd == CustomCommands.TournamentChatmessage)
     {
         if (gen5 == null)
         {
             gen5 = delegate {
                 main.SystemEvent(args[0], new object[0]);
             };
         }
         main.Invoke(gen5);
     }
     else if (cmd == CustomCommands.TournamentEndMatch)
     {
         main.Invoke((VGen0)delegate {
             try
             {
                 SupcomAutomatch.GetSupcomAutomatch().GetManager().ForceCloseGame(Loc.Get("<LOC>The Tournament Director has ended your game."));
             }
             catch (Exception exception)
             {
                 ErrorLog.WriteLine(exception);
             }
         });
     }
     else if (cmd == CustomCommands.TournamentAcknowledgeStatus)
     {
         if (gen6 == null)
         {
             gen6 = delegate {
                 sRespondingUsers.Add(senderName, args[0]);
                 if (DlgManageTournament.Current != null)
                 {
                     DlgManageTournament.Current.UpdateItemStatus(senderName, args[0]);
                 }
             };
         }
         main.Invoke(gen6);
     }
 }
Beispiel #19
0
        public override void Initialize()
        {
            Aimsharp.PrintMessage("Kyber Vengenace DH V3.1", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx SaveCovenant", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of Covenant abilities on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveMeta", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of Metamorphosis on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveInfernal", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of Infernal Strike on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveFiery", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of Fiery Brand on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveFelDev", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of Fel Devastation on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx Shriekwing", Color.Blue);
            Aimsharp.PrintMessage("--Toggles Shriekwing Tanking on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);

            Aimsharp.Latency = 40;
            Aimsharp.QuickDelay = 100;
            Aimsharp.SlowDelay = 225;

            //Main Skills
            foreach (string skill in VengeanceSpells)
            {
                Spellbook.Add(skill);
            }

            //Covenant
            foreach (string Spell in CovenantAbilities)
            {
                Spellbook.Add(Spell);
            }

            //Buffs
            foreach (string buff in VengeanceBuffs)
            {
                Buffs.Add(buff);
            }

            //Debuffs
            foreach (string debuff in VengeanceDebuffs)
            {
                Debuffs.Add(debuff);
            }


            foreach (string Buff in BloodlustEffects)
            {
                Buffs.Add(Buff);
            }

            addonName = GetString("First 5 Letter of your Addon:");

            Items.Add(GetString("Potion name:"));

            Macros.Add("TopTrinket", "/use 13");
            Macros.Add("BottomTrinket", "/use 14");
            Macros.Add("DPS Pot", "/use " + GetString("Potion name:"));

            Macros.Add("sigil self", "/cast [@player] Sigil of Flame");
            Macros.Add("Elysian self", "/cast [@player] Elysian Decree");
            Macros.Add("sigilC", "/cast [@cursor] Sigil of Flame");
            Macros.Add("ElysianC", "/cast [@cursor] Elysian Decree");
            Macros.Add("infernal self","/cast [@player] Infernal Strike");
            Macros.Add("ElysianDisable", "/" + addonName + " UseElysian");
            Macros.Add("FieryDisable", "/" + addonName + " UseFiery");
            Macros.Add("FelDevDisable", "/" + addonName + " UseFelDev");
            Macros.Add("SigilMDisable", "/" + addonName + " UseMisery");
            Macros.Add("SigilSDisable", "/" + addonName + " UseSilence");
            Macros.Add("SigilCDisable", "/" + addonName + " UseChains");
            Macros.Add("SigilMC", "/cast [@cursor] Sigil of Misery");
            Macros.Add("SigilMSelf", "/cast [@player] Sigil of Misery");
            Macros.Add("SigilSC", "/cast [@cursor] Sigil of Silence");
            Macros.Add("SigilSSelf", "/cast [@player] Sigil of Silence");
            Macros.Add("SigilCC", "/cast [@cursor] Sigil of Chains");
            Macros.Add("SigilCSelf", "/cast [@player] Sigil of Chains");
            Macros.Add("BoP Killer", "/cancelaura Blessing of Protection");


            CustomCommands.Add("AOE");
            CustomCommands.Add("SaveCovenant");
            CustomCommands.Add("SaveFiery");
            CustomCommands.Add("SaveFelDev");
            CustomCommands.Add("UseFiery");
            CustomCommands.Add("UseMisery");
            CustomCommands.Add("UseSilence");
            CustomCommands.Add("UseChains");
            CustomCommands.Add("UseElysian");
            CustomCommands.Add("UseFelDev");
            CustomCommands.Add("SaveMeta");
            CustomCommands.Add("SaveInfernal");
            CustomCommands.Add("Shriekwing");

            CustomFunctions.Add("ThreatStatus", "if (UnitDetailedThreatSituation(\"player\", \"target\"))\nthen\nreturn 1;\nend\nreturn 0;");
            CustomFunctions.Add("GetLegendarySpellID", "local power = 0 for i=1,15,1 do local xcs = ItemLocation:CreateFromEquipmentSlot(i) if(C_Item.DoesItemExist(xcs)) then if(C_LegendaryCrafting.IsRuneforgeLegendary(xcs)) then local id = C_LegendaryCrafting.GetRuneforgeLegendaryComponentInfo(xcs)[\"powerID\"] power = C_LegendaryCrafting.GetRuneforgePowerInfo(id)[\"descriptionSpellID\"] end end end return power");
        }
Beispiel #20
0
 public static void SendCustomCommand(CustomCommands cmd, params object[] args)
 {
     string msg = string.Format("/CUST {0} {1} {2} ", (uint) cmd, User.Current.ID, User.Current.Name);
     if (args != null)
     {
         for (int i = 0; i < args.Length; i++)
         {
             if (args[i] != null)
             {
                 msg = msg + '\x001f' + args[i].ToString();
             }
         }
     }
     if (CustomCommandRecieved != null)
     {
         CustomCommandRecieved(new MessageEventArgs(msg));
     }
     SendGathering(msg);
 }
Beispiel #21
0
        public override void Initialize()
        {
            Aimsharp.DebugMode();

            Aimsharp.PrintMessage("Vid Fury Warrior 1.02", Color.Yellow);
            Aimsharp.PrintMessage("Recommended Single Target talents: 2133123", Color.Yellow);
            Aimsharp.PrintMessage("Recommended Dungeon talents: 3133222", Color.Yellow);
            Aimsharp.PrintMessage("Default mode: PVE, AOE ON, USE CDs/Pots", Color.Yellow);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Yellow);
            Aimsharp.PrintMessage("/xxxxx Potions --Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns --Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx noaoe --Toggles to turn off PVE AOE on/off.", Color.Orange);
            Aimsharp.PrintMessage("/xxxxx AzeriteBeamOff --Toggles to turn off AzeriteBeam usage.", Color.Orange);
            Aimsharp.PrintMessage("/xxxxx savepp -- Toggles the use of prepull", Color.Orange);
            Aimsharp.PrintMessage("/xxxxx StormBolt --Queues Storm Bolt up to be used on the next GCD.", Color.Red);
            Aimsharp.PrintMessage("/xxxxx RallyingCry --Queues Rallying Cry up to be used on the next GCD.", Color.Red);
            Aimsharp.PrintMessage("/xxxxx IntimidatingShout --Queues Intimidating SHout up to be used on the next GCD.", Color.Red);
            Aimsharp.PrintMessage("/xxxxx Bladestorm --Queues Bladestorm up to be used on the next GCD.", Color.Red);



            Aimsharp.Latency    = 100;
            Aimsharp.QuickDelay = 125;

            MajorPower       = GetDropDown("Major Power");
            TopTrinket       = GetDropDown("Top Trinket");
            BotTrinket       = GetDropDown("Bot Trinket");
            RacialPower      = GetDropDown("Racial Power");
            usableitems      = GetString("Use item: Case Sens");
            AzeriteColdSteel = GetSlider("Cold Steel, Hot Blood Trait Number:");
            FiveLetters      = GetString("First 5 Letters of the Addon:");

            Spellbook.Add(MajorPower);

            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }



            Spellbook.Add("Victory Rush");
            Spellbook.Add("Enraged Regeneration");

            Spellbook.Add("Avatar");

            Spellbook.Add("Battle Shout");

            Spellbook.Add("Heroic Throw");
            Spellbook.Add("Hamstring");
            Spellbook.Add("Rallying Cry");
            Spellbook.Add("Defensive Stance");


            Spellbook.Add("Charge");
            Spellbook.Add("Heroic Leap");
            Spellbook.Add("Rampage");
            Spellbook.Add("Recklessness");
            Spellbook.Add("Siegebreaker");
            Spellbook.Add("Whirlwind");
            Spellbook.Add("Execute");
            Spellbook.Add("Furious Slash");
            Spellbook.Add("Bladestorm");
            Spellbook.Add("Bloodthirst");
            Spellbook.Add("Dragon Roar");
            Spellbook.Add("Raging Blow");
            Spellbook.Add("Storm Bolt");
            Spellbook.Add("Intimidating Shout");
            Spellbook.Add("Rallying Cry");
            Spellbook.Add("Onslaught");
            Spellbook.Add("Enraged Regeneration");
            Spellbook.Add("Bloodbath");
            Spellbook.Add("Crushing Blow");



            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Lifeblood");
            Buffs.Add("Memory of Lucid Dreams");
            Buffs.Add("Reckless Force");
            Buffs.Add("Guardian of Azeroth");


            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Lifeblood");
            Buffs.Add("Memory of Lucid Dreams");
            Buffs.Add("Reckless Force");
            Buffs.Add("Guardian of Azeroth");

            Buffs.Add("Recklessness");
            Buffs.Add("Meat Cleaver");
            Buffs.Add("Enrage");
            Buffs.Add("Furious Slash");
            Buffs.Add("Whirlwind");

            Debuffs.Add("Razor Coral");
            Debuffs.Add("Conductive Ink");
            Debuffs.Add("Shiver Venom");
            Debuffs.Add("Siegebreaker");

            Buffs.Add("Berserker Rage");
            Buffs.Add("Meat Cleaver");
            Buffs.Add("Enrage");
            Buffs.Add("Furious Slash");
            Buffs.Add("Whirlwind");
            Buffs.Add("Test of Might");
            Buffs.Add("Avatar");
            Buffs.Add("Sharpen Blade");
            Buffs.Add("Battle Shout");
            Buffs.Add("Overpower");
            Buffs.Add("Bladestorm");
            Buffs.Add("Defensive Stance");
            Buffs.Add("Sweeping Strikes");
            Buffs.Add("Sudden Death");

            Debuffs.Add("Razor Coral");
            Debuffs.Add("Conductive Ink");
            Debuffs.Add("Shiver Venom");
            Debuffs.Add("Siegebreaker");
            Debuffs.Add("Rend");
            Debuffs.Add("Hamstring");
            Debuffs.Add("Deep Wounds");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(usableitems);

            Macros.Add("ItemUse", "/use " + usableitems);
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");
            Macros.Add("StormBoltOff", "/" + FiveLetters + " StormBolt");
            Macros.Add("IntimidatingShoutOff", "/" + FiveLetters + " IntimidatingShout");
            Macros.Add("RallyingCryOff", "/" + FiveLetters + " RallyingCry");
            Macros.Add("BladestormOff", "/" + FiveLetters + " Bladestorm");

            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
            CustomCommands.Add("noaoe");
            CustomCommands.Add("pvp");
            CustomCommands.Add("savepp");
            CustomCommands.Add("StormBolt");
            CustomCommands.Add("RallyingCry");
            CustomCommands.Add("IntimidatingShout");
            CustomCommands.Add("Bladestorm");
            CustomCommands.Add("AzeriteBeamOff");
        }
Beispiel #22
0
 public static void SendCustomCommand(string[] recipients, CustomCommands cmd, params object[] args)
 {
     if (User.Current != null)
     {
         string message = string.Format("/CUST {0} {1} {2} ", (uint) cmd, User.Current.ID, User.Current.Name);
         if (args != null)
         {
             for (int i = 0; i < args.Length; i++)
             {
                 if (args[i] != null)
                 {
                     message = message + '\x001f' + args[i].ToString();
                 }
             }
         }
         SendPlayers(recipients, message);
     }
 }
Beispiel #23
0
        public override void Initialize()
        {
            Aimsharp.PrintMessage("Perfect Simcraft Series: Havoc DH - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("Recommended talents: 2313221", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);

            Aimsharp.Latency    = 50;
            Aimsharp.QuickDelay = 125;

            MajorPower = GetDropDown("Major Power");
            TopTrinket = GetDropDown("Top Trinket");
            BotTrinket = GetDropDown("Bot Trinket");

            Spellbook.Add(MajorPower);
            Spellbook.Add("Blade Dance");
            Spellbook.Add("Metamorphosis");
            Spellbook.Add("Nemesis");
            Spellbook.Add("Eye Beam");
            Spellbook.Add("Dark Slash");
            Spellbook.Add("Fel Barrage");
            Spellbook.Add("Chaos Strike");
            Spellbook.Add("Death Sweep");
            Spellbook.Add("Immolation Aura");
            Spellbook.Add("Annihilation");
            Spellbook.Add("Felblade");
            Spellbook.Add("Demon's Bite");
            Spellbook.Add("Throw Glaive");

            Buffs.Add("Revolving Blades");
            Buffs.Add("Metamorphosis");
            Buffs.Add("Momentum");
            Buffs.Add("Memory of Lucid Dreams");
            Buffs.Add("Thirsting Blades");
            Buffs.Add("Prepared");
            Buffs.Add("Lifeblood");

            Debuffs.Add("Razor Coral");
            Debuffs.Add("Conductive Ink");
            Debuffs.Add("Dark Slash");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));

            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");
            Macros.Add(TopTrinket, "/use " + TopTrinket);
            Macros.Add(BotTrinket, "/use " + BotTrinket);
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));
            Macros.Add("meta self", "/cast [@player] Metamorphosis");

            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
            CustomCommands.Add("AOE");
        }
Beispiel #24
0
 public static bool IsCommand(ClientInfo _cInfo, string _message, string _playerName)
 {
     if (!string.IsNullOrEmpty(_message) && _cInfo != null && _playerName != "" && _playerName != "Server")
     {
         if (AdminChat.MutedPlayersList.Contains(_cInfo.playerId))
         {
             _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}You are currently muted.[-]", CustomCommands._chatcolor), "Server"));
             return(false);
         }
         string _filter = "[ffffffff][/url][/b][/i][/u][/s][/sub][/sup][ff]";
         if (_message.EndsWith(_filter + _filter))
         {
             _message = _message.Remove(_message.Length - 2 * _filter.Length);
         }
         if (ChatLog.IsEnabled && !_message.EndsWith(_filter))
         {
             ChatLog.Send(_message, _playerName);
         }
         if (Badwords.IsEnabled && !_message.EndsWith(_filter))
         {
             string _message1 = _message.ToLower();
             foreach (string _word in Badwords.BadWordslist)
             {
                 if (_message1.Contains(_word))
                 {
                     _message1 = _message1.Replace(_word, "*****");
                     GameManager.Instance.GameMessageServer(_cInfo, _message1, _playerName);
                     return(false);
                 }
             }
         }
         if (_message.StartsWith("/") || _message.StartsWith("!") || _message.StartsWith("@"))
         {
             bool _announce = false;
             if (_message.StartsWith("!"))
             {
                 _announce = true;
                 _message  = _message.Replace("!", "");
             }
             if (_message.StartsWith("/"))
             {
                 _message = _message.Replace("/", "");
             }
             if (_message.StartsWith("mute ") || _message.StartsWith("unmute "))
             {
                 if (AdminChat.IsEnabled)
                 {
                     if (_message.StartsWith("mute "))
                     {
                         _message = _message.Replace("mute ", "");
                         AdminChat.MutePlayer(_cInfo, _message);
                     }
                     if (_message.StartsWith("unmute "))
                     {
                         _message = _message.Replace("unmute ", "");
                         AdminChat.UnMutePlayer(_cInfo, _message);
                     }
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}AdminChat is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message.StartsWith("clanadd ") || _message == "clandel" || _message.StartsWith("claninvite ") || _message == "clanaccept" || _message == "clandecline" || _message.StartsWith("clanremove ") || _message.StartsWith("clanpromote ") || _message.StartsWith("clandemote "))
             {
                 if (ClanManager.IsEnabled)
                 {
                     if (_message.StartsWith("clanadd "))
                     {
                         _message = _message.Replace("clanadd ", "");
                         ClanManager.AddClan(_cInfo, _message);
                     }
                     if (_message == "clandel")
                     {
                         ClanManager.RemoveClan(_cInfo);
                     }
                     if (_message.StartsWith("claninvite "))
                     {
                         _message = _message.Replace("claninvite ", "");
                         ClanManager.InviteMember(_cInfo, _message);
                     }
                     if (_message == "clanaccept")
                     {
                         ClanManager.InviteAccept(_cInfo);
                     }
                     if (_message == "clandecline")
                     {
                         ClanManager.InviteDecline(_cInfo);
                     }
                     if (_message.StartsWith("clanremove "))
                     {
                         _message = _message.Replace("clanremove ", "");
                         ClanManager.RemoveMember(_cInfo, _message);
                     }
                     if (_message.StartsWith("clanpromote "))
                     {
                         _message = _message.Replace("clanpromote ", "");
                         ClanManager.PromoteMember(_cInfo, _message);
                     }
                     if (_message.StartsWith("clandemote "))
                     {
                         _message = _message.Replace("clandemote ", "");
                         ClanManager.DemoteMember(_cInfo, _message);
                     }
                     if (_message == "clanleave")
                     {
                         ClanManager.LeaveClan(_cInfo);
                     }
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}ClanManager is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message.StartsWith("@admins ") || _message.StartsWith("@all ") || _message.StartsWith("@ADMINS ") || _message.StartsWith("@ALL "))
             {
                 if (!AdminChat.IsEnabled)
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}AdminChat is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 else
                 {
                     if (_message.StartsWith("@ADMINS "))
                     {
                         _message = _message.Replace("@ADMINS ", "");
                         AdminChat.SendAdmins(_cInfo, _message);
                     }
                     if (_message.StartsWith("@admins "))
                     {
                         _message = _message.Replace("@admins ", "");
                         _message = "hello " + _message;
                         AdminChat.SendAdmins(_cInfo, _message);
                     }
                     if (_message.StartsWith("@ALL "))
                     {
                         _message = _message.Replace("@ALL ", "");
                         AdminChat.SendAll(_cInfo, _message);
                     }
                     if (_message.StartsWith("@all "))
                     {
                         _message = _message.Replace("@all ", "");
                         AdminChat.SendAll(_cInfo, _message);
                     }
                 }
                 return(false);
             }
             if (_message.StartsWith("w ") || _message.StartsWith("W ") || _message.StartsWith("pm ") || _message.StartsWith("PM "))
             {
                 if (_message.StartsWith("PM "))
                 {
                     _message = _message.Replace("PM ", "");
                 }
                 if (_message.StartsWith("pm "))
                 {
                     _message = _message.Replace("pm ", "");
                 }
                 if (_message.StartsWith("W "))
                 {
                     _message = _message.Replace("W ", "");
                 }
                 if (_message.StartsWith("w "))
                 {
                     _message = _message.Replace("w ", "");
                 }
                 Whisper.Send(_cInfo, _message);
                 return(false);
             }
             _message = _message.ToLower();
             if (_message == "info" || _message == "help" || _message == "commands")
             {
                 string _commands = CustomCommands.GetChatCommands(_cInfo);
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                     GameManager.Instance.GameMessageServer(_cInfo, _commands, "Server");
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(_commands, "Server"));
                 }
                 return(false);
             }
             if (_message == "killme" || _message == "wrist" || _message == "suicide")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (KillMe.IsEnabled)
                 {
                     KillMe.KillPlayer(_cInfo, _announce, _message, _playerName);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}Killme is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message == "gimme" || _message == "gimmie")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (Gimme.AlwaysShowResponse && !_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("/{0}", _message), _playerName);
                 }
                 if (Gimme.IsEnabled)
                 {
                     Gimme.Checkplayer(_cInfo, _announce, _playerName);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}Gimme is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message == "sethome")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (TeleportHome.IsEnabled)
                 {
                     TeleportHome.SetHome(_cInfo);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}Sethome is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message == "delhome")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (TeleportHome.IsEnabled)
                 {
                     TeleportHome.DelHome(_cInfo);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}Delhome is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message == "home")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (TeleportHome.IsEnabled)
                 {
                     TeleportHome.TeleHome(_cInfo);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}Home is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message == "setreturn")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (TeleportReturn.IsEnabled)
                 {
                     TeleportReturn.SetReturn(_cInfo);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}SetReturn is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message == "delreturn")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (TeleportReturn.IsEnabled)
                 {
                     TeleportReturn.DelReturn(_cInfo);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}DelReturn is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message == "return")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (TeleportReturn.IsEnabled)
                 {
                     TeleportReturn.TeleReturn(_cInfo);
                 }
                 else
                 {
                     _cInfo.SendPackage(new NetPackageGameMessage(string.Format("{0}Return is not enabled.[-]", CustomCommands._chatcolor), "Server"));
                 }
                 return(false);
             }
             if (_message == "day7")
             {
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (Day7.IsEnabled)
                 {
                     Day7.GetInfo(_cInfo, _announce);
                 }
                 return(false);
             }
             if (_message == "clancommands")
             {
                 if (ClanManager.IsEnabled)
                 {
                     ClanManager.GetChatCommands(_cInfo);
                 }
                 return(false);
             }
             string _response = null;
             if (CustomCommands.IsEnabled && CustomCommands._customCommands.TryGetValue(_message, out _response))
             {
                 _response = _response.Replace("{0}", _cInfo.entityId.ToString());
                 _response = _response.Replace("{1}", _cInfo.playerId);
                 _response = _response.Replace("{2}", _playerName);
                 _response = _response.Replace("{EntityId}", _cInfo.entityId.ToString());
                 _response = _response.Replace("{SteamId}", _cInfo.playerId);
                 _response = _response.Replace("{PlayerName}", _playerName);
                 if (_announce)
                 {
                     GameManager.Instance.GameMessageServer(_cInfo, string.Format("!{0}", _message), _playerName);
                 }
                 if (_response.StartsWith("say "))
                 {
                     if (_announce)
                     {
                         SdtdConsole.Instance.ExecuteSync(_response, _cInfo);
                     }
                     else
                     {
                         _response = _response.Replace("say ", "");
                         _response = _response.Replace("\"", "");
                         _cInfo.SendPackage(new NetPackageGameMessage(string.Format(_response), "Server"));
                     }
                 }
                 else
                 {
                     SdtdConsole.Instance.ExecuteSync(_response, _cInfo);
                 }
                 return(false);
             }
         }
     }
     return(true);
 }
 void cmd_btnCustom_Click(object sender, EventArgs e)
 {
     using (CustomCommands form = new CustomCommands()) {
         form.ShowDialog();
     }
 }
Beispiel #26
0
        public override void Initialize()
        {
            //Aimsharp.DebugMode();

            Aimsharp.PrintMessage("Perfect Simcraft Series: Windwalker Monk - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            //Aimsharp.PrintMessage(" ");
            // Aimsharp.PrintMessage("/xxxxx Prepull 10", Color.Blue);
            // Aimsharp.PrintMessage("--Starts the prepull actions.", Color.Blue);
            // Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);

            Aimsharp.Latency    = 50;
            Aimsharp.QuickDelay = 125;
            Aimsharp.SlowDelay  = 250;

            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            RacialPower = GetDropDown("Racial Power");

            Spellbook.Add(MajorPower);

            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }
            if (RacialPower == "Bloodelf")
            {
                Spellbook.Add("Arcane Torrent");
            }

            Spellbook.Add("Serenity");
            Spellbook.Add("Touch of Death");
            Spellbook.Add("Rising Sun Kick");
            Spellbook.Add("Fists of Fury");
            Spellbook.Add("Spinning Crane Kick");
            Spellbook.Add("Fist of the White Tiger");
            Spellbook.Add("Blackout Kick");
            Spellbook.Add("Tiger Palm");
            Spellbook.Add("Chi Wave");
            Spellbook.Add("Invoke Xuen, the White Tiger");
            Spellbook.Add("Storm, Earth, and Fire");
            Spellbook.Add("Whirling Dragon Punch");
            Spellbook.Add("Rushing Jade Wind");
            Spellbook.Add("Energizing Elixir");
            Spellbook.Add("Chi Burst");
            Spellbook.Add("Flying Serpent Kick");

            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Lifeblood");
            Buffs.Add("Memory of Lucid Dreams");
            Buffs.Add("Reckless Force");
            Buffs.Add("Guardian of Azeroth");

            Buffs.Add("Serenity");
            Buffs.Add("Storm, Earth, and Fire");
            Buffs.Add("Rushing Jade Wind");
            Buffs.Add("Energizing Elixir");
            Buffs.Add("Dance of Chi-Ji");
            Buffs.Add("Blackout Kick!");

            Debuffs.Add("Razor Coral");
            Debuffs.Add("Conductive Ink");
            Debuffs.Add("Shiver Venom");

            Debuffs.Add("Touch of Death");
            Debuffs.Add("Mark of the Crane");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));

            Macros.Add(TopTrinket, "/use " + TopTrinket);
            Macros.Add(BotTrinket, "/use " + BotTrinket);
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));

            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
            CustomCommands.Add("AOE");
            // CustomCommands.Add("Prepull");
        }
Beispiel #27
0
        public MacroListWidget(EditMacrosWindow windowController)
        {
            this.windowController = windowController;

            linkButtonFactory.fontSize = 10;
            FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);

            topToBottom.AnchorAll();
            topToBottom.Padding = new BorderDouble(3, 0, 3, 5);

            FlowLayoutWidget headerRow = new FlowLayoutWidget(FlowDirection.LeftToRight);

            headerRow.HAnchor = HAnchor.ParentLeftRight;
            headerRow.Margin  = new BorderDouble(0, 3, 0, 0);
            headerRow.Padding = new BorderDouble(0, 3, 0, 3);

            {
                string     macroPresetsLabel     = LocalizedString.Get("Macro Presets");
                string     macroPresetsLabelFull = string.Format("{0}:", macroPresetsLabel);
                TextWidget elementHeader         = new TextWidget(macroPresetsLabelFull, pointSize: 14);
                elementHeader.TextColor = ActiveTheme.Instance.PrimaryTextColor;
                elementHeader.HAnchor   = HAnchor.ParentLeftRight;
                elementHeader.VAnchor   = Agg.UI.VAnchor.ParentBottom;
                headerRow.AddChild(elementHeader);
            }

            topToBottom.AddChild(headerRow);

            FlowLayoutWidget presetsFormContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);

            {
                presetsFormContainer.HAnchor         = HAnchor.ParentLeftRight;
                presetsFormContainer.VAnchor         = VAnchor.ParentBottomTop;
                presetsFormContainer.Padding         = new BorderDouble(3);
                presetsFormContainer.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
            }

            topToBottom.AddChild(presetsFormContainer);

            foreach (CustomCommands currentCommand in MacroControlsWidget.GetMacros())
            {
                FlowLayoutWidget macroRow = new FlowLayoutWidget();
                macroRow.Margin          = new BorderDouble(3, 0, 3, 3);
                macroRow.HAnchor         = Agg.UI.HAnchor.ParentLeftRight;
                macroRow.Padding         = new BorderDouble(3);
                macroRow.BackgroundColor = RGBA_Bytes.White;

                TextWidget buttonLabel = new TextWidget(currentCommand.Name);
                macroRow.AddChild(buttonLabel);

                FlowLayoutWidget hSpacer = new FlowLayoutWidget();
                hSpacer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
                macroRow.AddChild(hSpacer);

                Button editLink = linkButtonFactory.Generate(LocalizedString.Get("edit"));
                editLink.Margin = new BorderDouble(right: 5);
                // You can't pass a foreach variable into a link function or it wall always be the last item.
                // So we make a local variable copy of it and pass that. This will get the right one.
                CustomCommands currentCommandForLinkFunction = currentCommand;
                editLink.Click += (sender, e) =>
                {
                    windowController.ChangeToMacroDetail(currentCommandForLinkFunction);
                };
                macroRow.AddChild(editLink);

                Button removeLink = linkButtonFactory.Generate(LocalizedString.Get("remove"));
                removeLink.Click += (sender, e) =>
                {
                    currentCommandForLinkFunction.Delete();
                    windowController.functionToCallOnSave(this, null);
                    windowController.ChangeToMacroList();
                };
                macroRow.AddChild(removeLink);

                presetsFormContainer.AddChild(macroRow);
            }

            Button addMacroButton = textImageButtonFactory.Generate(LocalizedString.Get("Add"), "icon_circle_plus.png");

            addMacroButton.ToolTipText = "Add a new Macro".Localize();
            addMacroButton.Click      += new EventHandler(addMacro_Click);

            Button cancelPresetsButton = textImageButtonFactory.Generate(LocalizedString.Get("Close"));

            cancelPresetsButton.Click += (sender, e) =>
            {
                UiThread.RunOnIdle(() =>
                {
                    this.windowController.Close();
                });
            };

            FlowLayoutWidget buttonRow = new FlowLayoutWidget();

            buttonRow.HAnchor = HAnchor.ParentLeftRight;
            buttonRow.Padding = new BorderDouble(0, 3);

            GuiWidget hButtonSpacer = new GuiWidget();

            hButtonSpacer.HAnchor = HAnchor.ParentLeftRight;

            buttonRow.AddChild(addMacroButton);
            buttonRow.AddChild(hButtonSpacer);
            buttonRow.AddChild(cancelPresetsButton);

            topToBottom.AddChild(buttonRow);
            AddChild(topToBottom);
            this.AnchorAll();
        }
 public MainWindow()
 {
     CM = new  CustomCommands();
     InitializeComponent();
     this.DataContext = CM;
 }
Beispiel #29
0
 public void ChangeToMacroList()
 {
     this.ActiveMacro = null;
     UiThread.RunOnIdle(DoChangeToMacroList);
 }
Beispiel #30
0
        public void LoadSetupSettings(string make, string model)
        {
            Dictionary <string, string> settingsDict = LoadPrinterSetupFromFile(make, model);
            Dictionary <string, string> macroDict    = new Dictionary <string, string>();

            macroDict["Lights On"]  = "M42 P6 S255";
            macroDict["Lights Off"] = "M42 P6 S0";

            //Determine if baud rate is needed and show controls if required
            string baudRate;

            if (settingsDict.TryGetValue("baud_rate", out baudRate))
            {
                ActivePrinter.BaudRate = baudRate;
            }

            // Check if we need to run the print level wizard before printing
            PrintLevelingData levelingData = PrintLevelingData.GetForPrinter(ActivePrinter);
            string            needsPrintLeveling;

            if (settingsDict.TryGetValue("needs_print_leveling", out needsPrintLeveling))
            {
                levelingData.needsPrintLeveling = true;
            }

            string printLevelingType;

            if (settingsDict.TryGetValue("print_leveling_type", out printLevelingType))
            {
                levelingData.levelingSystem = PrintLevelingData.LevelingSystem.Probe2Points;
            }

            string defaultSliceEngine;

            if (settingsDict.TryGetValue("default_slice_engine", out defaultSliceEngine))
            {
                if (Enum.IsDefined(typeof(ActivePrinterProfile.SlicingEngineTypes), defaultSliceEngine))
                {
                    ActivePrinter.CurrentSlicingEngine = defaultSliceEngine;
                }
            }

            settingsDict.TryGetValue("default_material_presets", out defaultMaterialPreset);
            settingsDict.TryGetValue("default_quality_preset", out defaultQualityPreset);
            settingsDict.TryGetValue("default_movement_speeds", out defaultMovementSpeeds);

            string defaultMacros;

            printerCustomCommands = new List <CustomCommands>();
            if (settingsDict.TryGetValue("default_macros", out defaultMacros))
            {
                string[] macroList = defaultMacros.Split(',');
                foreach (string macroName in macroList)
                {
                    string macroValue;
                    if (macroDict.TryGetValue(macroName.Trim(), out macroValue))
                    {
                        CustomCommands customMacro = new CustomCommands();
                        customMacro.Name  = macroName.Trim();
                        customMacro.Value = macroValue;

                        printerCustomCommands.Add(customMacro);
                    }
                }
            }

            //Determine what if any drivers are needed
            string infFileNames;

            if (settingsDict.TryGetValue("windows_driver", out infFileNames))
            {
                string[] fileNames = infFileNames.Split(',');
                foreach (string fileName in fileNames)
                {
                    switch (OsInformation.OperatingSystem)
                    {
                    case OSType.Windows:

                        string pathForInf = Path.GetFileNameWithoutExtension(fileName);

                        // TODO: It's really unexpected that the driver gets copied to the temp folder everytime a printer is setup. I'd think this only needs
                        // to happen when the infinstaller is run (More specifically - move this to *after* the user clicks Install Driver)

                        string infPath = Path.Combine("Drivers", pathForInf);
                        string infPathAndFileToInstall = Path.Combine(infPath, fileName);

                        if (StaticData.Instance.FileExists(infPathAndFileToInstall))
                        {
                            // Ensure the output directory exists
                            string destTempPath = Path.GetFullPath(Path.Combine(ApplicationDataStorage.Instance.ApplicationUserDataPath, "data", "temp", "inf", pathForInf));
                            if (!Directory.Exists(destTempPath))
                            {
                                Directory.CreateDirectory(destTempPath);
                            }

                            string destTempInf = Path.GetFullPath(Path.Combine(destTempPath, fileName));

                            // Sync each file from StaticData to the location on disk for serial drivers
                            foreach (string file in StaticData.Instance.GetFiles(infPath))
                            {
                                using (Stream outstream = File.OpenWrite(Path.Combine(destTempPath, Path.GetFileName(file))))
                                    using (Stream instream = StaticData.Instance.OpenSteam(file))
                                    {
                                        instream.CopyTo(outstream);
                                    }
                            }

                            DriversToInstall.Add(destTempInf);
                        }
                        break;

                    default:
                        break;
                    }
                }
            }
        }
Beispiel #31
0
 public VoidReasonListViewModel()
 {
     CreateBatchVoidReasons = new CaptionCommand <string>(Resources.BatchAddVoidReasons, OnCreateBatchVoidReasons);
     CustomCommands.Add(CreateBatchVoidReasons);
 }
Beispiel #32
0
        public override void Initialize()
        {
            //Aimsharp.DebugMode();
            Aimsharp.PrintMessage("Vid Shadow - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx NoAOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx CouncilDotsOff", Color.Blue);
            Aimsharp.PrintMessage("--Will keep SW:P and VT up on focus and Boss 1-4.", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx StartCombat", Color.Blue);
            Aimsharp.PrintMessage("--Will initiate combat on by itself.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);


            Aimsharp.Latency    = 50;
            Aimsharp.QuickDelay = 125;
            Aimsharp.SlowDelay  = 250;

            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            FiveLetters = GetString("First 5 Letters of the Addon:");
            AmountHP    = GetSlider("Don't dot below HP Amount");
            PercentHP   = GetSlider("Don't dot below HP%");


            Spellbook.Add(MajorPower);
            Spellbook.Add("Agony");
            Spellbook.Add("Corruption");
            Spellbook.Add("Seed of Corruption");
            Spellbook.Add("Unstable Affliction");
            Spellbook.Add("Summon Darkglare");
            Spellbook.Add("Unending Resolve");
            Spellbook.Add("Command Demon");
            Spellbook.Add("Malefic Rapture");
            Spellbook.Add("Siphon Life");
            Spellbook.Add("Vile Taint");
            Spellbook.Add("Phantom Singularity");
            Spellbook.Add("Shadow Bolt");
            Spellbook.Add("Drain Soul");
            Spellbook.Add("Haunt");
            Spellbook.Add("Dark Soul: Misery");
            Spellbook.Add("Unending Resolve");

            Items.Add("Healthstone");


            Buffs.Add("Bloodlust");
            Buffs.Add("Heroism");
            Buffs.Add("Time Warp");
            Buffs.Add("Ancient Hysteria");
            Buffs.Add("Netherwinds");
            Buffs.Add("Drums of Rage");
            Buffs.Add("Lifeblood");
            Buffs.Add("Void Miasma");



            Debuffs.Add("Concentrated Flame");
            Debuffs.Add("Corruption");
            Debuffs.Add("Siphon Life");
            Debuffs.Add("Agony");
            Debuffs.Add("Unstable Affliction");
            Debuffs.Add("Vile Taint");
            Debuffs.Add("Phantom Singularity");
            Debuffs.Add("Seed of Corruption");



            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));

            Macros.Add(TopTrinket, "/use " + TopTrinket);
            Macros.Add(BotTrinket, "/use " + BotTrinket);
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));
            Macros.Add("Healthstone", "/use Healthstone");
            Macros.Add("crash cursor", "/cast [@cursor] Shadow Crash");
            Macros.Add("MassDispel", "/cast [@cursor] Mass Dispel");
            Macros.Add("MassDispelOff", "/" + FiveLetters + " MassDispel");
            Macros.Add("S2MOff", "/" + FiveLetters + " S2M");
            Macros.Add("DispelOff", "/" + FiveLetters + " DispelMagic");
            Macros.Add("DispersionOff", "/" + FiveLetters + " Dispersion");
            Macros.Add("MindControlOff", "/" + FiveLetters + " MindControl");
            Macros.Add("PsychicScreamOff", "/" + FiveLetters + " PsychicScream");
            Macros.Add("PsychicHorrorOff", "/" + FiveLetters + " PsychicHorror");
            Macros.Add("DispelMagicOff", "/" + FiveLetters + " DispelMagic");

            Macros.Add("AgonyFocus", "/cast [@focus] Agony");
            Macros.Add("AgonyBoss1", "/cast [@boss1] Agony");
            Macros.Add("AgonyBoss2", "/cast [@boss2] Agony");
            Macros.Add("AgonyBoss3", "/cast [@boss3] Agony");
            Macros.Add("AgonyBoss4", "/cast [@boss4] Agony");

            Macros.Add("CorruptionFocus", "/cast [@focus] Corruption");
            Macros.Add("CorruptionBoss1", "/cast [@boss1] Corruption");
            Macros.Add("CorruptionBoss2", "/cast [@boss2] Corruption");
            Macros.Add("CorruptionBoss3", "/cast [@boss3] Corruption");
            Macros.Add("CorruptionBoss4", "/cast [@boss4] Corruption");

            Macros.Add("SLFocus", "/cast [@focus] Siphon Life");
            Macros.Add("SLBoss1", "/cast [@boss1] Siphon Life");
            Macros.Add("SLBoss2", "/cast [@boss2] Siphon Life");
            Macros.Add("SLBoss3", "/cast [@boss3] Siphon Life");
            Macros.Add("SLBoss4", "/cast [@boss4] Siphon Life");



            CustomCommands.Add("NoAOE");
            CustomCommands.Add("Prepull");
            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
            CustomCommands.Add("MassDispel");
            CustomCommands.Add("JustEssences");
            CustomCommands.Add("CouncilDotsOff");
            CustomCommands.Add("SavePS");
            CustomCommands.Add("StartCombat");

            CustomFunctions.Add("UACount", "local UACount = 0\nfor i=1,20 do\nlocal unit = \"nameplate\" .. i\nif UnitExists(unit) then\nif UnitCanAttack(\"player\", unit) then\nfor j = 1, 40 do\nlocal name,_,_,_,_,_,source = UnitDebuff(unit, j)\nif name == \"Unstable Affliction\" and source == \"player\" then\nUACount = UACount + 1\nend\nend\nend\nend\nend\nreturn UACount");
            CustomFunctions.Add("CorruptionCount", "local CorruptionCount = 0\nfor i=1,20 do\nlocal unit = \"nameplate\" .. i\nif UnitExists(unit) then\nif UnitCanAttack(\"player\", unit) then\nfor j = 1, 40 do\nlocal name,_,_,_,_,_,source = UnitDebuff(unit, j)\nif name == \"Corruption\" and source == \"player\" then\nCorruptionCount = CorruptionCount + 1\nend\nend\nend\nend\nend\nreturn CorruptionCount");
            CustomFunctions.Add("CorruptionTargets", "local CorruptionTargets = 0\nfor i=1,20 do\nlocal unit = \"nameplate\" .. i\nif UnitExists(unit) then\nif UnitCanAttack(\"player\", unit) and UnitHealthMax(unit) > 90000 and UnitHealth(unit) > 60000 then\nCorruptionTargets = CorruptionTargets + 1\nend\nend\nend\nreturn CorruptionTargets");
            CustomFunctions.Add("SoCCount", "local SoCCount = 0\nfor i=1,20 do\nlocal unit = \"nameplate\" .. i\nif UnitExists(unit) then\nif UnitCanAttack(\"player\", unit) then\nfor j = 1, 40 do\nlocal name,_,_,_,_,_,source = UnitDebuff(unit, j)\nif name == \"Seed of Corruption\" and source == \"player\" then\nSoCCount = SoCCount + 1\nend\nend\nend\nend\nend\nreturn SoCCount");

            CustomFunctions.Add("TargetID",
                                "local TargetID = 0;" +
                                "\nif UnitExists(\"target\") then" +
                                "\nTargetID = tonumber(UnitGUID(\"target\"):match(\"-(%d+)-%x+$\"), 10);" +
                                "\nend" +
                                "\nreturn TargetID;"
                                );

            CustomFunctions.Add("Boss1ID",
                                "local Boss1ID = 0;" +
                                "\nif UnitExists(\"boss1\") and UnitCanAttack(\"player\", \"boss1\") then" +
                                "\nBoss1ID = tonumber(UnitGUID(\"boss1\"):match(\"-(%d+)-%x+$\"), 10);" +
                                "\nend" +
                                "\nreturn Boss1ID;"
                                );

            CustomFunctions.Add("Boss2ID",
                                "local Boss2ID = 0;" +
                                "\nif UnitExists(\"boss2\") and UnitCanAttack(\"player\", \"boss2\") then" +
                                "\nBoss2ID = tonumber(UnitGUID(\"boss2\"):match(\"-(%d+)-%x+$\"), 10);" +
                                "\nend" +
                                "\nreturn Boss2ID;"
                                );

            CustomFunctions.Add("Boss3ID",
                                "local Boss3ID = 0;" +
                                "\nif UnitExists(\"boss3\") and UnitCanAttack(\"player\", \"boss3\") then" +
                                "\nBoss3ID = tonumber(UnitGUID(\"boss3\"):match(\"-(%d+)-%x+$\"), 10);" +
                                "\nend" +
                                "\nreturn Boss3ID;"
                                );

            CustomFunctions.Add("Boss4ID",
                                "local Boss4ID = 0;" +
                                "\nif UnitExists(\"boss4\") and UnitCanAttack(\"player\", \"boss4\") then" +
                                "\nBoss4ID = tonumber(UnitGUID(\"boss4\"):match(\"-(%d+)-%x+$\"), 10);" +
                                "\nend" +
                                "\nreturn Boss4ID;"
                                );
        }
Beispiel #33
0
        public override void Initialize()
        {
            Aimsharp.PrintMessage("Perfect Simcraft Series: BM Hunter - v 1.0", Color.Blue);
            Aimsharp.PrintMessage("Recommended talents: 2222212", Color.Blue);
            Aimsharp.PrintMessage("These macros can be used for manual control:", Color.Blue);
            Aimsharp.PrintMessage("/xxxxx AOE", Color.Blue);
            Aimsharp.PrintMessage("--Toggles AOE mode on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx Potions", Color.Blue);
            Aimsharp.PrintMessage("--Toggles using buff potions on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx SaveCooldowns", Color.Blue);
            Aimsharp.PrintMessage("--Toggles the use of big cooldowns on/off.", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("/xxxxx Prepull 6", Color.Blue);
            Aimsharp.PrintMessage("--Starts prepull rotation (hit it at around 6 seconds before)", Color.Blue);
            Aimsharp.PrintMessage(" ");
            Aimsharp.PrintMessage("--Replace xxxxx with first 5 letters of your addon, lowercase.", Color.Blue);


            MajorPower  = GetDropDown("Major Power");
            TopTrinket  = GetDropDown("Top Trinket");
            BotTrinket  = GetDropDown("Bot Trinket");
            RacialPower = GetDropDown("Racial Power");

            if (RacialPower == "Orc")
            {
                Spellbook.Add("Blood Fury");
            }
            if (RacialPower == "Troll")
            {
                Spellbook.Add("Berserking");
            }
            if (RacialPower == "Dark Iron Dwarf")
            {
                Spellbook.Add("Fireblood");
            }
            if (RacialPower == "Mag'har Orc")
            {
                Spellbook.Add("Ancestral Call");
            }
            if (RacialPower == "Lightforged Draenei")
            {
                Spellbook.Add("Light's Judgment");
            }

            Spellbook.Add(MajorPower);
            Spellbook.Add("Aspect of the Wild");
            Spellbook.Add("Bestial Wrath");
            Spellbook.Add("Barbed Shot");
            Spellbook.Add("Stampede");
            Spellbook.Add("Kill Command");
            Spellbook.Add("Chimaera Shot");
            Spellbook.Add("Dire Beast");
            Spellbook.Add("Barrage");
            Spellbook.Add("Cobra Shot");
            Spellbook.Add("Spitting Cobra");
            Spellbook.Add("A Murder of Crows");
            Spellbook.Add("Multi-Shot");

            Buffs.Add("Aspect of the Wild");
            Buffs.Add("Bestial Wrath");
            Buffs.Add("Frenzy");
            Buffs.Add("Lifeblood");
            Buffs.Add("Dance of Death");
            Buffs.Add("Beast Cleave");
            Buffs.Add("Barbed Shot");

            Debuffs.Add("Razor Coral");

            Items.Add(TopTrinket);
            Items.Add(BotTrinket);
            Items.Add(GetDropDown("Potion Type"));

            Macros.Add(TopTrinket, "/use " + TopTrinket);
            Macros.Add(BotTrinket, "/use " + BotTrinket);
            Macros.Add("potion", "/use " + GetDropDown("Potion Type"));
            Macros.Add("TopTrink", "/use 13");
            Macros.Add("BotTrink", "/use 14");

            CustomCommands.Add("AOE");
            CustomCommands.Add("Prepull");
            CustomCommands.Add("Potions");
            CustomCommands.Add("SaveCooldowns");
        }
		public void GetMacros(string make, string model)
		{
			Dictionary<string, string> macroDict = new Dictionary<string, string>();
			macroDict["Lights On"] = "M42 P6 S255";
			macroDict["Lights Off"] = "M42 P6 S0";
			macroDict["Offset 0.8"] = "M565 Z0.8;\nM500";
			macroDict["Offset 0.9"] = "M565 Z0.9;\nM500";
			macroDict["Offset 1"] = "M565 Z1;\nM500";
			macroDict["Offset 1.1"] = "M565 Z1.1;\nM500";
			macroDict["Offset 1.2"] = "M565 Z1.2;\nM500";
			macroDict["Z Offset"] = "G1 Z10;\nG28;\nG29;\nG1 Z10;\nG1 X5 Y5 F4000;\nM117;";

			string defaultMacros = GetActiveValue("default_macros");
			var printerCustomCommands = new List<CustomCommands>();
			if (!string.IsNullOrEmpty(defaultMacros))
			{
				foreach (string macroName in defaultMacros.Split(','))
				{
					string macroValue;
					if (macroDict.TryGetValue(macroName.Trim(), out macroValue))
					{
						CustomCommands customMacro = new CustomCommands();
						customMacro.Name = macroName.Trim();
						customMacro.Value = macroValue;

						printerCustomCommands.Add(customMacro);
					}
				}
			}
		}
Beispiel #35
0
        public override void Initialize()
        {
            Aimsharp.PrintMessage("Simple kick plugin.");
            Aimsharp.PrintMessage("Do not use this together with the Arena Kicks plugin!");
            Aimsharp.PrintMessage("Use this macro to hold your kicks for a number of seconds: /xxxxx SaveKicks #");
            Aimsharp.PrintMessage("For example: /xxxxx SaveKicks 5");
            Aimsharp.PrintMessage("will make the bot not kick anything for the next 5 seconds.");

            if (GetDropDown("Class") == "Hunter")
            {
                Interrupt = "Counter Shot";
            }

            if (GetDropDown("Class") == "Rogue")
            {
                Interrupt = "Kick";
            }

            if (GetDropDown("Class") == "Priest")
            {
                Interrupt = "Silence";
            }

            if (GetDropDown("Class") == "Demon Hunter")
            {
                Interrupt = "Disrupt";
            }

            if (GetDropDown("Class") == "Shaman")
            {
                Interrupt = "Wind Shear";
            }

            if (GetDropDown("Class") == "Paladin")
            {
                Interrupt = "Rebuke";
            }

            if (GetDropDown("Class") == "Death Knight")
            {
                Interrupt = "Mind Freeze";
            }

            if (GetDropDown("Class") == "Druid")
            {
                Interrupt    = "Skull Bash";
                InterruptTwo = "Solar Beam";
            }

            if (GetDropDown("Class") == "Warlock")
            {
                Interrupt = "Spell Lock";
            }

            if (GetDropDown("Class") == "Mage")
            {
                Interrupt = "Counterspell";
            }

            if (GetDropDown("Class") == "Monk")
            {
                Interrupt = "Spear Hand Strike";
            }

            if (GetDropDown("Class") == "Warrior")
            {
                Interrupt = "Pummel";
            }

            Spellbook.Add(Interrupt);
            Spellbook.Add(InterruptTwo);

            CustomCommands.Add("SaveKicks");
        }
Beispiel #36
0
 public static void Load()
 {
     DiscordBot.BuildToken();
     if (!Timers.CoreIsRunning)
     {
         Timers.CoreTimerStart();
     }
     if (XRayDetector.IsEnabled && !Timers.HalfSecondIsRunning)
     {
         Timers.HalfSecondTimerStart();
     }
     if (!XRayDetector.IsEnabled && Timers.HalfSecondIsRunning)
     {
         Timers.HalfSecondTimerStop();
     }
     if (Poll.IsEnabled && PersistentContainer.Instance.PollOpen)
     {
         Poll.CheckTime();
     }
     if (!ClanManager.IsEnabled)
     {
         ClanManager.Clans.Clear();
         ClanManager.ClanMember.Clear();
     }
     if (!InfoTicker.IsEnabled && InfoTicker.IsRunning)
     {
         InfoTicker.Unload();
     }
     if (InfoTicker.IsEnabled && !InfoTicker.IsRunning)
     {
         InfoTicker.Load();
     }
     if (Gimme.IsRunning && !Gimme.IsEnabled)
     {
         Gimme.Unload();
     }
     if (!Gimme.IsRunning && Gimme.IsEnabled)
     {
         Gimme.Load();
     }
     if (Badwords.IsRunning && !Badwords.IsEnabled)
     {
         Badwords.Unload();
     }
     if (!Badwords.IsRunning && Badwords.IsEnabled)
     {
         Badwords.Load();
     }
     if (!LoginNotice.IsRunning && LoginNotice.IsEnabled)
     {
         LoginNotice.Load();
     }
     if (LoginNotice.IsRunning && !LoginNotice.IsEnabled)
     {
         LoginNotice.Unload();
     }
     if (!Zones.IsRunning && Zones.IsEnabled)
     {
         Zones.Load();
     }
     if (Zones.IsRunning && !Zones.IsEnabled)
     {
         Zones.Unload();
     }
     if (!VoteReward.IsRunning && VoteReward.IsEnabled)
     {
         VoteReward.Load();
     }
     if (VoteReward.IsRunning && !VoteReward.IsEnabled)
     {
         VoteReward.Unload();
     }
     if (!WatchList.IsRunning && WatchList.IsEnabled)
     {
         WatchList.Load();
     }
     if (WatchList.IsRunning && !WatchList.IsEnabled)
     {
         WatchList.Unload();
     }
     if (!ReservedSlots.IsRunning && ReservedSlots.IsEnabled)
     {
         ReservedSlots.Load();
     }
     if (ReservedSlots.IsRunning && !ReservedSlots.IsEnabled)
     {
         ReservedSlots.Unload();
     }
     if (!StartingItems.IsRunning && StartingItems.IsEnabled)
     {
         StartingItems.Load();
     }
     if (StartingItems.IsRunning && !StartingItems.IsEnabled)
     {
         StartingItems.Unload();
     }
     if (!Travel.IsRunning && Travel.IsEnabled)
     {
         Travel.Load();
     }
     if (Travel.IsRunning && !Travel.IsEnabled)
     {
         Travel.Unload();
     }
     if (!Shop.IsRunning && Shop.IsEnabled)
     {
         Shop.Load();
     }
     if (Shop.IsRunning && !Shop.IsEnabled)
     {
         Shop.Unload();
     }
     if (!Motd.IsRunning && Motd.IsEnabled)
     {
         Motd.Load();
     }
     if (Motd.IsRunning && !Motd.IsEnabled)
     {
         Motd.Unload();
     }
     if (InvalidItems.IsRunning && !InvalidItems.IsEnabled)
     {
         InvalidItems.Unload();
     }
     if (!InvalidItems.IsRunning && InvalidItems.IsEnabled)
     {
         InvalidItems.Load();
     }
     if (HighPingKicker.IsRunning && !HighPingKicker.IsEnabled)
     {
         HighPingKicker.Unload();
     }
     if (!HighPingKicker.IsRunning && HighPingKicker.IsEnabled)
     {
         HighPingKicker.Load();
     }
     if (CustomCommands.IsRunning && !CustomCommands.IsEnabled)
     {
         CustomCommands.Unload();
     }
     if (!CustomCommands.IsRunning && CustomCommands.IsEnabled)
     {
         CustomCommands.Load();
     }
     if (DupeLog.IsRunning && !DupeLog.IsEnabled)
     {
         DupeLog.Unload();
     }
     if (!DupeLog.IsRunning && DupeLog.IsEnabled)
     {
         DupeLog.Load();
     }
     if (ChatColor.IsRunning && !ChatColor.IsEnabled)
     {
         ColorList.Unload();
         ChatColor.Unload();
     }
     if (!ChatColor.IsRunning && ChatColor.IsEnabled)
     {
         ColorList.Load();
         ChatColor.Load();
     }
     if (KillNotice.IsRunning && !KillNotice.IsEnabled)
     {
         KillNotice.Unload();
     }
     if (!KillNotice.IsRunning && KillNotice.IsEnabled)
     {
         KillNotice.Load();
     }
     if (Prayer.IsRunning && !Prayer.IsEnabled)
     {
         Prayer.Unload();
     }
     if (!Prayer.IsRunning && Prayer.IsEnabled)
     {
         Prayer.Load();
     }
     if (BloodmoonWarrior.IsRunning && !BloodmoonWarrior.IsEnabled)
     {
         BloodmoonWarrior.Unload();
     }
     else if (!BloodmoonWarrior.IsRunning && BloodmoonWarrior.IsEnabled)
     {
         BloodmoonWarrior.Load();
     }
     if (Waypoints.IsRunning && !Waypoints.Public_Waypoints)
     {
         Waypoints.Unload();
     }
     else if (!Waypoints.IsRunning && Waypoints.Public_Waypoints)
     {
         Waypoints.Load();
     }
     if (LevelUp.IsRunning && !LevelUp.IsEnabled)
     {
         LevelUp.Unload();
     }
     else if (!LevelUp.IsRunning && LevelUp.IsEnabled)
     {
         LevelUp.Load();
     }
     if (BotResponse.IsRunning && !BotResponse.IsEnabled)
     {
         BotResponse.Unload();
     }
     else if (!BotResponse.IsRunning && BotResponse.IsEnabled)
     {
         BotResponse.Load();
     }
     if (ProtectedZones.IsRunning && !ProtectedZones.IsEnabled)
     {
         ProtectedZones.Unload();
     }
     else if (!ProtectedZones.IsRunning && ProtectedZones.IsEnabled)
     {
         ProtectedZones.Load();
     }
     if (ClanManager.IsEnabled)
     {
         ClanManager.ClanList();
     }
     if (Auction.IsEnabled)
     {
         Auction.AuctionList();
     }
     if (Mute.IsEnabled)
     {
         Mute.ClientMuteList();
         Mute.MuteList();
     }
     if (Jail.IsEnabled)
     {
         Jail.JailList();
     }
     if (WebAPI.IsEnabled && !WebAPI.IsRunning)
     {
         if (!PersistentOperations.ThirtySeconds)
         {
             Log.Out("[SERVERTOOLS] Web_API will go live thirty seconds after the server finishes loading");
         }
         else
         {
             WebAPI.Load();
         }
     }
     else if (WebAPI.IsRunning && !WebAPI.IsEnabled)
     {
         WebAPI.Unload();
     }
 }
        public static void ProcessCommand(FrmMain main, CustomCommands cmd, int senderID, string senderName, string[] args)
        {
            sFrmMain = main;
            if (!(main.IsDisposed || main.Disposing))
            {
                main.Invoke((VGen0)delegate {
                    Create();
                });
            }
            if (sDlgSupcom != null)
            {
                CustomCommands commands = cmd;
                int num = senderID;
                string str = senderName;
                string[] strArray = args;
                try
                {
                    int num2;
                    switch (commands)
                    {
                        case CustomCommands.AutomatchRequestAlliance:
                            lock (mInviteMutex)
                            {
                                if ((((sLeader == "") && !sIsHosting) && !sIsJoining) && !(main.IsDisposed || main.Disposing))
                                {
                                    main.BeginInvoke((VGen2)delegate (object objname, object objmain) {
                                        FrmMain mainForm = (FrmMain) objmain;
                                        if (((new DlgYesNo(mainForm, Loc.Get("<LOC>Arranged Team Request"), objname.ToString() + Loc.Get("<LOC> has invited you to play in a rated team game.  Do you wish to join?")).ShowDialog() == DialogResult.Yes) && (SupcomAutomatch.GetSupcomAutomatch().State == SupcomAutoState.Unavailable)) && !((!(sLeader == "") || sIsHosting) || sIsJoining))
                                        {
                                            sIsConfirmed = false;
                                            sIsJoining = true;
                                            Messaging.SendCustomCommand(objname.ToString(), CustomCommands.AutomatchConfirmAlliance, new object[0]);
                                            mainForm.SetStatus(Loc.Get("<LOC>Arranged Team Leader: ") + objname.ToString(), new object[0]);
                                            mainForm.DisableGameButtons();
                                            SkinStatusButton cancel = new SkinStatusButton();
                                            cancel.Click += new EventHandler(DlgSupcomTeamSelection.cancel_Click);
                                            cancel.Text = Loc.Get("<LOC>Leave Team");
                                            cancel.Tag = objname.ToString();
                                            mainForm.AddMiddleButton(cancel);
                                            sLeader = objname.ToString();
                                            ThreadPool.QueueUserWorkItem(delegate (object o) {
                                                Thread.Sleep(ConfigSettings.GetInt("TeamJoinTimeout", 0x1388));
                                                cancel.BeginInvoke((VGen1)delegate (object ocancel) {
                                                    if (!sIsConfirmed && (ocancel is SkinStatusButton))
                                                    {
                                                        (ocancel as SkinStatusButton).PerformClick();
                                                    }
                                                }, new object[] { o });
                                            }, cancel);
                                        }
                                    }, new object[] { str, main });
                                }
                            }
                            return;

                        case CustomCommands.AutomatchAcknowledgeTeam:
                            sIsConfirmed = true;
                            return;

                        default:
                            if (commands != CustomCommands.AutomatchConfirmAlliance)
                            {
                                goto Label_025A;
                            }
                            for (num2 = sDlgSupcom.mPendingUsers.Count - 1; num2 >= 0; num2--)
                            {
                                if (sDlgSupcom.mPendingUsers[num2].Name == str)
                                {
                                    int @int = ConfigSettings.GetInt("MaxTeamSize", 4);
                                    if (sDlgSupcom.mUsers.Count < @int)
                                    {
                                        sDlgSupcom.mUsers.Add(sDlgSupcom.mPendingUsers[num2]);
                                        Messaging.SendCustomCommand(senderName, CustomCommands.AutomatchAcknowledgeTeam, new object[0]);
                                        sDlgSupcom.mPendingUsers.RemoveAt(num2);
                                    }
                                    else
                                    {
                                        Messaging.SendCustomCommand(sDlgSupcom.mPendingUsers[num2].Name, CustomCommands.AutomatchEndAlliance, new object[0]);
                                        sDlgSupcom.mPendingUsers.RemoveAt(num2);
                                    }
                                    break;
                                }
                            }
                            break;
                    }
                    DisplayUsers();
                    return;
                Label_025A:
                    if (commands == CustomCommands.AutomatchCancelAlliance)
                    {
                        sIsJoining = false;
                        for (num2 = sDlgSupcom.mPendingUsers.Count - 1; num2 >= 0; num2--)
                        {
                            if (sDlgSupcom.mPendingUsers[num2].Name == str)
                            {
                                sDlgSupcom.mPendingUsers.RemoveAt(num2);
                                DisplayUsers();
                                break;
                            }
                        }
                        for (num2 = sDlgSupcom.mUsers.Count - 1; num2 >= 0; num2--)
                        {
                            if (sDlgSupcom.mUsers[num2].Name == str)
                            {
                                sDlgSupcom.mUsers.RemoveAt(num2);
                                DisplayUsers();
                                break;
                            }
                        }
                        if (SupcomAutomatch.GetSupcomAutomatch().State != SupcomAutoState.Unavailable)
                        {
                            sDlgSupcom.BeginInvoke((VGen0)delegate {
                                sDlgSupcom.AbortGame();
                            });
                        }
                    }
                    else
                    {
                        switch (commands)
                        {
                            case CustomCommands.AutomatchEndAlliance:
                                sIsJoining = false;
                                if (!(main.IsDisposed || main.Disposing))
                                {
                                    main.BeginInvoke((VGen2)delegate (object objname, object objmain) {
                                        FrmMain mainForm = (FrmMain) objmain;
                                        DlgMessage.Show(mainForm, Loc.Get("<LOC>The team leader has canceled the arranged team game."));
                                        mainForm.ClearStatus();
                                        mainForm.EnableGameButtons();
                                    }, new object[] { str, main });
                                }
                                sLeader = "";
                                sDlgSupcom = null;
                                break;

                            case CustomCommands.AutomatchStatusMessage:
                                if (strArray[0] == "AUTOSEARCH")
                                {
                                    SupcomAutomatch.GetSupcomAutomatch().OnExit += new EventHandler(DlgSupcomTeamSelection.DlgSupcomTeamSelection_OnExit);
                                }
                                else if (!(main.IsDisposed || main.Disposing))
                                {
                                    main.BeginInvoke((VGen3)delegate (object objname, object objmain, object objargs) {
                                        FrmMain curmain = (FrmMain) objmain;
                                        if (objargs.ToString().IndexOf("launch") >= 0)
                                        {
                                            curmain.ClearStatus();
                                        }
                                        curmain.SetStatus(Loc.Get(objargs.ToString()), new object[0]);
                                    }, new object[] { str, main, strArray[0] });
                                }
                                break;
                        }
                    }
                }
                catch (Exception exception)
                {
                    ErrorLog.WriteLine(exception);
                }
            }
        }