// This means that this script itself is not for sale, that the script must be full Mod at all time, and that modifications to it MUST be provided to anyone upon request. Pets made with this script may be sold. ~ Fred Beckhusen (Ferd Frederix)
// requires the following animations, use the names on the right
string sLand = "land"; // land is when the legs are down
string sFly = "fly"; // fly is legs up
string sPeck = "peck"; // peck is actual pecking at the ground
string sPeckL = "peckL"; // peckL is left side pecking at the ground
string sPeckR = "peckR"; // peckR is right side pecking at the ground
string sLegFlop = "legs"; // legs is heads up
string sLookAround = "look";// looking around, with a wing flap
string sLanding = "landing";// landing positions
integer _debug = FALSE; // to see what happens, set to FALSE for normal operation
float FUDGE = 0.0; // random delay in flight speed each span travlled
float SPEED = 2.0; // how fast to fly, large = faster, in meters per second.
float RANGE = 10; // how far to sense avatars before flying
float TIMEOUT = 5; // how long to stay on ground after flight, and to scan for avatars
float MIN = 3; // minimum time between animations
float MAX = 7; // MAX + MIN (3+7=10) is the maximum pause between animations
integer channel = -325238; // Change this only if you want flocks to not fly unless a sensor in this species detects a human. Otherwise any species will set off flight in 100 meter distance.
string PECK = "pecking"; // peck sound
string FLAP = "flying-dragon"; // flying wing sound, used here when the wings flap idly
string IDLE = "flamingo"; // a sound of a bunch of flamingos
string FLYING = "flamingo honking"; // used randomly in flight
// Link message numbers to/from the main bird menu
integer fromRoot = -3500;
integer toRoot = -3501;
integer toFlight = -3502;
float totalTime; // the total time it takes to fly around once.
list lCoordinate; // a list of coordinates, rotations, and times from the recorder
// boolean flags
integer iStopMoving; // we need to stop moving
integer iAmFlying = FALSE; // true if we are flying.
integer iStartTimer = FALSE; // true once the timer is set up
integer iStarted = FALSE; // true once someone has clicked Start
// movement
integer iAmMaster ; // true if we are the controlling bird