Jump to content

Des erreurs a l'usage d'anciens profils...


Recommended Posts

Bonjour

 

J'ai essaye de faire tourner les profils prècedent Draenor. Mais j'obtient des erreurs qui n'existaient pas auparavant :

 

 

749372ERRORS2.jpg

Voici le script qui etait utilisé :

using System;
using System.Threading;
using System.Windows.Forms;
using robotManager.Helpful;
using Timer = robotManager.Helpful.Timer;
using wManager.Wow.Class;
using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using Point = System.Drawing.Point;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

public class Main : ICustomClass
{
    public float Range { get { return 40; } }
    internal static float InternalRange = 5.0f;
    private bool _loop;
    public UInt64 lastTarget = 0;//Declaration de loop
    private Timer _Cible = new Timer(0);
    private Timer _Sappe = new Timer(0);

    //Zone Sorts
    #region Spells

    public readonly Spell ArcaneShot = new Spell("Arcane Shot");
    public readonly Spell ArcaneTorrent = new Spell("Arcane Torrent"); 
    public readonly Spell SteadyShot = new Spell("Steady Shot");
    public readonly Spell ConcussiveShot = new Spell("Concussive Shot");
    public readonly Spell SerpentSting = new Spell("Serpent Sting");
    public readonly Spell KillCommand = new Spell("Kill Command");
    public readonly Spell HuntersMark = new Spell("Hunter's Mark");
    public readonly Spell AspectoftheHawk = new Spell("Aspect of the Hawk");
    public readonly Spell CallPet1 = new Spell("Call Pet 1");
    public readonly Spell RevivePet = new Spell("Revive Pet");

    public readonly Spell ScatterShot = new Spell("Scatter Shot");

    #endregion Spells

    public void Initialize()
    {
        Logging.Write("Chargement CHASSEUR MDB PVP");
        Main.InternalRange = 5.0f;
        
        _loop = true;


        while (_loop)
        {
            try
            {
                if (!ObjectManager.Me.IsDead && !Usefuls.IsLoadingOrConnecting && Usefuls.InGame)
                {
                    Defense();
                    if (!ObjectManager.Me.IsMounted)
                    {
                        Permanent();
                        if (ObjectManager.Me.Target > 0 && ObjectManager.Target.Reaction <= Reaction.Neutral && ObjectManager.Target.IsAlive)
                            Engagement();
                    }
                }
            }
            catch (Exception e)
            {
                Logging.WriteError("CustomClass > Initialize(): " + e);
            }
            Thread.Sleep(15);
        }
        _loop = false;
    }

    public void Defense()
    {
        if (ObjectManager.Target.GetDistance < 8 && ObjectManager.Target.IsCast)
            ArcaneTorrent.Launch(false);

        if (ObjectManager.Target.IsCast && ScatterShot.IsDistanceGood && ScatterShot.IsSpellUsable)
        {
            ScatterShot.Launch(false);
            return;
        }
    }

    public void Permanent()
    {
        if (!AspectoftheHawk.HaveBuff)
            AspectoftheHawk.Launch(false);
        if (!ObjectManager.Me.IsCast && (ObjectManager.Pet.Health == 0 || ObjectManager.Pet.Guid == 0)
            && CallPet1.IsSpellUsable && ObjectManager.Me.InCombat)
        {
            CallPet1.Launch();
            Thread.Sleep(1000);
        }
        if (!ObjectManager.Me.IsCast && (!ObjectManager.Pet.IsAlive || ObjectManager.Pet.Guid == 0)
            && RevivePet.KnownSpell && RevivePet.IsSpellUsable && ObjectManager.Target.HealthPercent > 10 && ObjectManager.Me.InCombat)
        {
            RevivePet.Launch();
            Thread.Sleep(1000);
            return;
        }
        if (!ObjectManager.Me.IsCast && !ObjectManager.Pet.IsAlive
           && RevivePet.KnownSpell && RevivePet.IsSpellUsable && !ObjectManager.Me.InCombat)
        {
            RevivePet.Launch();
            Thread.Sleep(1000);
        }
    }

    public void Engagement()
    {
        if (ObjectManager.Me.Target != lastTarget)
        {
            Pull();
        }
        else
        {
            Attaque();
        }
    }

    public void Pull()
    {
        Lua.RunMacroText("/petattack");
        if (ConcussiveShot.IsSpellUsable && !ObjectManager.Target.HaveBuff(5116))
            ConcussiveShot.Launch(false);
        lastTarget = ObjectManager.Me.Target;
    }

    public void Attaque()
    {
        if (ConcussiveShot.IsSpellUsable && !ObjectManager.Target.HaveBuff(5116))
        {
            ConcussiveShot.Launch(false);
            return;
        }

        if (KillCommand.IsSpellUsable)
        {
            KillCommand.Launch(false);
            return;
        }

        if (!ObjectManager.Target.HaveBuff(1978))
            SerpentSting.Launch(false);

        if (SteadyShot.IsSpellUsable && ObjectManager.Me.Focus < 40)
            SteadyShot.Launch(false);
    }

    public void Dispose()
    {
        Logging.Write("Dispose Fight Class Hunter MDB");
        _loop = false;
    }

    public void ShowConfiguration()
    {
        MessageBox.Show("Script pour Hunter MDB : Mauvaise classe");
    }
}

Script pas publié car trop spécialisé a mon perso (Mon style de jeu et le lvl du perso)

 

 

Donc visiblement la notion de MemoryRobot.Int128 est nouvelle (Objet)...

 

Je crois savoir que le contenu des tutos deviens aussi obsolète...

