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

Ranged Attack

Jalockin

Member
Joined
Aug 29, 2012
Messages
441
Reaction score
0
Hi PushedX

I've recently gave my melee bot a leap slam so he can jump those pesky mobs that run away.... but now he jumps around like a crazy frog even if the monsters are right next to him - can I somehow adjust the min/max range before he uses leapslam as a ranged attack ?

J.
 
The minimal range is the Max Melee Range itself. If your Max Melee Range is 12 and your Max Range Range is 40, the ranged skill will be used primarily when the mob is 12 - 40 units away. Try increasing melee range more and that should cause it to use Melee skills rather than Range skills.

However, under certain scenarios when your skill can't be used, whether it's AoE or Single Target, the routine tries to use another skill so the bot doesn't do anything and sit around. Under that case, you might notice your Ranged skills getting used, but that's by design to avoid the bot not casting anything because the conditions to use a skill aren't met.

That is what the following code does in the CR:
Code:
// This sillyness is for making sure we always use a skill, and is why generic code is a PITA
                // when it can be configured like so.
                if (aoe)
                {
                    if (melee)
                    {
                        slot = EnsurceCast(ExampleRoutineSettings.Instance.AoeMeleeSlot);
                        if (slot == -1)
                        {
                            slot = EnsurceCast(ExampleRoutineSettings.Instance.SingleTargetMeleeSlot);
                            if (slot == -1)
                            {
                                melee = false;
                                slot = EnsurceCast(ExampleRoutineSettings.Instance.AoeRangedSlot);
                                if (slot == -1)
                                {
                                    slot = EnsurceCast(ExampleRoutineSettings.Instance.SingleTargetRangedSlot);
                                }
                            }
                        }
                    }
                    else
                    {
                        slot = EnsurceCast(ExampleRoutineSettings.Instance.AoeRangedSlot);
                        if (slot == -1)
                        {
                            slot = EnsurceCast(ExampleRoutineSettings.Instance.SingleTargetRangedSlot);
                            if (slot == -1)
                            {
                                melee = true;
                                slot = EnsurceCast(ExampleRoutineSettings.Instance.AoeMeleeSlot);
                                if (slot == -1)
                                {
                                    slot = EnsurceCast(ExampleRoutineSettings.Instance.SingleTargetMeleeSlot);
                                }
                            }
                        }
                    }
                }
                else
                {
                    if (melee)
                    {
                        slot = EnsurceCast(ExampleRoutineSettings.Instance.SingleTargetMeleeSlot);
                        if (slot == -1)
                        {
                            slot = EnsurceCast(ExampleRoutineSettings.Instance.AoeMeleeSlot);
                            if (slot == -1)
                            {
                                melee = false;
                                slot = EnsurceCast(ExampleRoutineSettings.Instance.SingleTargetRangedSlot);
                                if (slot == -1)
                                {
                                    slot = EnsurceCast(ExampleRoutineSettings.Instance.AoeRangedSlot);
                                }
                            }
                        }
                    }
                    else
                    {
                        slot = EnsurceCast(ExampleRoutineSettings.Instance.SingleTargetRangedSlot);
                        if (slot == -1)
                        {
                            slot = EnsurceCast(ExampleRoutineSettings.Instance.AoeRangedSlot);
                            if (slot == -1)
                            {
                                melee = true;
                                slot = EnsurceCast(ExampleRoutineSettings.Instance.SingleTargetMeleeSlot);
                                if (slot == -1)
                                {
                                    slot = EnsurceCast(ExampleRoutineSettings.Instance.AoeMeleeSlot);
                                }
                            }
                        }
                    }
                }

It tries to assign a skill to use that matches the current combat scenario and finally just falls back to your other assigned skills.
 
Back
Top