public static void AddHotkey(TreeNode parent, string name, HotKeyCallback callback) { KeyData key = HotKey.Add(HKCategory.None, HKSubCat.None, name, callback); key.Remove(); key.m_Node = HotKey.MakeNode(parent, key.StrName, key); }
public static void Initialize() { HotKey.Add(HKCategory.Misc, LocString.Resync, new HotKeyCallback(Resync)); HotKey.Add(HKCategory.Misc, LocString.RecStart, new HotKeyCallback(PacketPlayer.Record)); HotKey.Add(HKCategory.Misc, LocString.VidStop, new HotKeyCallback(PacketPlayer.Stop)); HotKey.Add(HKCategory.Misc, LocString.ClearDragDropQueue, new HotKeyCallback(DragDropManager.GracefulStop)); HotKey.Add(HKCategory.Misc, LocString.LastSpell, new HotKeyCallback(LastSpell)); HotKey.Add(HKCategory.Misc, LocString.LastSkill, new HotKeyCallback(LastSkill)); HotKey.Add(HKCategory.Misc, LocString.LastObj, new HotKeyCallback(LastObj)); HotKey.Add(HKCategory.Misc, LocString.AllNames, new HotKeyCallback(AllNames)); HotKey.Add(HKCategory.Misc, LocString.Dismount, new HotKeyCallback(Dismount)); HotKey.Add(HKCategory.Items, LocString.BandageSelf, new HotKeyCallback(BandageSelf)); HotKey.Add(HKCategory.Items, LocString.BandageLT, new HotKeyCallback(BandageLastTarg)); HotKey.Add(HKCategory.Items, LocString.UseHand, new HotKeyCallback(UseItemInHand)); HotKey.Add(HKCategory.Misc, LocString.PartyAccept, new HotKeyCallback(PartyAccept)); HotKey.Add(HKCategory.Misc, LocString.PartyDecline, new HotKeyCallback(PartyDecline)); HotKeyCallbackState call = new HotKeyCallbackState(OnUseItem); HotKey.Add(HKCategory.Items, LocString.UseBandage, call, (ushort)3617); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkHeal, call, (ushort)3852); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkCure, call, (ushort)3847); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkRef, call, (ushort)3851); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkNS, call, (ushort)3846); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkExp, call, (ushort)3853); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkStr, call, (ushort)3849); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkAg, call, (ushort)3848); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkApple, new HotKeyCallback(OnDrinkApple)); }
public void AddHotKeys() { HotKey.Add(HKCategory.Misc, HKSubCat.None, $"Friend Add Target To: {GroupName}", AddFriendToGroup); HotKey.Add(HKCategory.Misc, HKSubCat.None, $"Friend Toggle Group: {GroupName}", ToggleFriendGroup); HotKey.Add(HKCategory.Misc, HKSubCat.None, $"Friend Add All Mobiles: {GroupName}", AddAllMobileAsFriends); HotKey.Add(HKCategory.Misc, HKSubCat.None, $"Friend Add All Humanoids: {GroupName}", AddAllHumanoidsAsFriends); }
public static void Initialize() { HotKey.Add(HKCategory.Misc, LocString.Resync, new HotKeyCallback(Resync)); HotKey.Add(HKCategory.Misc, LocString.GoldPerHotkey, new HotKeyCallback(ToggleGoldPer)); HotKey.Add(HKCategory.Misc, LocString.DamageTracker, new HotKeyCallback(ToggleDamage)); HotKey.Add(HKCategory.Misc, LocString.CaptureBod, new HotKeyCallback(CaptureBod)); HotKey.Add(HKCategory.Misc, LocString.ClearDragDropQueue, new HotKeyCallback(DragDropManager.GracefulStop)); HotKey.Add(HKCategory.Misc, LocString.LastSpell, new HotKeyCallback(LastSpell)); HotKey.Add(HKCategory.Misc, LocString.LastSkill, new HotKeyCallback(LastSkill)); HotKey.Add(HKCategory.Misc, LocString.LastObj, new HotKeyCallback(LastObj)); HotKey.Add(HKCategory.Misc, LocString.AllNames, new HotKeyCallback(AllNames)); HotKey.Add(HKCategory.Misc, LocString.AllCorpses, new HotKeyCallback(AllCorpses)); HotKey.Add(HKCategory.Misc, LocString.AllMobiles, new HotKeyCallback(AllMobiles)); HotKey.Add(HKCategory.Misc, LocString.Dismount, new HotKeyCallback(Dismount)); HotKey.Add(HKCategory.Items, LocString.BandageSelf, new HotKeyCallback(BandageSelf)); HotKey.Add(HKCategory.Items, LocString.BandageLT, new HotKeyCallback(BandageLastTarg)); HotKey.Add(HKCategory.Items, LocString.UseHand, new HotKeyCallback(UseItemInHand)); HotKey.Add(HKCategory.Items, LocString.UseRightHand, new HotKeyCallback(UseItemInRightHand)); HotKey.Add(HKCategory.Items, LocString.UseLeftHand, new HotKeyCallback(UseItemInLeftHand)); HotKey.Add(HKCategory.Misc, LocString.PartyAccept, new HotKeyCallback(PartyAccept)); HotKey.Add(HKCategory.Misc, LocString.PartyDecline, new HotKeyCallback(PartyDecline)); HotKey.Add(HKCategory.Misc, LocString.PartyAdd, new HotKeyCallback(PartyAdd)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllCome, new HotKeyCallback(PetAllCome)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllFollowMe, new HotKeyCallback(PetAllFollowMe)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllFollow, new HotKeyCallback(PetAllFollow)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllGuardMe, new HotKeyCallback(PetAllGuardMe)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllGuard, new HotKeyCallback(PetAllGuard)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllKill, new HotKeyCallback(PetAllKill)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllStay, new HotKeyCallback(PetAllStay)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllStop, new HotKeyCallback(PetAllStop)); HotKeyCallbackState call = new HotKeyCallbackState(OnUseItem); HotKey.Add(HKCategory.Items, LocString.UseBandage, call, (ushort)3617); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkHeal, call, (ushort)3852); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkCure, call, (ushort)3847); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkRef, call, (ushort)3851); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkNS, call, (ushort)3846); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkExp, call, (ushort)3853); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkStr, call, (ushort)3849); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkAg, call, (ushort)3848); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkApple, new HotKeyCallback(OnDrinkApple)); // Set the packet handler for single click and establish hotkeys for grab item PacketHandler.RegisterClientToServerViewer(0x09, new PacketViewerCallback(OnGrabItemSingleClick)); HotKey.Add(HKCategory.Misc, LocString.GrabItem, new HotKeyCallback(GrabItem)); HotKey.Add(HKCategory.Misc, LocString.SetGrabItemHotBag, new HotKeyCallback(SetGrabItemHotBag)); _grabHotBag = Convert.ToUInt32(Config.GetString("GrabHotBag")); }
public static void Initialize() { m_Callback = new HotKeyCallbackState(OnHotKey); //1044060 = Alchemy in UO cliloc for (int i = 0; i < m_UsableSkills.Length; i++) { HotKey.Add(HKCategory.Skills, (1044060 + m_UsableSkills[i]), m_Callback, m_UsableSkills[i]); } }
public static void Initialize() { m_Callback = new HotKeyCallbackState(OnHotKey); //1044060 = Alchemy in UO cliloc foreach (int t in m_UsableSkills) { HotKey.Add(HKCategory.Skills, (1044060 + t), m_Callback, t); } }
public static void Initialize() { HotKey.Add(HKCategory.Macros, LocString.StopCurrent, new HotKeyCallback(HotKeyStop)); HotKey.Add(HKCategory.Macros, LocString.PauseCurrent, new HotKeyCallback(HotKeyPause)); string path = Config.GetUserDirectory("Macros"); Recurse(null, path); }
public IgnoreAgent() { m_Chars = new List <Serial>(); m_Names = new Dictionary <Serial, string>(); HotKey.Add(HKCategory.Targets, LocString.AddToIgnore, new HotKeyCallback(AddToIgnoreList)); HotKey.Add(HKCategory.Targets, LocString.RemoveFromIgnore, new HotKeyCallback(RemoveFromIgnoreList)); Agent.OnMobileCreated += new MobileCreatedEventHandler(OPLCheckIgnore); }
/// <summary> /// This is called via reflection when the application starts up /// </summary> public static void Initialize() { HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.StopScript, HotkeyStopScript); HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.ScriptDClickType, HotkeyDClickTypeScript); HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.ScriptTargetType, HotkeyTargetTypeScript); _scriptList = new List <RazorScript>(); Recurse(null, Config.GetUserDirectory("Scripts")); }
public static void Initialize() { _callback = new HotKeyCallbackState(OnHotKey); //1044060 = Alchemy in UO cliloc foreach (int t in Skills.GetUsableSkillIndexes()) { HotKey.Add(HKCategory.Skills, (1044060 + t), _callback, t); } }
public UseOnceAgent() { m_Items = new ArrayList(); PacketHandler.RegisterClientToServerViewer(0x09, new PacketViewerCallback(OnSingleClick)); HotKey.Add(HKCategory.Agents, LocString.UseOnceAgent, new HotKeyCallback(OnHotKey)); HotKey.Add(HKCategory.Agents, LocString.AddUseOnce, new HotKeyCallback(OnAdd)); HotKey.Add(HKCategory.Agents, LocString.AddUseOnceContainer, new HotKeyCallback(OnAddContainer)); Agent.OnItemCreated += new ItemCreatedEventHandler(CheckItemOPL); }
public SellAgent() { m_Items = new List <ushort>(); PacketHandler.RegisterServerToClientViewer(0x9E, new PacketViewerCallback(OnVendorSell)); PacketHandler.RegisterClientToServerViewer(0x09, new PacketViewerCallback(OnSingleClick)); HotKey.Add(HKCategory.Agents, HKSubCat.None, Language.GetString(LocString.SetSellAgentHotBag), new HotKeyCallback(SetHotBag)); Agent.OnItemCreated += new ItemCreatedEventHandler(CheckHBOPL); }
public static void Initialize() { HotKey.Add(HKCategory.Dress, LocString.ArmDisarmRight, new HotKeyCallback(ToggleRight)); HotKey.Add(HKCategory.Dress, LocString.ArmDisarmLeft, new HotKeyCallback(ToggleLeft)); HotKey.Add(HKCategory.Dress, LocString.UndressAll, new HotKeyCallback(OnUndressAll)); HotKey.Add(HKCategory.Dress, LocString.UndressHands, new HotKeyCallback(OnUnequipBothHands)); HotKey.Add(HKCategory.Dress, LocString.UndressLeft, new HotKeyCallback(OnUnequipLeft)); HotKey.Add(HKCategory.Dress, LocString.UndressRight, new HotKeyCallback(OnUnequipRight)); HotKey.Add(HKCategory.Dress, LocString.UndressHat, new HotKeyCallback(OnUnequipHat)); HotKey.Add(HKCategory.Dress, LocString.UndressJewels, new HotKeyCallback(OnUnequipJewelry)); }
public static void Initialize() { HotKey.Add(HKCategory.Macros, LocString.StopCurrent, new HotKeyCallback(HotKeyStop)); string path = Config.GetUserDirectory("Macros"); Recurse(null, path); /*string[] macros = Directory.GetFiles( path, "*.macro" ); * for (int i=0;i<macros.Length;i++) * Add( new Macro( macros[i] ) );*/ }
public ScavengerAgent() { m_Items = new List <ItemID>(); HotKey.Add(HKCategory.Agents, LocString.ClearScavCache, new HotKeyCallback(ClearCache)); HotKey.Add(HKCategory.Agents, LocString.ScavengerEnableDisable, new HotKeyCallback(OnEnableDisable)); HotKey.Add(HKCategory.Agents, LocString.ScavengerSetHotBag, new HotKeyCallback(OnSetHotBag)); HotKey.Add(HKCategory.Agents, LocString.ScavengerAddTarget, new HotKeyCallback(OnAddToHotBag)); PacketHandler.RegisterClientToServerViewer(0x09, new PacketViewerCallback(OnSingleClick)); Agent.OnItemCreated += new ItemCreatedEventHandler(CheckBagOPL); }
/// <summary> /// This is called via reflection when the application starts up /// </summary> public static void Initialize() { HotKey.Add(HKCategory.Scripts, LocString.StopScript, new HotKeyCallback(HotkeyStopScript)); Scripts = new List <RazorScript>(); LoadScripts(); foreach (RazorScript script in Scripts) { AddHotkey(script.Name); } }
public OrganizerAgent(int num) { Items = new List <ItemID>(); Number = num; HotKey.Add(HKCategory.Agents, HKSubCat.None, $"{Language.GetString(LocString.OrganizerAgent)}-{Number:D2}", new HotKeyCallback(Organize)); HotKey.Add(HKCategory.Agents, HKSubCat.None, $"{Language.GetString(LocString.SetOrganizerHB)}-{Number:D2}", new HotKeyCallback(SetHotBag)); PacketHandler.RegisterClientToServerViewer(0x09, new PacketViewerCallback(OnSingleClick)); Agent.OnItemCreated += new ItemCreatedEventHandler(CheckContOPL); }
/// <summary> /// This is called via reflection when the application starts up /// </summary> public static void Initialize() { HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.StopScript, HotkeyStopScript); HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.ScriptDClickType, HotkeyDClickTypeScript); HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.ScriptTargetType, HotkeyTargetTypeScript); Scripts = new List <RazorScript>(); LoadScripts(); foreach (RazorScript script in Scripts) { AddHotkey(script.Name); } }
public RestockAgent(int num) { Number = num; m_Items = new List <RestockItem>(); HotKey.Add(HKCategory.Agents, HKSubCat.None, $"{Language.GetString(LocString.RestockAgent)}-{Number:D2}", new HotKeyCallback(OnHotKey)); HotKey.Add(HKCategory.Agents, HKSubCat.None, $"{Language.GetString(LocString.SetRestockHB)}-{Number:D2}", new HotKeyCallback(SetHB)); PacketHandler.RegisterClientToServerViewer(0x09, new PacketViewerCallback(OnSingleClick)); Agent.OnItemCreated += new ItemCreatedEventHandler(CheckHBOPL); }
public static void Initialize() { HotKey.Add(HKCategory.Misc, LocString.Resync, new HotKeyCallback(Resync)); HotKey.Add(HKCategory.Misc, LocString.GoldPerHotkey, new HotKeyCallback(ToggleGoldPer)); HotKey.Add(HKCategory.Misc, LocString.DamageTracker, new HotKeyCallback(ToggleDamage)); HotKey.Add(HKCategory.Misc, LocString.CaptureBod, new HotKeyCallback(CaptureBod)); HotKey.Add(HKCategory.Misc, LocString.ClearDragDropQueue, new HotKeyCallback(DragDropManager.GracefulStop)); HotKey.Add(HKCategory.Misc, LocString.LastSpell, new HotKeyCallback(LastSpell)); HotKey.Add(HKCategory.Misc, LocString.LastSkill, new HotKeyCallback(LastSkill)); HotKey.Add(HKCategory.Misc, LocString.LastObj, new HotKeyCallback(LastObj)); HotKey.Add(HKCategory.Misc, LocString.AllNames, new HotKeyCallback(AllNames)); HotKey.Add(HKCategory.Misc, LocString.AllCorpses, new HotKeyCallback(AllCorpses)); HotKey.Add(HKCategory.Misc, LocString.AllMobiles, new HotKeyCallback(AllMobiles)); HotKey.Add(HKCategory.Misc, LocString.Dismount, new HotKeyCallback(Dismount)); HotKey.Add(HKCategory.Items, LocString.BandageSelf, new HotKeyCallback(BandageSelf)); HotKey.Add(HKCategory.Items, LocString.BandageLT, new HotKeyCallback(BandageLastTarg)); HotKey.Add(HKCategory.Items, LocString.UseHand, new HotKeyCallback(UseItemInHand)); HotKey.Add(HKCategory.Misc, LocString.PartyAccept, new HotKeyCallback(PartyAccept)); HotKey.Add(HKCategory.Misc, LocString.PartyDecline, new HotKeyCallback(PartyDecline)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllCome, new HotKeyCallback(PetAllCome)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllFollowMe, new HotKeyCallback(PetAllFollowMe)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllFollow, new HotKeyCallback(PetAllFollow)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllGuardMe, new HotKeyCallback(PetAllGuardMe)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllGuard, new HotKeyCallback(PetAllGuard)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllKill, new HotKeyCallback(PetAllKill)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllStay, new HotKeyCallback(PetAllStay)); HotKey.Add(HKCategory.Misc, HKSubCat.PetCommands, LocString.AllStop, new HotKeyCallback(PetAllStop)); HotKeyCallbackState call = new HotKeyCallbackState(OnUseItem); HotKey.Add(HKCategory.Items, LocString.UseBandage, call, (ushort)3617); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkHeal, call, (ushort)3852); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkCure, call, (ushort)3847); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkRef, call, (ushort)3851); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkNS, call, (ushort)3846); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkExp, call, (ushort)3853); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkStr, call, (ushort)3849); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkAg, call, (ushort)3848); HotKey.Add(HKCategory.Items, HKSubCat.Potions, LocString.DrinkApple, new HotKeyCallback(OnDrinkApple)); }
/// <summary> /// This is called via reflection when the application starts up /// </summary> public static void Initialize() { HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.StopScript, HotkeyStopScript); HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.ScriptDClickType, HotkeyDClickTypeScript); HotKey.Add(HKCategory.Scripts, HKSubCat.None, LocString.ScriptTargetType, HotkeyTargetTypeScript); Scripts = new List <RazorScript>(); LoadScripts(); foreach (RazorScript script in Scripts) { AddHotkey(script.Name); } Interpreter.ActiveScriptStatementExecuted += ActiveScriptStatementExecuted; foreach (HighlightType type in GetHighlightTypes()) { HighlightLines[type] = new List <int>(); } }
public void AddHotKeys() { if (Engine.MainWindow == null) { HotKey.Add(HKCategory.Friends, HKSubCat.None, $"Add Target To: {GroupName}", AddFriendToGroup); HotKey.Add(HKCategory.Friends, HKSubCat.None, $"Toggle Group: {GroupName}", ToggleFriendGroup); HotKey.Add(HKCategory.Friends, HKSubCat.None, $"Add All Mobiles: {GroupName}", AddAllMobileAsFriends); HotKey.Add(HKCategory.Friends, HKSubCat.None, $"Add All Humanoids: {GroupName}", AddAllHumanoidsAsFriends); } else { Engine.MainWindow.SafeAction(s => { HotKey.Add(HKCategory.Friends, HKSubCat.None, $"Add Target To: {GroupName}", AddFriendToGroup); HotKey.Add(HKCategory.Friends, HKSubCat.None, $"Toggle Group: {GroupName}", ToggleFriendGroup); HotKey.Add(HKCategory.Friends, HKSubCat.None, $"Add All Mobiles: {GroupName}", AddAllMobileAsFriends); HotKey.Add(HKCategory.Friends, HKSubCat.None, $"Add All Humanoids: {GroupName}", AddAllHumanoidsAsFriends); }); } }
public static void AddHotkey(string script) { HotKey.Add(HKCategory.Scripts, HKSubCat.None, Language.Format(LocString.PlayScript, script), HotkeyCallback, script); }
public static void Initialize() { new ReqPartyLocTimer().Start(); HotKey.Add(HKCategory.Misc, LocString.ToggleMap, new HotKeyCallback(ToggleMap)); }
public static void Initialize() { HotKey.Add(HKCategory.Misc, LocString.NextWaypoint, new HotKeyCallback(NextWaypoint)); HotKey.Add(HKCategory.Misc, LocString.PrevWaypoint, new HotKeyCallback(PrevWaypoint)); HotKey.Add(HKCategory.Misc, LocString.HideWaypoint, new HotKeyCallback(ClearWaypoint)); }
private static void AddHotkey(RazorScript script) { HotKey.Add(HKCategory.Scripts, HKSubCat.None, Language.Format(LocString.PlayScript, script), OnHotKey, script); }
//public static bool IsWaiting{ get{ return Playing && m_Current != null && m_Current.Waiting; } } public static void Add(Macro m) { HotKey.Add(HKCategory.Macros, HKSubCat.None, Language.Format(LocString.PlayA1, m), new HotKeyCallbackState(HotKeyPlay), m); m_List.Add(m); }
public static void Initialize() { HotKey.Add(HKCategory.Misc, LocString.DispCounters, new HotKeyCallback(DispCounters)); HotKey.Add(HKCategory.Misc, LocString.RecountCounters, new HotKeyCallback(Recount)); }