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

Question: How to cast spell while moving

Fujiyama

Member
Joined
Mar 27, 2014
Messages
485
Reaction score
4
Condemn Crusaders might want to give this a try.

Here is what I got so far. It's made with the Vacuum rune in mind. There is a slider under Combat/Crusader in Trinity settings named CondemnOOC_Range which will determine how close the bot has to be to use Condemn.

Just replace these files. (Modifications made to latest Trinity SVN - If you are using older versions I can't guarantee this will work.)

This is just something I made to make my crusader a little bit more effective, so I won't promise anything. Feedback will be appreciated! :cool:





Edit: added files in first post.
 

Attachments

Last edited:
I'm trying to make a Condemn crusader use Condemn when passing mobs, i.e. to open a container or just prioritizing another monster. I tried something like this but it doesn't seem to work:

Code:
if (UseOOCBuff)
      {
.....

	if (CanCast(SNOPower.X1_Crusader_Condemn) && TargetUtil.AnyMobsInRange(50f, 1) && Player.PrimaryResource > 50)
                {
                    return new TrinityPower(SNOPower.X1_Crusader_Condemn);
                }
      
.....
      }

He is casting Steed Charge when going for a chest (and passing monsters) but it won't cast Condemn. Is it because he is moving? Or am I missing something? I want him to just spam it when there are monsters nearby no matter what his objective is.
while targeting chests/shrines and stuff like that it doesnt use crusadercombat.cs. my guess is you have to add it to special movement in handletarget.cs

He is casting Steed Charge when going for a chest (and passing monsters) but it won't cast Condemn. Is it because he is moving? Or am I missing something? I want him to just spam it when there are monsters nearby no matter what his objective is.
are you sure about that? maybe it was cast before it was targeting the chest
 
Last edited:
are you sure about that? maybe it was cast before it was targeting the chest

That may be it! But trying to use it when "IsCurrentlyAvoiding" it looks like it works when he is standing still (and avoiding), not when running away. That's why I thought it had to do with the bot moving.
 
while targeting chests/shrines and stuff like that it doesnt use crusadercombat.cs. my guess is you have to add it to special movement in handletarget.cs

And thanks for this, I'll have a look. Wish there was some kind of documentation though, or is there?
 
while targeting chests/shrines and stuff like that it doesnt use crusadercombat.cs. my guess is you have to add it to special movement in handletarget.cs

I think I got it now, but I'm not sure if I'm using the spell right. Do you know if this is correct?

Code:
ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn, [COLOR="#FF0000"]CurrentDestination[/COLOR], CurrentWorldDynamicId, -1);

It's not supposed to be cast on a target/spot so I'm not sure how to do this.
 
I think I got it now, but I'm not sure if I'm using the spell right. Do you know if this is correct?

Code:
ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn, [COLOR="#FF0000"]CurrentDestination[/COLOR], CurrentWorldDynamicId, -1);

It's not supposed to be cast on a target/spot so I'm not sure how to do this.

Try

Code:
ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn, ZetaDia.Me.ACDGuid, CurrentWorldDynamicId, -1);

should do the trick.

or even

Code:
ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn);

Should also work, maybe better
 
Last edited:
Try

Code:
ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn, ZetaDia.Me.ACDGuid, CurrentWorldDynamicId, -1);

should do the trick.

or even

Code:
ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn);

Should also work, maybe better

Doesn't seem to work :/


"ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn, ZetaDia.Me.ACDGuid, CurrentWorldDynamicId, -1);" :

Code:
Compiler Error: path\HandleTarget.cs(372,7) : error CS1502: The best overloaded method match for 'Zeta.Game.Internals.Actors.DiaActivePlayer.UsePower(Zeta.Game.Internals.Actors.SNOPower, Zeta.Common.Vector3, int, int)' has some invalid arguments
Compiler Error: path\HandleTarget.cs(372,57) : error CS1503: Argument 2: cannot convert from 'int' to 'Zeta.Common.Vector3'

"ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn);" :
Code:
Compiler Error: path\HandleTarget.cs(372,7) : error CS1501: No overload for method 'UsePower' takes 1 arguments
 
OK so I discovered this:

When removing the check for "AnyMobsInRange" it works. But not when the check is used. He will still cast Steed Charge OOC even within range of monsters. Why doesn't AnyMobsInRange work for this?

This is in CrusaderCombat.cs under the "UseOOCBuff" part.

