Jump to content

fps drop when bot switches target.


Recommended Posts

Hi!

I've tried to do a healing FC for my character or ascension private server.

Everything works great except for when my FC targets someone to heal them I go from around 144 fps down to almost freeze for a second..
This happens everytime my FC tries to target another player.

when it casts heals on myself it's flawless.

what can be the cause of this issue?

healing test forum.xml

Link to comment
Share on other sites

13 minutes ago, The Smokie. said:

I’ll have a look at it once I finish what I’m doing.

cheers man, I am pretty sure that it's not my computer since my other profile on my main (dps) is working just fine without Fps drop...

Link to comment
Share on other sites

if i was you, id learn C# from @Marsbar Video and make you're fightclass using C# Here some code from @Droidz

using System;
using System.Threading;
using System.Windows.Forms;
using robotManager.Helpful;
using robotManager.Products;
using wManager.Wow.Class;
using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using Timer = robotManager.Helpful.Timer;
 
public class Main : ICustomClass
{
    public float Range { get { return 4.5f; } }
 
    private bool _isLaunched;
    private ulong _lastTarget;
 
    public void Initialize() // When product started, initialize and launch Fightclass
    {
        _isLaunched = true;
        Logging.Write("[My fightclass] Is initialized.");
        Rotation();
    }
 
    public void Dispose() // When product stopped
    {
        _isLaunched = false;
        Logging.Write("[My fightclass] Stop in progress.");
    }
 
    public void ShowConfiguration() // When use click on Fight class settings
    {
        MessageBox.Show("[My fightclass] No setting for this Fight Class.");
    }
 
 
    // SPELLS:
    // Buff:
    public Spell DeadlyPoison = new Spell("Deadly Poison");
    public Spell Sprint = new Spell("Sprint");
    // Pull:
    public Spell Stealth = new Spell("Stealth");
    // Combat:
    public Spell Garrote = new Spell("Garrote");
    public Spell SliceandDice = new Spell("Slice and Dice");
    public Spell Eviscerate = new Spell("Eviscerate");
    public Timer SliceandDiceTimer = new Timer(); // Timer
 
