NogoodhartDT
Member
- Joined
- Feb 27, 2016
- Messages
- 49
- Reaction score
- 1
what is the up to date coding for Rev.15 that the follower provides to use any OOC? My follower is a Crusader and he doesn´t uses Steed Charge when he follows a Sub-Barb. There was a code a few pages behind... schould I use that one?
OK I made this changes:
@Wrath:
I'll just post what I changed here so you can try it yourself, there's probably something majorly wrong with this so who knows what will happen but it has worked for hours for me at least
File called FollowerCombat.cs in Behaviors folder in the AutoFollow plugin folder, replace a function called "StayCloseToPlayer(...)" with this variation of it.
Code:
/// <summary>
/// Turn combat (Trinity) on and off while the follower is far away from the leader.
/// </summary>
public void StayCloseToPlayer(Message player)
{
if (player.Distance > Settings.Coordination.CatchUpDistance && !Player.IsInTown &&
!Navigation.IsBlocked && !Navigator.StuckHandler.IsStuck && Player.HitpointsCurrentPct > 0.7 && !Targetting.RoutineWantsToAttackGoblin())
{
if(!Player.IsCasting && !Player.IsCastingTownPortal && !Player.IsTryingToCastPortalSpell)
{
if (Player.ActorClass == ActorClass.Crusader && CombatBase.CanCast(SNOPower.X1_Crusader_SteedCharge))
ZetaDia.Me.UsePower(SNOPower.X1_Crusader_SteedCharge, Player.Position);
}
Targetting.State = CombatState.Pulsing;
}
else
{
Targetting.State = CombatState.Enabled;
}
}
edit: Ugh I changed the usings at the top also! Here they are
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoFollow.Behaviors.Structures;
using AutoFollow.Coroutines;
using AutoFollow.Coroutines.Resources;
using AutoFollow.Events;
using AutoFollow.Networking;
using AutoFollow.Resources;
using Buddy.Coroutines;
using Zeta.Bot;
using Zeta.Bot.Coroutines;
using Zeta.Bot.Logic;
using Zeta.Bot.Navigation;
using Zeta.Common;
using Zeta.Game;
using Zeta.Game.Internals;
using Zeta.Game.Internals.Service;
using Zeta.TreeSharp;
using Action = Zeta.TreeSharp.Action;
using Trinity.Combat.Abilities;
using Zeta.Game.Internals.Actors;
and @xzjv:
I think you're probably right, Trinity replaces the DB PlayerMover, which all movement in all plugins including DB itself uses for low level movement. So it is using the same code trinity does and trinity settings for when OOC movement should be cast. But yeah Trinity Movement\PlayerMover.cs ~743.
if (Trinity.Settings.Combat.Misc.AllowOOCMovement && !Trinity.Player.IsInTown && cancelSpecialMovementAfterStuck && (!CombatBase.IsInCombat || !CombatBase.IsCombatAllowed || !ZetaDia.Me.IsInCombat))
babysit right now but it look like a charm![]()
Would you mind posting the saved file? Id very much like to use it, and what version of zautofollow are u using 10 or 15?