public static void Add(DressList list) { m_List.Add(list); HotKey.Add(HKCategory.Dress, HKSubCat.None, String.Format("Dress: {0}", list.Name), new HotKeyCallback(list.Dress)); HotKey.Add(HKCategory.Dress, HKSubCat.None, String.Format("Undress: {0}", list.Name), new HotKeyCallback(list.Undress)); HotKey.Add(HKCategory.Dress, HKSubCat.None, String.Format("Toggle: {0}", list.Name), new HotKeyCallback(list.Toggle)); }
public static void Add(DressList list) { if (Engine.MainWindow == null) { m_List.Add(list); HotKey.Add(HKCategory.Dress, HKSubCat.None, $"Dress: {list.Name}", new HotKeyCallback(list.Dress)); HotKey.Add(HKCategory.Dress, HKSubCat.None, $"Undress: {list.Name}", new HotKeyCallback(list.Undress)); HotKey.Add(HKCategory.Dress, HKSubCat.None, $"Toggle: {list.Name}", new HotKeyCallback(list.Toggle)); } else { Engine.MainWindow.SafeAction(s => { m_List.Add(list); HotKey.Add(HKCategory.Dress, HKSubCat.None, $"Dress: {list.Name}", new HotKeyCallback(list.Dress)); HotKey.Add(HKCategory.Dress, HKSubCat.None, $"Undress: {list.Name}", new HotKeyCallback(list.Undress)); HotKey.Add(HKCategory.Dress, HKSubCat.None, $"Toggle: {list.Name}", new HotKeyCallback(list.Toggle)); }); } }
static Spell() { ArrayList list = new ArrayList(); string filename = Path.Combine(Config.GetInstallDirectory(), "spells.def"); m_SpellsByPower = new Hashtable(64 + 10 + 16); m_SpellsByID = new Hashtable(64 + 10 + 16); if (!File.Exists(filename)) { MessageBox.Show(Engine.ActiveWindow, Language.GetString(LocString.NoSpells), "Spells.def", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } using (StreamReader reader = new StreamReader(filename)) { string line; while ((line = reader.ReadLine()) != null) { line = line.Trim(); if (line.Length <= 0 || line[0] == '#') { continue; } string[] split = line.Split('|'); try { if (split.Length >= 5) { string[] reags = new string[split.Length - 5]; for (int i = 5; i < split.Length; i++) { reags[i - 5] = split[i].ToLower().Trim(); } Spell s = new Spell(split[0].Trim()[0], Convert.ToInt32(split[1].Trim()), Convert.ToInt32(split[2].Trim()), /*split[3].Trim(),*/ split[4].Trim(), reags); m_SpellsByID[s.GetID()] = s; if (s.WordsOfPower != null && s.WordsOfPower.Trim().Length > 0) { m_SpellsByPower[s.WordsOfPower] = s; } } } catch { } } } HotKeyCallback = new HotKeyCallbackState(OnHotKey); foreach (Spell s in m_SpellsByID.Values) { HotKey.Add(HKCategory.Spells, HKSubCat.SpellOffset + s.Circle, s.Name, HotKeyCallback, (ushort)s.GetID()); } HotKey.Add(HKCategory.Spells, LocString.HealOrCureSelf, new HotKeyCallback(HealOrCureSelf)); HotKey.Add(HKCategory.Spells, LocString.MiniHealOrCureSelf, new HotKeyCallback(MiniHealOrCureSelf)); }
public static void Initialize() { HotKey.Add(HKCategory.Misc, HKSubCat.SpecialMoves, LocString.ClearAbility, new HotKeyCallback(ClearAbilities)); HotKey.Add(HKCategory.Misc, HKSubCat.SpecialMoves, LocString.SetPrimAb, new HotKeyCallback(SetPrimaryAbility)); HotKey.Add(HKCategory.Misc, HKSubCat.SpecialMoves, LocString.SetSecAb, new HotKeyCallback(SetSecondaryAbility)); HotKey.Add(HKCategory.Misc, HKSubCat.SpecialMoves, LocString.ToggleStun, new HotKeyCallback(OnStun)); HotKey.Add(HKCategory.Misc, HKSubCat.SpecialMoves, LocString.ToggleDisarm, new HotKeyCallback(OnDisarm)); }
private static void InitClosestTargets() { HotKey.Add(HKCategory.Targets, LocString.TargClosest, TargetClosest); HotKey.Add(HKCategory.Targets, LocString.TargClosestFriend, TargetClosestFriend); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.TargCloseRed, TargetCloseRed); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.TargCloseRedHumanoid, TargetCloseRedHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.TargCloseRedMonster, TargetCloseRedMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.TargCloseNFriend, TargetCloseNonFriendly); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.TargClosestNFriendlyHuman, TargetCloseNonFriendlyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.TargClosestNFriendlyMonster, TargetCloseNonFriendlyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.TargCloseFriend, TargetCloseFriendly); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.TargClosestFriendlyHuman, TargetCloseFriendlyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.TargClosestFriendlyMonster, TargetCloseFriendlyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.TargCloseBlue, TargetCloseInnocent); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.TargCloseInnocentHuman, TargetCloseInnocentHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.TargClosestInnocentMonster, TargetCloseInnocentMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.TargCloseGrey, TargetCloseGrey); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.TargCloseGreyHuman, TargetCloseGreyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.TargCloseGreyMonster, TargetCloseGreyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.TargCloseCriminal, TargetCloseCriminal); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.TargCloseCriminalHuman, TargetCloseCriminalHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.TargClosestCriminalMonster, TargetCloseCriminalMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.TargCloseEnemy, TargetCloseEnemy); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.TargCloseEnemyHuman, TargetCloseEnemyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.TargCloseEnemyMonster, TargetCloseEnemyMonster); }
private static void InitRandomTarget() { HotKey.Add(HKCategory.Targets, LocString.TargetRandom, TargetRandAnyone); HotKey.Add(HKCategory.Targets, LocString.TargRandomFriend, TargetRandFriend); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.TargRandRed, TargetRandRed); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.TargRandomRedHuman, TargetRandRedHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.TargRandomRedMonster, TargetRandRedMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.TargRandNFriend, TargetRandNonFriendly); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.TargRandomNFriendlyHuman, TargetRandNonFriendlyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.TargRandomNFriendlyMonster, TargetRandNonFriendlyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.TargRandFriend, TargetRandFriendly); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.TargRandomFriendlyHuman, TargetRandFriendlyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.TargRandomFriendlyMonster, TargetRandFriendlyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.TargRandBlue, TargetRandInnocent); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.TargRandInnocentHuman, TargetRandInnocentHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.TargRandomInnocentMonster, TargetRandInnocentMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.TargRandGrey, TargetRandGrey); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.TargRandGreyHuman, TargetRandGreyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.TargRandGreyMonster, TargetRandGreyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.TargRandEnemy, TargetRandEnemy); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.TargRandEnemyHuman, TargetRandEnemyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.TargRandEnemyMonster, TargetRandEnemyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.TargRandCriminal, TargetRandCriminal); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.TargRandCriminalHuman, TargetRandCriminalHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.TargRandomCriminalMonster, TargetRandCriminalMonster); }
public static void Initialize() { try { File.Delete("DragDrop.log"); } catch { } HotKey.Add(HKCategory.Misc, LocString.DropCur, new HotKeyCallback(DropCurrent)); }
public static void Initialize() { PacketHandler.RegisterClientToServerViewer(0x6C, new PacketViewerCallback(TargetResponse)); PacketHandler.RegisterServerToClientViewer(0x6C, new PacketViewerCallback(NewTarget)); PacketHandler.RegisterServerToClientViewer(0xAA, new PacketViewerCallback(CombatantChange)); HotKey.Add(HKCategory.Targets, LocString.LastTarget, new HotKeyCallback(LastTarget)); HotKey.Add(HKCategory.Targets, LocString.TargetSelf, new HotKeyCallback(TargetSelf)); HotKey.Add(HKCategory.Targets, LocString.ClearTargQueue, new HotKeyCallback(OnClearQueue)); HotKey.Add(HKCategory.Targets, LocString.SetLT, new HotKeyCallback(TargetSetLastTarget)); HotKey.Add(HKCategory.Targets, LocString.TargRandRed, new HotKeyCallback(TargetRandRed)); HotKey.Add(HKCategory.Targets, LocString.TargRandNFriend, new HotKeyCallback(TargetRandNonFriendly)); HotKey.Add(HKCategory.Targets, LocString.TargRandFriend, new HotKeyCallback(TargetRandFriendly)); HotKey.Add(HKCategory.Targets, LocString.TargRandBlue, new HotKeyCallback(TargetRandInnocent)); HotKey.Add(HKCategory.Targets, LocString.TargRandGrey, new HotKeyCallback(TargetRandGrey)); HotKey.Add(HKCategory.Targets, LocString.TargRandEnemy, new HotKeyCallback(TargetRandEnemy)); HotKey.Add(HKCategory.Targets, LocString.TargRandCriminal, new HotKeyCallback(TargetRandCriminal)); HotKey.Add(HKCategory.Targets, LocString.TargRandEnemyHuman, new HotKeyCallback(TargetRandEnemyHumanoid)); HotKey.Add(HKCategory.Targets, LocString.TargRandGreyHuman, new HotKeyCallback(TargetRandGreyHumanoid)); HotKey.Add(HKCategory.Targets, LocString.TargRandInnocentHuman, new HotKeyCallback(TargetRandInnocentHumanoid)); HotKey.Add(HKCategory.Targets, LocString.TargRandCriminalHuman, new HotKeyCallback(TargetRandCriminalHumanoid)); HotKey.Add(HKCategory.Targets, LocString.AttackLastComb, new HotKeyCallback(AttackLastComb)); HotKey.Add(HKCategory.Targets, LocString.AttackLastTarg, new HotKeyCallback(AttackLastTarg)); HotKey.Add(HKCategory.Targets, LocString.CancelTarget, new HotKeyCallback(CancelTarget)); HotKey.Add(HKCategory.Targets, LocString.NextTarget, new HotKeyCallback(NextTarget)); HotKey.Add(HKCategory.Targets, LocString.NextTargetHumanoid, new HotKeyCallback(NextTargetHumanoid)); HotKey.Add(HKCategory.Targets, LocString.TargCloseRed, new HotKeyCallback(TargetCloseRed)); HotKey.Add(HKCategory.Targets, LocString.TargCloseNFriend, new HotKeyCallback(TargetCloseNonFriendly)); HotKey.Add(HKCategory.Targets, LocString.TargCloseFriend, new HotKeyCallback(TargetCloseFriendly)); HotKey.Add(HKCategory.Targets, LocString.TargCloseBlue, new HotKeyCallback(TargetCloseInnocent)); HotKey.Add(HKCategory.Targets, LocString.TargCloseGrey, new HotKeyCallback(TargetCloseGrey)); HotKey.Add(HKCategory.Targets, LocString.TargCloseEnemy, new HotKeyCallback(TargetCloseEnemy)); HotKey.Add(HKCategory.Targets, LocString.TargCloseCriminal, new HotKeyCallback(TargetCloseCriminal)); HotKey.Add(HKCategory.Targets, LocString.TargCloseEnemyHuman, new HotKeyCallback(TargetCloseEnemyHumanoid)); HotKey.Add(HKCategory.Targets, LocString.TargCloseGreyHuman, new HotKeyCallback(TargetCloseGreyHumanoid)); HotKey.Add(HKCategory.Targets, LocString.TargCloseInnocentHuman, new HotKeyCallback(TargetCloseInnocentHumanoid)); HotKey.Add(HKCategory.Targets, LocString.TargCloseCriminalHuman, new HotKeyCallback(TargetCloseCriminalHumanoid)); }
public static void Initialize() { PacketHandler.RegisterClientToServerViewer(0x6C, TargetResponse); PacketHandler.RegisterServerToClientViewer(0x6C, NewTarget); PacketHandler.RegisterServerToClientViewer(0xAA, CombatantChange); HotKey.Add(HKCategory.Targets, LocString.LastTarget, LastTarget); HotKey.Add(HKCategory.Targets, LocString.TargetSelf, TargetSelf); HotKey.Add(HKCategory.Targets, LocString.ClearTargQueue, OnClearQueue); HotKey.Add(HKCategory.Targets, LocString.SetLT, TargetSetLastTarget); HotKey.Add(HKCategory.Targets, LocString.SetLastBeneficial, SetLastTargetBeneficial); HotKey.Add(HKCategory.Targets, LocString.SetLastHarmful, SetLastTargetHarmful); HotKey.Add(HKCategory.Targets, LocString.AttackLastComb, AttackLastComb); HotKey.Add(HKCategory.Targets, LocString.AttackLastTarg, AttackLastTarg); HotKey.Add(HKCategory.Targets, LocString.CancelTarget, CancelTarget); InitRandomTarget(); InitNextPrevTargets(); InitClosestTargets(); }
private static void InitNextPrevTargets() { //Next targets HotKey.Add(HKCategory.Targets, LocString.NextTarget, NextTarget); HotKey.Add(HKCategory.Targets, LocString.NextTargetFriend, NextTargetFriend); HotKey.Add(HKCategory.Targets, LocString.NextTargetNonFriendly, NextTargetNonFriend); // Next humanoids HotKey.Add(HKCategory.Targets, LocString.NextTargetHumanoid, NextTargetHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.NextTargetEnemyHumanoid, NextTargetEnemyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.NextTargetCriminalHumanoid, NextTargetCriminalHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.NextTargetMurdererHumanoid, NextTargetMurdererHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.NextTargetInnocentHumanoid, NextTargetInnocentHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.NextTargetFriendlyHumanoid, NextTargetFriendlyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.NextTargetGreyHumanoid, NextTargetGreyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.NextTargetNonFriendlyHumanoid, NextTargetNonFriendlyHumanoid); // Next monsters HotKey.Add(HKCategory.Targets, LocString.NextTargetMonster, NextTargetMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.NextTargetEnemyMonster, NextTargetEnemyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.NextTargetCriminalMonster, NextTargetCriminalMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.NextTargetMurdererMonster, NextTargetMurdererMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.NextTargetInnocentMonster, NextTargetInnocentMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.NextTargetFriendlyMonster, NextTargetFriendlyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.NextTargetGreyMonster, NextTargetGreyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.NextTargetNonFriendlyMonster, NextTargetNonFriendlyMonster); //Previous targets HotKey.Add(HKCategory.Targets, LocString.PrevTarget, PrevTarget); HotKey.Add(HKCategory.Targets, LocString.PrevTargetNonFriendly, PrevTargetNonFriend); HotKey.Add(HKCategory.Targets, LocString.PrevTargetHumanoid, PrevTargetHumanoid); HotKey.Add(HKCategory.Targets, LocString.PrevTargetMonster, PrevTargetMonster); HotKey.Add(HKCategory.Targets, LocString.PrevTargetFriend, PrevTargetFriend); // Previous humanoids HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.PrevTargetEnemyHumanoid, PrevTargetEnemyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.PrevTargetFriendlyHumanoid, PrevTargetFriendlyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.PrevTargetGreyHumanoid, PrevTargetGreyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.PrevTargetNonFriendlyHumanoid, PrevTargetNonFriendlyHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.PrevTargetCriminalHumanoid, PrevTargetCriminalHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.PrevTargetMurdererHumanoid, PrevTargetMurdererHumanoid); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.PrevTargetInnocentHumanoid, PrevTargetInnocentHumanoid); // Previous monsters HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetEnemy, LocString.PrevTargetEnemyMonster, PrevTargetEnemyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetFriendly, LocString.PrevTargetFriendlyMonster, PrevTargetFriendlyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetGrey, LocString.PrevTargetGreyMonster, PrevTargetGreyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetNonFriendly, LocString.PrevTargetNonFriendlyMonster, PrevTargetNonFriendlyMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetCriminal, LocString.PrevTargetCriminalMonster, PrevTargetCriminalMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetMurderer, LocString.PrevTargetMurdererMonster, PrevTargetMurdererMonster); HotKey.Add(HKCategory.Targets, HKSubCat.SubTargetInnocent, LocString.PrevTargetInnocentMonster, PrevTargetInnocentMonster); }
public static void Initialize() { HotKey.Add(HKCategory.Misc, LocString.TakeSS, new HotKeyCallback(CaptureNow)); }