Stringstrider
New Member
- Joined
- Mar 24, 2015
- Messages
- 36
So I'm currently trying to add swiftcast to Sodimm's Codex summoner profile, as my pet despawns fairly often, and waiting 6 seconds every time it happens blows a lot of time. I figured I should insert it prior to the pet summon line.
I attached the original basic rotation, along with the only modification I made (in red), I have some basic/novice Java coding experience, enough that I can usually read and understand 75%ish of code I read, but I'm a total noob when it comes to C#. I'm wondering what the "r =>" does. I know that Swiftcast exists as a spell, because I see the ID for the skill appear when I start the bot, but I would like to know what I'm potentially doing wrong. I assume the parameters in brackets are the casting conditions, and I would love Swiftcast's use to be restricted to when no pets are summoned, but that is certainly over my head.
With it how it is, it doesnt actually use swiftcast, but it does load.
Edit: I've tried both spell.cast and spell.apply and neither are working, it's still slowcasting the pet
Any help appreciated, direct link to his CR below
Codex profile
I attached the original basic rotation, along with the only modification I made (in red), I have some basic/novice Java coding experience, enough that I can usually read and understand 75%ish of code I read, but I'm a total noob when it comes to C#. I'm wondering what the "r =>" does. I know that Swiftcast exists as a spell, because I see the ID for the skill appear when I start the bot, but I would like to know what I'm potentially doing wrong. I assume the parameters in brackets are the casting conditions, and I would love Swiftcast's use to be restricted to when no pets are summoned, but that is certainly over my head.
With it how it is, it doesnt actually use swiftcast, but it does load.
Edit: I've tried both spell.cast and spell.apply and neither are working, it's still slowcasting the pet
Any help appreciated, direct link to his CR below
Codex profile
Code:
public Composite CreateBasicCombat()
{
return new PrioritySelector(ctx => Core.Player.CurrentTarget as BattleCharacter,
new Decorator(ctx => ctx != null,
new PrioritySelector(
CommonBehaviors.MoveToLos(ctx => ctx as GameObject),
CommonBehaviors.MoveAndStop(ctx => (ctx as GameObject).Location, PullRange, true, "Moving to unit"),
new Decorator(r => !Core.Player.IsCasting, CommonBehaviors.MoveAndStop(ctx => (ctx as GameObject).Location, PullRange, true, "Moving to unit")),
[B][COLOR="#FF0000"]Spell.Cast("Swiftcast"),[/COLOR][/B]
Spell.Cast(r => WhichPet, r => Core.Player.Pet == null && Actionmanager.HasSpell(WhichPet), r => Core.Player),
new Decorator(r => Core.Me.SpellCastInfo != null && Core.Me.SpellCastInfo.SpellData.Name.Equals(WhichPet) && Core.Player.Pet != null, new Action(r => Actionmanager.StopCasting())),
Spell.Apply("Bio II"),
Spell.Apply("Miasma"),
Spell.Apply("Bio"),
Spell.Cast("Energy Drain", r => Core.Player.HasAura("Aetherflow") && Core.Player.CurrentManaPercent < WindowSettings.RestEnergyDone),
Spell.Cast("Ruin", r => true))));
}
Last edited: