Jump to content

Apexx

Elite user
  • Posts

    332
  • Joined

Everything posted by Apexx

  1. I have a spell ability that I need to check for use only if the player is in a group/party. I was in a group, but the group member went offline, and my ability was still being used despite the player actually being online in game. Is there a check for this? Thanks!
  2. Apexx

    GoToClick

    Hey reapler, thanks again for a great plugin. Is there any way to disable click-to-move in the game settings, until the user Ctrl+Clicks the map, then enable it. Then maybe once the player has reached its destination disable click-to-move again?
  3. Timer Declaration public static Timer waitTime = new Timer(); Asynchronous Task UseCombatSpell public static async Task<bool> UseCombatSpell(Spell spell, bool stopMoving, bool faceTarget = false, float rangeCheck = float.MaxValue, int castWait = 0) { // Spell validation if (Methods.IsValid(MyTarget, spell)) { // Launch the spell if (!Me.IsCast && waitTime.IsReady) { // Face the target if (faceTarget) MovementManager.Face(Me.TargetObject); Interact.InteractGameObject(MyTarget.GetBaseAddress, stopMoving); SpellManager.CastSpellByNameLUA(spell.Name); // Wait for cooldown + latency await Task.Delay(SpellManager.GetSpellCooldownTimeLeft(spell.Id) + Usefuls.Latency); // Create a new timer for the desired wait time between casts. waitTime = new Timer(castWait); Methods.LogFight("Wait time = " + waitTime.TimeLeft()); return true; } return false; } return false; } Please note, that I removed the rangeCheck portion of code from the above method. Usage: if (await Abilities.LesserHeal()) return true; // Lesser Heal Methods.IsValid is basically making sure that the player knowns the spell, that the spell is usable and in good distance, that the player is not eating or drinking, or is mounted.. That the target is attackable and alive, in distance, and in line of sight etc.. Abilities.Spellname is from a custom class of loading and declaring the class spells.
  4. Adding a timer to the spell ability is the only way that I have gotten not healing twice in a row to work.
  5. Apexx

    GoToClick

    Hey reapler, I have followed all instructions to install this Plugin, all three files where they should be. I am getting the following error: [E] 10:15:46 - [ClickToGo] Error @Initialize: System.TypeLoadException: Could not load type 'DatabaseManager.WoW.DbWorldMapArea' from assembly 'DatabaseManager, Version=1.0.6438.36262, Culture=neutral, PublicKeyToken=null'. at Main.Transform(WorldMapCoord wowCoords, Single zReference) at Main.Pulse() at Main.Initialize()
  6. Bump!
  7. It sounds like an issue with your fight class.
  8. Nice! Thank you, @reapler. I will give it a try.
  9. Hi, I was curious if there is a way to check if my current target is humanoid and has a weapon? Thanks!
  10. For anyone having issues with using the Wand Shoot ability, here is a snippet for you: // Test if player has a wand in the proper equipment slot | In Combat if (ObjectManager.Me.GetEquipedItemBySlot(wManager.Wow.Enums.InventorySlot.INVSLOT_RANGED) != 0 && ObjectManager.Me.InCombat && !ObjectManager.Me.GetMove) { // Wand Shoot if(Lua.LuaDoString<int>("isAutoRepeat = \"\"; isAutoRepeat = 0; local name = GetSpellInfo(5019); if IsAutoRepeatSpell(name) then isAutoRepeat = 1 end", "isAutoRepeat") == 0) { // Spammable Shoot Macro Lua.RunMacroText("/castsequence !Shoot, !Shoot"); } }
  11. I will. Thank you. It seemed odd though, that it was only happening in Stranglethorn Vale. I had kept the bot closed after it crashed 3-4 times. When I left the area to another zone, I opened it once more and I did not have any issues. Thanks for the reply, @Droidz
  12. Experiencing constant crash from the error above.
  13. It still is casting Lesser Heal twice even though my heath is >= to the determined value set in my settings. It was working fine with my spell Timer before.
  14. Okay that did the trick! Thank you very much! I was wondering one other thing. The main reason that I wanted a slight wait time between certain spells (Spammable spells mainly IE: Priest Smite) is to check the target unit health percentage between casts to determine other abilities based on the target hp % or even the player's hp %. Is it possible to adjust the msDelay value based on the spell method used?
  15. #region Properties public bool GcdActive => DateTime.Now < _unlockTime; #endregion Error 1 ; expected Error 2 Invalid token ';' in class, struct, or interface member declaration Error 3 Syntax error, '>' expected Error 4 'Main._unlockTime' is a 'field' but is used like a 'type' Error 5 'System.DateTime.Now' is a 'property' but is used like a 'type'
  16. That's wild! Thank you for the exuberant example. I will need to look this over a few times to try and wrap my head around it. Why is this sort of thing not already implemented into WRobot? Also, you defined _msDelay. Where does this number come from? Thank you again!
  17. Hey @reapler, How is that you use SPELL_CAST_SUCCESS I would like a more accurate wait time between casts. Thank you!
  18. Will try that out, you come to the rescue again @reapler
  19. I think I may have solved it on my own. It does seem to be working: if (player.GetEquipedItemBySlot(wManager.Wow.Enums.InventorySlot.INVSLOT_RANGED) != 0) { Logging.WriteFight("Using Wand."); Lua.RunMacroText("/cast !Shoot"); }
  20. Hi, I was wondering how one might search the player's equipped items to see if the player has a wand equipped? I have tried playing with: player.GetEquipedItemBySlot(wManager.Wow.Enums.InventorySlot.INVSLOT_RANGED)
×
×
  • Create New...