protected override Composite CreateMainBehavior()
        {
            return(new PrioritySelector(

                       // If quest is done, behavior is done...
                       new Decorator(context => IsDone,
                                     new Action(context =>
            {
                LogInfo("Finished");
                BehaviorDone();
            })),

                       // Done due to count completing?
                       new Decorator(context => Counter >= NumOfTimesToUseItem,
                                     new Action(context => { BehaviorDone(); })),

                       // If item is no longer viable to use, warn user and we're done...
                       new Decorator(context => !IsViable(ItemToUse),
                                     new Action(context =>
            {
                LogError("We no longer have a viable Item({0}) to use--terminating", ItemId);
                TreeRoot.Stop();
                BehaviorDone();
            })),

                       // If no viable target, find a new mob to harass...
                       new Decorator(context => !IsViableForItemUse(SelectedTarget),
                                     new PrioritySelector(
                                         new Action(context =>
            {
                Me.ClearTarget();
                SelectedTarget = FindBestTarget();

                // Target selected mob as feedback to user...
                if ((SelectedTarget != null) && (Me.CurrentTarget != SelectedTarget))
                {
                    SelectedTarget.Target();
                }

                return RunStatus.Failure;               // fall through
            }),

                                         // If we couldn't find a mob, move back to center of hunting grounds...
                                         new Decorator(context => SelectedTarget == null,
                                                       new PrioritySelector(
                                                           new Decorator(context => Me.Location.Distance(CurrentHuntingGroundWaypoint.Location) <= CurrentHuntingGroundWaypoint.Radius,
                                                                         new Action(context => { CurrentHuntingGroundWaypoint = HuntingGrounds.FindNextWaypoint(CurrentHuntingGroundWaypoint.Location); })),

                                                           UtilityBehaviorPS_MoveTo(
                                                               context => CurrentHuntingGroundWaypoint.Location,
                                                               context => string.IsNullOrEmpty(CurrentHuntingGroundWaypoint.Name)
                                               ? "to next hunting ground waypoint"
                                               : string.Format("to hunting ground waypoint '{0}'", CurrentHuntingGroundWaypoint.Name)
                                                               ),

                                                           new Decorator(context => Me.Location.Distance(HuntingGroundCenter) <= Navigator.PathPrecision,
                                                                         new Action(context => { LogInfo("Waiting for mobs to respawn."); }))
                                                           ))
                                         )),

                       // Pick a fight, if needed...
                       new Decorator(context => !Me.Combat && IsViableForItemUse(SelectedTarget),
                                     UtilityBehaviorPS_GetMobsAttention(context => SelectedTarget))
                       ));
        }