Jump to content

iMod

Elite user
  • Posts

    581
  • Joined

  • Last visited

Posts posted by iMod

  1. 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);
      }
      }

     

  2. 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.

  3.         // 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.

  4. var tank = getTanks();
    WoWUnit target = ;
    Interact.InteractGameObject(target.GetBaseAddress);
    _wrath.Launch(); 

    Thats why i said don't use var ^_-

    // Get all available tanks
    List<WoWPlayer> tankList = getTanks();
    
    // Get the first tank in the list
    WoWPlayer tank = tankList.First();
    
    // Get the target of the tank
    WoWUnit target = tank.TargetObject;
    
    // Focus at target
    Interact.InteractGameObject(target.GetBaseAddress, true);
    
    // Use the skill
    _wrath.Launch();

    It is way essiert to read ^_-

×
×
  • Create New...