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

[Plugin] GearSwap Extreme

evern

New Member
Joined
Mar 31, 2014
Messages
34
Reaction score
0
Before i say anything, thank you borderjs for your GearSwap plugin, i've made some modification from there onwards to proudly present to everybody

GearSwap Extreme

What is GearSwap Extreme?
Added the ability to swap gears before casting a skill

Why do i need that?
Swap in full elemental set before casting an elemental skill or equip legendary with skill modification (e.g. Wand of Woh) before casting a skill, or both!

What is required for this to work?
If you don't do anything it it'll work like a normal GearSwap which swaps gears depending on environmental statuses. But If you want it to work with skills you would have to use Trinity, and edit Trinity -> Combat -> Abilities -> CombatBase.cs

Code:
        public static bool CanCast(SNOPower power, CanCastFlags flags = CanCastFlags.All)
        {
            bool hasPower = Hotbar.Contains(power);
            if (!hasPower)
                return false;

            // Skip this or Barb, Crusader, WD
            if (Player.ActorClass == ActorClass.Wizard || Player.ActorClass == ActorClass.DemonHunter || Player.ActorClass == ActorClass.Monk)
            {
                bool timer = flags.HasFlag(CanCastFlags.NoTimer) || SNOPowerUseTimer(power);

                if (!timer)
                    return false;
            }

            bool powerManager = flags.HasFlag(CanCastFlags.NoPowerManager) || PowerManager.CanCast(power);

            if (!powerManager)
                return false;

[COLOR="#FF0000"]            
            // Add the following lines in red
            if (!GearSwap.Plugin.HasGear(power.ToString()))
                return false;
[/COLOR]

            return true;
        }

