if ((!followCreature || !hasFollowPath) && ([COLOR=rgb(184, 49, 47)]isSummon()[/COLOR] || !isMasterInRange)) {
if (OTSYS_TIME() >= nextDanceStepRound) {
nextDanceStepRound = OTSYS_TIME() + 2000 + getStepDuration();
//choose a random direction
result = getRandomStep(getPosition(), direction);
}
} else if (([COLOR=rgb(41, 105, 176)]isSummon()[/COLOR] && isMasterInRange) || followCreature) {
result = Creature::getNextStep(direction, flags);
if (result) {
flags |= FLAG_PATHFINDING;