Code:
if (CanCast(SNOPower.X1_Crusader_Condemn) && [COLOR="#FF0000"]TargetUtil.AnyMobsInRange(50)[/COLOR] && Player.PrimaryResource > 50)
                {
                    return new TrinityPower(SNOPower.X1_Crusader_Condemn);
                }
 
OK so I discovered this:

When removing the check for "AnyMobsInRange" it works. But not when the check is used. He will still cast Steed Charge OOC even within range of monsters. Why doesn't AnyMobsInRange work for this?

This is in CrusaderCombat.cs under the "UseOOCBuff" part.

Code:
if (CanCast(SNOPower.X1_Crusader_Condemn) && [COLOR="#FF0000"]TargetUtil.AnyMobsInRange(50)[/COLOR] && Player.PrimaryResource > 50)
                {
                    return new TrinityPower(SNOPower.X1_Crusader_Condemn);
                }

Got it: "TargetUtil.AnyMobsInRange(50f,1,false)" works.
 
this looks interesting, mind sharing your final result ? As I'm also running a condemn build ^^
 
this looks interesting, mind sharing your final result ? As I'm also running a condemn build ^^

Just need to test some more and clean up the code. I made quite a mess :cool: But I got it to cast condemn while going for globes/containers/avoiding now and it works quite well. He will also start casting a little bit before engaging. I assume you are using the Vacuum rune?
 
Doesn't seem to work :/


"ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn, ZetaDia.Me.ACDGuid, CurrentWorldDynamicId, -1);" :

Code:
Compiler Error: path\HandleTarget.cs(372,7) : error CS1502: The best overloaded method match for 'Zeta.Game.Internals.Actors.DiaActivePlayer.UsePower(Zeta.Game.Internals.Actors.SNOPower, Zeta.Common.Vector3, int, int)' has some invalid arguments
Compiler Error: path\HandleTarget.cs(372,57) : error CS1503: Argument 2: cannot convert from 'int' to 'Zeta.Common.Vector3'

"ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn);" :
Code:
Compiler Error: path\HandleTarget.cs(372,7) : error CS1501: No overload for method 'UsePower' takes 1 arguments

Oh shit, just noticed you used ZetaDia.Me.UsePower ^^ just return TrinityPower instead, should do the trick
 
Here is what I got so far. It's made with the Vacuum rune in mind. There is a slider under Combat/Crusader in Trinity settings named CondemnOOC_Range which will determine how close the bot has to be to use Condemn.

Just replace these files. (Modifications made to latest Trinity SVN - If you are using older versions I can't guarantee this will work.)

This is just something I made to make my crusader a little bit more effective, so I won't promise anything. Feedback will be appreciated! :cool:
 

Attachments

Is this working for anyone? I only see condemn aoe count in the newest trinity settings. It would be nice to start casting condemn while approaching mobs or spamming condemn during entire rift.
 
NVM got it to work. The slider goes to 70 and I was wondering if their is a way increase the range? If the crusader could cast condemn on approach and have it hit the mobs when he is in melee range. I don't think a range of 70 is enough to do this while having max movement speed?
 
Last edited:
"ZetaDia.Me.UsePower(SNOPower.X1_Crusader_Condemn, ZetaDia.Me.ACDGuid, CurrentWorldDynamicId, -1);" :
]

Sounds like you guys moved away from manually casting the spell, if you're going to that, there are additional things that need to be done to make sure the spell is recorded properly. Cast() from Skill.cs

Code:
        /// <summary>
        /// Cast this skill
        /// </summary>
        public void Cast(Vector3 clickPosition, int targetAcdGuid)
        {
            if (SNOPower != SNOPower.None && clickPosition != Vector3.Zero && IsActive && GameIsReady)
            {
                if (ZetaDia.Me.UsePower(SNOPower, clickPosition, Trinity.CurrentWorldDynamicId, targetAcdGuid))
                {
                    Trinity.LastPowerUsed = SNOPower;
                    CacheData.AbilityLastUsed[SNOPower] = DateTime.UtcNow;
                    SpellTracker.TrackSpellOnUnit(CombatBase.CurrentTarget.ACDGuid, SNOPower);
                    SpellHistory.RecordSpell(SNOPower);
                }
            }
        }
 
NVM got it to work. The slider goes to 70 and I was wondering if their is a way increase the range? If the crusader could cast condemn on approach and have it hit the mobs when he is in melee range. I don't think a range of 70 is enough to do this while having max movement speed?

I can see only Condemn AOE count in Trinity combat setting. how did you fix it?
 
Back
Top