Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A few questions about the CustomClass

Featured Replies

        // Get player around us
        List<WoWPlayer> randomPlayer = new List<WoWPlayer>();

        // Get specified player
        ObjectManager.GetNearestWoWPlayer(randomPlayer);

this code returns randomPlayer.Count == 0 even if there are player around me

 

Interact.InteractGameObject(ObjectManager.ObjectList.Single(o => o.Name == "CharName" && o.Type == WoWObjectType.Player).GetBaseAddress, false);

this code should target the player with the name "CharName" but in my test it doesnt target anything.

 

It seems that i'm doing something generally wrong. Hopefully someone can give me a hint.

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()); }

}

 

Hello,

8 hours ago, iMod said:

        // Get player around us
        List<WoWPlayer> randomPlayer = new List<WoWPlayer>();

        // Get specified player
        ObjectManager.GetNearestWoWPlayer(randomPlayer);

this code returns randomPlayer.Count == 0 even if there are player around me

Use this code for it:

WoWPlayer randomPlayer = ObjectManager.GetNearestWoWPlayer(ObjectManager.GetObjectWoWPlayer());

 

8 hours ago, iMod said:

 


Interact.InteractGameObject(ObjectManager.ObjectList.Single(o => o.Name == "CharName" && o.Type == WoWObjectType.Player).GetBaseAddress, false);

this code should target the player with the name "CharName" but in my test it doesnt target anything.

 

It seems that i'm doing something generally wrong. Hopefully someone can give me a hint.

Try this: 

        WoWPlayer player = ObjectManager.GetObjectWoWPlayer().FirstOrDefault(o => o.Name == "CharName");
        if (player != null && player.IsValid)
        {
            Interact.InteractGameObject(player.GetBaseAddress, false);
        }

 

  • Author

It also seems that the settings don't save if you are using the same value as the default

Example: 

        [Setting]
        [DefaultValue(80)]
        [Category("HealSettings")]
        [DisplayName("Rejuvenation")]
        [Description("Player health procent")]
        public int RejuvenationProcent { get; set; }

If i load the setting the first time the value is 0 and if i try to save the same value (80) it wont work but 81 or 79 is working.

  • Author

I also have problems with a debuff as DK

Example: i'm trying to use icy touch only if the debuff "Frost Fever" does not exists.

public Spell FrostFever = new Spell("Frost Fever");

if(!this._target.HaveBuff(this.FrostFever.Id))
{
	// Use spell
}

This does not work for me. If i replace the "this.FrostFever.Id" with the string "HaveBuff("Frost Fever")" it works.

 

This is the function i wrote for my spells but it wont work if the framework dont detect the debuff with id

private void UseSpell(Spell spell, bool canMove, List<uint> dependencies)
  {
  // Set current target
  this._target = ObjectManager.Me.TargetObject;

  // Valid?
  if (this._target.IsValid && spell.KnownSpell && spell.IsSpellUsable && spell.IsDistanceGood && !this._target.HaveBuff(dependencies))
  {
  // Cast spell
  spell.Launch(canMove, true);
  }
  }

 

  • 1 month later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.