What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Guide] A walkthrough of changing skill activation criteria (range etc) for Dummies!

Changed all >= abilities used by maurauder 6 DH to >=100 and it still spams them till I run out of resources. Multiple degrees in programming so I'm not editing the cs files wrong at all.
 
Hey community,

how should i edit it to bring my barb use "Ignore Pain" by elite mobs?

Code:
            // Ignore Pain when low on health
            if (IsNull(power) && CanCastIgnorePain)
                power = PowerIgnorePain;

            IsWaitingForSpecial = false;
 
Monk "seven sided strike" - Can someone write / copypaste me a version that lets the bot use it on any mobs and when they are 7f away. Right now it just uses it on elites and a bit too far, just hits nothing when mobs arent close enough.

Tried editing some myself, just killed trinity. Sorry.
 
Can someone give me copy paste-able code for an ability so the bot will always use it while in combat when it is off cooldown, regardless of how many mobs there are and how far they are away, etc?
 
How would I tell the bot to always whirlwind when in a rift?

Try this -- it worked for me:

In Combat\Abilities\BarbarianCombat.cs find (around line 527):
Code:
public static bool CanUseWhirlwind
        {
            get
            {
                if (UseOOCBuff || IsCurrentlyAvoiding || !CanCast(SNOPower.Barbarian_Whirlwind) || Player.IsIncapacitated || Player.IsRooted || Player.PrimaryResource < 10)
                    return false;

                return (CurrentTarget.RadiusDistance <= 25f || TargetUtil.AnyMobsInRange(V.F("Barbarian.Whirlwind.TrashRange"), V.I("Barbarian.Whirlwind.TrashCount"))) &&
                    // Check for energy reservation amounts
                    Player.PrimaryResource >= V.D("Barbarian.Whirlwind.MinFury") &&
                    // If they have battle-rage, make sure it's up
                    (!Hotbar.Contains(SNOPower.Barbarian_BattleRage) || (Hotbar.Contains(SNOPower.Barbarian_BattleRage) && GetHasBuff(SNOPower.Barbarian_BattleRage)));
            }
        }

Change to:
Code:
public static bool CanUseWhirlwind
        {
            get
            {
                if (UseOOCBuff || !CanCast(SNOPower.Barbarian_Whirlwind) || Player.IsIncapacitated || Player.IsRooted || Player.PrimaryResource < 10)
                    return false;

                return Player.PrimaryResource >= V.D("Barbarian.Whirlwind.MinFury") &&                    
                    (!Hotbar.Contains(SNOPower.Barbarian_BattleRage) || (Hotbar.Contains(SNOPower.Barbarian_BattleRage) && GetHasBuff(SNOPower.Barbarian_BattleRage)));
            }
        }
 
Would anyone know the criteria/condition to only allow a skill usage when in combat?

Thanks!
 
Would anyone know the criteria/condition to only allow a skill usage when in combat?

Thanks!

I guess you will need to add the spell under these codes, between the brackets {}

Code:
if (!UseOOCBuff && !IsCurrentlyAvoiding && CurrentTarget != null)
{ 
[U]HERE IS WHERE YOU MIGHT BE LOOKING TO INSERT SPELL RELATED CODE [/U]
}

im not 100% sure this will do, since i only found them while i was trying to stop my WD from spaming angry chicken in combat.

and since i m only capable of doing stupid coding (simple changes), this method might be more complicated if the spell you required got tons of related codes in Trinity. eg. other conditions that might triggers it, especially OOC related in your case.

that case, you will need to check if the spell (codes) exist under these conditions are crucial/useful as to what you need, and twist around or simply delete it. DO REMEMBER TO BACKUP the file before making any changes:eek::eek::eek::eek:

here is an example of where you might need to be checking, between the brackets {}.
Code:
if (UseOOCBuff)
            {}
 
Back
Top