/// <summary> /// Determines if the character is currently running. /// Assumes the character is running if a stamina potion is active because we cannot differentiate. /// </summary> /// <returns>true for running, false for walking</returns> public bool CharacterIsRunning(bool readWindow = false) { if (readWindow && !ReadWindow()) { return(false); } Point runOrb = RunOrbSamplePoint(); Color runColor = Screen[runOrb.X, runOrb.Y]; RGBHSBRange normalRunEnergyFoot = RGBHSBRangeFactory.RunEnergyFoot(); RGBHSBRange staminaRunEnergyFoot = RGBHSBRangeFactory.RunEnergyFootStamina(); bool normalRun = normalRunEnergyFoot.ColorInRange(runColor); bool staminaRun = staminaRunEnergyFoot.ColorInRange(runColor); return(normalRun || staminaRun); }