How to make it swap before casting skills?
Step 1: Run DemonBuddy and enable GearSwapExtreme, this is generate Managed.txt and Priority.txt file in DemonBuddy->Settings->GearSwapExtreme->[PlayerName#BattleTag]
Step 2:
Close DemonBuddy and edit the Priority.txt file to add in your skill name.
The skill name needs to be a qualified name that can be found in Trinity -> Configuration -> TVars.cs.
A qualified skill name will be Wizard_MagicMissile
Step 3: Run DemonBuddy again and load up GearSwap Extreme config. You will see three list box. Your skill will appear in the Condition List

GearSwap.webp

Step 4: To assign a gear to your skill, you will need to click Capture to get your equipped gear, it is a must that the bot is paused before doing so
Step 5: Click on the skill in the Condition List and click on gear(s) in the Current List then click Add, this will send the gear to the Managed List. Click Save if you're happy with the gears in the Managed List

My default gear isn't swapping back correctly! how do i fix that?
Sometimes GearSwap Extreme doesn't swap back your default gear when it swaps between skill gear and environment condition gear, to make sure it always swaps back to your default gear when there are no conditions present, you can add your current equipped set to the managed gear list as Default condition. Also make sure Default is set to the lowest priority.

Step 6 [Optional]: Open up GearSwap Extreme configuration and then click Capture, then click Add All As Default Gear, this will add all your currently equipped gear into the Managed List as default gear, click Save if you're happy with it.


You can change your default gear by clicking Clear Default Gear and then Add All As Default Gear then Save to refresh your default gear

Please also note that skill condition priority works the same as other priorities. So let's say if Wizard_ExplosiveBlast is set below Elite and when an elite is present GearSwap Extreme will not swap in your Wizard_ExplosiveBlast gear to cast it.

I hope i gave out enough information for you to make it work and happy swapping! If you like my modification feel free to buy me a new computer! :D

Update: v3.0
1. Includes GearSwapSVN21 changes
2. Added Gloves of Worship support
3. More robust sequence for preserving Vyr's set after equipped on Archon mode

Note: Need to change "hasGear" to "HasGear" in trinity to accomodate new coding convention

Update: v2.3
1. Vyr's set gear won't be replaced when player is in Archon mode

Update: v2.2
1. Fix priority.txt not getting written properly

Update: v2.1
1. Added skill window slider, this slider determines how long the gear should stay equipped before getting swapped out (Warn: this duration is how long the pulse will be paused. Condition statuses gears will get affected, so don't set too long)

View attachment GearSwapExtreme_v3.0.zip

To borderjs: Thank you so much for your great work, i really learned alot from what you've done and hope you'll consider adding my modification into your main trunk. If you do, sorry for my messy code and also this modification is done on top of your revision as of last saturday 10th May 2014.

Other findings: preliminary findings to element and elite bonuses indicates that bonus damage is calculated on hit. Meaning that if i swap in Wand of Woh before casting and swap in full elite gear after casting, the elite bonus will register.
 

Attachments

Last edited:
hi working really good. i tried barbarian_leap to switch between the leap boots and firewalkers. to always get 3 leaps in combat i changed the waittimer to 2sec in plugin.cs.
the main problem though is that it only works in combat. so i guess we need some additional changes to playermover.cs in trinity --> movement. tried some things but couldnt really figure it out. maybe you have the time/knowledge to figure it out.
thanks.
 
Glad that you got it to work, ill look into playermover and see how can i call up gearswap ex
 
Lenoar i have a look in the code and theoretically this should work, server is down at the moment so i can't test

What you do is change PowerManager to CombatBase

Code:
                 if (Trinity.Settings.Combat.Barbarian.UseLeapOOC && Trinity.Hotbar.Contains(SNOPower.Barbarian_Leap) &&
                    [COLOR="#FF0000"]CombatBase[/COLOR].CanCast(SNOPower.Barbarian_Leap) && !ShrinesInArea(vMoveToTarget))
                {
                    Vector3 vThisTarget = vMoveToTarget;
                    if (DestinationDistance > 35f)
                        vThisTarget = MathEx.CalculatePointFrom(vMoveToTarget, vMyCurrentPosition, 35f);
                    ZetaDia.Me.UsePower(SNOPower.Barbarian_Leap, vThisTarget, Trinity.CurrentWorldDynamicId, -1);
                    SpellHistory.RecordSpell(SNOPower.Barbarian_Leap);
                    if (Trinity.Settings.Advanced.LogCategories.HasFlag(LogCategory.Movement))
                        Logger.Log(TrinityLogLevel.Debug, LogCategory.Movement, "Using Leap for OOC movement, distance={0}", DestinationDistance);
                    return;
                }
 
Lenoar i have a look in the code and theoretically this should work, server is down at the moment so i can't test

What you do is change PowerManager to CombatBase

Code:
                 if (Trinity.Settings.Combat.Barbarian.UseLeapOOC && Trinity.Hotbar.Contains(SNOPower.Barbarian_Leap) &&
                    [COLOR="#FF0000"]CombatBase[/COLOR].CanCast(SNOPower.Barbarian_Leap) && !ShrinesInArea(vMoveToTarget))
                {
                    Vector3 vThisTarget = vMoveToTarget;
                    if (DestinationDistance > 35f)
                        vThisTarget = MathEx.CalculatePointFrom(vMoveToTarget, vMyCurrentPosition, 35f);
                    ZetaDia.Me.UsePower(SNOPower.Barbarian_Leap, vThisTarget, Trinity.CurrentWorldDynamicId, -1);
                    SpellHistory.RecordSpell(SNOPower.Barbarian_Leap);
                    if (Trinity.Settings.Advanced.LogCategories.HasFlag(LogCategory.Movement))
                        Logger.Log(TrinityLogLevel.Debug, LogCategory.Movement, "Using Leap for OOC movement, distance={0}", DestinationDistance);
                    return;
                }
thanks. that change is working fine. just wanted to leave the feedback.
atm i use both gearswap (for chest + shrine + well) + gearswap extreme (for leap + different amulets). "default" is especially great for amulets.
 
thanks. that change is working fine. just wanted to leave the feedback.
atm i use both gearswap (for chest + shrine + well) + gearswap extreme (for leap + different amulets). "default" is especially great for amulets.

gearswap extreme now supports chest, i put in the latest changes as of today from gearswap, let me know if it works well for you
 
hey chest works but default does not seem to work anymore. otherwise its working as good as before
 
Hey lenoar i've made some changes to allow default gear to be reverted properly
 
And this doesn´t get you banned? A human palyer couldn´t do that could he?
 
Hey lenoar i've made some changes to allow default gear to be reverted properly
hi, default works :) but chest is broken again. im not sure though maybe the problem is on my end. ill try a new clean installation sometime tomorrow.


And this doesn´t get you banned? A human palyer couldn´t do that could he?
atm nothing really gets you banned. who knows what they will look for in the future



ok chests are working. now that i use belts and boots i noticed that default is only triggered if all slots are in default. also if someone wants to swap gear on more than one skill it would be nice if the time equiped could be adjusted for each skill.

my bot is swapping items like a madman now. still missing the fire amulet. if i find it ill just turn off avoidance. it will be fun :=)
 