    internal void Rotation()
    {
        Logging.Write("[My fightclass] Is started.");
        while (_isLaunched)
        {
            try
            {
                if (!Products.InPause)
                {
                    if (!ObjectManager.Me.IsDeadMe)
                    {
                        BuffRotation();
 
                        if (Fight.InFight && ObjectManager.Me.Target > 0)
                        {
                            Pull();
                            CombatRotation();
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Logging.WriteError("[My fightclass] ERROR: " + e);
            }
 
            Thread.Sleep(10); // Pause 10 ms to reduce the CPU usage.
        }
        Logging.Write("[My fightclass] Is now stopped.");
    }
 
    internal void BuffRotation()
    {
        if (ObjectManager.Me.IsMounted)
            return;
 
        // Deadly Poison:
        if (DeadlyPoison.KnownSpell && !DeadlyPoison.HaveBuff && DeadlyPoison.IsSpellUsable && !ObjectManager.Me.GetMove)
        {
            DeadlyPoison.Launch();
            return;
        }
        // Sprint
        if (Sprint.KnownSpell && !ObjectManager.Me.InCombat && ObjectManager.Me.GetMove && Sprint.IsSpellUsable)
        {
            Sprint.Launch();
            return;
        }
    }
    internal void Pull()
    {
        if (ObjectManager.Me.Target == _lastTarget)
            return;
 
        // Stealth:
        if (Stealth.KnownSpell && Stealth.IsSpellUsable && !Stealth.HaveBuff && ObjectManager.Target.Target != ObjectManager.Me.Guid)
        {
            Stealth.Launch();
            _lastTarget = ObjectManager.Me.Target;
        }
    }
 
    internal void CombatRotation()
    {
        // Garrote:
        if (Garrote.IsSpellUsable && Garrote.IsDistanceGood && Garrote.KnownSpell && ObjectManager.Me.HaveBuff(115192))
        {
            Garrote.Launch();
            return;
        }
        // Eviscerate:
        if (Eviscerate.KnownSpell && Eviscerate.IsSpellUsable && Eviscerate.IsDistanceGood && (ObjectManager.Me.ComboPoint > 4 || (SliceandDice.HaveBuff && SliceandDiceTimer.IsReady)))
        {
            Eviscerate.Launch();
            if (SliceandDice.HaveBuff)
                SliceandDiceTimer = new Timer(1000 * 36);
            return;
        }
    }
}

 

Link to comment
Share on other sites

6 hours ago, The Smokie. said:

You're code has buffs and spells from different classes / races. i would do one fightclass with spells from 1 spec/ race at a time.

yeah I know that's what The Ascension private server are all about, it's classless high risk servers ?
 

6 hours ago, The Smokie. said:

if i was you, id learn C# from @Marsbar Video and make you're fightclass using C# Here some code from @Droidz

using System;
using System.Threading;
using System.Windows.Forms;
using robotManager.Helpful;
using robotManager.Products;
using wManager.Wow.Class;
using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using Timer = robotManager.Helpful.Timer;
 
public class Main : ICustomClass
{
    public float Range { get { return 4.5f; } }
 
    private bool _isLaunched;
    private ulong _lastTarget;
 
    public void Initialize() // When product started, initialize and launch Fightclass
    {
        _isLaunched = true;
        Logging.Write("[My fightclass] Is initialized.");
        Rotation();
    }
 
    public void Dispose() // When product stopped
    {
        _isLaunched = false;
        Logging.Write("[My fightclass] Stop in progress.");
    }
 
    public void ShowConfiguration() // When use click on Fight class settings
    {
        MessageBox.Show("[My fightclass] No setting for this Fight Class.");
    }
 
 
    // SPELLS:
    // Buff:
    public Spell DeadlyPoison = new Spell("Deadly Poison");
    public Spell Sprint = new Spell("Sprint");
    // Pull:
    public Spell Stealth = new Spell("Stealth");
    // Combat:
    public Spell Garrote = new Spell("Garrote");
    public Spell SliceandDice = new Spell("Slice and Dice");
    public Spell Eviscerate = new Spell("Eviscerate");
    public Timer SliceandDiceTimer = new Timer(); // Timer
 
    internal void Rotation()
    {
        Logging.Write("[My fightclass] Is started.");
        while (_isLaunched)
        {
            try
            {
                if (!Products.InPause)
                {
                    if (!ObjectManager.Me.IsDeadMe)
                    {
                        BuffRotation();
 
                        if (Fight.InFight && ObjectManager.Me.Target > 0)
                        {
                            Pull();
                            CombatRotation();
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Logging.WriteError("[My fightclass] ERROR: " + e);
            }
 
            Thread.Sleep(10); // Pause 10 ms to reduce the CPU usage.
        }
        Logging.Write("[My fightclass] Is now stopped.");
    }
 
    internal void BuffRotation()
    {
        if (ObjectManager.Me.IsMounted)
            return;
 
        // Deadly Poison:
        if (DeadlyPoison.KnownSpell && !DeadlyPoison.HaveBuff && DeadlyPoison.IsSpellUsable && !ObjectManager.Me.GetMove)
        {
            DeadlyPoison.Launch();
            return;
        }
        // Sprint
        if (Sprint.KnownSpell && !ObjectManager.Me.InCombat && ObjectManager.Me.GetMove && Sprint.IsSpellUsable)
        {
            Sprint.Launch();
            return;
        }
    }
    internal void Pull()
    {
        if (ObjectManager.Me.Target == _lastTarget)
            return;
 
        // Stealth:
        if (Stealth.KnownSpell && Stealth.IsSpellUsable && !Stealth.HaveBuff && ObjectManager.Target.Target != ObjectManager.Me.Guid)
        {
            Stealth.Launch();
            _lastTarget = ObjectManager.Me.Target;
        }
    }
 
    internal void CombatRotation()
    {
        // Garrote:
        if (Garrote.IsSpellUsable && Garrote.IsDistanceGood && Garrote.KnownSpell && ObjectManager.Me.HaveBuff(115192))
        {
            Garrote.Launch();
            return;
        }
        // Eviscerate:
        if (Eviscerate.KnownSpell && Eviscerate.IsSpellUsable && Eviscerate.IsDistanceGood && (ObjectManager.Me.ComboPoint > 4 || (SliceandDice.HaveBuff && SliceandDiceTimer.IsReady)))
        {
            Eviscerate.Launch();
            if (SliceandDice.HaveBuff)
                SliceandDiceTimer = new Timer(1000 * 36);
            return;
        }
    }
}

 

I will check this out!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...