Jump to content

reapler

Elite user
  • Posts

    288
  • Joined

  • Last visited

Reputation Activity

  1. Like
    reapler got a reaction from eeny in flying gathering tbc mine - mount - mine same mine - mount   
    Hello, i wrote a small plugin to fix it but i can't test it. But i hope it still works for you:
    [Tbc]MiningFix.cs
     
  2. Like
    reapler got a reaction from Matenia in Mouseover ?   
    Hello, it is possible. Here's an c# example:
    if (wManager.Statistics.RunningTimeInSec() < 2) { robotManager.Helpful.Logging.Write("Register OnEventsLuaWithArgs"); wManager.Wow.Helpers.EventsLuaWithArgs.OnEventsLuaWithArgs += delegate (LuaEventsId id, List<string> args) { if (id == LuaEventsId.UPDATE_MOUSEOVER_UNIT) { string name = Lua.LuaDoString("name = UnitName('mouseover')", "name"); int minHealth = 110; //cast heal spells if your mouseover target drops under this value int maxrange = 40; //general range for heal spells WoWUnit unit = wManager.Wow.ObjectManager.ObjectManager.GetObjectWoWPlayer().SingleOrDefault(i => i.Name == name); if (unit != null && unit.IsValid && unit.IsAlive && unit.GetDistance < maxrange && unit.HealthPercent < minHealth && !TraceLine.TraceLineGo(ObjectManager.Me.Position, unit.Position, CGWorldFrameHitFlags.HitTestSpellLoS)) { //here you can add more conditions which spell should be cast robotManager.Helpful.Logging.Write("cast heal on mouseover"); wManager.Wow.Helpers.SpellManager.CastSpellByNameOn("Flash Heal", "mouseover"); //here you can start a thread which checks whether you are still mouse over the unit & cast more heals } } }; System.Threading.Thread.Sleep(2000); }  
    and the example how it can be implemented in fightclass: mouseover heal example.xml
  3. Like
    reapler got a reaction from nxpert in How to find what hostile player is casting   
    Hello, for this behavior you need to subscribe lua events with arguments(wManager.Wow.Helpers.EventsLuaWithArgs.OnEventsLuaWithArgs).
    But i belive the event 'COMBAT_LOG_EVENT_UNFILTERED'  is also not working yet for 2.4.3(https://wrobot.eu/forums/topic/5519-register-combat_log-with-args/).
    If it works you could add a c# code to your fightclass. It could look like this:
    //example private void EventsLuaWithArgsOnOnEventsLuaWithArgs(LuaEventsId id, List<string> args) { if (id == LuaEventsId.COMBAT_LOG_EVENT_UNFILTERED && args[8] == ObjectManager.Me.Name) { if (args[2] == "Polymorph") { Logging.Write("Someone is casting Polymorph on me"); ///... } } }  
    Otherwise you can use 'UNIT_SPELLCAST_SENT' which should work as intend:
    if (wManager.Statistics.RunningTimeInSec() < 2) { robotManager.Helpful.Logging.Write("Register OnEventsLuaWithArgs"); wManager.Wow.Helpers.EventsLuaWithArgs.OnEventsLuaWithArgs += delegate(wManager.Wow.Enums.LuaEventsId id, System.Collections.Generic.List<string> args) { if (id == wManager.Wow.Enums.LuaEventsId.UNIT_SPELLCAST_SENT && args[3] == wManager.Wow.ObjectManager.ObjectManager.Me.Name) { if (args[1] == "Polymorph" || args[1] == "Fear") { robotManager.Helpful.Logging.Write("Someone casts " + args[1] + " on me"); wManager.Wow.Helpers.SpellManager.CastSpellByNameOn("Blessing of Sacrifice", "party1"); //you could add here a task in case if you are on global cooldown to cast it later } } }; System.Threading.Thread.Sleep(2000); }  
     
    and here's an example how you can implement the c# code into your fightclass: BoS example.xml
  4. Like
    reapler got a reaction from dirtyjobs in How to find what hostile player is casting   
    Hello, for this behavior you need to subscribe lua events with arguments(wManager.Wow.Helpers.EventsLuaWithArgs.OnEventsLuaWithArgs).
    But i belive the event 'COMBAT_LOG_EVENT_UNFILTERED'  is also not working yet for 2.4.3(https://wrobot.eu/forums/topic/5519-register-combat_log-with-args/).
    If it works you could add a c# code to your fightclass. It could look like this:
    //example private void EventsLuaWithArgsOnOnEventsLuaWithArgs(LuaEventsId id, List<string> args) { if (id == LuaEventsId.COMBAT_LOG_EVENT_UNFILTERED && args[8] == ObjectManager.Me.Name) { if (args[2] == "Polymorph") { Logging.Write("Someone is casting Polymorph on me"); ///... } } }  
    Otherwise you can use 'UNIT_SPELLCAST_SENT' which should work as intend:
    if (wManager.Statistics.RunningTimeInSec() < 2) { robotManager.Helpful.Logging.Write("Register OnEventsLuaWithArgs"); wManager.Wow.Helpers.EventsLuaWithArgs.OnEventsLuaWithArgs += delegate(wManager.Wow.Enums.LuaEventsId id, System.Collections.Generic.List<string> args) { if (id == wManager.Wow.Enums.LuaEventsId.UNIT_SPELLCAST_SENT && args[3] == wManager.Wow.ObjectManager.ObjectManager.Me.Name) { if (args[1] == "Polymorph" || args[1] == "Fear") { robotManager.Helpful.Logging.Write("Someone casts " + args[1] + " on me"); wManager.Wow.Helpers.SpellManager.CastSpellByNameOn("Blessing of Sacrifice", "party1"); //you could add here a task in case if you are on global cooldown to cast it later } } }; System.Threading.Thread.Sleep(2000); }  
     
    and here's an example how you can implement the c# code into your fightclass: BoS example.xml
  5. Like
    reapler got a reaction from Arcangelo in (BUG) NPC Database   
    hm i think the database is working as intend maybe it's just the product itself with a missing condition.
    For a workaround you could register the movement events and replace the current moveto/onmovement with your desired npc but it's abit too much work.
    I think you can also resolve the problem with a plugin which lookup the npc database & temporary blacklist the npc by its faction on Initialize():
    foreach (var obj in NpcDB.ListNpc) { if ((int) obj.Faction != ObjectManager.Me.Faction && obj.Faction != Npc.FactionType.Neutral) { wManagerSetting.AddBlackListNpcEntry(obj.Entry, true); } }  
  6. Like
    reapler reacted to Droidz in Pathfinder Event => Start, End   
    Hello, you can disable PathFinder here: 
    wManagerSetting.CurrentSetting.UsePathsFinder For the events, wait next update I added:
    wManager.Events.OthersEvents.OnPathFinderFindPath // Vector3 from, Vector3 to, string continentNameMpq, CancelEventArgs cancelable wManager.Events.OthersEvents.OnPathFinderFindPathResult // Vector3 from, Vector3 to, List<Vector3> path, string continentNameMpq, bool resultSuccess  
  7. Like
    reapler got a reaction from Azz in Evade Fix   
    Hello, you can try 
    it can also take a screenshot now
  8. Like
    reapler got a reaction from morris79 in Creating a plugin with debugging?   
    Hello, you can decompile wrobot's library to get the api documentation(MemoryRobot-, robotManager- & wManager in Wrobot\Bin) common decompiler are Jetbrains dotPeek, ILSpy, redgate's .net reflector & Justcompile. I also recommend to add it to reference and good extensions for VS make your life easier: ReSharper or Coderush are good extensions.
    And for testing things i'll prefer to link the build to Wrobots plugins folder so you can just compile and run directly with Wrobot & output the log with "robotManager.Helpful.Logging.Write("text");". 
  9. Like
    reapler got a reaction from Zan in Manual Looting of bodies?   
    This should work in a pulse method:
    WoWLocalPlayer me = ObjectManager.Me; WoWUnit LootableUnit = ObjectManager.GetObjectWoWUnit() .Where(i => i.IsLootable) .OrderBy(i => i.Position.DistanceTo(ObjectManager.Me.Position)) .FirstOrDefault(); if (LootableUnit != null && MovementManager.CurrentPath.LastOrDefault() != LootableUnit.Position && LootableUnit.Position.DistanceTo(me.Position) > 5) { MovementManager.Go(PathFinder.FindPath(LootableUnit.Position)); } else if (LootableUnit.Position.DistanceTo(me.Position) < 5 && !me.IsLooting()) { Interact.InteractGameObject(LootableUnit.GetBaseAddress, true); }  
  10. Like
    reapler got a reaction from iMod in CastSpell improvement   
    I guess that's a brilliant solution to overwrite guid for this purpose :) but it needs the mouseoverguid instead of mouseover for 3.3.5:
    public void CastSpell(string spellName, WoWUnit unit) { uint MouseOverGUID = 0x00BD07A0; wManager.Wow.Memory.WowMemory.Memory.WriteUInt64(MouseOverGUID, unit.Guid); SpellManager.CastSpellByNameOn(spellName, "mouseover"); } and @forerun i belive you need to search it couldn't find the offset myself currently :/
     
  11. Like
    reapler reacted to Droidz in Register Combat_Log with args   
    Hello, I confirm than "COMBAT_LOG_EVENT_UNFILTERED" seem skip in "OnEventsLuaWithArgs ". I'll fix it, I comeback here when is done, to wait you can try to use lua script
  12. Like
    reapler reacted to Droidz in DirectX Draw   
    Hello,
    // remove all landmarks by ID wManager.Wow.Forms.UserControlMiniMap.LandmarksMiniMap.Remove("MyCircleId"); // Add landmarks wManager.Wow.Forms.UserControlMiniMap.LandmarksMiniMap.Add(new MiniMapGenerator.LandmarkMiniMap(new Vector3(1, 2, 3), "MyCircleId", Color.Red)); wManager.Wow.Forms.UserControlMiniMap.LandmarksMiniMap.Add(new MiniMapGenerator.LandmarkMiniMap(new Vector3(1, 2, 3), "MyCircleId", Color.Red)); You don't need to run this code on all frame, by only one time (or when you want to change/add/remove position)
  13. Like
    reapler reacted to Pasterke in A few questions about the CustomClass   
    what are you trying to do ? If your interact returns null, wrobot will crash.
    public WoWPlayer getNearestPlayer
            {
                get
                {
                    var t = ObjectManager.GetObjectWoWPlayer().Where(p => p != null //from here on you can add checks
                        && p.IsAlive 
                        && p.IsHorde //or p.IsAlliance
                        && !TraceLine.TraceLineGo(p.Position) //test if no objects between you and target (target is in line of sight)
                        && p.GetDistance <= 40).OrderBy(p => p.HealthPercent).ThenBy(p => p.GetDistance).ToList(); //1st sort on healtpercent and if you want then by distance
                    if (t.Count() > 0) // check if t > 0, what means he find something you ask
                    {
                        WoWPlayer v = new WoWPlayer(t.FirstOrDefault().GetBaseAddress);
                        return v;
                    }
                    return null; //if t == 0 then return null
                }
            }
    then yo can use getNearestPlayer to do something in your code
    if (getNearestPlayer != null)
    {
          try
        {
             Interact.InteractGameObject(getNearestPlayer.GetBaseAddress);
             spell.Launch();
         }
         catch (Exception e) { Logging.WriteError("ErrorDescription: " + e.ToString()); }
    }
     
  14. Like
    reapler reacted to iMod in [Wotlk][Source] GetSpecialization   
    Since there is no method to get the specialization of the character in wotlk i took another way to find it out.
    It wont be 100% accurate if you use mixed talends but for the most spec's it should work.
    /// <summary> /// Returns the talent tree with the most invested points /// </summary> /// <returns>Returns the tree index</returns> public static int GetSpecialization() { KeyValuePair<int, int> highestPointTree = new KeyValuePair<int, int>(0, 0); // Process talent trees for (int i = 1; i <= 3; i++) { // Get current talent points int treePointValue = Lua.LuaDoString<int>($"local _, _, talentPoints = GetTalentTabInfo({i}); return talentPoints;"); // Bigger than old value? if (treePointValue > highestPointTree.Value) { // Set new value highestPointTree = new KeyValuePair<int, int>(i, treePointValue); } } // Return return highestPointTree.Key; } This will give you the the talent tree with the most invested points.
     
    Now you just need to define each talent tree based on the wow class
    For example DK:
    if(ObjectManager.Me.WowClass != WoWClass.DeathKnight) { throw new NotSupportedException("You need to be a DK to use this rotation."); } // Get the main talent tree int mainTalent = GetSpecialization(); // Choose the right rotation switch (mainTalent) { case 1: { // Set rotation this._rotation = new Blood(); Logging.WriteDebug("Choosing Blood rotation."); break; } case 2: { // Set rotation this._rotation = new Frost(); Logging.WriteDebug("Choosing Frost rotation."); break; } case 3: { // Set rotation this._rotation = new Unholy(); Logging.WriteDebug("Choosing Unholy rotation."); break; } default: { this._rotation = null; throw new NotSupportedException("Your spec is not supported."); } } This is just a small and fast coded example but hope it helps some ppl.
    Greez iMod
  15. Like
    reapler reacted to iMod in [Source] Rotation "Framework"   
    Hello, since i don't have that much time at the moment to play wow i will release my idea of a "All in One" rotation.
    Don't expect too much ;)

    iLoader:
    iRotationCore:
    BossList:
     
    Everything else i hope is selfexplain. It is just an idea and was a side project from me so i hope it is useful for someone.
    Greez iMod
    iRotation.zip
×
×
  • Create New...