Jump to content

Apexx

Elite user
  • Posts

    332
  • Joined

Posts posted by Apexx

  1. I hit level 30 on my protection warrior and my fight class was working just fine until I trained Rank 2 of Demoralizing Shout. I am using string names for spell checks,
    and it just keeps spamming Demo Shout continuously. Spell string = "Demoralizing Shout" | Spell ID = 6190.

    Using a simple check:
     

    if (!target.HaveBuff("Demoralizing Shout"))
            {
                DemoralizingShout.Launch();
                return;
            }

     

  2. protected void UseSpell(Spell spell, bool stopMoving, bool faceTarget = false, float rangeCheck = 5)
        {
            if (
                    !player.IsMounted && spell.KnownSpell && spell.IsSpellUsable && spell.IsDistanceGood &&     // Not mounted | Spell Known/Usable/Good Distance
                    player.TargetObject.IsAlive && player.TargetObject.IsAttackable &&                          // Target is alive | attackable
                    target.GetDistance <= rangeCheck                                                            // Target is within given range
                )
            {
    
                if (faceTarget)
                {
                    MovementManager.Face(player.TargetObject);
                }
    
                spell.Launch(stopMoving);
            }
        }

     

  3. Thanks Reapler, I already have functions to check hostile units in range, stunned units within range, etc. The issue is
    why does WRobot cast the ability twice in a row even though my health percent is above my threshold?
     

    if (player.HealthPercent <= 50 && HolyLightTimer.IsReady)
            {
                UseSpell(HolyLight, true, false, 30);
                HolyLightTimer = new Timer(3000); // Holy Light cast time = 2.5 seconds
            }

    The problem is, when casting and you take a hit, your cast bar subtracts value thus the timer is rendered useless.
    Let's say I pulled 3 hostile units and my health dropped to 48%. I will start to cast Holy Light as intended. However,
    the tigers are still attacking me during my heal. If my heal was almost done at 90%, the hostile unit attack from one
    unit will knock the 90% back down to say 85%. Then if I get hit by the second hostile unit, it will bump down from 85%,
    to 80%. The 3000 millisecond timer most likely is ready at this point, thus I cast Holy Light a second time, even though
    my Health percent = 90%.

  4. Original Thread Topic:

    I did not want to necro an old thread, but I have included a timer into the ability Holy Light from Paladin spellbook.
    However, I do not think that it works too well when you are being attacked while healing and it bumps your cast time
    backwards. If I pulled 3 mobs and wanted to check my fight class to heal at or below 50% health, and I am still being
    attacked by the mobs, my cast bar gets knocked backwards which increases the cast time. Is there any way to counter
    this issue?

    Thanks!

  5. I am writing a protection warrior fight class, and there are no cast times. I was just wanted to delay abilities like Overpower, Execute, Revenge.
    Once the ability is usable, it casts it immediately which is really not human-like at all. I try to write my fight classes as human-like as I can, adding
    randomization, delays, etc.

    pseudo example:
     

    var _timer = new robotManager.Helpful.Timer(_r.Next(300, 650));
                if (_timer.IsReady)
                {
                    // use Revenge
                }

     

  6. @reapler I was wondering if there was a way to disable the Log spam from this?
     

    Quote

    12:29:40 - [Fight] Player Attack Rotting Dead (lvl 5)
    [D] 12:29:40 - [Spell] Defensive Stance (Id found: 71, Name found: Defensive Stance, NameInGame found: Defensive Stance, Know = True, IsSpellUsable = True)
    [D] 12:29:40 - [Spell] Defensive Stance (Id found: 71, Name found: Defensive Stance, NameInGame found: Defensive Stance, Know = True, IsSpellUsable = True)
    [D] 12:29:40 - [Spell] Defensive Stance (Id found: 71, Name found: Defensive Stance, NameInGame found: Defensive Stance, Know = True, IsSpellUsable = True)
    [D] 12:29:41 - [Spell] Defensive Stance (Id found: 71, Name found: Defensive Stance, NameInGame found: Defensive Stance, Know = True, IsSpellUsable = True)
    [D] 12:29:41 - [Spell] Defensive Stance (Id found: 71, Name found: Defensive Stance, NameInGame found: Defensive Stance, Know = True, IsSpellUsable = True)
    [D] 12:29:41 - [Spell] Defensive Stance (Id found: 71, Name found: Defensive Stance, NameInGame found: Defensive Stance, Know = True, IsSpellUsable = True)
    [F] 12:29:41 - [Spell] Cast Taunt (Taunt)
    [F] 12:29:45 - [Spell] Cast Rend (Rend)
    [F] 12:29:45 - [Spell] Cast Bloodrage (Bloodrage)
    [F] 12:29:46 - [Spell] Cast Heroic Strike (Heroic Strike)
    [F] 12:29:49 - [Spell] Cast Heroic Strike (Heroic Strike)

     

  7. The Protection Warrior Fight Class I am making is more for those that would rather control their own character in game. Such things like targeting and initial pulling would be up to the player.
    However, if the user would like to allow the Fight Class to pull (Found in Settings), it was an issue with Wrath of the Lich King that once the initial targeted mob died, the in-game auto target
    feature continuously makes my character go as long as there are mobs around me (despite setting the advanced settings for eating at certain health percentage) because of how quick the
    auto target reacts.

  8. I am wondering if this if-statement will return a random time of interrupting an interruptible spell from my target using C# custom fight class:

    if (ShieldBash.KnownSpell && ShieldBash.IsSpellUsable && ShieldBash.IsDistanceGood &&
                Fight.InFight && target.CanInterruptCasting)
            {
                System.Threading.Thread.Sleep(robotManager.Helpful.Others.Random(0, target.CastingTimeLeft - 350));
                ShieldBash.Launch();
                Thread.Sleep(SpellManager.GlobalCooldownTimeLeft());
                return;
            }

     

×
×
  • Create New...