-
Posts
332 -
Joined
Content Type
Forums
Articles
Bug Tracker
Downloads
Store
Posts posted by Apexx
-
-
Unit Attack Player Near
Number: 3
Radius: Melee range might be 5 yards
Type: BiggerOrEqual -
I believe the option you are looking for is: Hostile Unit Near
Let's say you want to pull at least 3 mobs.Number: 3
Radius: Search range [Groups of mobs might be in closer proximity. 10 yards or so]
Type: BiggerOrEqual -
Thank you so much!
-
Thanks @Matenia for the assist with the count issue! I am going to try it out now.
Error:
'System.Collections.Generic.List<wManager.Wow.ObjectManager.WoWUnit>' does not contain a definition for 'Where' and no extension method 'Where' accepting a first argument of type 'System.Collections.Generic.List<wManager.Wow.ObjectManager.WoWUnit>' could be found (are you missing a using directive or an assembly reference?)
-
Wow, I feel so dumb right now.. I should have known that. Thank you, @Droidz
-
Excellent response! Thanks so much, @reapler! I will try this out soon.
-
Hey, in c#, how can I test the time that has passed from combat start? Thanks!
-
It's funny, I was just trying to do something similar in C# wanting to use an ability if certain amount of hostiles was within my range, and I am getting the same error with .Count:
QuoteNon-invocable member 'System.Collections.Generic.List<wManager.Wow.ObjectManager.WoWUnit>.Count' cannot be used like a method.
-
I am still learning how properly setup fight classes in c#. I would prefer to do it that way, but for now I will keep trying with the standard xml editor. Thanks for the input.
-
If someone were to buff it in party, and I immediately remove it, wouldn't that look suspicious?
-
Hey, so I was running around in Orgrimmar when a Paladin I had passed by blessed me with Blessing of Might.
I left Org to continue questing when I noticed my fight class kept trying to apply Battle Shout.In my Spell Conditions I have the following:
Buff -> Battle Shout | Need = False
Cooldown Time Left: Buff name: Battle Shout | Number: 10 | Type: SmallerOrEqual
I was wondering what condition I could add to check that i don't have a buff like Blessing of Might?
I was thinking something like:
If (wManager.Wow.ObjectManager.ObjectManager.Me.HaveBuff(19835)) { // Not sure what to add here }
*Edit* It may also be affected by Horn of Winter. Would need a check for multiple buffs.
-
Oh okay. I had a ton of profiles on their forum that I sold.
-
Yeah, it was Rebot. I didn't want to mention another bot on the forum in case.
-
Alright, I will research and try it out. Thanks for the tips iMod!
-
I followed the forum here:
I managed to get the same Pinvoke error as described, and disabled the PInvokeStackImbalance error check to get Wrobot to load from Debug. I guess my question is, what's next?
Let's say I want to write a starter Protection warrior fight class... -
I consider myself an intermediate programmer, but I haven't even been able to tie Wrobot into Visual Studio.
I read the forums and followed the instructions, but still have had no luck.
I would like to share a piece of code from a rotation I wrote using another bot that no longer exists. The API was beautiful!
Hooking into Visual Studio was easier than ever as well. I am new here, and I am sure after some more time playing around,
I will be able to figure it out eventually. Have a look at this neat fight class approach:using System.Linq; using Newtonsoft.Json; using Botname.API; namespace Botname { [Rotation("Apexx - PvP Beast Mastery [WiP]", "Apexx", WoWClass.Hunter, Specialization.HunterBeastMastery, 40)] public class HunterPvPBeastMastery : CombatRotation { [JsonProperty("UsePet")] public bool UsePet = true; public HunterPvPBeastMastery() { PullSpells = new string[] { "Concussive Shot", "Steady Shot" }; } private void DebugWrite(string text) { API.Print(text); } // Store Player Focus public int myFocus { get { return Me.GetPower(WoWPowerType.Focus); } } // DPS Priority (From Noxxic.com) // ############################################################ // Kill Command [on cooldown] private bool KillCommand() { string spellname = "Kill Command"; if (SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast(spellname, () => Target.HpGreaterThanOrElite(0.4) && (!Target.HasAura("Hunter's Mark") || myFocus >= 60)); DebugWrite(spellname); return true; } // Kill Shot [when target below 20% Health] private bool KillShot() { string spellname = "Kill Shot"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast(spellname, () => Me.Target.HealthFraction < 0.2); DebugWrite(spellname); return true; } // Focus Fire [with 5 Frenzy stacks] private bool FocusFire() { string spellname = "Focus Fire"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; if(CastSelf(spellname, () => HasAura("Frenzy") && !HasAura("Focus Fire"))) { DebugWrite(spellname); return false; } return false; } // Arcane Shot [to dump excess Focus (> 60 Focus)] private bool ArcaneShot() { string spellname = "Arcane Shot"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast(spellname, () => myFocus >= 60); DebugWrite(spellname); //DebugWrite("My Focus: " + myFocus.ToString()); return true; } // Steady Shot [to build Focus (< 60 Focus)] private bool SteadyShot() { string spellname = "Steady Shot"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; if(Cast(spellname, () => myFocus < 60)) { DebugWrite(spellname); return true; } return false; } // Cobra Shot [to build Focus (< 60 Focus)] private bool CobraShot() { string spellname = "Cobra Shot"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast(spellname, () => myFocus < 60); DebugWrite(spellname); return true; } // AoE Abilities // ########################################################### // Multi-Shot [for Improved Beast Cleave] // Will perform Adds.Count check in combat (2+ enemy units) private bool MultiShot() { string spellname = "Multi-Shot"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast(spellname, () => myFocus >= 40); DebugWrite(spellname); return true; } // Explosive Trap [on cooldown] // Will perform Adds.Count check in combat (2+ enemy units) private bool ExplosiveTrap() { string spellname = "Explosive Trap"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; CastOnTerrain(spellname, Me.Target.Position); DebugWrite(spellname); return true; } // Ice Trap [for evasive maneuvering] private bool IceTrap() { string spellname = "Ice Trap"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; CastOnTerrain(spellname, Me.Target.Position); DebugWrite(spellname); return true; } // Miscellaneous // ########################################################### // Dire Beast [should be used as frequently as possible] private bool DireBeast() { string spellname = "Dire Beast"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast(spellname); DebugWrite(spellname); return true; } // Bestial Wrath [Use on cooldown. Let your pet keep Frenzy.] private bool BestialWrath() { string spellname = "Bestial Wrath"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast(spellname); DebugWrite(spellname); return true; } // A Murder of Crows [when target HP < 20% and Focus >= 30] private bool MurderofCrows() { string spellname = "A Murder of Crows"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast("A Murder of Crows", () => Target.HealthFraction < 0.2 && myFocus >= 30); DebugWrite(spellname); return true; } // Concussive Shot [when target does not have debuff] private bool ConcussiveShot() { string spellname = "Concussive Shot"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; if(Cast(spellname, () => (!Target.HasAura(spellname)))) { DebugWrite(spellname); return true; } return false; } // Last Stand private bool LastStand() { string spellname = "Last Stand"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; CastSelf(spellname, () => Me.HasAlivePet && Me.Pet.HealthFraction <= 0.5 && Me.Pet.HasAura("Mend Pet")); DebugWrite(spellname); return true; } // Disengage [Evasive maneuver used when target(s) are close!] private bool Disengage() { string spellname = "Disengage"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; if(CastSelfPreventDouble(spellname, () => (Target.DistanceSquared <= 5 * 5))) { DebugWrite(spellname); return true; } return false; } // Tranquilizing Shot [If target has magic aura] private bool TranquilizingShot() { string spellname = "Tranquilizing Shot"; if(SpellCooldown(spellname) > 0) return false; if(!HasSpell(spellname)) return false; Cast(spellname, () => Target.Auras.Any(x => !x.IsDebuff && x.DebuffType == "Magic")); DebugWrite(spellname); return true; } // OUT OF COMBAT // ############################################################################### public override bool OutOfCombat() { if (UsePet) { if (!Me.HasAlivePet) { if (CastSelfPreventDouble("Call Pet 1", null, 2000)) return true; if (CastSelfPreventDouble("Revive Pet", null, 2000)) return true; return true; } } else if (Me.HasAlivePet) { Me.PetDismiss(); } // Check Pet health here if(CastSelfPreventDouble("Mend Pet", () => Me.HasAlivePet && Me.Pet.HealthFraction <= 0.8, 9000)) return true; if (CastSelf("Trap Launcher", () => !HasAura("Trap Launcher"))) return true; return false; } // IN COMBAT // ############################################################################### public override void Combat() { if (Me.HasAlivePet) { UnitObject add = Adds.FirstOrDefault(x => x.Target == Me); if (add != null) Me.PetAttack(add); } else if (!Me.HasAlivePet) { if (CastSelf("Heart of the Phoenix")) return; if (CastSelfPreventDouble("Revive Pet", null, 10000)) return; } int addsWithinMultiRange = 0; if(Adds.Count > 0) { foreach(var aggro in Adds.Where(x => x.DistanceSquared < SpellMaxRangeSq("Arcane Shot"))) { UnitObject add = aggro; if(Cast("Serpent Sting", () => !add.HasAura("Serpent Sting", true), add)) { DebugWrite("Serpent Sting"); return; } } // Add.Count +1 to offset 0 addsWithinMultiRange = 1 + Adds.Count(x => x.DistanceSquaredTo(Target) < 40 * 40); //DebugWrite("Adds in range: " + addsWithinMultiRange); // Check Pet health here if(CastSelfPreventDouble("Mend Pet", () => Me.HasAlivePet && Me.Pet.HealthFraction <= 0.8, 9000)) return; // AoE if more than one enemy unit if(addsWithinMultiRange >= 2) { if(ExplosiveTrap()) return; //if(IceTrap()) return; //if(MultiShot()) return; } } // Begin Rotation if(Target.HealthFraction < 0.2) { API.ExecuteMacro("/stopcasting"); if(KillShot()) return; } //if(DireBeast()) return; //if(BestialWrath()) return; if(ConcussiveShot()) return; if(FocusFire()) return; if(ArcaneShot()) return; if(SteadyShot()) return; if(CobraShot()) return; if(LastStand()) return; if(MurderofCrows()) return; if(KillCommand()) return; if(Target.HealthFraction < 0.2) { API.ExecuteMacro("/stopcasting"); if(KillShot()) return; } if(Target.IsCastingAndInterruptible() && SpellCooldown("Counter Shot") <= 0) { API.ExecuteMacro("/stopcasting"); Cast("Counter Shot"); DebugWrite("Counter Shot"); } if(Disengage()) return; if(TranquilizingShot()) return; if(Cast("Barrage")) return; if(Cast("Glaive Toss")) return; // Check Player health here // Feign Dealth when HP at 20% if(CastSelfPreventDouble("Feign Death", () => Me.HealthFraction <= 0.2)) return; if (CastSelfPreventDouble("Feign Death", () => Me.HasAlivePet && Target.Target == Me.Pet && Adds.Any(x => x.Target == Me))) return; } } }
I will keep searching the forums to better educate myself here. I like writing fight classes and grinder/questing profiles.
-
-
Compilator Error:
QuoteCS0234: The type or namespace name 'Target' does not exist in the namespace 'wManager.Wow.ObjectManager' (are you missing an assembly reference?)
-
I will test this out. Thank you Zan.
-
I have an idea using Lua Script, but not sure exactly what return value research and return value var are, and how to appropriately use them.
Script:
myTarget = UnitCreatureType("target") If myTarget == "Humanoid" return true else return false end
-
Hi, I didn't see anything in the Creator Spell Conditions if there is a way to check if my target is humanoid? I would like to be able to cast Hamstring if so.
Alot of questions about FightClass and API
in WRobot for Wow Vanilla - Help and support
Posted
I am using Visual Studio 2013 with .Net Framework 4.5
Before you guys supplied me with the Namespace System.Linq reference, I managed to get my rotation working using