Link to comment
https://wrobot.eu/forums/topic/1810-des-erreurs-a-lusage-danciens-profils/
Share on other sites

Bonjour, oui il y a eu des changement dans le code de Wow sur WoD, ce code devrait fonctionner (si vous utilisez Visual studio pour écrire votre code ajouter la référence "WRobot\Bin\MemoryRobot.dll" en plus).

using System;
using System.Threading;
using System.Windows.Forms;
using MemoryRobot;
using robotManager.Helpful;
using Timer = robotManager.Helpful.Timer;
using wManager.Wow.Class;
using wManager.Wow.Enums;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;

public class Main : ICustomClass
{
    public float Range { get { return 40; } }
    internal static float InternalRange = 5.0f;
    private bool _loop;
    public Int128 lastTarget = Int128.Zero();//Declaration de loop
    private Timer _Cible = new Timer(0);
    private Timer _Sappe = new Timer(0);

    //Zone Sorts
    #region Spells

    public readonly Spell ArcaneShot = new Spell("Arcane Shot");
    public readonly Spell ArcaneTorrent = new Spell("Arcane Torrent");
    public readonly Spell SteadyShot = new Spell("Steady Shot");
    public readonly Spell ConcussiveShot = new Spell("Concussive Shot");
    public readonly Spell SerpentSting = new Spell("Serpent Sting");
    public readonly Spell KillCommand = new Spell("Kill Command");
    public readonly Spell HuntersMark = new Spell("Hunter's Mark");
    public readonly Spell AspectoftheHawk = new Spell("Aspect of the Hawk");
    public readonly Spell CallPet1 = new Spell("Call Pet 1");
    public readonly Spell RevivePet = new Spell("Revive Pet");

    public readonly Spell ScatterShot = new Spell("Scatter Shot");

    #endregion Spells

    public void Initialize()
    {
        Logging.Write("Chargement CHASSEUR MDB PVP");
        InternalRange = 5.0f;

        _loop = true;


        while (_loop)
        {
            try
            {
                if (!ObjectManager.Me.IsDead && !Usefuls.IsLoadingOrConnecting && Usefuls.InGame)
                {
                    Defense();
                    if (!ObjectManager.Me.IsMounted)
                    {
                        Permanent();
                        if (ObjectManager.Me.Target.IsNotZero() && ObjectManager.Target.Reaction <= Reaction.Neutral && ObjectManager.Target.IsAlive)
                            Engagement();
                    }
                }
            }
            catch (Exception e)
            {
                Logging.WriteError("CustomClass > Initialize(): " + e);
            }
            Thread.Sleep(15);
        }
        _loop = false;
    }

    public void Defense()
    {
        if (ObjectManager.Target.GetDistance < 8 && ObjectManager.Target.IsCast)
            ArcaneTorrent.Launch(false);

        if (ObjectManager.Target.IsCast && ScatterShot.IsDistanceGood && ScatterShot.IsSpellUsable)
        {
            ScatterShot.Launch(false);
            return;
        }
    }

    public void Permanent()
    {
        if (!AspectoftheHawk.HaveBuff)
            AspectoftheHawk.Launch(false);
        if (!ObjectManager.Me.IsCast && (ObjectManager.Pet.Health == 0 || ObjectManager.Pet.Guid.IsZero())
            && CallPet1.IsSpellUsable && ObjectManager.Me.InCombat)
        {
            CallPet1.Launch();
            Thread.Sleep(1000);
        }
        if (!ObjectManager.Me.IsCast && (!ObjectManager.Pet.IsAlive || ObjectManager.Pet.Guid.IsZero())
            && RevivePet.KnownSpell && RevivePet.IsSpellUsable && ObjectManager.Target.HealthPercent > 10 && ObjectManager.Me.InCombat)
        {
            RevivePet.Launch();
            Thread.Sleep(1000);
            return;
        }
        if (!ObjectManager.Me.IsCast && !ObjectManager.Pet.IsAlive
           && RevivePet.KnownSpell && RevivePet.IsSpellUsable && !ObjectManager.Me.InCombat)
        {
            RevivePet.Launch();
            Thread.Sleep(1000);
        }
    }

    public void Engagement()
    {
        if (ObjectManager.Me.Target != lastTarget)
        {
            Pull();
        }
        else
        {
            Attaque();
        }
    }

    public void Pull()
    {
        Lua.RunMacroText("/petattack");
        if (ConcussiveShot.IsSpellUsable && !ObjectManager.Target.HaveBuff(5116))
            ConcussiveShot.Launch(false);
        lastTarget = ObjectManager.Me.Target;
    }

    public void Attaque()
    {
        if (ConcussiveShot.IsSpellUsable && !ObjectManager.Target.HaveBuff(5116))
        {
            ConcussiveShot.Launch(false);
            return;
        }

        if (KillCommand.IsSpellUsable)
        {
            KillCommand.Launch(false);
            return;
        }

        if (!ObjectManager.Target.HaveBuff(1978))
            SerpentSting.Launch(false);

        if (SteadyShot.IsSpellUsable && ObjectManager.Me.Focus < 40)
            SteadyShot.Launch(false);
    }

    public void Dispose()
    {
        Logging.Write("Dispose Fight Class Hunter MDB");
        _loop = false;
    }

    public void ShowConfiguration()
    {
        MessageBox.Show("Script pour Hunter MDB : Mauvaise classe");
    }
}

OK. C'est moi :(

 

Je n'avais pas mis les même using que toi. Maintenant ca semble bien rouler. Apres diner je turbine dessus.

 

Merci encore...

 

T'a pas changé :) toujours up pour ce bot. Bravo et chapeau pour tes competences

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...