public static void Register(ActionCallback callback, string action, string[,] list) { ParamNode[] paramNodeArray = new ParamNode[list.GetLength(0)]; for (int index = 0; index < paramNodeArray.Length; ++index) { paramNodeArray[index] = new ParamNode(list[index, 0], list[index, 1]); } MacroHandlers.Register(callback, action, paramNodeArray); }
public static void Setup() { MacroHandlers.Register(new ActionCallback(MacroHandlers.Screenshots_OnAction), "Options|Screenshots@Death Screenshots", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.RegCounter_OnAction), "Interface|RegCounter@Reg Counter", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.Warmode_OnAction), "Actions|Warmode", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.Halos_OnAction), "Options|Halos@Halos", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.ParticleCount_OnAction), "Options|ParticleCount@Particle Counter", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.Temperature_OnAction), "Options|Temperature@Temperature", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.Ping_OnAction), "Options|Ping@Ping Display", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.Transparency_OnAction), "Options|Transparency", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.ContainerGrid_OnAction), "Options|ContainerGrid@Container Grid", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.Grid_OnAction), "Options|Grid@Terrain Grid", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.PumpFPS_OnAction), "Options|PumpFPS@Pump FPS", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.FPS_OnAction), "Options|FPS@Display FPS", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.MiniHealth_OnAction), "Options|MiniHealth@Mini Health", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.ToggleHotkeys_OnAction), "Options|ToggleHotkeys@Toggle Hotkeys", ParamNode.Toggle); MacroHandlers.Register(new ActionCallback(MacroHandlers.Cast_OnAction), "Actions|Cast@Cast Spell", new ParamNode("Mage", new ParamNode[8] { new ParamNode("First", new string[8] { "Clumsy", "Create Food", "Feeblemind", "Heal", "Magic Arrow", "Night Sight", "Reactive Armor", "Weaken" }), new ParamNode("Second", new string[8] { "Agility", "Cunning", "Cure", "Harm", "Magic Trap", "Magic Untrap", "Protection", "Strength" }), new ParamNode("Third", new string[8] { "Bless", "Fireball", "Magic Lock", "Poison", "Telekinesis", "Teleport", "Unlock", "Wall of Stone" }), new ParamNode("Fourth", new string[8] { "Arch Cure", "Arch Protection", "Curse", "Fire Field", "Greater Heal", "Lightning", "Mana Drain", "Recall" }), new ParamNode("Fifth", new string[8] { "Blade Spirits", "Dispel Field", "Incognito", "Magic Reflection", "Mind Blast", "Paralyze", "Poison Field", "Summ. Creature" }), new ParamNode("Sixth", new string[8] { "Dispel", "Energy Bolt", "Explosion", "Invisibility", "Mark", "Mass Curse", "Paralyze Field", "Reveal" }), new ParamNode("Seventh", new string[8] { "Chain Lightning", "Energy Field", "Flame Strike", "Gate Travel", "Mana Vampire", "Mass Dispel", "Meteor Swarm", "Polymorph" }), new ParamNode("Eighth", new string[8] { "Earthquake", "Energy Vortex", "Resurrection", "Air Elemental", "Summon Daemon", "Earth Elemental", "Fire Elemental", "Water Elemental" }) }), new ParamNode("Paladin", new string[10] { "Cleanse by Fire", "Close Wounds", "Consecrate Weapon", "Dispel Evil", "Divine Fury", "Enemy of One", "Holy Light", "Noble Sacrifice", "Remove Curse", "Sacred Journey" }), new ParamNode("Necromancer", new ParamNode[4] { new ParamNode("Curses", new string[5] { "Blood Oath", "Corpse Skin", "Curse Weapon", "Evil Omen", "Mind Rot" }), new ParamNode("Damaging", new string[4] { "Pain Spike", "Poison Strike", "Strangle", "Wither" }), new ParamNode("Transorming", new string[4] { "Horrific Beast", "Lich Form", "Vampiric Embrace", "Wraith Form" }), new ParamNode("Summoning", new string[3] { "Animate Dead", "Summon Familiar", "Vengeful Spirit" }) })); MacroHandlers.Register(new ActionCallback(MacroHandlers.UsePotion_OnAction), "Items|UsePotion@Use Potion", new string[9, 2] { { "Smart", "Smart" }, { "Cure", "Orange" }, { "Heal", "Yellow" }, { "Poison", "Green" }, { "Agility", "Blue" }, { "Refresh", "Red" }, { "Strength", "White" }, { "Explosion", "Purple" }, { "Night Sight", "Black" } }); MacroHandlers.Register(new ActionCallback(MacroHandlers.Open_OnAction), "Interface|Open", new ParamNode("Spellbook", new ParamNode[3] { new ParamNode("Mage", "Spellbook"), new ParamNode("Paladin", "PaladinSpellbook"), new ParamNode("Necromancer", "NecroSpellbook") }), new ParamNode("Combat Book", "Abilities"), new ParamNode("Backpack", "Backpack"), new ParamNode("Help", "Help"), new ParamNode("Journal", "Journal"), new ParamNode("Network Stats", "NetStats"), new ParamNode("Configuration", "Options"), new ParamNode("Paperdoll", "Paperdoll"), new ParamNode("Overview", "Radar"), new ParamNode("Skills", "Skills"), new ParamNode("Status", "Status"), new ParamNode("Macro Editor", "Macros"), new ParamNode("Info Browser", "InfoBrowser")); MacroHandlers.Register(new ActionCallback(MacroHandlers.UseSkill_OnAction), "Actions|Use@Use Skill", new ParamNode("Actions", new string[11] { "Animal Taming", "Begging", "Detecting Hidden", "Hiding", "Meditation", "Poisoning", "Remove Trap", "Spirit Speak", "Stealing", "Stealth", "Tracking" }), new ParamNode("Lore & Knowledge", new string[7] { "Anatomy", "Animal Lore", "Arms Lore", "Evaluating Intelligence", "Forensic Evaluation", "Taste Identification", "Item Identification" }), new ParamNode("Crafting", new string[2] { "Inscription", "Cartography" }), new ParamNode("Bardic", new string[3] { "Discordance", "Peacemaking", "Provocation" })); MacroHandlers.Register(new ActionCallback(MacroHandlers.Target_OnAction), "Actions|Target", new ParamNode("Self", "Self"), new ParamNode("Last", "Last"), new ParamNode("Acquire", "Acquire"), new ParamNode("Find", "Find")); MacroHandlers.Register(new ActionCallback(MacroHandlers.Clear_OnAction), "Other|Clear", new ParamNode("Screen", "Screen"), new ParamNode("Target Queue", "TargetQueue"), new ParamNode("Target Cursor", "Target")); MacroHandlers.Register(new ActionCallback(MacroHandlers.DelayMacro_OnAction), "Other|DelayMacro@Delay Macro"); MacroHandlers.Register(new ActionCallback(MacroHandlers.Repeat_OnAction), "Other|Repeat", "Speech", "Macro"); MacroHandlers.Register(new ActionCallback(MacroHandlers.UseOnce_OnAction), "Items|UseOnce@Use Once", "Use", "Set"); MacroHandlers.Register(new ActionCallback(MacroHandlers.UseItemByType_OnAction), "Items|UseItemByType@Use By Type", "Bola", "Bandage", "Dagger", "Candle", "Moongate", "Purple Petal", "Orange Petal"); MacroHandlers.Register(new ActionCallback(MacroHandlers.UseItemInHand_OnAction), "Items|UseItemInHand@Use In Hand"); MacroHandlers.Register(new ActionCallback(MacroHandlers.UseWand_OnAction), "Items|UseWand@Use Wand", "Identification", "Clumsy", "Feeblemind", "Harm", "Magic Arrow", "Weaken", "Fireball", "Heal", "Greater Heal", "Lightning", "Mana Drain"); MacroHandlers.Register(new ActionCallback(MacroHandlers.SetEquip_OnAction), "Equipment|SetEquip@Set Equipment", ParamNode.Count(0, 10, "Slot {0}")); MacroHandlers.Register(new ActionCallback(MacroHandlers.Equip_OnAction), "Equipment|Arm", ParamNode.Count(0, 10, "Slot {0}")); MacroHandlers.Register(new ActionCallback(MacroHandlers.Dequip_OnAction), "Equipment|Disarm", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.Dress_OnAction), "Equipment|Dress", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.Bow_OnAction), "Other|Animations|Bow", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.Salute_OnAction), "Other|Animations|Salute", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.Wrestle_OnAction), "Other|Wrestle@Wrestle Move", "Disarm", "Stun"); MacroHandlers.Register(new ActionCallback(MacroHandlers.Resync_OnAction), "Other|Resync@Resynchronize", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.BandageSelf_OnAction), "Actions|BandageSelf@Bandage Self", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.Paste_OnAction), "Interface|Paste"); MacroHandlers.Register(new ActionCallback(MacroHandlers.Dismount_OnAction), "Actions|Dismount", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.Remount_OnAction), "Actions|Remount", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.StopMacros_OnAction), "Other|StopMacros@Stop Macros", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.WaitForTargetLast_OnAction), "Other|WaitForTargetLast", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.WaitForTarget_OnAction), "Other|WaitForTarget", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.Quit_OnAction), "Interface|Quit", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.AllNames_OnAction), "Interface|AllNames@All Names", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.SetAbility_OnAction), "Other|Ability@Set Ability", "Primary", "Secondary", "None"); MacroHandlers.Register(new ActionCallback(MacroHandlers.Count_OnAction), "Interface|Count", "Regs", "Ammo"); MacroHandlers.Register(new ActionCallback(MacroHandlers.Attack_OnAction), "Other|Attack", "Last", "Red"); MacroHandlers.Register(new ActionCallback(MacroHandlers.Last_OnAction), "Actions|Last", "Object", "Skill", "Spell"); MacroHandlers.Register(new ActionCallback(MacroHandlers.Disrupt_OnAction), "Actions|Disrupt", ParamNode.Empty); MacroHandlers.Register(new ActionCallback(MacroHandlers.Say_OnAction), "Interface|Say"); MacroHandlers.Register(new ActionCallback(MacroHandlers.RestoreSpeech_OnAction), "Interface|Restore@Restore Speech", ParamNode.Empty); }
public static void Register(ActionCallback callback, string action) { MacroHandlers.Register(callback, action, (ParamNode[])null); }