Last edited:
Hi lenoar i've updated it, due to changes in GearSwapSVN17 from borderjs you need to amend your trinity

// Add the following lines in red
if (!GearSwap.Plugin.hasGear(power.ToString()))
return false;
 
hi, the priority.txt doesnt save anymore so you have to edit it in the settings yourself. everything else is working good. no need for two gearswap plugins anymore.
once i get the fire amulet ill change some of the conditions and post them here because i think there should be more options regarding the elemental conditions.
separate skill windows for each skill would be nice if that is something you can implement. otherwise im out of ideas. thanks
 
hi, the priority.txt doesnt save anymore so you have to edit it in the settings yourself. everything else is working good. no need for two gearswap plugins anymore.
once i get the fire amulet ill change some of the conditions and post them here because i think there should be more options regarding the elemental conditions.
separate skill windows for each skill would be nice if that is something you can implement. otherwise im out of ideas. thanks

Hi lenoar thanks for testing that out, i've fixed priority.txt not being written properly. In the future i might add skill management, so depending on what class you're playing as you'll be able to maintain a list of skill cast window and add it directly to the condition list.
 
can this plugin work when played by a human???

Blank combat routine/profile

(my guess is no, but just curious!)
 
i tried this plugin, or let me say, i am still trying to figure out why it doesn't work as described.

my problem is: it doesn't swap my belt for chilanik's chain before war cry is used, no matter what i do.
i followed your instructions from the first post (edit combatbase.cs -> generate priority/managed.txt -> add skill name which would be "Barbarian_WarCry" -> open config in bot and add the item to the condition...) and it looks exactly the same in the config, yet it doesn't work ._.

"Barbarian_WarCry,Chilanik’s Chain,Waist,298133" this is the line from managed.txt..
 
Hey, could u add a Feature which locks slots while a Buff is active(Archon)
 
i tried this plugin, or let me say, i am still trying to figure out why it doesn't work as described.

my problem is: it doesn't swap my belt for chilanik's chain before war cry is used, no matter what i do.
i followed your instructions from the first post (edit combatbase.cs -> generate priority/managed.txt -> add skill name which would be "Barbarian_WarCry" -> open config in bot and add the item to the condition...) and it looks exactly the same in the config, yet it doesn't work ._.

"Barbarian_WarCry,Chilanik’s Chain,Waist,298133" this is the line from managed.txt..

Hi there, can you enable logging and copy paste a few lines from gearswap before it casts warcry? also, what is the priority of your skill?
 
Hey, could u add a Feature which locks slots while a Buff is active(Archon)

Yes i'll definitely look into that, currently it pauses swapping depending on how long you set for skill window, but that also means that other conditional gear won't be swapped in during archon mode
 
Back
Top