Alright, I don't feel like editing this thing all over just to make it better for myself so I'm gonna tell you everything you can do to improve this CC
I'm just gonna start going through the code and start writing, so no particular order really.
1. When you call a pet you want to check if it's null, not if it's dead. If the pet is dead you'll still try to call it.
Code:
!Me.GotAlivePet into Me.Pet == null
Also here's my code for calling a pet of your choice
Code:
public bool CallPet ()
{
if (Me.Pet == null)
{
if (MarksmanSettings.Instance.PET == 1 && SpellManager.HasSpell("Call Pet 1"))
CastSpell("Call Pet 1");
StyxWoW.SleepForLagDuration();
if (MarksmanSettings.Instance.PET == 2 && SpellManager.HasSpell("Call Pet 2"))
CastSpell("Call Pet 2");
StyxWoW.SleepForLagDuration();
if (MarksmanSettings.Instance.PET == 3 && SpellManager.HasSpell("Call Pet 3"))
CastSpell("Call Pet 3");
StyxWoW.SleepForLagDuration();
if (MarksmanSettings.Instance.PET == 4 && SpellManager.HasSpell("Call Pet 4"))
CastSpell("Call Pet 4");
StyxWoW.SleepForLagDuration();
if (MarksmanSettings.Instance.PET == 5 && SpellManager.HasSpell("Call Pet 5"))
CastSpell("Call Pet 5");
StyxWoW.SleepForLagDuration();
return true;
}
return false;
}
Code:
{
if (MarksmanSettings.Instance.Revive && Me.Pet == null)
if (CallPet() == true)
Logging.Write(Color.Cyan, ">> Calling Pet " + MarksmanSettings.Instance.PET + " <<");
}
The sleep for lag duration is from your new code and hasn't been tested there but I trust that it works.
2. If you want the bot to stop attacking when you're trying to use the trap launcher or are in feign death, add this:
Code:
!Me.Auras.ContainsKey("Trap Launcher") && !Me.ActiveAuras.ContainsKey("Feign Death")
pretty much everywhere. (Everywhere (including AutoAttack) except for the traplauncher itself)
The !Me.ActiveAuras.ContainsKey("Feign Death") hasn't been tested, since I changed it into that from "PlayerHasBuff" as you removed it.
3. My IsTargetBoss code, with additional IsTargetEasyBoss code, EasyBoss is so it'll use trinkets etc. more often.
Code:
private bool IsTargetBoss()
{
using (new FrameLock())
if (Me.IsInRaid)
{
if (Me.CurrentTarget.CreatureRank == WoWUnitClassificationType.WorldBoss ||
(Me.CurrentTarget.Level >= 87 && Me.CurrentTarget.Elite) ||
(Me.CurrentTarget.Level >= 88))
return true;
else return false;
}
else
{
if (UnitClassification == "worldboss" ||
(Me.CurrentTarget.Level >= 86 && Me.CurrentTarget.Elite) ||
(Me.CurrentTarget.Level >= 87))
return true;
else return false;
}
}
private bool IsTargetEasyBoss()
{
using (new FrameLock())
if (Me.IsInRaid)
{
if (Me.CurrentTarget.CreatureRank == WoWUnitClassificationType.WorldBoss ||
(Me.CurrentTarget.Level >= 86 && Me.CurrentTarget.Elite) ||
(Me.CurrentTarget.Level >= 87))
return true;
else return false;
}
else
{
if (UnitClassification == "worldboss" ||
(Me.CurrentTarget.Level >= 85 && Me.CurrentTarget.Elite) ||
(Me.CurrentTarget.Level >= 86))
return true;
else return false;
}
}
4. I haven't tested this, but I think it might be a good idea for CastSpell condition
Code:
SpellManager.GlobalCooldownLeft.TotalMilliseconds < 150
It could reduce "spam" but still cast the next spell asap.
5. This should fix the mend pet spam:
Code:
!Me.Pet.ActiveAuras.ContainsKey("Mend Pet")
Untested though.
6. Add these conditions to readiness:
Code:
&& ((Me.ActiveAuras.ContainsKey("Rapid Fire") && SpellManager.Spells["Rapid Fire"].CooldownTimeLeft.TotalSeconds > 10) || SpellManager.Spells["Rapid Fire"].CooldownTimeLeft.TotalSeconds > 120)
It'll make sure that readiness it cast even if Rapid Fire has already ended but there's still over 2 minutes left in the cooldown, but also that readiness isn't cast if Rapid Fire is available but still active. (Happens at End Times dungeon, due to the hour glass)
It should work...
7. These conditions will make trinkets, with cooldowns, stop spamming:
Code:
&& StyxWoW.Me.Inventory.Equipped.Trinket1 != null && StyxWoW.Me.Inventory.Equipped.Trinket1.Cooldown <= 0
and Trinket2 for the 2nd trinket obviously

Also I haven't tested this (since I don't have a glove enchant) but you might also have to add
Code:
&& StyxWoW.Me.Inventory.Equipped.Gloves != null && StyxWoW.Me.Inventory.Equipped.Gloves.Cooldown <= 0
Not sure about the gloves though, I'm sure you'll figure it out.
8. If you do:
Code:
addCount() <= MarksmanSettings.Instance.Mobs
addCount() >= MarksmanSettings.Instance.Mobs
It's going to cast both AoE and Single target rotations when the amount of mobs equals to your mobs setting.
So just do
Code:
addCount() < MarksmanSettings.Instance.Mobs
for single target rotation.
9. I noticed you do,
Code:
!MarksmanSettings.Instance.MMSPEC
and
!MarksmanSettings.Instance.MMSPEC
I don't see a reason to use them as "not" conditions, and you don't even need a setting for both. Just use
Code:
MarksmanSettings.Instance.MMSPEC
for marksman stuff and
Code:
!MarksmanSettings.Instance.MMSPEC
for survival stuff.
10. Instead of
Code:
Me.CurrentTarget != null && Me.CurrentTarget.IsAlive == true && Me.Mounted == false
(Which repeats in the CC many times)
I'd rather user
Code:
Me.GotTarget && Me.CurrentTarget.IsAlive && !Me.Mounted
It's shorther, cleaner and should work just as fine.
_____________________________________________________________________________
I'm going to add the CC I edited (based on 3.4 I believe) here for you so you can look through to code and see all the stuff I added, incase you want to implement any of those.
There's a lot of stuff like, Interrupts, Aggro Management and Melee attacks, all with GUI options, as well other GUI options for spells and focus control for spells.
Hopefully you'll find some of it useful and will be able to add some of it to future releases.
This might not have been all I had to say but I can't remember anything else right now
