Jump to content

srazdokunebil

WRobot user
  • Posts

    20
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    srazdokunebil reacted to Seminko in [Solution] How to check for specific buff duration   
    I was trying to figure this out for vanilla to optimize my combat rotation. Finally made it work.
    public decimal BuffTimeLeft() { var SliceAndDiceTimeLeft = Lua.LuaDoString<decimal>("for i=0,31 do\r\n local id,cancel = GetPlayerBuff(i,\"HELPFUL|HARMFUL|PASSIVE\");\r\n if(id > -1) then\r\n local buffTexture = GetPlayerBuffTexture(id);\r\n if(strfind(buffTexture,\"Ability_Rogue_SliceDice\")) then\r\n local timeleft = GetPlayerBuffTimeLeft(id);\r\n return timeleft;\r\n end\r\n end\r\nend"); return SliceAndDiceTimeLeft; } Just change the buff texture from "Ability_Rogue_SliceDice" to the texture name you are checking for.
  2. Thanks
    srazdokunebil got a reaction from 0x22Fenrir in Server Down?   
    Server still down after several reboots.
  3. Like
    srazdokunebil got a reaction from Talamin in Draw Vector3 Path on WRobot map from a plugin   
    I am developing a WRobot plugin that assists in making granular edits to Vector3 paths while in-game.  Right now I can add nodes, delete nodes, reposition existing nodes, and display the complete Vector3 path overlay in the client using Radar3D.DrawLine() and Radar3D.DrawCircle():

     
    I would like to draw my path to the WRobot map the same way that the Gatherer Profile Editor does.

    Is this possible to do from within a plugin?
  4. Like
    srazdokunebil got a reaction from Garub in [Solved] Target Switching using Grinder in Vanilla 1.12.1 5785   
    I have put together a few vanilla fightclasses which are working well with the Party and WRotation addons.  I've stitched them in C# using Matenia's framework and a patchwork of other code gleaned from this site.
    I have a tank class, a healing class and a dps class.  They are configured thusly:
    tank - uses Grinder product to follow a path, pick targets and murder things.
    healer - uses Party product to follow and heal tank
    dps - uses Party product to follow and assist tank
    While using the Grinder product, I need to give the tank the ability to switch from its current target to taunt units that are attacking/targeting partymembers in mid-fight.  Currently the behavior is
    Acquire target Kill target Attack & kill remaining adds Goto 1. When I am manually driving the tank using WRotation, I can manually pick targets at will.  I am able to switch from my current target to another without any constraints.  The healer follows and heals, the dps follows and assists.  The tank even rushes to assist partymembers AFTER the current target dies thanks to the Party product.
    The problem is that when I use the Grinder product, I am unable to get my tank fightclass to switch targets DURING the fight to taunt adds off the others.  I am currently attempting this from the fightclass .DLL.
    I have a series of functions inside the TANK FIGHTCLASS to ascertain if there are targets that need to be taunted off partymembers.
    public static void CMD_Priotarg() { WoWUnit target = GetHighPriorityUnit(25); // Returns GUID of 1st mob within 25 yds that is targeting a partymember if (target != null && target.Guid >= 0UL && target.IsAlive && target.GetDistance <= 25) { LuaPrint(target.Name + " is attacking a partymember. Switching!"); CombatUtil.TargetUnit(target); MovementManager.Face(target); } }    
    If there's a mob that is targeting party members and needs to be taunted off them, GetHighPriorityUnit() spits out the mob's WoWUnit GUID and I use Matenia's CombatUtil.TargetUnit() function to switch to it.  I have the CMD_Priotarg() function bound to a hotkey defined by the fightclass.  It is currently working with WRotation.
    I followed these two threads for guidance.
    https://wrobot.eu/forums/topic/7658-prioritize-low-hp-targets/
    https://wrobot.eu/forums/topic/7681-left-click-unit/
    This does not work if I am using the Grinder product.  The issue is that Grinder owns the targeting.  I've put the function above in a subroutine that ticks alongside the rotation in Matenia's framework.  When it is triggered and GetHighPriorityUnit() returns a valid WoWUnit GUID, the tank will switch targets to that mob's GUID for a second, then immediately snap back to the original target.
    So I found this thread
    "OK, that probably means that I should be doing this via a fightloop event," I thought.
    That thread referenced a few event driven fightloop code examples that are much more elegant than my CMD_Priotarg() example.  But they all yield the same unwanted behavior.  WRobot still acquires the new target and immediately switches back to the original target:
    public void Initialize() { try { ... FightEvents.OnFightLoop += new FightEvents.FightTargetHandler(Methods.FightEvents_OnFightLoop_Taunt); ... } } ... private static void FightEvents_OnFightLoop_Taunt(WoWUnit unit, CancelEventArgs cancelable) { // If running Grinder, Gatherer or Automaton, switch to targets that are targeting partymembers if ((OffensiveWarrior.productCategory == "Grinder" || OffensiveWarrior.productCategory == "Automaton" || OffensiveWarrior.productCategory == "Gatherer") && woWPlayer.IsPartyMember) { unit = Methods.GetHighPriorityUnit(8); // gets all units attacking you // if a mob is attacking a partymember and we haven't switched targets in the last 5sec if (unit != null && unit.Guid > 0UL && Methods.LastTargetSwitch.AddSeconds(5) < DateTime.Now) { Methods.LuaPrint("FightEvents_OnFightLoop: switchTarget"); CombatUtil.TargetUnit(attacker); Methods.LastTargetSwitch = DateTime.Now; } } } This results in the same snap back targeting behavior while running Grinder.  Works fine when using the WRotation product.
    TL;DR:
    I can reliably get a fightclass to switch targets after combat has been initiated when using the WRotation product.  Can the same be done with the Grinder product?  If not, is a workaround possible?
×
×
  • Create New...