integer counter; // List of all the animation states list animState = [ "Sitting on Ground", "Sitting", "Striding", "Crouching", "CrouchWalking", "Soft Landing", "Standing Up", "Falling", "Hovering Down", "Hovering Up", "FlyingSlow", "Flying", "Hovering", "Jumping", "PreJumping", "Running", "Turning Right", "Turning Left", "Walking", "Landing", "Standing", "Dancing" ]; // Logic change - we now have a list of tokens. The 'overrides' list is the same length as this, // i.e. it has one entry per token, *not* one entry per animation. Multiple options for a token // are stored as | separated strings in a single list entry. This was done to save memory, and // allow a larger number of stands etc. All the xxxIndex variables now refer to the token index, // since that's how long 'overrides' is. // List of internal tokens. This *must* be in the same sequence as the animState list. Note that // we combine some tokens after the notecard is read (striding/walking, landing/soft landing), etc. // The publicized tokens list only contains one entry for each pair, but we'll accept both, and // combine them later list tokens = [ "[ Sitting On Ground ]", // 0 "[ Sitting ]", // 1 "", // 2 - We don't allow Striding as a token "[ Crouching ]", // 3 "[ Crouch Walking ]", // 4 "", // 5 - We don't allow Soft Landing as a token "[ Standing Up ]", // 6 "[ Falling ]", // 7 "[ Flying Down ]", // 8 "[ Flying Up ]", // 9 "[ Flying Slow ]", // 10 "[ Flying ]", // 11 "[ Hovering ]", // 12 "[ Jumping ]", // 13 "[ Pre Jumping ]", // 14 "[ Running ]", // 15 "[ Turning Right ]", // 16 "[ Turning Left ]", // 17 "[ Walking ]", // 18 "[ Landing ]", // 19 "[ Standing ]", // 20 "[ Swimming Down ]", // 21 "[ Dancing ]", // 22 For Dancing Animations "[ Swimming Up ]", // 23 "[ Swimming Forward ]", // 24 "[ Floating ]", // 25 "[ Typing ]", // 26 "[ Settings ]" // 27 this is new... we'll see how i can make it work ]; // The tokens for which we allow multiple animations list multiAnimTokenIndexes = [ 0, // "[ Sitting On Ground ]" 1, // "[ Sitting ]" 18, // "[ Walking ]" 20, // "[ Standing ]" 15, // "[ Running ]" 22 // "[ Dancing ]" ]; // Index of interesting animations integer noAnimIndex = -1; integer sitgroundIndex = 0; integer sittingIndex = 1; integer stridingIndex = 2; integer standingupIndex = 6; integer hoverdownIndex = 8; integer hoverupIndex = 9; integer flyingslowIndex = 10; integer flyingIndex = 11; integer hoverIndex = 12; integer walkingIndex = 18; integer standingIndex = 20; integer swimdownIndex = 21; integer swimupIndex = 22; integer swimmingIndex = 23; integer waterTreadIndex = 24; integer typingIndex = 25; integer settingsIndex = 26; integer dancingIndex = 22; list overrides = []; // List of animations we override key notecardLineKey; // notecard reading keys integer notecardIndex; // current line being read from notecard integer numOverrides; // # of overrides string notecardName = ""; // The notecard we're currently reading // String constants to save a few bytes string EMPTY = ""; string SEPARATOR = "|"; string TIMINGSEPARATOR = ":"; string TRYAGAIN = "Please correct the notecard and try again."; string FLAG = "flag"; string VAR = "var"; string COMMANDS = "commands"; // Settings keywords, their type and respective command(s) // e.g. Standtime would be tye variable and the command is ZHAO_STANDTIME|