variables { global: 0: GenreNames 1: HumanPlayers 2: AvailableHudSlots 3: IsReady 4: NameColors 5: CameraDistance 6: CameraOffset 7: CameraWallPadding 8: PlayerListHudIds 9: MenuHudIds 10: InspectionTextIds 11: LeavingPlayerIndex 12: ColorNames 13: MenuPageNames 14: ServerDurationMinutes 15: ServerEndTime 16: ServerTimeRemaining 17: ServerTimeText 18: RestartRequested 19: PerformanceDiagnostics 20: CleanupPlayerIndex 21: CleanupSubject 22: LeavingDebtIndex 23: PlayerHudSlots 24: RGB 25: RGBPhase 26: PlayerIcons 27: IconNames 28: LastHudSlot 29: NameColorRGBValues 30: VoteLeader 31: HighestVoteCount 32: VoteTied 33: VoterIndex 34: HeroSelectionSkipped 35: SetupSkipped 36: GameStartRequested 37: ActivePlayer 38: SchedulerPlayerIndex 39: SchedulerStep 40: ActiveDummyBotTeam 41: AimDistance 42: TeamCyclePlayer 43: TeamCycleTime 44: LeavingRevengeIndex 45: PlayerListSnapshot 46: VoteLeaderName 47: VoteLeaderColor 48: UnkillableIconIds 49: LuckIconIds 50: TemporaryTextOwners 51: TemporaryEffectHudIds 52: TemporaryTravelTextIds 53: TemporaryVisionTextIds 54: TextCleanupIndex 55: TextCleanupPlayer 56: TextCleanupCursor 57: LuckVisionViewers 58: VoteRecountNeeded 59: Team1DummyBotRetryTime 60: Team2DummyBotRetryTime 61: SuperPunchPlayers 62: SuperPunchTimes 63: SuperPunchTarget 64: ObjectiveIconOwners 65: ObjectiveIconIds 66: ObjectiveIconTimes 67: ObjectiveIconIndex 68: ObjectiveIconChoices 69: ObjectiveIconPlayer 70: CameraPlayer 71: PresenceNames 72: FateNames 73: WhisperNames 74: AuraNames 75: OmenLines 76: MoonlitAuraOwners 77: MoonlitAuraIds 78: MoonlitAuraChoices 79: MoonlitAuraColors 80: MoonlitAuraIndex 81: MoonlitAuraPlayer 82: FateResultOwners 83: FateResultHudIds 84: FateResultDeadlines 85: FateResultIndex 86: FateResultPlayer 87: WhisperPlayer 88: WhisperTarget 89: TriggerPlayer 90: ControllerGeneration 91: TeamCyclePhase 92: TeamCyclePhaseTime 93: TeamCyclePhaseOwner 94: EventQueue 95: EventQueueHead 96: EventQueueTail 97: EventCount 98: InitialEventCount 99: EventCursor 100: ActiveEvent 101: DroppedEventCount 102: PendingLeaves 103: PendingLeaveCursor 104: MissingHudDeadlines 105: MissingPlayerCursor 106: VisibleIconChoices player: 0: IsClassified 1: IsAutomaticBot 2: IsHuman 3: GenreIndex 4: HudSlot 5: PlayerListHud 6: MenuOpen 7: GenreCursor 8: MenuHud 9: InspectionActive 10: InspectionTarget 11: InspectionText 12: CameraMode 13: CameraTarget 14: MeleeConsumed 15: MenuPage 16: MainMenuCursor 17: CameraCursor 18: ColorCursor 19: ColorIndex 20: NameColor 21: CameraTargetCandidate 22: CameraTargets 23: IsPrepared 24: RevengeCursor 25: RevengeTargets 26: RevengeKillers 27: RevengeDebts 28: RevengeIndex 29: RevengeDeathPending 30: TravelCursor 31: TravelTargets 32: TravelTargetCandidate 33: LockedRevengeTarget 34: SelectedRevengeTarget 35: NameplatesDisabled 36: BotLocked 37: LastHero 38: InspectionTargets 39: MenuCommand 40: LockedTravelType 41: LockedTravelTarget 42: UnkillableActive 43: UnkillableCursor 44: VoiceIndex 45: VoiceCursor 46: CrouchTravelActive 47: TravelCommand 48: CameraInteractConsumed 49: DeathPosition 50: SafeRevivePosition 51: JumpReviveConsumed 52: IconIndex 53: IconCursor 54: MenuColor 55: CrouchTravelEnabled 56: ObjectiveIconPosition 57: InspectionPrivacyActive 58: UnkillableMode 59: UnkillableIcon 60: LuckActive 61: LuckSpinCount 62: LuckSpinInterval 63: LuckIcon 64: VoteCursor 65: VotedPlayer 66: VoteCount 67: PlayerHudCreated 68: PlayerCycleActive 69: WasPrepared 70: TeamChangeProcessed 71: TravelTextTarget 72: TravelText 73: MenuInputLocked 74: LuckEffect 75: LuckEffectEndTime 76: LuckPrivacyActive 77: NextLuckBurnTime 78: LuckMenuReopenNeeded 79: LuckEffectHud 80: LuckVisionText 81: NextLuckSpinTime 82: LuckIconEndTime 83: LastTeam 84: DummyBotTravelTime 85: RevengeClaimant 86: NextForcedRevengeTime 87: ForcedRevengeEndTime 88: AllowDummyBotFollow 89: DummyBotFollowTarget 90: InspectionTargetCandidate 91: TravelDestination 92: TravelAttachmentTarget 93: TravelAttachmentActive 94: AttachmentOwnerHero 95: AttachmentTargetHero 96: TeamCycleDeadline 97: TeamCycleTargetTeam 98: CustomSoundtrack 99: PlayerListUpdatePending 100: DisplayName 101: GhostModeActive 102: FlyModeActive 103: GhostFlyCursor 104: GhostFlyPhysicsApplied 105: NextSuicideTime 106: MovementGravity 107: MovementSpeed 108: FlyDirection 109: FlyVelocityDelta 110: AttachmentChain 111: AttachmentChainIndex 112: AttachmentCycleDetected 113: DummyBotTravelCursor 114: NextTargetTextTime 115: ReviveTeleportNeeded 116: AutoHeroSelectionDeadline 117: AutoHeroSelectionComplete 118: MultijumpEnabled 119: MultijumpCursor 120: MultijumpLevel 121: MultijumpConsumed 122: JumpWasGrounded 123: NextMultijumpTime 124: MovementCursor 125: NocturneState 126: ControllerState 127: ControllerTimes } subroutines { 0: CloseMenu 1: StartCamera 2: DrawMenu 3: LockBot 4: PreparePlayer 5: RefreshCameraTargets 6: DrawMainMenu 7: DrawSoundtrackMenu 8: DrawCameraMenu 9: DrawNameColorMenu 10: DrawInfoMenu 11: RefreshInspectionTarget 12: DrawRevengeMenu 13: RefreshRevengeTargets 14: DrawTravelMenu 15: RefreshTravelTarget 16: DrawUnkillableMenu 17: DrawHeroVoiceMenu 18: DrawPlayerIconMenu 19: TransitionMenuColor 20: DrawLuckMenu 21: DrawVoteMenu 22: RecountVotes 23: CleanupPlayer 24: DrawActiveMenuPage 25: QuiescePlayer 26: ProcessPlayerFastState 27: ProcessPlayerCycle 28: ProcessPlayerMaintenance 29: ProcessPlayerLuck 30: ApplySoundtrackPage 31: ApplyCameraPage 32: ApplyNameColorPage 33: ApplyRevengePage 34: ApplyUnkillablePage 35: ApplyHeroVoicePage 36: ApplyPlayerIconPage 37: ApplyCrouchTravel 38: ApplyInspectionPrivacyPage 39: ApplyLuckPage 40: ApplyVotePage 41: RestorePlayerLuck 42: RestoreActivePlayerLuck 43: RefreshPlayerPublicTargets 44: RefreshActivePlayerPublicTargets 45: CreateTeamDummyBot 46: RemoveTeamDummyBot 47: TravelToSpawn 48: TravelToObjective 49: TravelToPlayer 50: ApplyDummyBotFollowPage 51: FindSafeTravelPosition 52: DrawGhostFlyMenu 53: ApplyGhostFlyPage 54: ApplyGhostFlyPhysics 55: ProcessPlayerFlight 56: CleanupOrphanedText 57: ProcessPlayerBot 58: MaintainDummyBots 59: DrawMultijumpMenu 60: ApplyMultijumpPage 61: ProcessMultijump 62: ApplySuperPunchPage 63: ProcessSuperPunch 64: UpdateSocialObjectiveIcons 65: CleanupObjectiveIcon 66: ApplyMovementPage 67: DrawMovementMenu 68: ResetMenuPage 69: DrawNocturneMenu 70: ApplyNocturnePage 71: UpdateMoonlitAuras 72: CleanupMoonlitAura 73: ShowFateResult 74: CleanupFateResults 75: RefreshWhisperTarget 76: CloseCrouchTravel 77: Controller01a 78: Controller01b 79: Controller02 80: Controller03c 81: Controller03f 82: Controller03g 83: Controller03h 84: Controller05 85: Controller05b 86: Controller05c 87: Controller05d 88: Controller05e 89: Controller05f 90: Controller06 91: Controller08 92: Controller10 93: Controller11 94: Controller12c 95: Controller12d 96: Controller12f 97: Controller12g 98: Controller13 99: Controller18c 100: Controller18g 101: Controller18i 102: Controller18j 103: Controller18k 104: Controller19 105: Controller19a 106: Controller19b 107: Controller19c 108: Controller19d 109: Controller19e 110: Controller19f 111: Controller19h 112: Controller19g 113: NativeEvent03i 114: NativeEvent04 115: NativeEvent12e 116: NativeEvent16a 117: NativeEvent17 118: NativeEvent18f 119: NativeEvent89i1 120: ProcessGlobalController 121: ProcessGlobalEventQueue 122: ProcessGlobalLeaves 123: ProcessVisibleIcons } rule("0 - Global: Initialize 200 genres, from calm to chaos") { event { Ongoing - Global; } conditions { Global.IsReady == False; } actions { Global.GenreNames = Array(Custom String("Lowercase"), Custom String("Nature Ambient"), Custom String("Meditation Ambient"), Custom String("Drone Ambient"), Custom String("Space Ambient"), Custom String("Minimal Ambient"), Custom String("Ambient Piano"), Custom String("New Age"), Custom String("Neoclassical Ambient"), Custom String("Ethereal Ambient"), Custom String("Dark Ambient"), Custom String("Ritual Ambient"), Custom String("Dungeon Synth"), Custom String("Fourth World"), Custom String("Microsound"), Custom String("Onkyokei"), Custom String("Gregorian Chant"), Custom String("Shomyo"), Custom String("Gagaku"), Custom String("Holy Minimalism"), Custom String("Solo Piano"), Custom String("Classical Guitar"), Custom String("Chamber Music"), Custom String("Neoclassical"), Custom String("Acoustic Folk"), Custom String("Indie Folk"), Custom String("Easy Listening"), Custom String("Bossa Nova"), Custom String("Smooth Jazz"), Custom String("Cool Jazz"), Custom String("Traditional Folk"), Custom String("Contemporary Folk"), Custom String("Celtic Folk"), Custom String("Fado"), Custom String("Chanson"), Custom String("Bolero"), Custom String("Vocal Jazz"), Custom String("Chamber Jazz"), Custom String("Baroque Music"), Custom String("Renaissance Music"), Custom String("Lounge"), Custom String("Downtempo"), Custom String("Chillout"), Custom String("Lo-fi Hip-Hop"), Custom String("Chillwave"), Custom String("Dream Pop"), Custom String("Bedroom Pop"), Custom String("Slowcore"), Custom String("Psybient"), Custom String("Trip-Hop"), Custom String("Ambient Techno"), Custom String("Dub Techno"), Custom String("Balearic Beat"), Custom String("Future Garage"), Custom String("Chillstep"), Custom String("Nu Jazz"), Custom String("Folktronica"), Custom String("Indietronica"), Custom String("Illbient"), Custom String("Dreampunk"), Custom String("Vaporwave"), Custom String("Lovers Rock"), Custom String("Roots Reggae"), Custom String("Dub"), Custom String("Soft Rock"), Custom String("Neo-Soul"), Custom String("Soul"), Custom String("Contemporary R&B"), Custom String("Acid Jazz"), Custom String("City Pop"), Custom String("Hip-Hop"), Custom String("Jazz Rap"), Custom String("Boom Bap"), Custom String("Alternative Hip-Hop"), Custom String("Conscious Hip-Hop"), Custom String("Alternative R&B"), Custom String("Quiet Storm"), Custom String("Sophisti-Pop"), Custom String("Ska"), Custom String("Rocksteady"), Custom String("Jazz-Funk"), Custom String("Funk"), Custom String("Indie Pop"), Custom String("Art Pop"), Custom String("Synthpop"), Custom String("Electropop"), Custom String("Tropical House"), Custom String("Deep House"), Custom String("Nu-Disco"), Custom String("Disco"), Custom String("Synthwave"), Custom String("Afrobeat"), Custom String("Afrobeats"), Custom String("Dancehall"), Custom String("Reggaeton"), Custom String("Salsa"), Custom String("Cumbia"), Custom String("Swing"), Custom String("Electro Swing"), Custom String("Latin Pop"), Custom String("French House"), Custom String("Progressive House"), Custom String("UK Garage"), Custom String("Eurodance"), Custom String("Electro House"), Custom String("Acid House"), Custom String("Detroit Techno"), Custom String("Tech House"), Custom String("Trance"), Custom String("Psytrance"), Custom String("Trap"), Custom String("Moombahton"), Custom String("Bass House"), Custom String("Future House"), Custom String("Big Room House"), Custom String("Future Bass"), Custom String("Jersey Club"), Custom String("Amapiano"), Custom String("Gqom"), Custom String("Goa Trance"), Custom String("Indie Rock"), Custom String("Britpop"), Custom String("Shoegaze"), Custom String("Alternative Rock"), Custom String("Garage Rock"), Custom String("Grunge"), Custom String("Pop Punk"), Custom String("Hard Rock"), Custom String("Punk Rock"), Custom String("Post-Hardcore"), Custom String("Post-Rock"), Custom String("Progressive Rock"), Custom String("Psychedelic Rock"), Custom String("Stoner Rock"), Custom String("Gothic Rock"), Custom String("Post-Punk"), Custom String("New Wave"), Custom String("Math Rock"), Custom String("Surf Rock"), Custom String("Rap Rock"), Custom String("Hardcore Punk"), Custom String("Heavy Metal"), Custom String("Power Metal"), Custom String("Progressive Metal"), Custom String("Groove Metal"), Custom String("Nu Metal"), Custom String("Industrial Metal"), Custom String("Speed Metal"), Custom String("Thrash Metal"), Custom String("Metalcore"), Custom String("Doom Metal"), Custom String("Gothic Metal"), Custom String("Symphonic Metal"), Custom String("Folk Metal"), Custom String("Viking Metal"), Custom String("Stoner Metal"), Custom String("Sludge Metal"), Custom String("Post-Metal"), Custom String("Djent"), Custom String("Alternative Metal"), Custom String("Drum & Bass"), Custom String("Jungle"), Custom String("Dubstep"), Custom String("Riddim"), Custom String("Neurofunk"), Custom String("Hard Techno"), Custom String("Hardstyle"), Custom String("Hardcore Techno"), Custom String("Gabber"), Custom String("Digital Hardcore"), Custom String("Techstep"), Custom String("Jump-Up"), Custom String("Drumstep"), Custom String("Bassline"), Custom String("Grime"), Custom String("Industrial Techno"), Custom String("Acid Techno"), Custom String("UK Hard House"), Custom String("Hard Trance"), Custom String("Happy Hardcore"), Custom String("Deathcore"), Custom String("Death Metal"), Custom String("Brutal Death Metal"), Custom String("Black Metal"), Custom String("War Metal"), Custom String("Powerviolence"), Custom String("Grindcore"), Custom String("Breakcore"), Custom String("Harsh Noise"), Custom String("Extratone"), Custom String("Atmospheric Black Metal"), Custom String("Symphonic Black Metal"), Custom String("Melodic Death Metal"), Custom String("Technical Death Metal"), Custom String("Blackened Death Metal"), Custom String("Dissonant Death Metal"), Custom String("Slam Death Metal"), Custom String("Goregrind"), Custom String("Noisegrind"), Custom String("Splittercore")); Global.HumanPlayers = Empty Array; Global.SuperPunchPlayers = Empty Array; Global.SuperPunchTimes = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); Global.SuperPunchTarget = Null; Global.PlayerListHudIds = Empty Array; Global.MenuHudIds = Empty Array; Global.InspectionTextIds = Empty Array; Global.PlayerHudSlots = Empty Array; Global.LeavingPlayerIndex = -1; Global.LastHudSlot = -1; Global.VoteLeader = Null; Global.HighestVoteCount = 0; Global.VoteTied = False; Global.VoteLeaderName = Custom String(""); Global.VoteLeaderColor = Color(White); Global.VoterIndex = 0; Global.LeavingRevengeIndex = -1; Global.HeroSelectionSkipped = False; Global.SetupSkipped = False; Global.NameColors = Array(Color(White), Custom Color(190, 210, 230, 255), Custom Color(100, 110, 120, 255), Custom Color(0, 0, 0, 255), Custom Color(255, 245, 215, 255), Custom Color(218, 198, 142, 255), Custom Color(184, 150, 92, 255), Custom Color(218, 194, 167, 255), Custom Color(190, 132, 98, 255), Custom Color(166, 110, 78, 255), Custom Color(148, 112, 88, 255), Custom Color(198, 132, 128, 255), Custom Color(198, 72, 92, 255), Custom Color(146, 58, 82, 255), Custom Color(214, 164, 184, 255), Custom Color(182, 112, 146, 255), Custom Color(170, 76, 108, 255), Custom Color(148, 76, 122, 255), Custom Color(190, 178, 218, 255), Custom Color(176, 140, 190, 255), Custom Color(150, 118, 180, 255), Custom Color(128, 102, 164, 255), Custom Color(124, 82, 124, 255), Custom Color(174, 198, 218, 255), Custom Color(142, 170, 198, 255), Custom Color(164, 168, 206, 255), Custom Color(110, 142, 180, 255), Custom Color(94, 116, 164, 255), Custom Color(112, 108, 162, 255), Custom Color(50, 70, 120, 255), Custom Color(168, 204, 210, 255), Custom Color(104, 164, 172, 255), Custom Color(148, 190, 178, 255), Custom Color(164, 196, 176, 255), Custom Color(112, 166, 142, 255), Custom Color(86, 142, 138, 255), Custom Color(182, 190, 128, 255), Custom Color(142, 164, 102, 255), Custom Color(84, 148, 108, 255), Custom Color(65, 110, 76, 255)); Global.NameColorRGBValues = Array(Vector(255, 255, 255), Vector(190, 210, 230), Vector(100, 110, 120), Vector(0, 0, 0), Vector(255, 245, 215), Vector(218, 198, 142), Vector(184, 150, 92), Vector(218, 194, 167), Vector(190, 132, 98), Vector(166, 110, 78), Vector(148, 112, 88), Vector(198, 132, 128), Vector(198, 72, 92), Vector(146, 58, 82), Vector(214, 164, 184), Vector(182, 112, 146), Vector(170, 76, 108), Vector(148, 76, 122), Vector(190, 178, 218), Vector(176, 140, 190), Vector(150, 118, 180), Vector(128, 102, 164), Vector(124, 82, 124), Vector(174, 198, 218), Vector(142, 170, 198), Vector(164, 168, 206), Vector(110, 142, 180), Vector(94, 116, 164), Vector(112, 108, 162), Vector(50, 70, 120), Vector(168, 204, 210), Vector(104, 164, 172), Vector(148, 190, 178), Vector(164, 196, 176), Vector(112, 166, 142), Vector(86, 142, 138), Vector(182, 190, 128), Vector(142, 164, 102), Vector(84, 148, 108), Vector(65, 110, 76)); Global.ColorNames = Array(Custom String("Moon White"), Custom String("Silver Mist"), Custom String("Charcoal"), Custom String("Black"), Custom String("Ivory"), Custom String("Candlelight"), Custom String("Antique Gold"), Custom String("Faded Parchment"), Custom String("Autumn Ember"), Custom String("Burnished Copper"), Custom String("Sepia"), Custom String("Ashen Coral"), Custom String("Garnet"), Custom String("Wine Red"), Custom String("Withered Rose"), Custom String("Mourning Rose"), Custom String("Blood Rose"), Custom String("Mulberry"), Custom String("Moon Lavender"), Custom String("Dusk Orchid"), Custom String("Amethyst"), Custom String("Twilight Violet"), Custom String("Plum"), Custom String("Frost Blue"), Custom String("Moonlit Blue"), Custom String("Ghost Periwinkle"), Custom String("Storm Blue"), Custom String("Funeral Blue"), Custom String("Dusk Indigo"), Custom String("Midnight Blue"), Custom String("Pale Mist"), Custom String("Drowned Teal"), Custom String("Sea Glass"), Custom String("Grave Mint"), Custom String("Ashen Jade"), Custom String("Haunted Teal"), Custom String("Lichen Gold"), Custom String("Moss Green"), Custom String("Deep Emerald"), Custom String("Forest Green")); Global.MenuPageNames = Array(Custom String("THE SILENT CHAPEL"), Custom String("ELEGIES BY CANDLELIGHT"), Custom String("VEILS OF REVERIE"), Custom String("EMBERS OF LONGING"), Custom String("THE WAKING PULSE"), Custom String("RITES AFTER DUSK"), Custom String("THORNS AND STRINGS"), Custom String("CATHEDRALS OF IRON"), Custom String("TEMPEST OF SHADOWS"), Custom String("WHERE MELODY MEETS DEATH")); Global.PlayerIcons = Array(Custom String(""), Icon String(Arrow: Down), Icon String(Arrow: Left), Icon String(Arrow: Right), Icon String(Arrow: Up), Icon String(Asterisk), Icon String(Bolt), Icon String(Checkmark), Icon String(Circle), Icon String(Club), Icon String(Diamond), Icon String(Dizzy), Icon String(Exclamation Mark), Icon String(Eye), Icon String(Fire), Icon String(Flag), Icon String(Halo), Icon String(Happy), Icon String(Heart), Icon String(Moon), Icon String(No), Icon String(Plus), Icon String(Poison), Icon String(Poison 2), Icon String(Question Mark), Icon String(Radioactive), Icon String(Recycle), Icon String(Ring Thick), Icon String(Ring Thin), Icon String(Sad), Icon String(Skull), Icon String(Spade), Icon String(Spiral), Icon String(Stop), Icon String(Trashcan), Icon String(Warning), Icon String(X)); Global.IconNames = Array(Custom String("NONE"), Custom String("ARROW: DOWN"), Custom String("ARROW: LEFT"), Custom String("ARROW: RIGHT"), Custom String("ARROW: UP"), Custom String("ASTERISK"), Custom String("BOLT"), Custom String("CHECKMARK"), Custom String("CIRCLE"), Custom String("CLUB"), Custom String("DIAMOND"), Custom String("DIZZY"), Custom String("EXCLAMATION MARK"), Custom String("EYE"), Custom String("FIRE"), Custom String("FLAG"), Custom String("HALO"), Custom String("HAPPY"), Custom String("HEART"), Custom String("MOON"), Custom String("NO"), Custom String("PLUS"), Custom String("POISON"), Custom String("POISON 2"), Custom String("QUESTION MARK"), Custom String("RADIOACTIVE"), Custom String("RECYCLE"), Custom String("RING THICK"), Custom String("RING THIN"), Custom String("SAD"), Custom String("SKULL"), Custom String("SPADE"), Custom String("SPIRAL"), Custom String("STOP"), Custom String("TRASHCAN"), Custom String("WARNING"), Custom String("X")); Global.AvailableHudSlots = Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); Global.UnkillableIconIds = Mapped Array(Global.AvailableHudSlots, 0); Global.LuckIconIds = Mapped Array(Global.AvailableHudSlots, 0); Global.TemporaryTextOwners = Array(Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null); Global.TemporaryEffectHudIds = Mapped Array(Global.TemporaryTextOwners, 0); Global.TemporaryTravelTextIds = Mapped Array(Global.TemporaryTextOwners, 0); Global.TemporaryVisionTextIds = Mapped Array(Global.TemporaryTextOwners, 0); Global.TextCleanupIndex = -1; Global.TextCleanupPlayer = Null; Global.TextCleanupCursor = 0; Global.PresenceNames = Array(Custom String("Unspoken"), Custom String("Seeking company"), Custom String("Listening in silence"), Custom String("Lost in thought"), Custom String("Away beyond the veil")); Global.FateNames = Array(Custom String("MOON / ASH"), Custom String("SIX-SIDED DIE"), Custom String("TWENTY-SIDED DIE"), Custom String("PERCENTILE"), Custom String("DARK OMEN")); Global.WhisperNames = Array(Custom String("RECEIVE WHISPERS"), Custom String("GREETING"), Custom String("RESPECT"), Custom String("WITHERED ROSE"), Custom String("GENTLE EMBRACE"), Custom String("RESONANCE")); Global.AuraNames = Array(Custom String("NONE"), Custom String("MOONLIT RING"), Custom String("WITHERED HALO"), Custom String("VEIL OF ASH"), Custom String("HIDE OTHER AURAS")); Global.OmenLines = Array(Custom String("The raven remembers."), Custom String("Beneath the ash, an ember waits."), Custom String("The moon guards your silence."), Custom String("A lost melody returns."), Custom String("Thorns yield to patient hands."), Custom String("Even winter carries a song.")); Global.MoonlitAuraOwners = Mapped Array(Global.AvailableHudSlots, Null); Global.MoonlitAuraIds = Mapped Array(Global.AvailableHudSlots, 0); Global.MoonlitAuraChoices = Mapped Array(Global.AvailableHudSlots, 0); Global.MoonlitAuraColors = Mapped Array(Global.AvailableHudSlots, 0); Global.FateResultOwners = Mapped Array(Global.AvailableHudSlots, Null); Global.FateResultHudIds = Mapped Array(Global.AvailableHudSlots, 0); Global.FateResultDeadlines = Mapped Array(Global.AvailableHudSlots, 0); Global.WhisperPlayer = Null; Global.WhisperTarget = Null; Global.FateResultIndex = 0; Global.FateResultPlayer = Null; Global.MoonlitAuraIndex = 0; Global.MoonlitAuraPlayer = Null; Global.CameraPlayer = Null; Global.CameraDistance = 2.000; Global.CameraOffset = 0.550; Global.CameraWallPadding = 0.200; Global.AimDistance = 25; Global.ServerDurationMinutes = Workshop Setting Integer(Custom String("COZYWATCH"), Custom String("Duration (min)"), 30, 30, 60, 0); Global.PerformanceDiagnostics = Workshop Setting Toggle(Custom String("COZYWATCH"), Custom String("Diagnostics"), False, 2); Global.ServerEndTime = (Total Time Elapsed + (Global.ServerDurationMinutes * 60)); Global.ServerTimeRemaining = Max(0, Round To Integer((Global.ServerEndTime - Total Time Elapsed), Up)); Global.ServerTimeText = (((Global.ServerTimeRemaining % 60) < 10) ? Custom String("{0}:0{1}", Round To Integer((Global.ServerTimeRemaining / 60), Down), (Global.ServerTimeRemaining % 60)) : Custom String("{0}:{1}", Round To Integer((Global.ServerTimeRemaining / 60), Down), (Global.ServerTimeRemaining % 60))); Global.RestartRequested = False; Global.GameStartRequested = False; Global.ActivePlayer = Null; Global.SchedulerPlayerIndex = 0; Global.SchedulerStep = 0; Global.VoteRecountNeeded = False; Global.LuckVisionViewers = Empty Array; Global.TeamCyclePlayer = Null; Global.TeamCycleTime = 0; Global.ActiveDummyBotTeam = Team 1; Global.Team1DummyBotRetryTime = 0; Global.Team2DummyBotRetryTime = 0; Global.RGBPhase = 0; Global.RGB = Custom Color(255, 80, 80, 255); Disable Built-In Game Mode Announcer; Disable Built-In Game Mode Music; Disable Inspector Recording; Create HUD Text(Global.HumanPlayers, Null, ((Global.VoteLeaderName != Custom String("")) ? Custom String("\nCROWN OF ASH: {0}", Global.VoteLeaderName) : Custom String("")), Null, Left, 13, Color(White), Global.VoteLeaderColor, Color(White), Visible To String and Color, Visible Never); Create HUD Text(Global.HumanPlayers, Null, Null, Custom String("SOULS & ECHOES\n "), Left, 0, Color(White), Custom Color(198, 185, 210, 255), Custom Color(202, 164, 180, 255), Visible To and String, Visible Never); Create HUD Text(Global.HumanPlayers, Null, Custom String("cozywatch.org [{0}]", Global.ServerTimeText), (Entity Exists(Host Player) ? Custom String("\n{0} {1} {2}\n ", Custom String("Host:"), Hero Icon String(Hero Of(Host Player)), (And((Player Variable(Host Player, DisplayName) != Null), (Player Variable(Host Player, DisplayName) != Custom String(""))) ? Player Variable(Host Player, DisplayName) : Custom String("{0}", Host Player))) : Custom String("")), Right, 0, Color(White), Global.RGB, Global.RGB, Visible To String and Color, Visible Never); Global.ObjectiveIconOwners = Mapped Array(Global.AvailableHudSlots, Null); Global.ObjectiveIconIds = Mapped Array(Global.AvailableHudSlots, 0); Global.ObjectiveIconChoices = Mapped Array(Global.AvailableHudSlots, 0); Global.ObjectiveIconPlayer = Null; Global.ObjectiveIconTimes = Mapped Array(Global.AvailableHudSlots, 0); Global.ObjectiveIconIndex = 0; Global.TriggerPlayer = Null; Global.ControllerGeneration = 0; Global.TeamCyclePhase = 0; Global.TeamCyclePhaseTime = 0; Global.TeamCyclePhaseOwner = Null; Global.EventQueue = Empty Array; Global.EventQueueHead = 0; Global.EventQueueTail = 0; Global.EventCount = 0; Global.InitialEventCount = 0; Global.ActiveEvent = Null; Global.DroppedEventCount = 0; Global.PendingLeaves = Empty Array; Global.PendingLeaveCursor = 0; Global.MissingHudDeadlines = Empty Array; Global.MissingPlayerCursor = 0; Global.VisibleIconChoices = Empty Array; Global.IsReady = True; } } rule("1 - Global: Start the game immediately while waiting for players") { event { Ongoing - Global; } conditions { Global.IsReady == True; Global.GameStartRequested == False; Is Game In Progress == False; Is Waiting For Players == True; } actions { Global.GameStartRequested = True; Start Game Mode; } } rule("2 - Global: Skip hero selection") { event { Ongoing - Global; } conditions { Global.IsReady == True; Global.HeroSelectionSkipped == False; Count Of(Global.HumanPlayers) == 0; Global.TeamCyclePlayer == Null; Is Game In Progress == False; Is Assembling Heroes == True; } actions { Global.HeroSelectionSkipped = True; Set Match Time(0); } } rule("3 - Global: Skip initial setup") { event { Ongoing - Global; } conditions { Global.IsReady == True; Global.SetupSkipped == False; Count Of(Global.HumanPlayers) == 0; Global.TeamCyclePlayer == Null; Is Game In Progress == False; Is In Setup == True; } actions { Global.SetupSkipped = True; Set Match Time(0); } } rule("4 - Global: Lock initial phase skipping after the game starts") { event { Ongoing - Global; } conditions { Global.IsReady == True; Is Game In Progress == True; Or(Global.HeroSelectionSkipped == False, Global.SetupSkipped == False) == True; } actions { Global.HeroSelectionSkipped = True; Global.SetupSkipped = True; } } rule("5 - Global: Restart exactly once when the countdown ends") { event { Ongoing - Global; } conditions { Global.IsReady == True; Global.RestartRequested == False; Global.ServerTimeRemaining <= 0; } actions { Global.RestartRequested = True; Global.HeroSelectionSkipped = False; Global.SetupSkipped = False; Global.GameStartRequested = False; Restart Match; } } rule("6 - Team cycle: Quarantine before preparation") { event { Subroutine; Controller01a; } actions { Abort If(Not(And(Global.IsReady, And(Not(Is Dummy Bot(Global.TriggerPlayer)), And(Not(Global.TriggerPlayer.IsAutomaticBot), And(Array Contains(Global.HumanPlayers, Global.TriggerPlayer), (Global.TriggerPlayer.LastTeam != Team Of(Global.TriggerPlayer)))))))); Global.TriggerPlayer.PlayerListUpdatePending = False; Global.TriggerPlayer.TeamChangeProcessed = True; Global.TriggerPlayer.PlayerCycleActive = True; Global.TriggerPlayer.IsPrepared = False; Global.TriggerPlayer.IsHuman = False; Global.SuperPunchPlayers = Remove From Array(Global.SuperPunchPlayers, Global.TriggerPlayer); Global.TriggerPlayer.LastTeam = Team Of(Global.TriggerPlayer); Global.TriggerPlayer.TeamCycleTargetTeam = Team Of(Global.TriggerPlayer); Global.TriggerPlayer.TeamCycleDeadline = (Total Time Elapsed + 0.500); If((Global.TeamCyclePlayer == Global.TriggerPlayer)); Global.TeamCyclePlayer = Null; Global.TeamCycleTime = (Total Time Elapsed + 0.250); End; Global.TriggerPlayer.ControllerTimes[36] = Global.TriggerPlayer.ControllerState[36]; Global.TriggerPlayer.ControllerState = Empty Array; Global.TriggerPlayer.ControllerState[36] = Global.TriggerPlayer.ControllerTimes[36]; Global.TriggerPlayer.ControllerTimes = Empty Array; If((Global.TeamCyclePhaseOwner == Global.TriggerPlayer)); Global.TeamCyclePhaseOwner = Null; Global.TeamCyclePhase = 0; End; } } rule("7 - Team cycle: Preparation worker from the global scheduler") { event { Subroutine; Controller01b; } actions { Abort If(Not(And(Global.IsReady, And(Entity Exists(Global.TriggerPlayer), And(Not(Global.TriggerPlayer.IsHuman), And(Not(Is Dummy Bot(Global.TriggerPlayer)), And(Not(Global.TriggerPlayer.IsAutomaticBot), And(Global.TriggerPlayer.TeamChangeProcessed, And((Global.TeamCyclePlayer == Global.TriggerPlayer), And((Global.TriggerPlayer.TeamCycleTargetTeam == Team Of(Global.TriggerPlayer)), And(Has Spawned(Global.TriggerPlayer), And(Not(Global.TriggerPlayer.IsPrepared), (Total Time Elapsed >= Global.TriggerPlayer.TeamCycleDeadline))))))))))))); If((Global.TeamCyclePhaseOwner != Global.TriggerPlayer)); Global.TeamCyclePhaseOwner = Global.TriggerPlayer; Global.TeamCyclePhase = 0; Global.TeamCyclePhaseTime = 0; End; Abort If((Total Time Elapsed < Global.TeamCyclePhaseTime)); If((Global.TeamCyclePhase == 0)); Call Subroutine(QuiescePlayer); Global.TeamCyclePhase = 1; Global.TeamCyclePhaseTime = (Total Time Elapsed + 0.050); Else If((Global.TeamCyclePhase == 1)); Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If(Global.TriggerPlayer.IsAutomaticBot); Abort If(Not(Global.TriggerPlayer.TeamChangeProcessed)); Abort If((Global.TriggerPlayer.TeamCycleTargetTeam != Team Of(Global.TriggerPlayer))); Abort If(Global.TriggerPlayer.IsPrepared); If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Call Subroutine(CleanupPlayer); End; Global.TeamCyclePhase = 2; Global.TeamCyclePhaseTime = (Total Time Elapsed + 0.050); Else If((Global.TeamCyclePhase == 2)); Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If(Global.TriggerPlayer.IsAutomaticBot); Abort If(Not(Global.TriggerPlayer.TeamChangeProcessed)); Abort If((Global.TriggerPlayer.TeamCycleTargetTeam != Team Of(Global.TriggerPlayer))); Abort If(Global.TriggerPlayer.IsPrepared); Call Subroutine(PreparePlayer); Global.TeamCyclePhase = 3; End; If((Global.TeamCyclePhase == 3)); Global.TeamCyclePhaseOwner = Null; Global.TeamCyclePhase = 0; End; } } rule("8 - Player: Classify humans and automatic bots") { event { Subroutine; Controller02; } actions { If((Global.TriggerPlayer.ControllerState[2] == 2)); Abort If((Total Time Elapsed < Global.TriggerPlayer.ControllerTimes[2])); If(Or((Global.TriggerPlayer.LastTeam != Team Of(Global.TriggerPlayer)), (Global.TriggerPlayer.TeamCycleTargetTeam != Team Of(Global.TriggerPlayer)))); Stop Forcing Dummy Bot Name(Global.TriggerPlayer); Global.TriggerPlayer.IsClassified = False; Global.TriggerPlayer.ControllerState[2] = 0; Abort; End; Global.TriggerPlayer.ControllerState[2] = 1; Abort If(Not(Entity Exists(Global.TriggerPlayer))); If(Or(Not(Global.TriggerPlayer.IsPrepared), Not(Has Spawned(Global.TriggerPlayer)))); Stop Forcing Dummy Bot Name(Global.TriggerPlayer); Global.TriggerPlayer.IsClassified = False; Abort; End; If((Custom String("{0}", Global.TriggerPlayer) == Custom String("​"))); Global.TriggerPlayer.IsAutomaticBot = True; End; Stop Forcing Dummy Bot Name(Global.TriggerPlayer); Global.TriggerPlayer.ControllerState[2] = 3; Else; Abort If(Not(And(Global.IsReady, And(Not(Is Dummy Bot(Global.TriggerPlayer)), And(Not(Global.TriggerPlayer.IsAutomaticBot), And(Not(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)), And(Global.TriggerPlayer.IsPrepared, And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Has Spawned(Global.TriggerPlayer), And((Global.TriggerPlayer.LastTeam == Team Of(Global.TriggerPlayer)), And(Not(Global.TriggerPlayer.PlayerListUpdatePending), Not(Global.TriggerPlayer.IsClassified)))))))))))); Global.TriggerPlayer.IsClassified = True; Global.TriggerPlayer.IsAutomaticBot = False; Global.TriggerPlayer.IsHuman = False; Global.TriggerPlayer.NameColor = Color(White); If(And(Global.TriggerPlayer.WasPrepared, And((Global.TriggerPlayer.DisplayName != Null), (Global.TriggerPlayer.DisplayName != Custom String(""))))); Global.TriggerPlayer.ControllerState[2] = 3; Else; Start Forcing Dummy Bot Name(Evaluate Once(Global.TriggerPlayer), Custom String("​")); Global.TriggerPlayer.ControllerState[2] = 2; Global.TriggerPlayer.ControllerTimes[2] = (Total Time Elapsed + 0.016); End; End; If((Global.TriggerPlayer.ControllerState[2] == 3)); Global.TriggerPlayer.ControllerState[2] = 0; If(Global.TriggerPlayer.IsAutomaticBot); Global.TriggerPlayer.TeamChangeProcessed = False; Global.TriggerPlayer.PlayerCycleActive = False; Global.TriggerPlayer.TeamCycleDeadline = 0; If((Global.TeamCyclePlayer == Global.TriggerPlayer)); Global.TeamCyclePlayer = Null; Global.TeamCycleTime = (Total Time Elapsed + 0.250); End; Cancel Primary Action(Global.TriggerPlayer); Call Subroutine(LockBot); Abort; End; Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); If((Count Of(Global.AvailableHudSlots) == 0)); Global.TriggerPlayer.IsClassified = False; Global.TriggerPlayer.IsPrepared = False; Global.TriggerPlayer.TeamChangeProcessed = False; Global.TriggerPlayer.PlayerCycleActive = False; Global.TriggerPlayer.TeamCycleDeadline = (Total Time Elapsed + 0.250); If((Global.TeamCyclePlayer == Global.TriggerPlayer)); Global.TeamCyclePlayer = Null; Global.TeamCycleTime = (Total Time Elapsed + 0.250); End; Abort; End; If(Or(Not(Global.TriggerPlayer.WasPrepared), Or((Global.TriggerPlayer.DisplayName == Null), (Global.TriggerPlayer.DisplayName == Custom String(""))))); Global.TriggerPlayer.DisplayName = Evaluate Once(Custom String("{0}", Global.TriggerPlayer)); End; If(Or((Global.TriggerPlayer.DisplayName == Null), (Global.TriggerPlayer.DisplayName == Custom String("")))); Global.TriggerPlayer.IsClassified = False; Global.TriggerPlayer.IsPrepared = False; Global.TriggerPlayer.TeamCycleDeadline = (Total Time Elapsed + 0.250); If((Global.TeamCyclePlayer == Global.TriggerPlayer)); Global.TeamCyclePlayer = Null; Global.TeamCycleTime = (Total Time Elapsed + 0.250); End; Abort; End; Disable Game Mode HUD(Global.TriggerPlayer); Disable Game Mode In-World UI(Global.TriggerPlayer); Global.TriggerPlayer.GenreIndex = -1; Global.TriggerPlayer.ColorIndex = 0; Global.TriggerPlayer.NameColor = Global.NameColors[Global.TriggerPlayer.ColorIndex]; If((Global.TriggerPlayer.DisplayName == Custom String("งูแรร์"))); Global.TriggerPlayer.CustomSoundtrack = Custom String("Draconian"); Global.TriggerPlayer.ColorIndex = 2; Global.TriggerPlayer.ColorCursor = 2; Global.TriggerPlayer.NameColor = Global.NameColors[2]; Global.TriggerPlayer.MenuColor = Global.NameColorRGBValues[2]; Global.TriggerPlayer.IconIndex = 23; Global.TriggerPlayer.IconCursor = 23; End; Global.TriggerPlayer.HudSlot = First Of(Global.AvailableHudSlots); Global.MissingHudDeadlines[Global.TriggerPlayer.HudSlot] = 0; Global.SuperPunchTimes[Global.TriggerPlayer.HudSlot] = 0; Global.LastHudSlot = Max(Global.LastHudSlot, Global.TriggerPlayer.HudSlot); Modify Global Variable(AvailableHudSlots, Remove From Array By Index, 0); Global.HumanPlayers = Append To Array(Global.HumanPlayers, Global.TriggerPlayer); Disable Nameplates(Global.TriggerPlayer, Filtered Array(Global.HumanPlayers, Player Variable(Current Array Element, NameplatesDisabled))); Global.PlayerListHudIds = Append To Array(Global.PlayerListHudIds, 0); Global.MenuHudIds = Append To Array(Global.MenuHudIds, 0); Global.InspectionTextIds = Append To Array(Global.InspectionTextIds, 0); Global.PlayerHudSlots = Append To Array(Global.PlayerHudSlots, Global.TriggerPlayer.HudSlot); Global.TriggerPlayer.IsHuman = True; Global.TriggerPlayer.LastHero = Hero Of(Global.TriggerPlayer); Global.VoteRecountNeeded = True; Create HUD Text(Global.HumanPlayers, Null, Custom String("{0} {1} {2}", Global.PlayerIcons[Player Variable(Evaluate Once(Global.TriggerPlayer), IconIndex)], Hero Icon String((Is Duplicating(Evaluate Once(Global.TriggerPlayer)) ? Hero Being Duplicated(Evaluate Once(Global.TriggerPlayer)) : Hero Of(Evaluate Once(Global.TriggerPlayer)))), Custom String("{0} - {1}", Evaluate Once(Global.TriggerPlayer.DisplayName), ((Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[0] == 0) ? ((Player Variable(Evaluate Once(Global.TriggerPlayer), CustomSoundtrack) != Null) ? Player Variable(Evaluate Once(Global.TriggerPlayer), CustomSoundtrack) : ((Player Variable(Evaluate Once(Global.TriggerPlayer), GenreIndex) >= 0) ? Global.GenreNames[Player Variable(Evaluate Once(Global.TriggerPlayer), GenreIndex)] : Custom String("silence before the storm"))) : Custom String("{0} | {1}", ((Player Variable(Evaluate Once(Global.TriggerPlayer), CustomSoundtrack) != Null) ? Player Variable(Evaluate Once(Global.TriggerPlayer), CustomSoundtrack) : ((Player Variable(Evaluate Once(Global.TriggerPlayer), GenreIndex) >= 0) ? Global.GenreNames[Player Variable(Evaluate Once(Global.TriggerPlayer), GenreIndex)] : Custom String("silence before the storm"))), Global.PresenceNames[Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[0]])))), (And((Global.PerformanceDiagnostics == True), And((Local Player == Host Player), (Player Variable(Evaluate Once(Global.TriggerPlayer), HudSlot) == Global.LastHudSlot))) ? Custom String("{0}\n{1}", Custom String("\n \nLOAD {0}% | AVG {1}% | MAX {2}%", Server Load, Server Load Average, Server Load Peak), Custom String("HUD {0} | IWT {1}", ((((3 + Count Of(Filtered Array(Global.PlayerListHudIds, (Current Array Element != 0)))) + Count Of(Filtered Array(Global.MenuHudIds, (Current Array Element != 0)))) + Count Of(Filtered Array(Global.TemporaryEffectHudIds, (Current Array Element != 0)))) + Count Of(Filtered Array(Global.FateResultHudIds, (Current Array Element != 0)))), ((Count Of(Filtered Array(Global.InspectionTextIds, (Current Array Element != 0))) + Count Of(Filtered Array(Global.TemporaryTravelTextIds, (Current Array Element != 0)))) + Count Of(Filtered Array(Global.TemporaryVisionTextIds, (Current Array Element != 0)))))) : Custom String("")), Left, (1 + Player Variable(Evaluate Once(Global.TriggerPlayer), HudSlot)), Color(White), Player Variable(Evaluate Once(Global.TriggerPlayer), NameColor), Color(White), Visible To String and Color, Visible Never); Global.TriggerPlayer.PlayerListHud = Last Text ID; If(And((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0), (Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.PlayerListHudIds)))); Global.PlayerListHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = Global.TriggerPlayer.PlayerListHud; End; Global.TriggerPlayer.PlayerHudCreated = True; Global.TriggerPlayer.MainMenuCursor = 0; Global.TriggerPlayer.MenuPage = -1; Global.TriggerPlayer.MenuOpen = True; Call Subroutine(DrawMenu); Small Message(Global.TriggerPlayer, Custom String("Enter the Nocturne.")); End; } } rule("9 - Bot: Lock on respawn or hero change") { event { Subroutine; Controller03c; } actions { Abort If(Not(And(Global.IsReady, And(Or(Is Dummy Bot(Global.TriggerPlayer), Global.TriggerPlayer.IsAutomaticBot), And(Has Spawned(Global.TriggerPlayer), And(Is Alive(Global.TriggerPlayer), Or(Not(Global.TriggerPlayer.BotLocked), (Hero Of(Global.TriggerPlayer) != Global.TriggerPlayer.LastHero)))))))); Call Subroutine(LockBot); If(Is Dummy Bot(Global.TriggerPlayer)); Global.TriggerPlayer.DummyBotTravelTime = (Total Time Elapsed + 1); Global.TriggerPlayer.DummyBotTravelCursor = 0; Set Respawn Max Time(Global.TriggerPlayer, 3); End; } } rule("10 - Subroutine: Maintain dummy bot slots for both teams at 1 Hz") { event { Subroutine; MaintainDummyBots; } actions { Abort If(Not(Global.IsReady)); Abort If(Not(Is Game In Progress)); Abort If((Global.TeamCyclePlayer != Null)); If((Number Of Players(Team 1) >= Number Of Slots(Team 1))); If((Count Of(Filtered Array(All Players(Team 1), Is Dummy Bot(Current Array Element))) > 0)); Global.ActiveDummyBotTeam = Team 1; Global.Team1DummyBotRetryTime = (Total Time Elapsed + 1); Call Subroutine(RemoveTeamDummyBot); End; Else; If(And((Current Game Mode == Game Mode(Skirmish)), And((Number Of Players(Team 1) < (Number Of Slots(Team 1) - 1)), And((Count Of(Spawn Points(Team 1)) > 0), And((Count Of(Filtered Array(All Players(Team 1), Is Dummy Bot(Current Array Element))) == 0), (Total Time Elapsed >= Global.Team1DummyBotRetryTime)))))); Global.ActiveDummyBotTeam = Team 1; Global.Team1DummyBotRetryTime = (Total Time Elapsed + 1); Call Subroutine(CreateTeamDummyBot); End; End; If((Number Of Players(Team 2) >= Number Of Slots(Team 2))); If((Count Of(Filtered Array(All Players(Team 2), Is Dummy Bot(Current Array Element))) > 0)); Global.ActiveDummyBotTeam = Team 2; Global.Team2DummyBotRetryTime = (Total Time Elapsed + 1); Call Subroutine(RemoveTeamDummyBot); End; Else; If(And((Current Game Mode == Game Mode(Skirmish)), And((Number Of Players(Team 2) < (Number Of Slots(Team 2) - 1)), And((Count Of(Spawn Points(Team 2)) > 0), And((Count Of(Filtered Array(All Players(Team 2), Is Dummy Bot(Current Array Element))) == 0), (Total Time Elapsed >= Global.Team2DummyBotRetryTime)))))); Global.ActiveDummyBotTeam = Team 2; Global.Team2DummyBotRetryTime = (Total Time Elapsed + 1); Call Subroutine(CreateTeamDummyBot); End; End; } } rule("11 - Bot: Travel from spawn to the objective") { event { Subroutine; Controller03f; } actions { Abort If(Not(And(Global.IsReady, And(Is Dummy Bot(Global.TriggerPlayer), And((Current Game Mode == Game Mode(Skirmish)), And(Has Spawned(Global.TriggerPlayer), And(Is Alive(Global.TriggerPlayer), And(Is In Spawn Room(Global.TriggerPlayer), And((Count Of(Spawn Points(Team Of(Global.TriggerPlayer))) > 0), Or((Global.TriggerPlayer.DummyBotTravelTime == 0), (Total Time Elapsed >= Global.TriggerPlayer.DummyBotTravelTime))))))))))); If((Global.TriggerPlayer.DummyBotTravelTime == 0)); Global.TriggerPlayer.DummyBotTravelTime = (Total Time Elapsed + 1); Global.TriggerPlayer.DummyBotTravelCursor = 0; Abort; End; Global.TriggerPlayer.DummyBotTravelTime = (Total Time Elapsed + 1); Global.TriggerPlayer.DeathPosition = Objective Position(Objective Index); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); If((Distance Between(Global.TriggerPlayer.DeathPosition, Vector(0, 0, 0)) > 0.100)); Global.TriggerPlayer.SafeRevivePosition = Nearest Walkable Position((Global.TriggerPlayer.DeathPosition + (Direction From Angles((Horizontal Angle From Direction(Direction Towards(Global.TriggerPlayer.DeathPosition, Position Of(First Of(Spawn Points(Team Of(Global.TriggerPlayer)))))) + ((Global.TriggerPlayer.DummyBotTravelCursor % 8) * 45)), 0) * ((Global.TriggerPlayer.DummyBotTravelCursor < 8) ? 8 : 12)))); Global.TriggerPlayer.TravelDestination = Global.TriggerPlayer.SafeRevivePosition; Global.TriggerPlayer.DummyBotTravelCursor = ((Global.TriggerPlayer.DummyBotTravelCursor + 1) % 16); Call Subroutine(FindSafeTravelPosition); If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Global.TriggerPlayer.DeathPosition) >= 6)); If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Global.TriggerPlayer.DeathPosition) <= 16)); If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 5, 0)), (Global.TriggerPlayer.SafeRevivePosition - Vector(0, 20, 0)), Empty Array, Empty Array, False), Global.TriggerPlayer.SafeRevivePosition) <= 6)); If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) > 0.100)); Teleport(Global.TriggerPlayer, Global.TriggerPlayer.SafeRevivePosition); End; End; End; End; End; } } rule("12 - Bot: Stand still and face the nearest eligible enemy human") { event { Subroutine; Controller03g; } actions { If(Not(And(Global.IsReady, And(Is Dummy Bot(Global.TriggerPlayer), And(Has Spawned(Global.TriggerPlayer), And(Is Alive(Global.TriggerPlayer), And((Global.TriggerPlayer.DummyBotFollowTarget != Null), And(Entity Exists(Global.TriggerPlayer.DummyBotFollowTarget), And(Player Variable(Global.TriggerPlayer.DummyBotFollowTarget, IsHuman), And(Player Variable(Global.TriggerPlayer.DummyBotFollowTarget, AllowDummyBotFollow), And(Has Spawned(Global.TriggerPlayer.DummyBotFollowTarget), And(Is Alive(Global.TriggerPlayer.DummyBotFollowTarget), (Team Of(Global.TriggerPlayer.DummyBotFollowTarget) == Opposite Team Of(Team Of(Global.TriggerPlayer))))))))))))))); Global.TriggerPlayer.ControllerState[5] = 0; Abort; End; Abort If((Global.TriggerPlayer.ControllerState[5] == 1)); Global.TriggerPlayer.ControllerState[5] = 1; Start Facing(Evaluate Once(Global.TriggerPlayer), Direction Towards(Eye Position(Evaluate Once(Global.TriggerPlayer)), Eye Position(Player Variable(Evaluate Once(Global.TriggerPlayer), DummyBotFollowTarget))), 1000, To World, Direction and Turn Rate); Stop Throttle In Direction(Global.TriggerPlayer); } } rule("13 - Bot: Stop moving when no enemy human is alive") { event { Subroutine; Controller03h; } actions { If(Not(And(Global.IsReady, And(Is Dummy Bot(Global.TriggerPlayer), Or(Or(Or((Global.TriggerPlayer.DummyBotFollowTarget == Null), Not(Entity Exists(Global.TriggerPlayer.DummyBotFollowTarget))), Or(Not(Player Variable(Global.TriggerPlayer.DummyBotFollowTarget, IsHuman)), Not(Player Variable(Global.TriggerPlayer.DummyBotFollowTarget, AllowDummyBotFollow)))), Or(Or(Not(Has Spawned(Global.TriggerPlayer.DummyBotFollowTarget)), Not(Is Alive(Global.TriggerPlayer.DummyBotFollowTarget))), (Team Of(Global.TriggerPlayer.DummyBotFollowTarget) != Opposite Team Of(Team Of(Global.TriggerPlayer))))))))); Global.TriggerPlayer.ControllerState[6] = 0; Abort; End; Abort If((Global.TriggerPlayer.ControllerState[6] == 1)); Global.TriggerPlayer.ControllerState[6] = 1; Stop Facing(Global.TriggerPlayer); Stop Throttle In Direction(Global.TriggerPlayer); } } rule("14 - Bot: Stop moving on death") { event { Player Died; All; All; } conditions { Is Dummy Bot(Event Player) == True; Is Alive(Event Player) == False; } actions { If((Global.EventCount < 256)); Global.EventQueue[Global.EventQueueTail] = Array(0, Event Player, Null, Null, Null, Null, Null, Total Time Elapsed, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Hero Of(Event Player), Team Of(Event Player), Event Player.ControllerState[36], (Event Player.IsHuman ? Event Player.DisplayName : Custom String("{0}", Event Player))); Global.EventQueueTail = ((Global.EventQueueTail + 1) % 256); Global.EventCount += 1; Else; Global.DroppedEventCount += 1; End; } } rule("15 - Bot: Stop moving on death global") { event { Subroutine; NativeEvent03i; } actions { Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If((Global.ActiveEvent[20] != Global.TriggerPlayer.ControllerState[36])); Abort If((Global.ActiveEvent[21] != (Global.TriggerPlayer.IsHuman ? Global.TriggerPlayer.DisplayName : Custom String("{0}", Global.TriggerPlayer)))); Abort If(Is Alive(Global.TriggerPlayer)); Stop Facing(Global.TriggerPlayer); Stop Throttle In Direction(Global.TriggerPlayer); Global.TriggerPlayer.DummyBotTravelTime = 0; Global.TriggerPlayer.DummyBotTravelCursor = 0; Global.TriggerPlayer.DummyBotFollowTarget = Null; } } rule("16 - Player left: Clean up only after an actual departure") { event { Player Left Match; All; All; } conditions { Is Dummy Bot(Event Player) == False; Or(Event Player.IsAutomaticBot == True, Or(Event Player.IsHuman == True, Array Contains(Global.HumanPlayers, Event Player))) == True; } actions { If((Global.EventCount < 256)); Global.EventQueue[Global.EventQueueTail] = Array(1, Event Player, Null, Null, Null, Null, Null, Total Time Elapsed, Null, Null, Null, Null, Event Player.IsAutomaticBot); Global.EventQueueTail = ((Global.EventQueueTail + 1) % 256); Global.EventCount += 1; Else; Global.DroppedEventCount += 1; End; } } rule("17 - Player left: Clean up only after an actual departure global") { event { Subroutine; NativeEvent04; } actions { If(Global.ActiveEvent[12]); Global.TextCleanupPlayer = Global.TriggerPlayer; Call Subroutine(CleanupOrphanedText); Else; Global.PendingLeaveCursor = Index Of Array Value(Global.PendingLeaves, Null); If((Global.PendingLeaveCursor < 0)); Global.PendingLeaveCursor = Count Of(Global.PendingLeaves); End; If((Global.PendingLeaveCursor < 24)); Global.PendingLeaves[Global.PendingLeaveCursor] = Global.ActiveEvent; Else; Global.DroppedEventCount += 1; End; End; } } rule("18 - Global main loop: Central scheduler at 20 Hz") { event { Ongoing - Global; } conditions { Global.IsReady == True; } actions { Global.PlayerListSnapshot = All Players(All Teams); Call Subroutine(ProcessGlobalEventQueue); Call Subroutine(ProcessGlobalLeaves); Global.SchedulerStep = ((Global.SchedulerStep + 1) % 200); If(((Global.SchedulerStep % 2) == 0)); Global.RGB = Custom Color((80 + (((Global.RGBPhase < 255) ? 255 : ((Global.RGBPhase < 510) ? (510 - Global.RGBPhase) : ((Global.RGBPhase < 1020) ? 0 : ((Global.RGBPhase < 1275) ? (Global.RGBPhase - 1020) : 255)))) * 0.686)), (80 + (((Global.RGBPhase < 255) ? Global.RGBPhase : ((Global.RGBPhase < 765) ? 255 : ((Global.RGBPhase < 1020) ? (1020 - Global.RGBPhase) : 0))) * 0.686)), (80 + (((Global.RGBPhase < 510) ? 0 : ((Global.RGBPhase < 765) ? (Global.RGBPhase - 510) : ((Global.RGBPhase < 1275) ? 255 : (1530 - Global.RGBPhase)))) * 0.686)), 255); Global.RGBPhase = ((Global.RGBPhase + 3) % 1530); End; If(And(((Global.SchedulerStep % 20) == 0), Not(Global.RestartRequested))); Global.ServerTimeRemaining = Max(0, Round To Integer((Global.ServerEndTime - Total Time Elapsed), Up)); Global.ServerTimeText = (((Global.ServerTimeRemaining % 60) < 10) ? Custom String("{0}:0{1}", Round To Integer((Global.ServerTimeRemaining / 60), Down), (Global.ServerTimeRemaining % 60)) : Custom String("{0}:{1}", Round To Integer((Global.ServerTimeRemaining / 60), Down), (Global.ServerTimeRemaining % 60))); If(And(Is Game In Progress, (Global.ServerTimeRemaining > 0))); Disable Built-In Game Mode Completion; Set Match Time(Max(1, Global.ServerTimeRemaining)); End; End; If(And((Global.TeamCyclePlayer != Null), Or(Not(Entity Exists(Global.TeamCyclePlayer)), Or(Not(Has Spawned(Global.TeamCyclePlayer)), Not(Array Contains(Global.PlayerListSnapshot, Global.TeamCyclePlayer)))))); Global.TeamCyclePlayer = Null; Global.TeamCyclePhaseOwner = Null; Global.TeamCycleTime = (Total Time Elapsed + 0.250); End; If(Is True For Any(Global.PlayerListSnapshot, Player Variable(Current Array Element, LuckPrivacyActive))); Global.LuckVisionViewers = Filtered Array(Global.PlayerListSnapshot, And(Entity Exists(Current Array Element), And(Player Variable(Current Array Element, IsHuman), Player Variable(Current Array Element, LuckPrivacyActive)))); Else; If((Count Of(Global.LuckVisionViewers) > 0)); Global.LuckVisionViewers = Empty Array; End; End; For Global Variable(SchedulerPlayerIndex, 0, Count Of(Global.PlayerListSnapshot), 1); Global.ActivePlayer = Global.PlayerListSnapshot[Global.SchedulerPlayerIndex]; Global.TriggerPlayer = Global.ActivePlayer; Call Subroutine(ProcessGlobalController); If(And(Not(Is Dummy Bot(Global.ActivePlayer)), Not(Global.ActivePlayer.IsAutomaticBot))); Call Subroutine(ProcessPlayerFastState); If(Array Contains(Global.SuperPunchPlayers, Global.ActivePlayer)); Call Subroutine(ProcessSuperPunch); End; If(Global.ActivePlayer.MultijumpEnabled); Call Subroutine(ProcessMultijump); End; If(Or(Global.ActivePlayer.LuckActive, Or((Global.ActivePlayer.LuckSpinCount > 0), Or((Global.ActivePlayer.LuckEffect != 0), (Global.ActivePlayer.LuckIconEndTime > 0))))); Call Subroutine(ProcessPlayerLuck); End; If(And(Global.ActivePlayer.IsHuman, Global.ActivePlayer.FlyModeActive)); Call Subroutine(ProcessPlayerFlight); End; If(((Global.SchedulerStep % 2) == ((Global.ActivePlayer.IsHuman ? Global.ActivePlayer.HudSlot : Slot Of(Global.ActivePlayer)) % 2))); Call Subroutine(ProcessPlayerCycle); End; If(((Global.SchedulerStep % 20) == ((Global.ActivePlayer.IsHuman ? Global.ActivePlayer.HudSlot : Slot Of(Global.ActivePlayer)) % 20))); If(Not(Global.ActivePlayer.AutoHeroSelectionComplete)); If(Has Spawned(Global.ActivePlayer)); Global.ActivePlayer.AutoHeroSelectionComplete = True; Global.ActivePlayer.AutoHeroSelectionDeadline = 0; Else; If(Or((Team Of(Global.ActivePlayer) == Team 1), (Team Of(Global.ActivePlayer) == Team 2))); If(And((Global.ActivePlayer.AutoHeroSelectionDeadline > 0), (Total Time Elapsed >= Global.ActivePlayer.AutoHeroSelectionDeadline))); Global.ActivePlayer.AutoHeroSelectionComplete = True; Global.ActivePlayer.AutoHeroSelectionDeadline = 0; Start Forcing Player To Be Hero(Evaluate Once(Global.ActivePlayer), Hero(Shion)); Stop Forcing Player To Be Hero(Global.ActivePlayer); End; Else; Global.ActivePlayer.AutoHeroSelectionDeadline = 0; End; End; End; If(And(Global.ActivePlayer.IsHuman, Or(Global.ActivePlayer.AllowDummyBotFollow, And(Global.ActivePlayer.MenuOpen, Or((Global.ActivePlayer.MenuPage == 2), (Global.ActivePlayer.MenuPage == 4)))))); Call Subroutine(ProcessPlayerMaintenance); End; End; Else; If(((Global.SchedulerStep % 2) == (Slot Of(Global.ActivePlayer) % 2))); Call Subroutine(ProcessPlayerBot); End; End; End; Global.TriggerPlayer = Null; Global.ActivePlayer = Null; Global.PlayerListSnapshot = Empty Array; If(((Global.SchedulerStep % 20) == 0)); Call Subroutine(MaintainDummyBots); Call Subroutine(UpdateSocialObjectiveIcons); Call Subroutine(UpdateMoonlitAuras); Global.FateResultPlayer = Null; Call Subroutine(CleanupFateResults); Global.TextCleanupPlayer = Null; Call Subroutine(CleanupOrphanedText); End; Call Subroutine(ProcessVisibleIcons); If(Global.VoteRecountNeeded); Global.VoteRecountNeeded = False; Call Subroutine(RecountVotes); End; Wait(0.050, Ignore Condition); Loop If Condition Is True; } } rule("19 - Menu: Crouch + Melee opens or closes immediately") { event { Subroutine; Controller05; } actions { Abort If(Not(And(Is Alive(Global.TriggerPlayer), And(Not(Global.TriggerPlayer.MeleeConsumed), And(Not(Global.TriggerPlayer.LuckActive), And(Is Button Held(Global.TriggerPlayer, Button(Crouch)), Is Button Held(Global.TriggerPlayer, Button(Melee)))))))); Global.TriggerPlayer.MeleeConsumed = True; If(Global.TriggerPlayer.MenuOpen); Call Subroutine(CloseMenu); Else; If(Global.TriggerPlayer.CrouchTravelActive); Call Subroutine(CloseCrouchTravel); End; Global.TriggerPlayer.MenuOpen = True; Global.TriggerPlayer.MenuPage = -1; Call Subroutine(DrawMenu); End; } } rule("20 - Menu: Release Melee before using it again") { event { Subroutine; Controller05b; } actions { Abort If(Not(And(Global.TriggerPlayer.MeleeConsumed, Not(Is Button Held(Global.TriggerPlayer, Button(Melee)))))); If(Not(Global.TriggerPlayer.MenuOpen)); Allow Button(Global.TriggerPlayer, Button(Melee)); End; Global.TriggerPlayer.MeleeConsumed = False; } } rule("21 - Menu: Input controller with fixed priority") { event { Subroutine; Controller05c; } actions { Abort If(Not(And(Is Alive(Global.TriggerPlayer), And(Global.TriggerPlayer.MenuOpen, And(Is Button Held(Global.TriggerPlayer, Button(Crouch)), And((Global.TriggerPlayer.MenuCommand == 0), And(Not(Global.TriggerPlayer.CameraInteractConsumed), And(Not(Global.TriggerPlayer.LuckActive), Or(Or(Or(Is Button Held(Global.TriggerPlayer, Button(Interact)), And(Is Button Held(Global.TriggerPlayer, Button(Reload)), (Global.TriggerPlayer.MenuPage != -1))), Or(Or(Is Button Held(Global.TriggerPlayer, Button(Primary Fire)), Is Button Held(Global.TriggerPlayer, Button(Secondary Fire))), And((Global.TriggerPlayer.MenuPage == 3), Or(Is Button Held(Global.TriggerPlayer, Button(Ability 1)), Is Button Held(Global.TriggerPlayer, Button(Ability 2)))))), Is Button Held(Global.TriggerPlayer, Button(Ultimate))))))))))); If(Is Button Held(Global.TriggerPlayer, Button(Interact))); Global.TriggerPlayer.CameraInteractConsumed = True; Global.TriggerPlayer.MenuCommand = 1; Else If(And(Is Button Held(Global.TriggerPlayer, Button(Reload)), (Global.TriggerPlayer.MenuPage != -1))); Global.TriggerPlayer.MenuCommand = 2; Else If(Is Button Held(Global.TriggerPlayer, Button(Primary Fire))); Global.TriggerPlayer.MenuCommand = 3; Else If(Is Button Held(Global.TriggerPlayer, Button(Secondary Fire))); Global.TriggerPlayer.MenuCommand = 4; Else If(And(Is Button Held(Global.TriggerPlayer, Button(Ability 1)), (Global.TriggerPlayer.MenuPage == 3))); Global.TriggerPlayer.MenuCommand = 5; Else If(And(Is Button Held(Global.TriggerPlayer, Button(Ability 2)), (Global.TriggerPlayer.MenuPage == 3))); Global.TriggerPlayer.MenuCommand = 6; Else If(Is Button Held(Global.TriggerPlayer, Button(Ultimate))); Global.TriggerPlayer.MenuCommand = 7; End; } } rule("22 - Menu: Release the controller after all inputs are released") { event { Subroutine; Controller05d; } actions { Abort If(Not(And((Global.TriggerPlayer.MenuCommand != 0), And(And(And(Not(Is Button Held(Global.TriggerPlayer, Button(Interact))), Not(Is Button Held(Global.TriggerPlayer, Button(Reload)))), And(And(Not(Is Button Held(Global.TriggerPlayer, Button(Primary Fire))), Not(Is Button Held(Global.TriggerPlayer, Button(Secondary Fire)))), And(Not(Is Button Held(Global.TriggerPlayer, Button(Ability 1))), Not(Is Button Held(Global.TriggerPlayer, Button(Ability 2)))))), Not(Is Button Held(Global.TriggerPlayer, Button(Ultimate))))))); If(And((Global.TriggerPlayer.MenuCommand == 8), Not(Global.TriggerPlayer.MenuInputLocked))); Allow Button(Global.TriggerPlayer, Button(Ultimate)); End; Global.TriggerPlayer.MenuCommand = 0; } } rule("23 - Menu: Crouch locks hero inputs only during navigation") { event { Subroutine; Controller05e; } actions { Abort If(Not(And(Global.TriggerPlayer.MenuOpen, And(Not(Global.TriggerPlayer.MenuInputLocked), Is Button Held(Global.TriggerPlayer, Button(Crouch)))))); Global.TriggerPlayer.MenuInputLocked = True; Disallow Button(Global.TriggerPlayer, Button(Primary Fire)); Disallow Button(Global.TriggerPlayer, Button(Secondary Fire)); Disallow Button(Global.TriggerPlayer, Button(Interact)); Disallow Button(Global.TriggerPlayer, Button(Reload)); Disallow Button(Global.TriggerPlayer, Button(Ability 1)); Disallow Button(Global.TriggerPlayer, Button(Ability 2)); Disallow Button(Global.TriggerPlayer, Button(Ultimate)); } } rule("24 - Menu: Release Crouch and immediately restore hero inputs") { event { Subroutine; Controller05f; } actions { Abort If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Global.TriggerPlayer.MenuInputLocked, Or(Not(Global.TriggerPlayer.MenuOpen), Not(Is Button Held(Global.TriggerPlayer, Button(Crouch))))))))); Allow Button(Global.TriggerPlayer, Button(Primary Fire)); Allow Button(Global.TriggerPlayer, Button(Secondary Fire)); Allow Button(Global.TriggerPlayer, Button(Interact)); Allow Button(Global.TriggerPlayer, Button(Reload)); Allow Button(Global.TriggerPlayer, Button(Ability 1)); Allow Button(Global.TriggerPlayer, Button(Ability 2)); If(Or((Global.TriggerPlayer.MenuCommand != 8), Not(Is Button Held(Global.TriggerPlayer, Button(Ultimate))))); Allow Button(Global.TriggerPlayer, Button(Ultimate)); Global.TriggerPlayer.MenuCommand = 0; End; Global.TriggerPlayer.MenuInputLocked = False; } } rule("25 - Menu: Navigate forward and backward") { event { Subroutine; Controller06; } actions { If(Not(And(Is Alive(Global.TriggerPlayer), And(Global.TriggerPlayer.MenuOpen, Or((Global.TriggerPlayer.MenuCommand == 3), (Global.TriggerPlayer.MenuCommand == 4)))))); Global.TriggerPlayer.ControllerState[13] = 0; Abort; End; Abort If((Global.TriggerPlayer.ControllerState[13] == 1)); Global.TriggerPlayer.ControllerState[13] = 1; If((Global.TriggerPlayer.MenuPage == -1)); Global.TriggerPlayer.MainMenuCursor = ((Global.TriggerPlayer.MainMenuCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : 20)) % 21); Else If((Global.TriggerPlayer.MenuPage == 1)); Global.TriggerPlayer.ColorCursor = ((Global.TriggerPlayer.ColorCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : (Count Of(Global.NameColors) - 1))) % Count Of(Global.NameColors)); Else If((Global.TriggerPlayer.MenuPage == 2)); Call Subroutine(RefreshCameraTargets); Global.TriggerPlayer.CameraCursor = ((Global.TriggerPlayer.CameraCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : (Count Of(Global.TriggerPlayer.CameraTargets) + 1))) % (Count Of(Global.TriggerPlayer.CameraTargets) + 2)); Else If(And((Global.TriggerPlayer.MenuPage == 3), (Global.TriggerPlayer.CustomSoundtrack == Null))); Global.TriggerPlayer.GenreCursor = ((Global.TriggerPlayer.GenreCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : (Count Of(Global.GenreNames) - 1))) % Count Of(Global.GenreNames)); Else If((Global.TriggerPlayer.MenuPage == 4)); Call Subroutine(RefreshRevengeTargets); If((Count Of(Global.TriggerPlayer.RevengeTargets) > 0)); Global.TriggerPlayer.RevengeCursor = ((Global.TriggerPlayer.RevengeCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : (Count Of(Global.TriggerPlayer.RevengeTargets) - 1))) % Count Of(Global.TriggerPlayer.RevengeTargets)); End; Else If((Global.TriggerPlayer.MenuPage == 5)); Global.TriggerPlayer.UnkillableCursor = ((Global.TriggerPlayer.UnkillableCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : 2)) % 3); Else If((Global.TriggerPlayer.MenuPage == 6)); Global.TriggerPlayer.VoiceCursor = ((Global.TriggerPlayer.VoiceCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : 4)) % 5); Else If((Global.TriggerPlayer.MenuPage == 7)); Global.TriggerPlayer.IconCursor = ((Global.TriggerPlayer.IconCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : Count Of(Global.PlayerIcons))) % (Count Of(Global.PlayerIcons) + 1)); Else If((Global.TriggerPlayer.MenuPage == 11)); If((Count Of(Global.HumanPlayers) > 0)); Global.TriggerPlayer.VoteCursor = ((Global.TriggerPlayer.VoteCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : (Count Of(Global.HumanPlayers) - 1))) % Count Of(Global.HumanPlayers)); End; Else If((Global.TriggerPlayer.MenuPage == 13)); Global.TriggerPlayer.GhostFlyCursor = ((Global.TriggerPlayer.GhostFlyCursor + 1) % 2); Else If((Global.TriggerPlayer.MenuPage == 14)); Global.TriggerPlayer.MultijumpCursor = ((Global.TriggerPlayer.MultijumpCursor + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : 10)) % 11); Else If((Global.TriggerPlayer.MenuPage == 17)); Global.TriggerPlayer.NocturneState[1] = ((Global.TriggerPlayer.NocturneState[1] + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : 4)) % 5); Else If((Global.TriggerPlayer.MenuPage == 18)); Global.TriggerPlayer.NocturneState[2] = ((Global.TriggerPlayer.NocturneState[2] + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : 4)) % 5); Else If((Global.TriggerPlayer.MenuPage == 19)); Global.TriggerPlayer.NocturneState[4] = ((Global.TriggerPlayer.NocturneState[4] + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : 5)) % 6); Else If((Global.TriggerPlayer.MenuPage == 20)); Global.TriggerPlayer.NocturneState[7] = ((Global.TriggerPlayer.NocturneState[7] + ((Global.TriggerPlayer.MenuCommand == 3) ? 1 : 4)) % 5); Else If((Global.TriggerPlayer.MenuPage == 16)); If((Global.TriggerPlayer.MovementCursor == 0)); Global.TriggerPlayer.MovementSpeed = Min(1000, Max(20, (Global.TriggerPlayer.MovementSpeed + ((Global.TriggerPlayer.MenuCommand == 3) ? ((Global.TriggerPlayer.MovementSpeed < 100) ? 20 : 100) : ((Global.TriggerPlayer.MovementSpeed <= 100) ? -20 : -100))))); Else; Global.TriggerPlayer.MovementGravity = Min(500, Max(0, (Global.TriggerPlayer.MovementGravity + ((Global.TriggerPlayer.MenuCommand == 3) ? ((Global.TriggerPlayer.MovementGravity < 100) ? 20 : 100) : ((Global.TriggerPlayer.MovementGravity <= 100) ? -20 : -100))))); End; Call Subroutine(ApplyGhostFlyPhysics); End; Call Subroutine(TransitionMenuColor); } } rule("26 - Soundtrack menu: Jump forward or backward by ten genres") { event { Subroutine; Controller08; } actions { If(Not(And(Is Alive(Global.TriggerPlayer), And(Global.TriggerPlayer.MenuOpen, And((Global.TriggerPlayer.MenuPage == 3), And((Global.TriggerPlayer.CustomSoundtrack == Null), Or((Global.TriggerPlayer.MenuCommand == 5), (Global.TriggerPlayer.MenuCommand == 6)))))))); Global.TriggerPlayer.ControllerState[14] = 0; Abort; End; Abort If((Global.TriggerPlayer.ControllerState[14] == 1)); Global.TriggerPlayer.ControllerState[14] = 1; Global.TriggerPlayer.GenreCursor = ((Global.TriggerPlayer.GenreCursor + ((Global.TriggerPlayer.MenuCommand == 5) ? 10 : (Count Of(Global.GenreNames) - 10))) % Count Of(Global.GenreNames)); } } rule("27 - Menu: Apply the active page") { event { Subroutine; Controller10; } actions { If(Not(And(Is Alive(Global.TriggerPlayer), And(Global.TriggerPlayer.MenuOpen, Or((Global.TriggerPlayer.MenuCommand == 1), (Global.TriggerPlayer.MenuCommand == 7)))))); Global.TriggerPlayer.ControllerState[15] = 0; Abort; End; Abort If((Global.TriggerPlayer.ControllerState[15] == 1)); Global.TriggerPlayer.ControllerState[15] = 1; If((Global.TriggerPlayer.MenuCommand == 7)); Global.TriggerPlayer.MenuCommand = 8; Call Subroutine(ResetMenuPage); Else If((Global.TriggerPlayer.MenuPage == -1)); If((Global.TriggerPlayer.MainMenuCursor == 8)); Call Subroutine(ApplyCrouchTravel); Else If((Global.TriggerPlayer.MainMenuCursor == 9)); Call Subroutine(ApplyInspectionPrivacyPage); Else If((Global.TriggerPlayer.MainMenuCursor == 12)); Call Subroutine(ApplyDummyBotFollowPage); Else If((Global.TriggerPlayer.MainMenuCursor == 15)); Call Subroutine(ApplySuperPunchPage); Else; Global.TriggerPlayer.MenuPage = Global.TriggerPlayer.MainMenuCursor; If((Global.TriggerPlayer.MenuPage == 2)); Call Subroutine(RefreshCameraTargets); Else If((Global.TriggerPlayer.MenuPage == 4)); Call Subroutine(RefreshRevengeTargets); Else If((Global.TriggerPlayer.MenuPage == 5)); Global.TriggerPlayer.UnkillableCursor = Global.TriggerPlayer.UnkillableMode; Else If((Global.TriggerPlayer.MenuPage == 11)); Global.TriggerPlayer.VoteCursor = (And((Global.TriggerPlayer.VotedPlayer != Null), Array Contains(Global.HumanPlayers, Global.TriggerPlayer.VotedPlayer)) ? Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer.VotedPlayer) : Min(Global.TriggerPlayer.VoteCursor, Max(0, (Count Of(Global.HumanPlayers) - 1)))); Else If((Global.TriggerPlayer.MenuPage == 13)); Global.TriggerPlayer.GhostFlyCursor %= 2; Else If((Global.TriggerPlayer.MenuPage == 14)); Global.TriggerPlayer.MultijumpCursor = (Global.TriggerPlayer.MultijumpEnabled ? Global.TriggerPlayer.MultijumpLevel : 0); Else If((Global.TriggerPlayer.MenuPage == 17)); Global.TriggerPlayer.NocturneState[1] = Global.TriggerPlayer.NocturneState[0]; Else If((Global.TriggerPlayer.MenuPage == 16)); Global.TriggerPlayer.MovementCursor %= 2; End; Call Subroutine(DrawMenu); End; Else If((Global.TriggerPlayer.MenuPage == 1)); Call Subroutine(ApplyNameColorPage); Else If((Global.TriggerPlayer.MenuPage == 2)); Call Subroutine(ApplyCameraPage); Else If((Global.TriggerPlayer.MenuPage == 3)); Call Subroutine(ApplySoundtrackPage); Else If((Global.TriggerPlayer.MenuPage == 4)); Call Subroutine(ApplyRevengePage); Else If((Global.TriggerPlayer.MenuPage == 5)); Call Subroutine(ApplyUnkillablePage); Else If((Global.TriggerPlayer.MenuPage == 6)); Call Subroutine(ApplyHeroVoicePage); Else If((Global.TriggerPlayer.MenuPage == 7)); Call Subroutine(ApplyPlayerIconPage); Else If((Global.TriggerPlayer.MenuPage == 10)); Call Subroutine(ApplyLuckPage); Else If((Global.TriggerPlayer.MenuPage == 11)); Call Subroutine(ApplyVotePage); Else If((Global.TriggerPlayer.MenuPage == 13)); Call Subroutine(ApplyGhostFlyPage); Else If((Global.TriggerPlayer.MenuPage == 14)); Call Subroutine(ApplyMultijumpPage); Else If(And((Global.TriggerPlayer.MenuPage >= 17), (Global.TriggerPlayer.MenuPage <= 20))); Call Subroutine(ApplyNocturnePage); Else If((Global.TriggerPlayer.MenuPage == 16)); Call Subroutine(ApplyMovementPage); End; } } rule("28 - Subroutine: Apply the Soundtrack page") { event { Subroutine; ApplySoundtrackPage; } actions { Abort If((Global.TriggerPlayer.CustomSoundtrack != Null)); If((Global.TriggerPlayer.GenreIndex != Global.TriggerPlayer.GenreCursor)); Global.TriggerPlayer.GenreIndex = Global.TriggerPlayer.GenreCursor; End; } } rule("29 - Subroutine: Apply the Camera page") { event { Subroutine; ApplyCameraPage; } actions { Call Subroutine(RefreshCameraTargets); Global.TriggerPlayer.CameraCursor %= (Count Of(Global.TriggerPlayer.CameraTargets) + 2); If((Global.TriggerPlayer.CameraCursor == 0)); Stop Camera(Global.TriggerPlayer); Global.TriggerPlayer.CameraMode = 0; Global.TriggerPlayer.CameraTarget = Null; Else If((Global.TriggerPlayer.CameraCursor == 1)); Stop Camera(Global.TriggerPlayer); Global.TriggerPlayer.CameraTarget = Global.TriggerPlayer; Global.TriggerPlayer.CameraMode = 1; Global.CameraPlayer = Global.TriggerPlayer; Call Subroutine(StartCamera); Global.CameraPlayer = Null; Else; If(((Global.TriggerPlayer.CameraCursor - 2) < Count Of(Global.TriggerPlayer.CameraTargets))); Global.TriggerPlayer.CameraTargetCandidate = Global.TriggerPlayer.CameraTargets[(Global.TriggerPlayer.CameraCursor - 2)]; Else; Global.TriggerPlayer.CameraTargetCandidate = Null; End; If(And((Global.TriggerPlayer.CameraTargetCandidate != Null), Entity Exists(Global.TriggerPlayer.CameraTargetCandidate))); Stop Camera(Global.TriggerPlayer); Global.TriggerPlayer.CameraTarget = Global.TriggerPlayer.CameraTargetCandidate; Global.TriggerPlayer.CameraMode = 2; Global.CameraPlayer = Global.TriggerPlayer; Call Subroutine(StartCamera); Global.CameraPlayer = Null; Else; Small Message(Global.TriggerPlayer, Custom String("Camera target unavailable.")); End; End; } } rule("30 - Subroutine: Apply the Name Color page") { event { Subroutine; ApplyNameColorPage; } actions { If((Global.TriggerPlayer.ColorIndex != Global.TriggerPlayer.ColorCursor)); Global.TriggerPlayer.ColorIndex = Global.TriggerPlayer.ColorCursor; Global.TriggerPlayer.NameColor = Global.NameColors[Global.TriggerPlayer.ColorIndex]; If((Global.VoteLeader == Global.TriggerPlayer)); Global.VoteLeaderColor = Global.TriggerPlayer.NameColor; End; End; } } rule("31 - Subroutine: Apply the Revenge page") { event { Subroutine; ApplyRevengePage; } actions { If(And((Global.TriggerPlayer.LockedRevengeTarget != Null), And(Entity Exists(Global.TriggerPlayer.LockedRevengeTarget), (Player Variable(Global.TriggerPlayer.LockedRevengeTarget, RevengeClaimant) == Global.TriggerPlayer)))); Small Message(Global.TriggerPlayer, Custom String("Revenge pending. Target death repays 1.")); Else; Global.TriggerPlayer.LockedRevengeTarget = Null; Call Subroutine(RefreshRevengeTargets); If((Count Of(Global.TriggerPlayer.RevengeTargets) == 0)); Small Message(Global.TriggerPlayer, Custom String("No revenge targets.")); Else; Global.TriggerPlayer.RevengeCursor %= Count Of(Global.TriggerPlayer.RevengeTargets); Global.TriggerPlayer.LockedRevengeTarget = Global.TriggerPlayer.RevengeTargets[Global.TriggerPlayer.RevengeCursor]; Global.TriggerPlayer.RevengeIndex = Index Of Array Value(Global.TriggerPlayer.RevengeKillers, Global.TriggerPlayer.LockedRevengeTarget); If((Global.TriggerPlayer.RevengeIndex < 0)); Small Message(Global.TriggerPlayer, Custom String("No debt on this soul.")); Global.TriggerPlayer.LockedRevengeTarget = Null; Else If((Global.TriggerPlayer.RevengeDebts[Global.TriggerPlayer.RevengeIndex] <= 0)); Small Message(Global.TriggerPlayer, Custom String("Revenge debt cleared.")); Global.TriggerPlayer.LockedRevengeTarget = Null; Else If(Or(Not(Entity Exists(Global.TriggerPlayer.LockedRevengeTarget)), Not(Is Alive(Global.TriggerPlayer.LockedRevengeTarget)))); Small Message(Global.TriggerPlayer, Custom String("Target already fallen.")); Global.TriggerPlayer.LockedRevengeTarget = Null; Else If(Player Variable(Global.TriggerPlayer.LockedRevengeTarget, RevengeDeathPending)); Small Message(Global.TriggerPlayer, Custom String("Revenge already pending.")); Global.TriggerPlayer.LockedRevengeTarget = Null; Else If(Player Variable(Global.TriggerPlayer.LockedRevengeTarget, LuckActive)); Small Message(Global.TriggerPlayer, Custom String("Target busy: Dark Roulette.")); Global.TriggerPlayer.LockedRevengeTarget = Null; Else; Set Player Variable(Global.TriggerPlayer.LockedRevengeTarget, RevengeDeathPending, True); Set Player Variable(Global.TriggerPlayer.LockedRevengeTarget, RevengeClaimant, Global.TriggerPlayer); Set Player Variable(Global.TriggerPlayer.LockedRevengeTarget, NextForcedRevengeTime, Total Time Elapsed); Set Player Variable(Global.TriggerPlayer.LockedRevengeTarget, ForcedRevengeEndTime, (Total Time Elapsed + 5)); Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("Revenge: {0}.", Evaluate Once(Global.TriggerPlayer.LockedRevengeTarget))); End; End; End; } } rule("32 - Subroutine: Apply the Unkillable page") { event { Subroutine; ApplyUnkillablePage; } actions { If((Global.TriggerPlayer.UnkillableMode != Global.TriggerPlayer.UnkillableCursor)); If(And((Global.TriggerPlayer.UnkillableCursor == 1), Is In Spawn Room(Global.TriggerPlayer))); Small Message(Global.TriggerPlayer, Custom String("No 1 HP in spawn. FULL HP allowed.")); Else; Global.TriggerPlayer.UnkillableMode = Global.TriggerPlayer.UnkillableCursor; Global.TriggerPlayer.UnkillableActive = (Global.TriggerPlayer.UnkillableMode != 0); If((Global.TriggerPlayer.UnkillableMode == 0)); Clear Status(Global.TriggerPlayer, Unkillable); Set Damage Received(Global.TriggerPlayer, 100); Set Knockback Received(Global.TriggerPlayer, 100); Enable Movement Collision With Players(Global.TriggerPlayer); If(Is Alive(Global.TriggerPlayer)); Set Player Health(Global.TriggerPlayer, Max Health(Global.TriggerPlayer)); End; If((Global.TriggerPlayer.UnkillableIcon != Null)); Destroy Icon(Global.TriggerPlayer.UnkillableIcon); Global.TriggerPlayer.UnkillableIcon = Null; If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Global.UnkillableIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]] = 0; End; End; Else; Clear Status(Global.TriggerPlayer, Unkillable); Set Status(Global.TriggerPlayer, Null, Unkillable, 9999); If((Global.TriggerPlayer.UnkillableMode == 1)); Set Damage Received(Global.TriggerPlayer, 100); Set Knockback Received(Global.TriggerPlayer, 100); Enable Movement Collision With Players(Global.TriggerPlayer); If(Is Alive(Global.TriggerPlayer)); Set Player Health(Global.TriggerPlayer, 1); End; Else; Set Damage Received(Global.TriggerPlayer, 0); Set Knockback Received(Global.TriggerPlayer, 0); Disable Movement Collision With Players(Global.TriggerPlayer); If(Is Alive(Global.TriggerPlayer)); Set Player Health(Global.TriggerPlayer, Max Health(Global.TriggerPlayer)); End; End; If((Global.TriggerPlayer.UnkillableIcon != Null)); Destroy Icon(Global.TriggerPlayer.UnkillableIcon); Global.TriggerPlayer.UnkillableIcon = Null; If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Global.UnkillableIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]] = 0; End; End; If((Global.TriggerPlayer.UnkillableMode == 1)); Create Icon(All Players(All Teams), Evaluate Once(Global.TriggerPlayer), Warning, Visible To and Position, Custom Color(255, 80, 80, 255), True); Else; Create Icon(All Players(All Teams), Evaluate Once(Global.TriggerPlayer), Halo, Visible To and Position, Global.RGB, True); End; Global.TriggerPlayer.UnkillableIcon = Last Created Entity; If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Global.UnkillableIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]] = Global.TriggerPlayer.UnkillableIcon; End; End; End; End; } } rule("33 - Subroutine: Apply the Hero Voice page") { event { Subroutine; ApplyHeroVoicePage; } actions { If((Global.TriggerPlayer.VoiceIndex != Global.TriggerPlayer.VoiceCursor)); Global.TriggerPlayer.VoiceIndex = Global.TriggerPlayer.VoiceCursor; If((Global.TriggerPlayer.VoiceIndex == 0)); Stop Modifying Hero Voice Lines(Global.TriggerPlayer); Else If((Global.TriggerPlayer.VoiceIndex == 1)); Start Modifying Hero Voice Lines(Global.TriggerPlayer, 0.500, False); Else If((Global.TriggerPlayer.VoiceIndex == 2)); Start Modifying Hero Voice Lines(Global.TriggerPlayer, 0.750, False); Else If((Global.TriggerPlayer.VoiceIndex == 3)); Start Modifying Hero Voice Lines(Global.TriggerPlayer, 1.250, False); Else; Start Modifying Hero Voice Lines(Global.TriggerPlayer, 1.500, False); End; End; } } rule("34 - Subroutine: Apply the Player Icon page") { event { Subroutine; ApplyPlayerIconPage; } actions { If((Global.TriggerPlayer.IconCursor == Count Of(Global.PlayerIcons))); Global.TriggerPlayer.NocturneState[14] = (Global.TriggerPlayer.NocturneState[14] == False); Else If((Global.TriggerPlayer.IconIndex != Global.TriggerPlayer.IconCursor)); Global.TriggerPlayer.IconIndex = Global.TriggerPlayer.IconCursor; End; } } rule("35 - Subroutine: Apply Crouch Travel") { event { Subroutine; ApplyCrouchTravel; } actions { Global.TriggerPlayer.CrouchTravelEnabled = Not(Global.TriggerPlayer.CrouchTravelEnabled); } } rule("36 - Subroutine: Apply the Inspection Privacy page") { event { Subroutine; ApplyInspectionPrivacyPage; } actions { Global.TriggerPlayer.InspectionPrivacyActive = Not(Global.TriggerPlayer.InspectionPrivacyActive); } } rule("37 - Subroutine: Apply the Try Your Luck page") { event { Subroutine; ApplyLuckPage; } actions { If(Global.TriggerPlayer.LuckActive); Small Message(Global.TriggerPlayer, Custom String("Dark Roulette already active.")); Else If(Global.TriggerPlayer.RevengeDeathPending); Small Message(Global.TriggerPlayer, Custom String("Revenge active: Dark Roulette locked.")); Else; Global.TriggerPlayer.LuckActive = True; Global.TriggerPlayer.LuckEffect = Random Integer(1, 6); Global.TriggerPlayer.LuckSpinCount = Random Integer(20, 24); Global.TriggerPlayer.LuckSpinInterval = 0.080; Global.TriggerPlayer.LuckEffectEndTime = 0; Global.TriggerPlayer.NextLuckBurnTime = 0; Global.TriggerPlayer.NextLuckSpinTime = Total Time Elapsed; Global.TriggerPlayer.LuckIconEndTime = 0; Global.TriggerPlayer.LuckPrivacyActive = False; Global.TriggerPlayer.LuckMenuReopenNeeded = False; If((Global.TriggerPlayer.LuckIcon != Null)); Destroy Icon(Global.TriggerPlayer.LuckIcon); End; Global.TriggerPlayer.LuckIcon = Null; If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Global.LuckIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]] = 0; End; End; } } rule("38 - Subroutine: Apply the Vote page") { event { Subroutine; ApplyVotePage; } actions { If((Count Of(Global.HumanPlayers) > 0)); Global.TriggerPlayer.VoteCursor %= Count Of(Global.HumanPlayers); If((Global.TriggerPlayer.VotedPlayer != Global.HumanPlayers[Global.TriggerPlayer.VoteCursor])); Global.TriggerPlayer.VotedPlayer = Global.HumanPlayers[Global.TriggerPlayer.VoteCursor]; Global.VoteRecountNeeded = True; End; End; } } rule("39 - Subroutine: Apply dummy bot follow permission") { event { Subroutine; ApplyDummyBotFollowPage; } actions { Abort If(And(Not(Global.TriggerPlayer.AllowDummyBotFollow), Not(Is True For Any(All Players(Opposite Team Of(Team Of(Global.TriggerPlayer))), And(Entity Exists(Current Array Element), Is Dummy Bot(Current Array Element)))))); Global.TriggerPlayer.AllowDummyBotFollow = Not(Global.TriggerPlayer.AllowDummyBotFollow); } } rule("40 - Subroutine: Apply the Ghost / Fly page") { event { Subroutine; ApplyGhostFlyPage; } actions { If((Global.TriggerPlayer.GhostFlyCursor == 0)); Global.TriggerPlayer.GhostModeActive = Not(Global.TriggerPlayer.GhostModeActive); If(Global.TriggerPlayer.GhostModeActive); Disable Movement Collision With Environment(Global.TriggerPlayer, False); Else; Enable Movement Collision With Environment(Global.TriggerPlayer); End; Else; Global.TriggerPlayer.FlyModeActive = Not(Global.TriggerPlayer.FlyModeActive); Global.TriggerPlayer.GhostFlyPhysicsApplied = False; Call Subroutine(ApplyGhostFlyPhysics); End; } } rule("41 - Subroutine: Apply Ghost / Fly physics") { event { Subroutine; ApplyGhostFlyPhysics; } actions { If(Global.TriggerPlayer.GhostModeActive); Disable Movement Collision With Environment(Global.TriggerPlayer, False); Else; Enable Movement Collision With Environment(Global.TriggerPlayer); End; Stop Transforming Throttle(Global.TriggerPlayer); If(Global.TriggerPlayer.FlyModeActive); If(Or((Global.TriggerPlayer.LuckEffect != 2), (Global.TriggerPlayer.LuckEffectEndTime <= Total Time Elapsed))); Set Move Speed(Global.TriggerPlayer, 0); End; Set Gravity(Global.TriggerPlayer, 0); Else; If(Or((Global.TriggerPlayer.LuckEffect != 2), (Global.TriggerPlayer.LuckEffectEndTime <= Total Time Elapsed))); Set Move Speed(Global.TriggerPlayer, Global.TriggerPlayer.MovementSpeed); If(And(Not(Global.TriggerPlayer.GhostFlyPhysicsApplied), (Magnitude Of(Velocity Of(Global.TriggerPlayer)) > 0.010))); Apply Impulse(Global.TriggerPlayer, (Velocity Of(Global.TriggerPlayer) * -1), Magnitude Of(Velocity Of(Global.TriggerPlayer)), To World, Incorporate Contrary Motion); End; End; Set Gravity(Global.TriggerPlayer, Global.TriggerPlayer.MovementGravity); End; Global.TriggerPlayer.GhostFlyPhysicsApplied = True; } } rule("42 - Menu: Reload returns from a submenu to the main menu") { event { Subroutine; Controller11; } actions { If(Not(And(Is Alive(Global.TriggerPlayer), And(Global.TriggerPlayer.MenuOpen, And((Global.TriggerPlayer.MenuPage != -1), (Global.TriggerPlayer.MenuCommand == 2)))))); Global.TriggerPlayer.ControllerState[16] = 0; Abort; End; Abort If((Global.TriggerPlayer.ControllerState[16] == 1)); Global.TriggerPlayer.ControllerState[16] = 1; Global.TriggerPlayer.MenuPage = -1; Call Subroutine(DrawMenu); } } rule("43 - Camera: Hold Interact for half a second to switch") { event { Subroutine; Controller12c; } actions { If(Not(And(Has Spawned(Global.TriggerPlayer), And(Is Alive(Global.TriggerPlayer), And(Not(Global.TriggerPlayer.CameraInteractConsumed), And(Not(Is Button Held(Global.TriggerPlayer, Button(Crouch))), Is Button Held(Global.TriggerPlayer, Button(Interact)))))))); Global.TriggerPlayer.ControllerTimes[17] = 0; Abort; End; If((Global.TriggerPlayer.ControllerTimes[17] == 0)); Global.TriggerPlayer.ControllerTimes[17] = (Total Time Elapsed + 0.500); Abort; End; Abort If((Total Time Elapsed < Global.TriggerPlayer.ControllerTimes[17])); Global.TriggerPlayer.ControllerTimes[17] = 0; Global.TriggerPlayer.CameraInteractConsumed = True; If((Global.TriggerPlayer.CameraMode == 0)); Global.TriggerPlayer.CameraTarget = Global.TriggerPlayer; Global.TriggerPlayer.CameraMode = 1; Global.CameraPlayer = Global.TriggerPlayer; Call Subroutine(StartCamera); Global.CameraPlayer = Null; Else; Stop Camera(Global.TriggerPlayer); Global.TriggerPlayer.CameraMode = 0; Global.TriggerPlayer.CameraTarget = Null; End; } } rule("44 - Camera: Release Interact before using it again") { event { Subroutine; Controller12d; } actions { Abort If(Not(And(Global.TriggerPlayer.CameraInteractConsumed, Not(Is Button Held(Global.TriggerPlayer, Button(Interact)))))); Global.TriggerPlayer.CameraInteractConsumed = False; } } rule("45 - Jump revive: Store the death position") { event { Player Died; All; All; } conditions { Event Player.IsHuman == True; Event Player.IsAutomaticBot == False; Is Dummy Bot(Event Player) == False; Is Alive(Event Player) == False; } actions { If((Global.EventCount < 256)); Global.EventQueue[Global.EventQueueTail] = Array(2, Event Player, Null, Null, Null, Null, Position Of(Event Player), Total Time Elapsed, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Hero Of(Event Player), Team Of(Event Player), Event Player.ControllerState[36], (Event Player.IsHuman ? Event Player.DisplayName : Custom String("{0}", Event Player))); Global.EventQueueTail = ((Global.EventQueueTail + 1) % 256); Global.EventCount += 1; Else; Global.DroppedEventCount += 1; End; } } rule("46 - Jump revive: Store the death position global") { event { Subroutine; NativeEvent12e; } actions { Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If((Global.ActiveEvent[20] != Global.TriggerPlayer.ControllerState[36])); Abort If((Global.ActiveEvent[21] != (Global.TriggerPlayer.IsHuman ? Global.TriggerPlayer.DisplayName : Custom String("{0}", Global.TriggerPlayer)))); Abort If(Or(Global.TriggerPlayer.PlayerCycleActive, (Global.TriggerPlayer.LastTeam != Team Of(Global.TriggerPlayer)))); Abort If(Is Alive(Global.TriggerPlayer)); Global.TriggerPlayer.DeathPosition = Global.ActiveEvent[6]; Stop Accelerating(Global.TriggerPlayer); Set Move Speed(Global.TriggerPlayer, 100); Stop Transforming Throttle(Global.TriggerPlayer); Set Gravity(Global.TriggerPlayer, 100); Enable Movement Collision With Environment(Global.TriggerPlayer); Global.TriggerPlayer.GhostFlyPhysicsApplied = False; If(Or((Global.TriggerPlayer.MenuCommand != 8), Not(Is Button Held(Global.TriggerPlayer, Button(Ultimate))))); Global.TriggerPlayer.MenuCommand = 0; End; Global.TriggerPlayer.TravelCommand = 0; Small Message(Global.TriggerPlayer, Custom String("{0}: revive here (void: safe ground).", Input Binding String(Button(Jump)))); } } rule("47 - Jump revive: Revive at a safe walkable position") { event { Subroutine; Controller12f; } actions { Abort If(Not(And(Not(Is Alive(Global.TriggerPlayer)), And(Not(Global.TriggerPlayer.JumpReviveConsumed), Is Button Held(Global.TriggerPlayer, Button(Jump)))))); Global.TriggerPlayer.JumpReviveConsumed = True; Global.TriggerPlayer.SafeRevivePosition = Nearest Walkable Position(Position Of(Global.TriggerPlayer)); Global.TriggerPlayer.ReviveTeleportNeeded = Or((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.DeathPosition + Vector(0, 1, 0)), (Global.TriggerPlayer.DeathPosition - Vector(0, 3, 0)), Empty Array, Empty Array, False), Global.TriggerPlayer.DeathPosition) > 2.500), (Distance Between(Global.TriggerPlayer.SafeRevivePosition, Global.TriggerPlayer.DeathPosition) > 0.500)); If(Global.TriggerPlayer.ReviveTeleportNeeded); Teleport(Global.TriggerPlayer, (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 0.500, 0))); End; Resurrect(Global.TriggerPlayer); If(Global.TriggerPlayer.ReviveTeleportNeeded); Teleport(Global.TriggerPlayer, (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 0.500, 0))); End; Global.TriggerPlayer.ReviveTeleportNeeded = False; If(Is Alive(Global.TriggerPlayer)); Global.TriggerPlayer.GhostFlyPhysicsApplied = False; Call Subroutine(ApplyGhostFlyPhysics); End; } } rule("48 - Jump revive: Release Jump before trying again") { event { Subroutine; Controller12g; } actions { Abort If(Not(And(Global.TriggerPlayer.JumpReviveConsumed, Not(Is Button Held(Global.TriggerPlayer, Button(Jump)))))); Global.TriggerPlayer.JumpReviveConsumed = False; } } rule("49 - Hero inspection: Name follows the aim target") { event { Subroutine; Controller13; } actions { Abort If(Not(And(Is Alive(Global.TriggerPlayer), And(Not(Global.TriggerPlayer.MenuOpen), And(Not(Global.TriggerPlayer.LuckPrivacyActive), And(Not(Global.TriggerPlayer.CrouchTravelActive), And(Not(Global.TriggerPlayer.CrouchTravelEnabled), And((Global.TriggerPlayer.CameraMode != 2), And(Is Button Held(Global.TriggerPlayer, Button(Crouch)), Or((Global.TriggerPlayer.InspectionTarget != Global.TriggerPlayer.InspectionTargetCandidate), Or(And((Global.TriggerPlayer.InspectionText != Null), Or(Not(Entity Exists(Global.TriggerPlayer.InspectionTarget)), Or(Not(Has Spawned(Global.TriggerPlayer.InspectionTarget)), Or(Not(Is Alive(Global.TriggerPlayer.InspectionTarget)), And(And(Not(Is Dummy Bot(Global.TriggerPlayer.InspectionTarget)), Not(Player Variable(Global.TriggerPlayer.InspectionTarget, IsAutomaticBot))), Or(Not(Player Variable(Global.TriggerPlayer.InspectionTarget, IsHuman)), Or(Player Variable(Global.TriggerPlayer.InspectionTarget, InspectionPrivacyActive), Player Variable(Global.TriggerPlayer.InspectionTarget, PlayerListUpdatePending)))))))), And((Global.TriggerPlayer.InspectionText == Null), And((Global.TriggerPlayer.InspectionTargetCandidate != Null), (Total Time Elapsed >= Global.TriggerPlayer.NextTargetTextTime)))))))))))))); If(Not(Global.TriggerPlayer.InspectionActive)); Global.TriggerPlayer.InspectionActive = True; Disable Nameplates(All Players(All Teams), Global.TriggerPlayer); Global.TriggerPlayer.NameplatesDisabled = True; End; If((Global.TriggerPlayer.InspectionText != Null)); Destroy In-World Text(Global.TriggerPlayer.InspectionText); End; If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.InspectionTextIds))); Global.InspectionTextIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = 0; End; End; Global.TriggerPlayer.InspectionText = Null; Call Subroutine(RefreshInspectionTarget); Abort If((Global.TriggerPlayer.InspectionTarget == Null)); Abort If((Total Time Elapsed < Global.TriggerPlayer.NextTargetTextTime)); Global.TriggerPlayer.NextTargetTextTime = (Total Time Elapsed + 0.250); Create In-World Text(Evaluate Once(Global.TriggerPlayer), Custom String("{0} {1} | {2}", Hero Icon String((Is Duplicating(Evaluate Once(Global.TriggerPlayer.InspectionTarget)) ? Hero Being Duplicated(Evaluate Once(Global.TriggerPlayer.InspectionTarget)) : Hero Of(Evaluate Once(Global.TriggerPlayer.InspectionTarget)))), Evaluate Once((Array Contains(Global.HumanPlayers, Global.TriggerPlayer.InspectionTarget) ? Player Variable(Global.TriggerPlayer.InspectionTarget, DisplayName) : Custom String("{0}", (Is Duplicating(Global.TriggerPlayer.InspectionTarget) ? Hero Being Duplicated(Global.TriggerPlayer.InspectionTarget) : Hero Of(Global.TriggerPlayer.InspectionTarget))))), Round To Integer(Health(Evaluate Once(Global.TriggerPlayer.InspectionTarget)), Down)), Update Every Frame((Eye Position(Evaluate Once(Global.TriggerPlayer.InspectionTarget)) + Vector(0, 0.450, 0))), 1.100, Do Not Clip, Visible To Position String and Color, Evaluate Once((Array Contains(Global.HumanPlayers, Global.TriggerPlayer.InspectionTarget) ? Player Variable(Global.TriggerPlayer.InspectionTarget, NameColor) : Color(Orange))), Visible Never); Global.TriggerPlayer.InspectionText = Last Text ID; If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.InspectionTextIds))); Global.InspectionTextIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = Global.TriggerPlayer.InspectionText; End; End; } } rule("50 - Anran: Ultimate charge reaches 100 percent on each death") { event { Player Died; All; All; } conditions { Event Player.IsHuman == True; Event Player.IsAutomaticBot == False; Is Dummy Bot(Event Player) == False; Hero Of(Event Player) == Hero(Anran); } actions { If((Global.EventCount < 256)); Global.EventQueue[Global.EventQueueTail] = Array(3, Event Player, Null, Null, Null, Null, Null, Total Time Elapsed, Null, Null, Null, Null, Null, Null, Null, Null, Null, Null, Hero Of(Event Player), Team Of(Event Player), Event Player.ControllerState[36], (Event Player.IsHuman ? Event Player.DisplayName : Custom String("{0}", Event Player))); Global.EventQueueTail = ((Global.EventQueueTail + 1) % 256); Global.EventCount += 1; Else; Global.DroppedEventCount += 1; End; } } rule("51 - Anran: Ultimate charge reaches 100 percent on each death global") { event { Subroutine; NativeEvent16a; } actions { Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If((Global.ActiveEvent[20] != Global.TriggerPlayer.ControllerState[36])); Abort If((Global.ActiveEvent[21] != (Global.TriggerPlayer.IsHuman ? Global.TriggerPlayer.DisplayName : Custom String("{0}", Global.TriggerPlayer)))); Abort If(Or(Global.TriggerPlayer.PlayerCycleActive, (Global.TriggerPlayer.LastTeam != Team Of(Global.TriggerPlayer)))); Abort If((Hero Of(Global.TriggerPlayer) != Global.ActiveEvent[18])); Set Ultimate Charge(Global.TriggerPlayer, 100); } } rule("52 - Revenge: Record only the direct killer") { event { Player Died; All; All; } conditions { Event Player.IsHuman == True; } actions { If((Global.EventCount < 256)); Global.EventQueue[Global.EventQueueTail] = Array(4, Event Player, Attacker, Null, Null, Null, Null, Total Time Elapsed, Event Player.RevengeDeathPending, Event Player.RevengeClaimant, And((Event Player.RevengeClaimant != Null), And(Entity Exists(Event Player.RevengeClaimant), Player Variable(Event Player.RevengeClaimant, IsHuman))), Player Variable(Attacker, IsHuman), Null, Null, Null, Null, Null, Not(Is Alive(Event Player)), Hero Of(Event Player), Team Of(Event Player), Event Player.ControllerState[36], (Event Player.IsHuman ? Event Player.DisplayName : Custom String("{0}", Event Player)), Null, Player Variable(Event Player.RevengeClaimant, ControllerState)[36], Player Variable(Attacker, ControllerState)[36]); Global.EventQueueTail = ((Global.EventQueueTail + 1) % 256); Global.EventCount += 1; Else; Global.DroppedEventCount += 1; End; } } rule("53 - Revenge: Record only the direct killer global") { event { Subroutine; NativeEvent17; } actions { Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If((Global.ActiveEvent[20] != Global.TriggerPlayer.ControllerState[36])); Abort If((Global.ActiveEvent[21] != (Global.TriggerPlayer.IsHuman ? Global.TriggerPlayer.DisplayName : Custom String("{0}", Global.TriggerPlayer)))); Abort If(Or(Global.TriggerPlayer.PlayerCycleActive, (Global.TriggerPlayer.LastTeam != Team Of(Global.TriggerPlayer)))); If(Global.ActiveEvent[8]); If(Global.ActiveEvent[17]); If(And((Global.ActiveEvent[9] != Null), And(And(Entity Exists(Global.ActiveEvent[9]), (Player Variable(Global.ActiveEvent[9], ControllerState)[36] == Global.ActiveEvent[23])), And(Global.ActiveEvent[10], (Global.ActiveEvent[2] == Global.ActiveEvent[9]))))); Set Player Variable(Global.ActiveEvent[9], RevengeIndex, Index Of Array Value(Player Variable(Global.ActiveEvent[9], RevengeKillers), Global.TriggerPlayer)); If(And((Player Variable(Global.ActiveEvent[9], RevengeIndex) >= 0), (Player Variable(Global.ActiveEvent[9], RevengeDebts)[Player Variable(Global.ActiveEvent[9], RevengeIndex)] > 0))); Modify Player Variable At Index(Global.ActiveEvent[9], RevengeDebts, Player Variable(Global.ActiveEvent[9], RevengeIndex), Subtract, 1); Small Message(Evaluate Once(Global.ActiveEvent[9]), Custom String("Revenge: {0} | debt left: {1}.", Evaluate Once(Global.TriggerPlayer), Evaluate Once(Player Variable(Global.ActiveEvent[9], RevengeDebts)[Player Variable(Global.ActiveEvent[9], RevengeIndex)]))); End; Set Player Variable(Global.ActiveEvent[9], LockedRevengeTarget, Null); Global.TriggerPlayer.RevengeDeathPending = False; Global.TriggerPlayer.RevengeClaimant = Null; Global.TriggerPlayer.NextForcedRevengeTime = 0; Global.TriggerPlayer.ForcedRevengeEndTime = 0; Abort; End; If(And((Global.ActiveEvent[9] != Null), And(Entity Exists(Global.ActiveEvent[9]), (Player Variable(Global.ActiveEvent[9], ControllerState)[36] == Global.ActiveEvent[23])))); Set Player Variable(Global.ActiveEvent[9], LockedRevengeTarget, Null); End; Global.TriggerPlayer.RevengeDeathPending = False; Global.TriggerPlayer.RevengeClaimant = Null; Global.TriggerPlayer.NextForcedRevengeTime = 0; Global.TriggerPlayer.ForcedRevengeEndTime = 0; Else; Abort; End; End; Abort If((Global.ActiveEvent[2] == Null)); Abort If((Global.ActiveEvent[2] == Global.TriggerPlayer)); Abort If(Not(Global.ActiveEvent[11])); Abort If(Not(Entity Exists(Global.ActiveEvent[2]))); Abort If((Player Variable(Global.ActiveEvent[2], ControllerState)[36] != Global.ActiveEvent[24])); Global.TriggerPlayer.RevengeIndex = Index Of Array Value(Global.TriggerPlayer.RevengeKillers, Global.ActiveEvent[2]); If((Global.TriggerPlayer.RevengeIndex < 0)); Global.TriggerPlayer.RevengeKillers = Append To Array(Global.TriggerPlayer.RevengeKillers, Global.ActiveEvent[2]); Global.TriggerPlayer.RevengeDebts = Append To Array(Global.TriggerPlayer.RevengeDebts, 1); Else; Modify Player Variable At Index(Global.TriggerPlayer, RevengeDebts, Global.TriggerPlayer.RevengeIndex, Add, 1); End; } } rule("54 - Unkillable: Disable only the 1 HP mode in spawn") { event { Subroutine; Controller18c; } actions { Abort If(Not(And((Global.TriggerPlayer.UnkillableMode == 1), Is In Spawn Room(Global.TriggerPlayer)))); Global.TriggerPlayer.UnkillableActive = False; Global.TriggerPlayer.UnkillableMode = 0; Global.TriggerPlayer.UnkillableCursor = 1; Clear Status(Global.TriggerPlayer, Unkillable); Set Damage Received(Global.TriggerPlayer, 100); Set Knockback Received(Global.TriggerPlayer, 100); Enable Movement Collision With Players(Global.TriggerPlayer); If(Is Alive(Global.TriggerPlayer)); Set Player Health(Global.TriggerPlayer, Max Health(Global.TriggerPlayer)); End; If((Global.TriggerPlayer.UnkillableIcon != Null)); Destroy Icon(Global.TriggerPlayer.UnkillableIcon); Global.TriggerPlayer.UnkillableIcon = Null; If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Global.UnkillableIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]] = 0; End; End; Small Message(Global.TriggerPlayer, Custom String("1 HP disabled in spawn.")); } } rule("55 - Luck: Clear effects on death") { event { Player Died; All; All; } conditions { Or(Event Player.LuckActive == True, Or(Event Player.LuckSpinCount > 0, Event Player.LuckEffect != 0)) == True; Is Alive(Event Player) == False; } actions { If((Global.EventCount < 256)); Global.EventQueue[Global.EventQueueTail] = Array(5, Event Player, Null, Null, Null, Null, Null, Total Time Elapsed, Null, Null, Null, Null, Null, Null, Not(Event Player.MenuOpen), Null, Null, Null, Hero Of(Event Player), Team Of(Event Player), Event Player.ControllerState[36], (Event Player.IsHuman ? Event Player.DisplayName : Custom String("{0}", Event Player))); Global.EventQueueTail = ((Global.EventQueueTail + 1) % 256); Global.EventCount += 1; Else; Global.DroppedEventCount += 1; End; } } rule("56 - Luck: Clear effects on death global") { event { Subroutine; NativeEvent18f; } actions { Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If((Global.ActiveEvent[20] != Global.TriggerPlayer.ControllerState[36])); Abort If((Global.ActiveEvent[21] != (Global.TriggerPlayer.IsHuman ? Global.TriggerPlayer.DisplayName : Custom String("{0}", Global.TriggerPlayer)))); Abort If(Or(Global.TriggerPlayer.PlayerCycleActive, (Global.TriggerPlayer.LastTeam != Team Of(Global.TriggerPlayer)))); Abort If(Is Alive(Global.TriggerPlayer)); Call Subroutine(RestorePlayerLuck); Global.TriggerPlayer.LuckMenuReopenNeeded = Global.ActiveEvent[14]; } } rule("57 - Luck: Reopen the menu after the effect ends") { event { Subroutine; Controller18g; } actions { Abort If(Not(And(Global.TriggerPlayer.LuckMenuReopenNeeded, And(Not(Global.TriggerPlayer.LuckActive), And(Has Spawned(Global.TriggerPlayer), Is Alive(Global.TriggerPlayer)))))); Global.TriggerPlayer.MenuInputLocked = False; Global.TriggerPlayer.MenuCommand = 0; Global.TriggerPlayer.MenuOpen = True; Global.TriggerPlayer.MenuPage = 10; Call Subroutine(DrawMenu); Global.TriggerPlayer.LuckMenuReopenNeeded = False; } } rule("58 - Luck: Vision displays all player and bot names") { event { Subroutine; Controller18i; } actions { Abort If(Not(And(Or(Array Contains(Global.TemporaryTextOwners, Global.TriggerPlayer), Array Contains(Global.TemporaryTextOwners, Null)), And(Or((Global.TriggerPlayer.LuckVisionText == Null), (Global.TriggerPlayer.LuckVisionText == 0)), And(Is Alive(Global.TriggerPlayer), And(Or(Is Dummy Bot(Global.TriggerPlayer), Or(Global.TriggerPlayer.IsAutomaticBot, Global.TriggerPlayer.IsHuman)), (Count Of(Filtered Array(Global.LuckVisionViewers, And((Current Array Element != Global.TriggerPlayer), And(Entity Exists(Current Array Element), And(Player Variable(Current Array Element, IsHuman), Player Variable(Current Array Element, LuckPrivacyActive)))))) > 0))))))); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer); If((Global.TextCleanupIndex < 0)); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); If((Global.TextCleanupIndex < 0)); Global.TextCleanupPlayer = Null; Call Subroutine(CleanupOrphanedText); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); End; Abort If((Global.TextCleanupIndex < 0)); If(Or((Global.TemporaryEffectHudIds[Global.TextCleanupIndex] != 0), Or((Global.TemporaryTravelTextIds[Global.TextCleanupIndex] != 0), (Global.TemporaryVisionTextIds[Global.TextCleanupIndex] != 0)))); Global.TextCleanupPlayer = Null; Call Subroutine(CleanupOrphanedText); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); End; Abort If((Global.TextCleanupIndex < 0)); Global.TemporaryTextOwners[Global.TextCleanupIndex] = Global.TriggerPlayer; End; Create In-World Text(Filtered Array(Global.LuckVisionViewers, And((Current Array Element != Evaluate Once(Global.TriggerPlayer)), And(Entity Exists(Current Array Element), And(Player Variable(Current Array Element, IsHuman), Player Variable(Current Array Element, LuckPrivacyActive))))), Custom String("{0} {1} | {2}", Hero Icon String((Is Duplicating(Evaluate Once(Global.TriggerPlayer)) ? Hero Being Duplicated(Evaluate Once(Global.TriggerPlayer)) : Hero Of(Evaluate Once(Global.TriggerPlayer)))), (Player Variable(Evaluate Once(Global.TriggerPlayer), IsHuman) ? Player Variable(Evaluate Once(Global.TriggerPlayer), DisplayName) : Custom String("{0}", Evaluate Once(Global.TriggerPlayer))), Round To Integer(Health(Evaluate Once(Global.TriggerPlayer)), Down)), Update Every Frame((Eye Position(Evaluate Once(Global.TriggerPlayer)) + Vector(0, 0.450, 0))), 1.100, Do Not Clip, Visible To Position String and Color, (Player Variable(Evaluate Once(Global.TriggerPlayer), IsHuman) ? Player Variable(Evaluate Once(Global.TriggerPlayer), NameColor) : Color(Orange)), Visible Never); Global.TriggerPlayer.LuckVisionText = Last Text ID; Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = Global.TriggerPlayer.LuckVisionText; } } rule("59 - Luck: Clear vision names when no longer needed") { event { Subroutine; Controller18j; } actions { Abort If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(And((Global.TriggerPlayer.LuckVisionText != Null), (Global.TriggerPlayer.LuckVisionText != 0)), Or(Not(Is Alive(Global.TriggerPlayer)), (Count Of(Filtered Array(Global.LuckVisionViewers, And((Current Array Element != Global.TriggerPlayer), And(Entity Exists(Current Array Element), And(Player Variable(Current Array Element, IsHuman), Player Variable(Current Array Element, LuckPrivacyActive)))))) == 0))))))); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.LuckVisionText)); Destroy In-World Text(Global.TriggerPlayer.LuckVisionText); Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; Global.TriggerPlayer.LuckVisionText = Null; } } rule("60 - Luck: Show effect and duration HUD while the menu is closed") { event { Subroutine; Controller18k; } actions { Abort If(Not(And(Or(Array Contains(Global.TemporaryTextOwners, Global.TriggerPlayer), Array Contains(Global.TemporaryTextOwners, Null)), And(Global.TriggerPlayer.LuckActive, And((Global.TriggerPlayer.LuckSpinCount == 0), And((Global.TriggerPlayer.LuckEffectEndTime > 0), And((Global.TriggerPlayer.LuckEffectHud == Null), Is Alive(Global.TriggerPlayer)))))))); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer); If((Global.TextCleanupIndex < 0)); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); If((Global.TextCleanupIndex < 0)); Global.TextCleanupPlayer = Null; Call Subroutine(CleanupOrphanedText); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); End; Abort If((Global.TextCleanupIndex < 0)); If(Or((Global.TemporaryEffectHudIds[Global.TextCleanupIndex] != 0), Or((Global.TemporaryTravelTextIds[Global.TextCleanupIndex] != 0), (Global.TemporaryVisionTextIds[Global.TextCleanupIndex] != 0)))); Global.TextCleanupPlayer = Null; Call Subroutine(CleanupOrphanedText); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); End; Abort If((Global.TextCleanupIndex < 0)); Global.TemporaryTextOwners[Global.TextCleanupIndex] = Global.TriggerPlayer; End; Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Null, Custom String("{0}\n{1}", ((Player Variable(Local Player, LuckEffect) == 1) ? Custom String("VISION: PLAYER/BOT NAMES") : ((Player Variable(Local Player, LuckEffect) == 2) ? Custom String("AIM ACCELERATION") : ((Player Variable(Local Player, LuckEffect) == 5) ? Custom String("BURN: 5% MAX HP/s") : Custom String("HACKED")))), Custom String("{0}s LEFT", Max(0, Round To Integer((Player Variable(Local Player, LuckEffectEndTime) - Total Time Elapsed), Up)))), Top, 3, Color(White), Color(White), Global.RGB, Visible To String and Color, Visible Never); Global.TriggerPlayer.LuckEffectHud = Last Text ID; Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = Global.TriggerPlayer.LuckEffectHud; } } rule("61 - Crouch Travel: Open five pages while Crouch is held") { event { Subroutine; Controller19; } actions { Abort If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Not(Global.TriggerPlayer.MenuOpen), And(Not(Global.TriggerPlayer.LuckActive), And(Not(Global.TriggerPlayer.LuckPrivacyActive), And(Not(Global.TriggerPlayer.CrouchTravelActive), And(Global.TriggerPlayer.CrouchTravelEnabled, And(Has Spawned(Global.TriggerPlayer), And(Is Alive(Global.TriggerPlayer), And(Is Button Held(Global.TriggerPlayer, Button(Crouch)), Not(Is Button Held(Global.TriggerPlayer, Button(Melee))))))))))))))); Global.TriggerPlayer.CrouchTravelActive = True; Global.TriggerPlayer.TravelCommand = 0; Global.TriggerPlayer.TravelTargets = Empty Array; Global.TriggerPlayer.TravelTargetCandidate = Null; Global.TriggerPlayer.LockedTravelType = -1; Global.TriggerPlayer.LockedTravelTarget = Null; Disallow Button(Global.TriggerPlayer, Button(Primary Fire)); Disallow Button(Global.TriggerPlayer, Button(Secondary Fire)); Disallow Button(Global.TriggerPlayer, Button(Interact)); Call Subroutine(TransitionMenuColor); Call Subroutine(DrawTravelMenu); } } rule("62 - Crouch Travel: Primary Fire advances, Secondary Fire reverses, Interact applies") { event { Subroutine; Controller19a; } actions { Abort If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Global.TriggerPlayer.CrouchTravelActive, And(Has Spawned(Global.TriggerPlayer), And(Is Alive(Global.TriggerPlayer), And((Global.TriggerPlayer.TravelCommand == 0), And(Is Button Held(Global.TriggerPlayer, Button(Crouch)), Or(Or(Is Button Held(Global.TriggerPlayer, Button(Primary Fire)), Is Button Held(Global.TriggerPlayer, Button(Secondary Fire))), Is Button Held(Global.TriggerPlayer, Button(Interact)))))))))))); If(Is Button Held(Global.TriggerPlayer, Button(Primary Fire))); Global.TriggerPlayer.TravelCommand = 1; Else If(Is Button Held(Global.TriggerPlayer, Button(Secondary Fire))); Global.TriggerPlayer.TravelCommand = 2; Else If(And(Is Button Held(Global.TriggerPlayer, Button(Interact)), Not(Global.TriggerPlayer.CameraInteractConsumed))); Global.TriggerPlayer.CameraInteractConsumed = True; Global.TriggerPlayer.TravelCommand = 3; End; } } rule("63 - Crouch Travel: Release navigation and action locks") { event { Subroutine; Controller19b; } actions { Abort If(Not(And(Global.TriggerPlayer.CrouchTravelActive, And((Global.TriggerPlayer.TravelCommand != 0), And(Not(Is Button Held(Global.TriggerPlayer, Button(Primary Fire))), And(Not(Is Button Held(Global.TriggerPlayer, Button(Secondary Fire))), Not(Is Button Held(Global.TriggerPlayer, Button(Interact))))))))); Global.TriggerPlayer.TravelCommand = 0; } } rule("64 - Crouch Travel: Navigate five pages with Primary and Secondary Fire") { event { Subroutine; Controller19c; } actions { If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Global.TriggerPlayer.CrouchTravelActive, And(Has Spawned(Global.TriggerPlayer), And(Is Alive(Global.TriggerPlayer), Or((Global.TriggerPlayer.TravelCommand == 1), (Global.TriggerPlayer.TravelCommand == 2))))))))); Global.TriggerPlayer.ControllerState[30] = 0; Abort; End; Abort If((Global.TriggerPlayer.ControllerState[30] == 1)); Global.TriggerPlayer.ControllerState[30] = 1; Global.TriggerPlayer.TravelCursor = ((Global.TriggerPlayer.TravelCursor + ((Global.TriggerPlayer.TravelCommand == 1) ? 1 : 4)) % 5); If(And((Global.TriggerPlayer.TravelCursor != 2), (Global.TriggerPlayer.TravelCursor != 3))); Global.TriggerPlayer.TravelTargetCandidate = Null; If((Global.TriggerPlayer.TravelText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.TravelText)); Destroy In-World Text(Global.TriggerPlayer.TravelText); Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; Global.TriggerPlayer.TravelText = Null; Global.TriggerPlayer.TravelTextTarget = Null; If(Global.TriggerPlayer.NameplatesDisabled); Enable Nameplates(All Players(All Teams), Global.TriggerPlayer); Global.TriggerPlayer.NameplatesDisabled = False; End; Else; If((Global.TriggerPlayer.InspectionText != Null)); Destroy In-World Text(Global.TriggerPlayer.InspectionText); End; If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.InspectionTextIds))); Global.InspectionTextIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = 0; End; End; Global.TriggerPlayer.InspectionText = Null; Global.TriggerPlayer.InspectionTarget = Null; Global.TriggerPlayer.InspectionActive = False; If((Global.TriggerPlayer.TravelText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.TravelText)); Destroy In-World Text(Global.TriggerPlayer.TravelText); Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; Global.TriggerPlayer.TravelText = Null; Global.TriggerPlayer.TravelTextTarget = Null; Call Subroutine(RefreshTravelTarget); End; Call Subroutine(TransitionMenuColor); } } rule("65 - Crouch Travel: Recreate the name when the target changes") { event { Subroutine; Controller19d; } actions { Abort If(Not(And(Or(Array Contains(Global.TemporaryTextOwners, Global.TriggerPlayer), Array Contains(Global.TemporaryTextOwners, Null)), And(Global.TriggerPlayer.CrouchTravelActive, And(Or((Global.TriggerPlayer.TravelCursor == 2), (Global.TriggerPlayer.TravelCursor == 3)), And(Is Alive(Global.TriggerPlayer), And(Is Button Held(Global.TriggerPlayer, Button(Crouch)), Or((Global.TriggerPlayer.TravelTextTarget != Global.TriggerPlayer.TravelTargetCandidate), Or(And((Global.TriggerPlayer.TravelText != Null), Or(Not(Entity Exists(Global.TriggerPlayer.TravelTextTarget)), Or(Not(Has Spawned(Global.TriggerPlayer.TravelTextTarget)), Or(Not(Is Alive(Global.TriggerPlayer.TravelTextTarget)), And(And(Not(Is Dummy Bot(Global.TriggerPlayer.TravelTextTarget)), Not(Player Variable(Global.TriggerPlayer.TravelTextTarget, IsAutomaticBot))), Or(Not(Player Variable(Global.TriggerPlayer.TravelTextTarget, IsHuman)), Or(Player Variable(Global.TriggerPlayer.TravelTextTarget, InspectionPrivacyActive), Player Variable(Global.TriggerPlayer.TravelTextTarget, PlayerListUpdatePending)))))))), And((Global.TriggerPlayer.TravelText == Null), And((Global.TriggerPlayer.TravelTargetCandidate != Null), (Total Time Elapsed >= Global.TriggerPlayer.NextTargetTextTime)))))))))))); If((Global.TriggerPlayer.TravelText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.TravelText)); Destroy In-World Text(Global.TriggerPlayer.TravelText); Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; Global.TriggerPlayer.TravelText = Null; Global.TriggerPlayer.TravelTextTarget = Global.TriggerPlayer.TravelTargetCandidate; If(Or((Global.TriggerPlayer.TravelTargetCandidate == Null), Or(Not(Entity Exists(Global.TriggerPlayer.TravelTargetCandidate)), Or(Not(Has Spawned(Global.TriggerPlayer.TravelTargetCandidate)), Or(Not(Is Alive(Global.TriggerPlayer.TravelTargetCandidate)), And(And(Not(Is Dummy Bot(Global.TriggerPlayer.TravelTargetCandidate)), Not(Player Variable(Global.TriggerPlayer.TravelTargetCandidate, IsAutomaticBot))), Or(Not(Player Variable(Global.TriggerPlayer.TravelTargetCandidate, IsHuman)), Or(Player Variable(Global.TriggerPlayer.TravelTargetCandidate, InspectionPrivacyActive), Player Variable(Global.TriggerPlayer.TravelTargetCandidate, PlayerListUpdatePending))))))))); Global.TriggerPlayer.TravelTargetCandidate = Null; Global.TriggerPlayer.TravelTextTarget = Null; Abort; End; Abort If((Total Time Elapsed < Global.TriggerPlayer.NextTargetTextTime)); If(Not(Global.TriggerPlayer.NameplatesDisabled)); Disable Nameplates(All Players(All Teams), Global.TriggerPlayer); Global.TriggerPlayer.NameplatesDisabled = True; End; Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer); If((Global.TextCleanupIndex < 0)); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); If((Global.TextCleanupIndex < 0)); Global.TextCleanupPlayer = Null; Call Subroutine(CleanupOrphanedText); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); End; Abort If((Global.TextCleanupIndex < 0)); If(Or((Global.TemporaryEffectHudIds[Global.TextCleanupIndex] != 0), Or((Global.TemporaryTravelTextIds[Global.TextCleanupIndex] != 0), (Global.TemporaryVisionTextIds[Global.TextCleanupIndex] != 0)))); Global.TextCleanupPlayer = Null; Call Subroutine(CleanupOrphanedText); Global.TextCleanupIndex = Index Of Array Value(Global.TemporaryTextOwners, Null); End; Abort If((Global.TextCleanupIndex < 0)); Global.TemporaryTextOwners[Global.TextCleanupIndex] = Global.TriggerPlayer; End; Global.TriggerPlayer.NextTargetTextTime = (Total Time Elapsed + 0.250); Create In-World Text(Evaluate Once(Global.TriggerPlayer), Custom String("{0} {1} | {2}", Hero Icon String((Is Duplicating(Evaluate Once(Global.TriggerPlayer.TravelTargetCandidate)) ? Hero Being Duplicated(Evaluate Once(Global.TriggerPlayer.TravelTargetCandidate)) : Hero Of(Evaluate Once(Global.TriggerPlayer.TravelTargetCandidate)))), Evaluate Once((Array Contains(Global.HumanPlayers, Global.TriggerPlayer.TravelTargetCandidate) ? Player Variable(Global.TriggerPlayer.TravelTargetCandidate, DisplayName) : Custom String("{0}", (Is Duplicating(Global.TriggerPlayer.TravelTargetCandidate) ? Hero Being Duplicated(Global.TriggerPlayer.TravelTargetCandidate) : Hero Of(Global.TriggerPlayer.TravelTargetCandidate))))), Round To Integer(Health(Evaluate Once(Global.TriggerPlayer.TravelTargetCandidate)), Down)), Update Every Frame((Eye Position(Evaluate Once(Global.TriggerPlayer.TravelTargetCandidate)) + Vector(0, 0.450, 0))), 1.100, Do Not Clip, Visible To Position String and Color, Evaluate Once((Array Contains(Global.HumanPlayers, Global.TriggerPlayer.TravelTargetCandidate) ? Player Variable(Global.TriggerPlayer.TravelTargetCandidate, NameColor) : Color(Orange))), Visible Never); Global.TriggerPlayer.TravelText = Last Text ID; Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = Global.TriggerPlayer.TravelText; Global.TriggerPlayer.TravelTextTarget = Global.TriggerPlayer.TravelTargetCandidate; } } rule("66 - Crouch Travel: Interact applies the active page") { event { Subroutine; Controller19e; } actions { If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Global.TriggerPlayer.CrouchTravelActive, And(Has Spawned(Global.TriggerPlayer), And(Is Alive(Global.TriggerPlayer), (Global.TriggerPlayer.TravelCommand == 3)))))))); Global.TriggerPlayer.ControllerState[32] = 0; Abort; End; Abort If((Global.TriggerPlayer.ControllerState[32] == 1)); Global.TriggerPlayer.ControllerState[32] = 1; Global.TriggerPlayer.LockedTravelType = Global.TriggerPlayer.TravelCursor; Global.TriggerPlayer.LockedTravelTarget = Null; If(Or((Global.TriggerPlayer.LockedTravelType == 2), (Global.TriggerPlayer.LockedTravelType == 3))); Call Subroutine(RefreshTravelTarget); Global.TriggerPlayer.LockedTravelTarget = Global.TriggerPlayer.TravelTargetCandidate; End; If((Global.TriggerPlayer.LockedTravelType == 0)); Call Subroutine(TravelToSpawn); Else If((Global.TriggerPlayer.LockedTravelType == 1)); Call Subroutine(TravelToObjective); Else If((Global.TriggerPlayer.LockedTravelType == 2)); Call Subroutine(TravelToPlayer); Else If((Global.TriggerPlayer.LockedTravelType == 3)); Global.TriggerPlayer.AttachmentChain = Global.TriggerPlayer.LockedTravelTarget; Global.TriggerPlayer.AttachmentCycleDetected = False; For Player Variable(Global.TriggerPlayer, AttachmentChainIndex, 0, (Count Of(All Players(All Teams)) + 1), 1); If((Global.TriggerPlayer.AttachmentChain != Null)); If((Global.TriggerPlayer.AttachmentChain == Global.TriggerPlayer)); Global.TriggerPlayer.AttachmentCycleDetected = True; Global.TriggerPlayer.AttachmentChain = Null; Else If(Player Variable(Global.TriggerPlayer.AttachmentChain, TravelAttachmentActive)); Global.TriggerPlayer.AttachmentChain = Player Variable(Global.TriggerPlayer.AttachmentChain, TravelAttachmentTarget); Else; Global.TriggerPlayer.AttachmentChain = Null; End; End; End; If((Global.TriggerPlayer.AttachmentChain != Null)); Global.TriggerPlayer.AttachmentCycleDetected = True; End; If(Or(Or((Global.TriggerPlayer.LockedTravelTarget == Null), Not(Entity Exists(Global.TriggerPlayer.LockedTravelTarget))), Or(Not(Has Spawned(Global.TriggerPlayer.LockedTravelTarget)), Not(Is Alive(Global.TriggerPlayer.LockedTravelTarget))))); Small Message(Global.TriggerPlayer, Custom String("Attach target unavailable.")); Else If(Global.TriggerPlayer.AttachmentCycleDetected); Small Message(Global.TriggerPlayer, Custom String("Attach blocked: loop.")); Else; If(Global.TriggerPlayer.TravelAttachmentActive); Detach Players(Global.TriggerPlayer); End; Global.TriggerPlayer.TravelAttachmentTarget = Global.TriggerPlayer.LockedTravelTarget; Global.TriggerPlayer.AttachmentOwnerHero = Hero Of(Global.TriggerPlayer); Global.TriggerPlayer.AttachmentTargetHero = Hero Of(Global.TriggerPlayer.TravelAttachmentTarget); Global.TriggerPlayer.TravelAttachmentActive = True; Attach Players(Evaluate Once(Global.TriggerPlayer), Player Variable(Evaluate Once(Global.TriggerPlayer), TravelAttachmentTarget), Vector(0, ((Y Component Of(Eye Position(Player Variable(Evaluate Once(Global.TriggerPlayer), TravelAttachmentTarget))) - Y Component Of(Position Of(Player Variable(Evaluate Once(Global.TriggerPlayer), TravelAttachmentTarget)))) + 0.750), 0)); Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("Attached. {0}+{1}: detach", Input Binding String(Button(Crouch)), Input Binding String(Button(Reload)))); End; Else; If((Total Time Elapsed >= Global.TriggerPlayer.NextSuicideTime)); Global.TriggerPlayer.NextSuicideTime = (Total Time Elapsed + 3); Clear Status(Global.TriggerPlayer, Unkillable); Set Damage Received(Global.TriggerPlayer, 100); Kill(Global.TriggerPlayer, Null); Else If((Total Time Elapsed < (Global.TriggerPlayer.NextSuicideTime - 2))); Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("Self kill: wait 3s.")); Else If((Total Time Elapsed < (Global.TriggerPlayer.NextSuicideTime - 1))); Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("Self kill: wait 2s.")); Else; Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("Self kill: wait 1s.")); End; End; Global.TriggerPlayer.LockedTravelType = -1; Global.TriggerPlayer.LockedTravelTarget = Null; } } rule("67 - Crouch Travel: Reload detaches the player") { event { Subroutine; Controller19f; } actions { Abort If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Global.TriggerPlayer.TravelAttachmentActive, And(Not(Global.TriggerPlayer.MenuOpen), And(Is Button Held(Global.TriggerPlayer, Button(Crouch)), Is Button Held(Global.TriggerPlayer, Button(Reload))))))))); Detach Players(Global.TriggerPlayer); Set Player Variable(Global.TriggerPlayer, TravelAttachmentActive, False); Set Player Variable(Global.TriggerPlayer, TravelAttachmentTarget, Null); Set Player Variable(Global.TriggerPlayer, AttachmentOwnerHero, Null); Set Player Variable(Global.TriggerPlayer, AttachmentTargetHero, Null); } } rule("68 - Crouch Travel: Detach when player state changes") { event { Subroutine; Controller19h; } actions { Abort If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Global.TriggerPlayer.TravelAttachmentActive, Or(Or(Or(Not(Has Spawned(Global.TriggerPlayer)), Not(Is Alive(Global.TriggerPlayer))), Or((Global.TriggerPlayer.TravelAttachmentTarget == Null), Not(Entity Exists(Global.TriggerPlayer.TravelAttachmentTarget)))), Or(Or(Not(Has Spawned(Global.TriggerPlayer.TravelAttachmentTarget)), Not(Is Alive(Global.TriggerPlayer.TravelAttachmentTarget))), Or(Or((Hero Of(Global.TriggerPlayer) != Global.TriggerPlayer.AttachmentOwnerHero), (Hero Of(Global.TriggerPlayer.TravelAttachmentTarget) != Global.TriggerPlayer.AttachmentTargetHero)), Or(Player Variable(Global.TriggerPlayer.TravelAttachmentTarget, PlayerCycleActive), And(Player Variable(Global.TriggerPlayer.TravelAttachmentTarget, IsHuman), Player Variable(Global.TriggerPlayer.TravelAttachmentTarget, InspectionPrivacyActive))))))))))); Detach Players(Global.TriggerPlayer); Set Player Variable(Global.TriggerPlayer, TravelAttachmentActive, False); Set Player Variable(Global.TriggerPlayer, TravelAttachmentTarget, Null); Set Player Variable(Global.TriggerPlayer, AttachmentOwnerHero, Null); Set Player Variable(Global.TriggerPlayer, AttachmentTargetHero, Null); } } rule("69 - Crouch Travel: Close when Crouch is released") { event { Subroutine; Controller19g; } actions { Abort If(Not(And(Not(Global.TriggerPlayer.TeamChangeProcessed), And(Not(Global.TriggerPlayer.PlayerCycleActive), And(Global.TriggerPlayer.CrouchTravelActive, Or(Or(Or(Not(Is Button Held(Global.TriggerPlayer, Button(Crouch))), Global.TriggerPlayer.MenuOpen), Or(Not(Has Spawned(Global.TriggerPlayer)), Not(Is Alive(Global.TriggerPlayer)))), Global.TriggerPlayer.LuckPrivacyActive)))))); Call Subroutine(CloseCrouchTravel); } } rule("70 - Subroutine: Process fast player state") { event { Subroutine; ProcessPlayerFastState; } actions { If(And(Not(Global.ActivePlayer.AutoHeroSelectionComplete), (Global.ActivePlayer.AutoHeroSelectionDeadline == 0))); If(Or((Team Of(Global.ActivePlayer) == Team 1), (Team Of(Global.ActivePlayer) == Team 2))); Global.ActivePlayer.AutoHeroSelectionDeadline = (Total Time Elapsed + 60); End; End; If(And(Array Contains(Global.HumanPlayers, Global.ActivePlayer), And(Or((Global.ActivePlayer.DisplayName == Null), (Global.ActivePlayer.DisplayName == Custom String(""))), (Custom String("{0}", Global.ActivePlayer) != Custom String(""))))); Global.ActivePlayer.DisplayName = Evaluate Once(Custom String("{0}", Global.ActivePlayer)); End; If(And(Not(Global.ActivePlayer.PlayerCycleActive), And(Not(Is Dummy Bot(Global.ActivePlayer)), And(Not(Global.ActivePlayer.IsAutomaticBot), And(Array Contains(Global.HumanPlayers, Global.ActivePlayer), Or(Not(Global.ActivePlayer.IsHuman), Not(Global.ActivePlayer.WasPrepared))))))); If((Global.ActivePlayer.DisplayName == Custom String("งูแรร์"))); Global.ActivePlayer.CustomSoundtrack = Custom String("Draconian"); If(Not(Global.ActivePlayer.WasPrepared)); Global.ActivePlayer.ColorIndex = 2; Global.ActivePlayer.ColorCursor = 2; Global.ActivePlayer.NameColor = Global.NameColors[2]; Global.ActivePlayer.MenuColor = Global.NameColorRGBValues[2]; Global.ActivePlayer.IconIndex = 23; Global.ActivePlayer.IconCursor = 23; End; End; Global.ActivePlayer.IsHuman = True; Global.ActivePlayer.IsClassified = True; Global.ActivePlayer.IsPrepared = True; Global.ActivePlayer.WasPrepared = True; End; If(And(Not(Is Dummy Bot(Global.ActivePlayer)), And(Not(Global.ActivePlayer.IsAutomaticBot), And(Not(Array Contains(Global.HumanPlayers, Global.ActivePlayer)), Or(Not(Global.ActivePlayer.TeamChangeProcessed), (Global.ActivePlayer.TeamCycleTargetTeam != Team Of(Global.ActivePlayer))))))); Global.ActivePlayer.TeamChangeProcessed = True; Global.ActivePlayer.PlayerCycleActive = False; Global.ActivePlayer.IsPrepared = False; Global.ActivePlayer.IsHuman = False; Global.ActivePlayer.TeamCycleTargetTeam = Team Of(Global.ActivePlayer); Global.ActivePlayer.TeamCycleDeadline = (Total Time Elapsed + 0.250); If((Global.TeamCyclePlayer == Global.ActivePlayer)); Global.TeamCyclePlayer = Null; Global.TeamCyclePhaseOwner = Null; Global.TeamCycleTime = (Total Time Elapsed + 0.250); End; End; If(And((Global.TeamCyclePlayer == Null), And(Global.ActivePlayer.TeamChangeProcessed, And(Not(Global.ActivePlayer.IsAutomaticBot), And(Or(Not(Array Contains(Global.HumanPlayers, Global.ActivePlayer)), Global.ActivePlayer.PlayerCycleActive), And((Global.ActivePlayer.TeamCycleTargetTeam == Team Of(Global.ActivePlayer)), And(Entity Exists(Global.ActivePlayer), And(Has Spawned(Global.ActivePlayer), And((Total Time Elapsed >= Global.TeamCycleTime), (Total Time Elapsed >= Global.ActivePlayer.TeamCycleDeadline)))))))))); Global.TeamCyclePlayer = Global.ActivePlayer; End; If(And(Global.ActivePlayer.IsHuman, Or(Global.ActivePlayer.RevengeDeathPending, And(Global.ActivePlayer.LuckActive, And((Global.ActivePlayer.LuckEffect == 3), And((Global.ActivePlayer.LuckSpinCount == 0), (Global.ActivePlayer.ForcedRevengeEndTime > 0))))))); If(And(Global.ActivePlayer.RevengeDeathPending, Or((Global.ActivePlayer.RevengeClaimant == Null), Or(Not(Entity Exists(Global.ActivePlayer.RevengeClaimant)), Not(Player Variable(Global.ActivePlayer.RevengeClaimant, IsHuman)))))); Global.ActivePlayer.RevengeDeathPending = False; Global.ActivePlayer.RevengeClaimant = Null; Global.ActivePlayer.NextForcedRevengeTime = 0; Global.ActivePlayer.ForcedRevengeEndTime = 0; Else If(And((Global.ActivePlayer.ForcedRevengeEndTime > 0), (Total Time Elapsed >= Global.ActivePlayer.ForcedRevengeEndTime))); If(Global.ActivePlayer.RevengeDeathPending); Small Message(Evaluate Once(Global.ActivePlayer.RevengeClaimant), Custom String("Revenge failed. Debt unchanged.")); Set Player Variable(Global.ActivePlayer.RevengeClaimant, LockedRevengeTarget, Null); Global.ActivePlayer.RevengeDeathPending = False; Global.ActivePlayer.RevengeClaimant = Null; Else; Call Subroutine(RestoreActivePlayerLuck); Global.ActivePlayer.LuckMenuReopenNeeded = Not(Global.ActivePlayer.MenuOpen); Small Message(Global.ActivePlayer, Custom String("SKULL failed. Menu restored.")); End; Global.ActivePlayer.NextForcedRevengeTime = 0; Global.ActivePlayer.ForcedRevengeEndTime = 0; Else If(And(Has Spawned(Global.ActivePlayer), And(Is Alive(Global.ActivePlayer), (Total Time Elapsed >= Global.ActivePlayer.NextForcedRevengeTime)))); Global.ActivePlayer.NextForcedRevengeTime = (Total Time Elapsed + 0.250); Clear Status(Global.ActivePlayer, Unkillable); Set Damage Received(Global.ActivePlayer, 100); Kill(Global.ActivePlayer, (Global.ActivePlayer.RevengeDeathPending ? Global.ActivePlayer.RevengeClaimant : Null)); End; End; If(And(Global.ActivePlayer.IsHuman, And(Global.ActivePlayer.UnkillableActive, And(Not(Global.ActivePlayer.RevengeDeathPending), And(Not(And(And(Global.ActivePlayer.LuckActive, (Global.ActivePlayer.LuckSpinCount == 0)), Or(And((Global.ActivePlayer.LuckEffect == 3), (Global.ActivePlayer.ForcedRevengeEndTime > 0)), And((Global.ActivePlayer.LuckEffect == 5), (Global.ActivePlayer.LuckEffectEndTime > Total Time Elapsed))))), And(Has Spawned(Global.ActivePlayer), Is Alive(Global.ActivePlayer))))))); If(And((Global.ActivePlayer.UnkillableMode == 1), Not(Is In Spawn Room(Global.ActivePlayer)))); If(Or(Not(Has Status(Global.ActivePlayer, Unkillable)), Or((Hero Of(Global.ActivePlayer) != Global.ActivePlayer.LastHero), ((Global.SchedulerStep % 20) == (Global.ActivePlayer.HudSlot % 20))))); If(Not(Has Status(Global.ActivePlayer, Unkillable))); Set Status(Global.ActivePlayer, Null, Unkillable, 9999); End; Set Damage Received(Global.ActivePlayer, 100); Set Knockback Received(Global.ActivePlayer, 100); Enable Movement Collision With Players(Global.ActivePlayer); End; If((Health(Global.ActivePlayer) >= Max Health(Global.ActivePlayer))); Set Player Health(Global.ActivePlayer, 1); End; Else If((Global.ActivePlayer.UnkillableMode == 2)); If(Or(Not(Has Status(Global.ActivePlayer, Unkillable)), Or((Hero Of(Global.ActivePlayer) != Global.ActivePlayer.LastHero), ((Global.SchedulerStep % 20) == (Global.ActivePlayer.HudSlot % 20))))); If(Not(Has Status(Global.ActivePlayer, Unkillable))); Set Status(Global.ActivePlayer, Null, Unkillable, 9999); End; Set Damage Received(Global.ActivePlayer, 0); Set Knockback Received(Global.ActivePlayer, 0); Disable Movement Collision With Players(Global.ActivePlayer); End; If((Health(Global.ActivePlayer) < Max Health(Global.ActivePlayer))); Set Player Health(Global.ActivePlayer, Max Health(Global.ActivePlayer)); End; End; If(Or((Global.ActivePlayer.UnkillableIcon == Null), Not(Entity Exists(Global.ActivePlayer.UnkillableIcon)))); If((Global.ActivePlayer.UnkillableMode == 1)); Create Icon(All Players(All Teams), Evaluate Once(Global.ActivePlayer), Warning, Visible To and Position, Custom Color(255, 80, 80, 255), True); Else; Create Icon(All Players(All Teams), Evaluate Once(Global.ActivePlayer), Halo, Visible To and Position, Global.RGB, True); End; Global.ActivePlayer.UnkillableIcon = Last Created Entity; If(Array Contains(Global.HumanPlayers, Global.ActivePlayer)); Global.UnkillableIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer)]] = Global.ActivePlayer.UnkillableIcon; End; End; End; } } rule("71 - Subroutine: Process 3D flight per player at 20 Hz") { event { Subroutine; ProcessPlayerFlight; } actions { If(And(Global.ActivePlayer.IsHuman, And(Not(Global.ActivePlayer.IsAutomaticBot), And(Not(Is Dummy Bot(Global.ActivePlayer)), And(Has Spawned(Global.ActivePlayer), And(Is Alive(Global.ActivePlayer), And(Global.ActivePlayer.FlyModeActive, Global.ActivePlayer.GhostFlyPhysicsApplied))))))); If(And((Global.ActivePlayer.LuckEffect == 2), (Global.ActivePlayer.LuckEffectEndTime > Total Time Elapsed))); Global.ActivePlayer.FlyDirection = Vector(0, 0, 0); Global.ActivePlayer.FlyVelocityDelta = Vector(0, 0, 0); Else; Set Move Speed(Global.ActivePlayer, 0); Global.ActivePlayer.FlyDirection = (((Facing Direction Of(Global.ActivePlayer) * Max(0, Z Component Of(Throttle Of(Global.ActivePlayer)))) + (Direction From Angles(Horizontal Facing Angle Of(Global.ActivePlayer), 0) * Min(0, Z Component Of(Throttle Of(Global.ActivePlayer))))) + (Cross Product(Vector(0, 1, 0), Direction From Angles(Horizontal Facing Angle Of(Global.ActivePlayer), 0)) * X Component Of(Throttle Of(Global.ActivePlayer)))); If((Magnitude Of(Global.ActivePlayer.FlyDirection) > 0.050)); Global.ActivePlayer.FlyVelocityDelta = (((((Normalize(Global.ActivePlayer.FlyDirection) * 5.500) * Global.ActivePlayer.MovementSpeed) / 100) * Min(1, Magnitude Of(Throttle Of(Global.ActivePlayer)))) - Velocity Of(Global.ActivePlayer)); Else; Global.ActivePlayer.FlyVelocityDelta = (Velocity Of(Global.ActivePlayer) * -1); End; If((Magnitude Of(Global.ActivePlayer.FlyVelocityDelta) > 0.010)); Apply Impulse(Global.ActivePlayer, Global.ActivePlayer.FlyVelocityDelta, Magnitude Of(Global.ActivePlayer.FlyVelocityDelta), To World, Incorporate Contrary Motion); End; End; End; } } rule("72 - Subroutine: Process the player cycle at 10 Hz") { event { Subroutine; ProcessPlayerCycle; } actions { If(Global.ActivePlayer.IsHuman); If(And(And(Global.ActivePlayer.MenuOpen, (Global.ActivePlayer.MenuPage == 19)), And(Is Button Held(Global.ActivePlayer, Button(Crouch)), And(Has Spawned(Global.ActivePlayer), Is Alive(Global.ActivePlayer))))); Global.WhisperPlayer = Global.ActivePlayer; Call Subroutine(RefreshWhisperTarget); Global.WhisperPlayer = Null; Global.WhisperTarget = Null; Else; Global.ActivePlayer.NocturneState[11] = Null; End; Else If((Count Of(Global.ActivePlayer.NocturneState) >= 14)); Global.ActivePlayer.NocturneState[11] = Null; End; If(And(Global.ActivePlayer.IsHuman, And(Not(Global.ActivePlayer.IsAutomaticBot), And(Not(Is Dummy Bot(Global.ActivePlayer)), Or(Not(Has Spawned(Global.ActivePlayer)), Not(Is Alive(Global.ActivePlayer))))))); If(Or((Global.ActivePlayer.LuckEffect != 2), (Global.ActivePlayer.LuckEffectEndTime <= Total Time Elapsed))); Set Move Speed(Global.ActivePlayer, 100); End; If(Global.ActivePlayer.GhostFlyPhysicsApplied); Stop Transforming Throttle(Global.ActivePlayer); Set Gravity(Global.ActivePlayer, 100); Enable Movement Collision With Environment(Global.ActivePlayer); Global.ActivePlayer.GhostFlyPhysicsApplied = False; End; End; If(And(Global.ActivePlayer.IsHuman, And(Not(Global.ActivePlayer.IsAutomaticBot), And(Not(Is Dummy Bot(Global.ActivePlayer)), And(Has Spawned(Global.ActivePlayer), Is Alive(Global.ActivePlayer)))))); If(Not(Global.ActivePlayer.GhostFlyPhysicsApplied)); If(Or((Global.ActivePlayer.LuckEffect != 2), (Global.ActivePlayer.LuckEffectEndTime <= Total Time Elapsed))); Set Move Speed(Global.ActivePlayer, (Global.ActivePlayer.FlyModeActive ? 0 : Global.ActivePlayer.MovementSpeed)); End; Stop Transforming Throttle(Global.ActivePlayer); Set Gravity(Global.ActivePlayer, Global.ActivePlayer.MovementGravity); Enable Movement Collision With Environment(Global.ActivePlayer); If(Global.ActivePlayer.GhostModeActive); Disable Movement Collision With Environment(Global.ActivePlayer, False); End; If(Global.ActivePlayer.FlyModeActive); Set Gravity(Global.ActivePlayer, 0); End; Global.ActivePlayer.GhostFlyPhysicsApplied = True; End; End; If(And(Global.ActivePlayer.IsHuman, And(Has Spawned(Global.ActivePlayer), Is Alive(Global.ActivePlayer)))); If(And(Not(Global.ActivePlayer.MenuOpen), And(Not(Global.ActivePlayer.LuckPrivacyActive), And(Not(Global.ActivePlayer.CrouchTravelActive), And(Not(Global.ActivePlayer.CrouchTravelEnabled), And((Global.ActivePlayer.CameraMode != 2), Is Button Held(Global.ActivePlayer, Button(Crouch)))))))); Call Subroutine(RefreshActivePlayerPublicTargets); Set Player Variable(Global.ActivePlayer, InspectionTargetCandidate, ((Count Of(Global.ActivePlayer.InspectionTargets) == 0) ? Null : First Of(Sorted Array(Global.ActivePlayer.InspectionTargets, Angle Between Vectors(Facing Direction Of(Global.ActivePlayer), Direction Towards(Eye Position(Global.ActivePlayer), Eye Position(Current Array Element))))))); Else; Set Player Variable(Global.ActivePlayer, InspectionTargetCandidate, Null); End; If(And(Global.ActivePlayer.CrouchTravelActive, And(Or((Global.ActivePlayer.TravelCursor == 2), (Global.ActivePlayer.TravelCursor == 3)), Is Button Held(Global.ActivePlayer, Button(Crouch))))); Call Subroutine(RefreshActivePlayerPublicTargets); Set Player Variable(Global.ActivePlayer, TravelTargets, Global.ActivePlayer.InspectionTargets); Set Player Variable(Global.ActivePlayer, TravelTargetCandidate, ((Count Of(Global.ActivePlayer.TravelTargets) == 0) ? Null : First Of(Sorted Array(Global.ActivePlayer.TravelTargets, Angle Between Vectors(Facing Direction Of(Global.ActivePlayer), Direction Towards(Eye Position(Global.ActivePlayer), Eye Position(Current Array Element))))))); End; End; If(And(Global.ActivePlayer.TeamChangeProcessed, And(Global.ActivePlayer.IsHuman, And(Has Spawned(Global.ActivePlayer), Global.ActivePlayer.PlayerHudCreated)))); Global.ActivePlayer.TeamChangeProcessed = False; Global.ActivePlayer.PlayerCycleActive = False; Global.ActivePlayer.TeamCycleDeadline = 0; If((Global.TeamCyclePlayer == Global.ActivePlayer)); Global.TeamCyclePlayer = Null; Global.TeamCycleTime = (Total Time Elapsed + 0.250); End; End; If((Global.ActivePlayer.CameraMode == 2)); If(Or(Global.ActivePlayer.CameraTarget.PlayerCycleActive, Or(Or(Or((Global.ActivePlayer.CameraTarget == Null), Not(Entity Exists(Global.ActivePlayer.CameraTarget))), Or(Not(Has Spawned(Global.ActivePlayer.CameraTarget)), Not(Is Alive(Global.ActivePlayer.CameraTarget)))), And(Global.ActivePlayer.CameraTarget.IsHuman, Global.ActivePlayer.CameraTarget.InspectionPrivacyActive)))); Stop Camera(Global.ActivePlayer); Set Player Variable(Global.ActivePlayer, CameraMode, 0); Set Player Variable(Global.ActivePlayer, CameraTarget, Null); Small Message(Global.ActivePlayer, Custom String("Camera target unavailable/private.")); End; End; If(And(Global.ActivePlayer.IsHuman, And(Has Spawned(Global.ActivePlayer), (Hero Of(Global.ActivePlayer) != Global.ActivePlayer.LastHero)))); Global.ActivePlayer.LastHero = Hero Of(Global.ActivePlayer); Global.ActivePlayer.GhostFlyPhysicsApplied = False; If(Or((Global.ActivePlayer.LuckEffect != 2), (Global.ActivePlayer.LuckEffectEndTime <= Total Time Elapsed))); Set Move Speed(Global.ActivePlayer, (Global.ActivePlayer.FlyModeActive ? 0 : Global.ActivePlayer.MovementSpeed)); End; If(Or(Global.ActivePlayer.LuckActive, Or((Global.ActivePlayer.LuckSpinCount > 0), (Global.ActivePlayer.LuckEffect != 0)))); Call Subroutine(RestoreActivePlayerLuck); Global.ActivePlayer.LuckMenuReopenNeeded = Not(Global.ActivePlayer.MenuOpen); End; If(And((Global.ActivePlayer.CameraMode != 0), And((Global.ActivePlayer.CameraTarget != Null), Entity Exists(Global.ActivePlayer.CameraTarget)))); Stop Camera(Global.ActivePlayer); Global.CameraPlayer = Global.ActivePlayer; Call Subroutine(StartCamera); Global.CameraPlayer = Null; End; End; If(And(Global.ActivePlayer.InspectionActive, Or(Or(Or(Or(Or(Or(Not(Is Button Held(Global.ActivePlayer, Button(Crouch))), Global.ActivePlayer.MenuOpen), Not(Has Spawned(Global.ActivePlayer))), Not(Is Alive(Global.ActivePlayer))), (Global.ActivePlayer.CameraMode == 2)), And(Global.ActivePlayer.CrouchTravelActive, And((Global.ActivePlayer.TravelCursor != 2), (Global.ActivePlayer.TravelCursor != 3)))), Global.ActivePlayer.LuckPrivacyActive))); If(Global.ActivePlayer.NameplatesDisabled); Enable Nameplates(All Players(All Teams), Global.ActivePlayer); Global.ActivePlayer.NameplatesDisabled = False; End; If((Global.ActivePlayer.InspectionText != Null)); Destroy In-World Text(Global.ActivePlayer.InspectionText); End; If((Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer) < Count Of(Global.InspectionTextIds))); Global.InspectionTextIds[Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer)] = 0; End; End; Global.ActivePlayer.InspectionText = Null; Global.ActivePlayer.InspectionTarget = Null; Global.ActivePlayer.InspectionTargets = Empty Array; Global.ActivePlayer.InspectionActive = False; End; } } rule("73 - Subroutine: Maintain bots at 10 Hz and follow targets at 5 Hz") { event { Subroutine; ProcessPlayerBot; } actions { If(((Global.SchedulerStep % 4) == (Slot Of(Global.ActivePlayer) % 4))); If(And(Is Dummy Bot(Global.ActivePlayer), And(Has Spawned(Global.ActivePlayer), Is Alive(Global.ActivePlayer)))); Set Player Variable(Global.ActivePlayer, InspectionTargets, Filtered Array(Global.HumanPlayers, And(Entity Exists(Current Array Element), And(Player Variable(Current Array Element, IsHuman), And(Player Variable(Current Array Element, AllowDummyBotFollow), And(Has Spawned(Current Array Element), And(Is Alive(Current Array Element), (Team Of(Current Array Element) == Opposite Team Of(Team Of(Global.ActivePlayer)))))))))); If((Count Of(Global.ActivePlayer.InspectionTargets) > 0)); Set Player Variable(Global.ActivePlayer, DummyBotFollowTarget, First Of(Sorted Array(Global.ActivePlayer.InspectionTargets, Distance Between(Global.ActivePlayer, Current Array Element)))); Else; Set Player Variable(Global.ActivePlayer, DummyBotFollowTarget, Null); End; End; End; If(And(Global.ActivePlayer.TeamChangeProcessed, And(Global.ActivePlayer.IsAutomaticBot, And(Global.ActivePlayer.IsClassified, And(Has Spawned(Global.ActivePlayer), And(Is Alive(Global.ActivePlayer), Global.ActivePlayer.BotLocked)))))); Global.ActivePlayer.TeamChangeProcessed = False; Global.ActivePlayer.PlayerCycleActive = False; Global.ActivePlayer.TeamCycleDeadline = 0; If((Global.TeamCyclePlayer == Global.ActivePlayer)); Global.TeamCyclePlayer = Null; Global.TeamCycleTime = (Total Time Elapsed + 0.250); End; End; If(And(Global.IsReady, And(Or(Is Dummy Bot(Global.ActivePlayer), Global.ActivePlayer.IsAutomaticBot), And(Global.ActivePlayer.BotLocked, Or(Not(Has Spawned(Global.ActivePlayer)), Not(Is Alive(Global.ActivePlayer))))))); Global.ActivePlayer.BotLocked = False; End; } } rule("74 - Subroutine: Process player maintenance at 1 Hz") { event { Subroutine; ProcessPlayerMaintenance; } actions { If(And(Global.ActivePlayer.IsHuman, Entity Exists(Global.ActivePlayer))); If(Global.ActivePlayer.AllowDummyBotFollow); If(Not(Is True For Any(All Players(Opposite Team Of(Team Of(Global.ActivePlayer))), And(Entity Exists(Current Array Element), Is Dummy Bot(Current Array Element))))); Set Player Variable(Global.ActivePlayer, AllowDummyBotFollow, False); End; End; If(And(Global.ActivePlayer.MenuOpen, (Global.ActivePlayer.MenuPage == 2))); If(And((Global.ActivePlayer.CameraCursor >= 2), ((Global.ActivePlayer.CameraCursor - 2) < Count Of(Global.ActivePlayer.CameraTargets)))); Set Player Variable(Global.ActivePlayer, CameraTargetCandidate, Global.ActivePlayer.CameraTargets[(Global.ActivePlayer.CameraCursor - 2)]); Else; Set Player Variable(Global.ActivePlayer, CameraTargetCandidate, Null); End; Call Subroutine(RefreshActivePlayerPublicTargets); Set Player Variable(Global.ActivePlayer, CameraTargets, Global.ActivePlayer.InspectionTargets); If(And((Global.ActivePlayer.CameraTargetCandidate != Null), Array Contains(Global.ActivePlayer.CameraTargets, Global.ActivePlayer.CameraTargetCandidate))); Set Player Variable(Global.ActivePlayer, CameraCursor, (Index Of Array Value(Global.ActivePlayer.CameraTargets, Global.ActivePlayer.CameraTargetCandidate) + 2)); Else If((Global.ActivePlayer.CameraCursor >= (Count Of(Global.ActivePlayer.CameraTargets) + 2))); Set Player Variable(Global.ActivePlayer, CameraCursor, 0); End; End; If(And(Global.ActivePlayer.MenuOpen, (Global.ActivePlayer.MenuPage == 4))); If((Global.ActivePlayer.RevengeCursor < Count Of(Global.ActivePlayer.RevengeTargets))); Set Player Variable(Global.ActivePlayer, SelectedRevengeTarget, Global.ActivePlayer.RevengeTargets[Global.ActivePlayer.RevengeCursor]); Else; Set Player Variable(Global.ActivePlayer, SelectedRevengeTarget, Null); End; Set Player Variable(Global.ActivePlayer, RevengeTargets, Filtered Array(Global.HumanPlayers, (Current Array Element != Global.ActivePlayer))); If((Count Of(Global.ActivePlayer.RevengeTargets) == 0)); Set Player Variable(Global.ActivePlayer, RevengeCursor, 0); Else If(And((Global.ActivePlayer.SelectedRevengeTarget != Null), Array Contains(Global.ActivePlayer.RevengeTargets, Global.ActivePlayer.SelectedRevengeTarget))); Set Player Variable(Global.ActivePlayer, RevengeCursor, Index Of Array Value(Global.ActivePlayer.RevengeTargets, Global.ActivePlayer.SelectedRevengeTarget)); Else If((Global.ActivePlayer.RevengeCursor >= Count Of(Global.ActivePlayer.RevengeTargets))); Set Player Variable(Global.ActivePlayer, RevengeCursor, 0); End; End; End; } } rule("75 - Subroutine: Process the Try Your Luck state machine") { event { Subroutine; ProcessPlayerLuck; } actions { If(And(Global.ActivePlayer.IsHuman, And(Global.ActivePlayer.LuckActive, And(Has Spawned(Global.ActivePlayer), Is Alive(Global.ActivePlayer))))); If(And(((Global.SchedulerStep % 4) == (Global.ActivePlayer.HudSlot % 4)), And((Global.ActivePlayer.LuckSpinCount > 0), (Total Time Elapsed >= Global.ActivePlayer.NextLuckSpinTime)))); If((Global.ActivePlayer.LuckIcon != Null)); Destroy Icon(Global.ActivePlayer.LuckIcon); End; Global.ActivePlayer.LuckEffect = Random Integer(1, 6); If((Global.ActivePlayer.LuckEffect == 1)); Create Icon(Global.HumanPlayers, Update Every Frame((Eye Position(Evaluate Once(Global.ActivePlayer)) + (Facing Direction Of(Evaluate Once(Global.ActivePlayer)) * 4))), Eye, Visible To and Position, Color(Aqua), True); Else If((Global.ActivePlayer.LuckEffect == 2)); Create Icon(Global.HumanPlayers, Update Every Frame((Eye Position(Evaluate Once(Global.ActivePlayer)) + (Facing Direction Of(Evaluate Once(Global.ActivePlayer)) * 4))), Dizzy, Visible To and Position, Color(Violet), True); Else If((Global.ActivePlayer.LuckEffect == 3)); Create Icon(Global.HumanPlayers, Update Every Frame((Eye Position(Evaluate Once(Global.ActivePlayer)) + (Facing Direction Of(Evaluate Once(Global.ActivePlayer)) * 4))), Skull, Visible To and Position, Custom Color(255, 70, 70, 255), True); Else If((Global.ActivePlayer.LuckEffect == 4)); Create Icon(Global.HumanPlayers, Update Every Frame((Eye Position(Evaluate Once(Global.ActivePlayer)) + (Facing Direction Of(Evaluate Once(Global.ActivePlayer)) * 4))), Heart, Visible To and Position, Custom Color(70, 255, 110, 255), True); Else If((Global.ActivePlayer.LuckEffect == 5)); Create Icon(Global.HumanPlayers, Update Every Frame((Eye Position(Evaluate Once(Global.ActivePlayer)) + (Facing Direction Of(Evaluate Once(Global.ActivePlayer)) * 4))), Fire, Visible To and Position, Color(Orange), True); Else; Create Icon(Global.HumanPlayers, Update Every Frame((Eye Position(Evaluate Once(Global.ActivePlayer)) + (Facing Direction Of(Evaluate Once(Global.ActivePlayer)) * 4))), Poison 2, Visible To and Position, Custom Color(170, 80, 255, 255), True); End; Global.ActivePlayer.LuckIcon = Last Created Entity; If(Array Contains(Global.HumanPlayers, Global.ActivePlayer)); Global.LuckIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer)]] = Global.ActivePlayer.LuckIcon; End; Modify Player Variable(Global.ActivePlayer, LuckSpinCount, Subtract, 1); Global.ActivePlayer.NextLuckSpinTime = (Total Time Elapsed + Global.ActivePlayer.LuckSpinInterval); Modify Player Variable(Global.ActivePlayer, LuckSpinInterval, Add, 0.045); End; If(And((Global.ActivePlayer.LuckSpinCount == 0), And((Global.ActivePlayer.LuckIconEndTime == 0), And((Global.ActivePlayer.NextLuckSpinTime > 0), (Total Time Elapsed >= Global.ActivePlayer.NextLuckSpinTime))))); Global.ActivePlayer.LuckEffectEndTime = 0; Global.ActivePlayer.NextLuckBurnTime = 0; Global.ActivePlayer.LuckMenuReopenNeeded = False; If(Or(Or((Global.ActivePlayer.LuckEffect == 1), (Global.ActivePlayer.LuckEffect == 2)), Or((Global.ActivePlayer.LuckEffect == 5), (Global.ActivePlayer.LuckEffect == 6)))); If((Global.ActivePlayer.MenuHud != Null)); Destroy HUD Text(Global.ActivePlayer.MenuHud); End; If((Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer) < Count Of(Global.MenuHudIds))); Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer)] = 0; End; End; Global.ActivePlayer.MenuHud = Null; Global.ActivePlayer.MenuOpen = False; Global.ActivePlayer.MenuInputLocked = False; Global.ActivePlayer.MenuCommand = 0; Global.ActivePlayer.MenuPage = -1; Allow Button(Global.ActivePlayer, Button(Primary Fire)); Allow Button(Global.ActivePlayer, Button(Secondary Fire)); Allow Button(Global.ActivePlayer, Button(Interact)); Allow Button(Global.ActivePlayer, Button(Reload)); Allow Button(Global.ActivePlayer, Button(Ability 1)); Allow Button(Global.ActivePlayer, Button(Ability 2)); Allow Button(Global.ActivePlayer, Button(Ultimate)); End; If((Global.ActivePlayer.LuckEffect == 1)); Global.ActivePlayer.LuckPrivacyActive = True; Global.ActivePlayer.LuckEffectEndTime = (Total Time Elapsed + 15); Small Message(Global.ActivePlayer, Custom String("DARK ROULETTE: ALL PLAYER/BOT NAMES — 15s")); Else If((Global.ActivePlayer.LuckEffect == 2)); Set Move Speed(Global.ActivePlayer, 1000); Start Accelerating(Evaluate Once(Global.ActivePlayer), Facing Direction Of(Evaluate Once(Global.ActivePlayer)), 50, 25, To World, Direction Rate and Max Speed); Global.ActivePlayer.LuckEffectEndTime = (Total Time Elapsed + 10); If(Global.ActivePlayer.FlyModeActive); Small Message(Evaluate Once(Global.ActivePlayer), Custom String("DARK ROULETTE: FLIGHT BOOST — 10s")); Else; Small Message(Evaluate Once(Global.ActivePlayer), Custom String("DARK ROULETTE: AIM-STEERED ACCELERATION — 10s")); End; Else If((Global.ActivePlayer.LuckEffect == 3)); Small Message(Global.ActivePlayer, Custom String("DARK ROULETTE: SKULL")); Global.ActivePlayer.NextForcedRevengeTime = Total Time Elapsed; Global.ActivePlayer.ForcedRevengeEndTime = (Total Time Elapsed + 5); Else If((Global.ActivePlayer.LuckEffect == 4)); Set Player Health(All Living Players(Team Of(Global.ActivePlayer)), 9999); Small Message(Global.ActivePlayer, Custom String("DARK ROULETTE: HEART — FULL TEAM HEAL")); Global.ActivePlayer.LuckEffect = 0; Global.ActivePlayer.LuckActive = False; Else If((Global.ActivePlayer.LuckEffect == 5)); Set Status(Global.ActivePlayer, Null, Burning, 10); Clear Status(Global.ActivePlayer, Unkillable); Set Damage Received(Global.ActivePlayer, 100); Global.ActivePlayer.LuckEffectEndTime = (Total Time Elapsed + 10); Global.ActivePlayer.NextLuckBurnTime = Total Time Elapsed; Small Message(Global.ActivePlayer, Custom String("DARK ROULETTE: BURNING — 5% MAX HP/s — 10s")); Else; Set Status(Global.ActivePlayer, Null, Hacked, 5); Global.ActivePlayer.LuckEffectEndTime = (Total Time Elapsed + 5); Small Message(Global.ActivePlayer, Custom String("DARK ROULETTE: HACKED — 5s")); End; Global.ActivePlayer.NextLuckSpinTime = 0; Global.ActivePlayer.LuckIconEndTime = (Total Time Elapsed + 1); End; End; If(Global.ActivePlayer.IsHuman); If((Global.ActivePlayer.LuckEffect == 5)); If((Global.ActivePlayer.LuckEffectEndTime > Total Time Elapsed)); If((Global.ActivePlayer.NextLuckBurnTime <= Total Time Elapsed)); If(Has Spawned(Global.ActivePlayer)); If(Is Alive(Global.ActivePlayer)); Clear Status(Global.ActivePlayer, Unkillable); Set Damage Received(Global.ActivePlayer, 100); Damage(Global.ActivePlayer, Global.ActivePlayer, (Max Health(Global.ActivePlayer) * 0.050)); Global.ActivePlayer.NextLuckBurnTime = (Total Time Elapsed + 1.000); End; End; End; End; End; End; If(Global.ActivePlayer.IsHuman); If(Global.ActivePlayer.LuckActive); If((Global.ActivePlayer.LuckSpinCount == 0)); If((Global.ActivePlayer.LuckEffectEndTime > 0)); If((Total Time Elapsed >= Global.ActivePlayer.LuckEffectEndTime)); Clear Status(Global.ActivePlayer, Burning); Clear Status(Global.ActivePlayer, Hacked); If((Global.ActivePlayer.LuckEffect == 2)); Stop Accelerating(Global.ActivePlayer); Set Move Speed(Global.ActivePlayer, (Global.ActivePlayer.FlyModeActive ? 0 : Global.ActivePlayer.MovementSpeed)); End; If((Global.ActivePlayer.LuckEffectHud != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer) >= 0)); If((Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer)] == Global.ActivePlayer.LuckEffectHud)); Destroy HUD Text(Global.ActivePlayer.LuckEffectHud); Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer)] = 0; End; End; End; Global.ActivePlayer.LuckEffectHud = Null; Global.ActivePlayer.LuckPrivacyActive = False; Global.ActivePlayer.LuckEffect = 0; Global.ActivePlayer.LuckEffectEndTime = 0; Global.ActivePlayer.NextLuckBurnTime = 0; Global.ActivePlayer.LuckActive = False; Global.ActivePlayer.LuckMenuReopenNeeded = True; End; End; End; End; End; If((Global.ActivePlayer.LuckIconEndTime > 0)); If((Total Time Elapsed >= Global.ActivePlayer.LuckIconEndTime)); If((Global.ActivePlayer.LuckIcon != Null)); Destroy Icon(Global.ActivePlayer.LuckIcon); End; Global.ActivePlayer.LuckIcon = Null; If(Array Contains(Global.HumanPlayers, Global.ActivePlayer)); Global.LuckIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer)]] = 0; End; Global.ActivePlayer.LuckIconEndTime = 0; If(Not(Global.ActivePlayer.LuckActive)); If(Not(Global.ActivePlayer.MenuOpen)); Global.ActivePlayer.LuckMenuReopenNeeded = True; End; End; End; End; } } rule("76 - Subroutine: Close the menu and restore buttons") { event { Subroutine; CloseMenu; } actions { If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.MenuHudIds))); If((Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] != 0)); Destroy HUD Text(Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]); If((Global.TriggerPlayer.MenuHud == Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)])); Global.TriggerPlayer.MenuHud = Null; End; End; Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = 0; End; End; If((Global.TriggerPlayer.MenuHud != Null)); Destroy HUD Text(Global.TriggerPlayer.MenuHud); End; Global.TriggerPlayer.MenuHud = Null; Global.TriggerPlayer.MenuOpen = False; If(Or((Global.TriggerPlayer.MenuCommand != 8), Not(Is Button Held(Global.TriggerPlayer, Button(Ultimate))))); Global.TriggerPlayer.MenuCommand = 0; End; Global.TriggerPlayer.MenuPage = -1; If(Is Button Held(Global.TriggerPlayer, Button(Melee))); Global.TriggerPlayer.MeleeConsumed = True; Else; Allow Button(Global.TriggerPlayer, Button(Melee)); Global.TriggerPlayer.MeleeConsumed = False; End; Allow Button(Global.TriggerPlayer, Button(Jump)); Allow Button(Global.TriggerPlayer, Button(Crouch)); Allow Button(Global.TriggerPlayer, Button(Primary Fire)); Allow Button(Global.TriggerPlayer, Button(Secondary Fire)); Allow Button(Global.TriggerPlayer, Button(Interact)); Allow Button(Global.TriggerPlayer, Button(Reload)); Allow Button(Global.TriggerPlayer, Button(Ability 1)); Allow Button(Global.TriggerPlayer, Button(Ability 2)); If(Or((Global.TriggerPlayer.MenuCommand != 8), Not(Is Button Held(Global.TriggerPlayer, Button(Ultimate))))); Allow Button(Global.TriggerPlayer, Button(Ultimate)); End; } } rule("77 - Subroutine: Draw one active menu HUD") { event { Subroutine; DrawMenu; } actions { If((Global.TriggerPlayer.MenuHud != Null)); Destroy HUD Text(Global.TriggerPlayer.MenuHud); Global.TriggerPlayer.MenuHud = Null; End; Call Subroutine(DrawActiveMenuPage); Call Subroutine(TransitionMenuColor); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.MenuHudIds))); Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = Global.TriggerPlayer.MenuHud; End; End; } } rule("78 - Subroutine: Draw the main menu") { event { Subroutine; DrawMainMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, ((Player Variable(Local Player, MainMenuCursor) == 0) ? Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("0 - RITES / CONTROLS\n"), Custom String("{2} + {0}: Nocturne | {1} 0.5s: camera ({2} released)", Input Binding String(Button(Melee)), Input Binding String(Button(Interact)), Input Binding String(Button(Crouch)))), Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire)))), Custom String("+ {0}: all controls", Input Binding String(Button(Interact)))), Custom String("Nocturne closed: hold {0} to inspect hero/HP", Input Binding String(Button(Crouch)))), Custom String("Travel off or player/bot/attach mode")) : Custom String("{0}\n{1}", Custom String("{0}{1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} select", Input Binding String(Button(Interact)))), (And(Array Contains(Array(1, 2, 3, 5, 6, 7, 11, 13, 14, 16, 17, 18, 19, 20), Player Variable(Local Player, MainMenuCursor)), Or((Player Variable(Local Player, MainMenuCursor) != 3), (Player Variable(Local Player, CustomSoundtrack) == Null))) ? Custom String(" | {0} reset", Input Binding String(Button(Ultimate))) : Custom String(""))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee))))), ((Player Variable(Local Player, MainMenuCursor) == 0) ? Custom String("") : Custom String("\n{0}", Custom String("{0}\n{1}", ((Player Variable(Local Player, MainMenuCursor) == 1) ? Custom String("1 - MOONLIT NAME COLOR") : ((Player Variable(Local Player, MainMenuCursor) == 2) ? Custom String("2 - SPECTRAL CAMERA") : ((Player Variable(Local Player, MainMenuCursor) == 3) ? Custom String("3 - SOUL SOUNDTRACK") : ((Player Variable(Local Player, MainMenuCursor) == 4) ? Custom String("4 - BLOOD DEBT / REVENGE") : ((Player Variable(Local Player, MainMenuCursor) == 5) ? Custom String("5 - DEATHLESS") : ((Player Variable(Local Player, MainMenuCursor) == 6) ? Custom String("6 - ECHO VOICE") : ((Player Variable(Local Player, MainMenuCursor) == 7) ? Custom String("7 - SOUL SIGIL / ICON") : ((Player Variable(Local Player, MainMenuCursor) == 8) ? Custom String("8 - VEIL TRAVEL / SELF KILL") : ((Player Variable(Local Player, MainMenuCursor) == 9) ? Custom String("9 - PRIVACY VEIL") : ((Player Variable(Local Player, MainMenuCursor) == 10) ? Custom String("10 - DARK ROULETTE") : ((Player Variable(Local Player, MainMenuCursor) == 11) ? Custom String("11 - CROWN / VOTE") : ((Player Variable(Local Player, MainMenuCursor) == 12) ? Custom String("12 - DUMMY GAZE") : ((Player Variable(Local Player, MainMenuCursor) == 15) ? Custom String("15 - DEATH PUNCH") : ((Player Variable(Local Player, MainMenuCursor) == 14) ? Custom String("14 - SPECTRAL MULTIJUMP") : ((Player Variable(Local Player, MainMenuCursor) == 16) ? Custom String("16 - SPEED / GRAVITY") : ((Player Variable(Local Player, MainMenuCursor) == 17) ? Custom String("17 - SOUL PRESENCE") : ((Player Variable(Local Player, MainMenuCursor) == 18) ? Custom String("18 - FATES") : ((Player Variable(Local Player, MainMenuCursor) == 19) ? Custom String("19 - WHISPERS") : ((Player Variable(Local Player, MainMenuCursor) == 20) ? Custom String("20 - MOONLIT AURA") : Custom String("13 - GHOST / FLY")))))))))))))))))))), ((Player Variable(Local Player, MainMenuCursor) == 1) ? Custom String("NOW: {0}", Global.ColorNames[Player Variable(Local Player, ColorIndex)]) : ((Player Variable(Local Player, MainMenuCursor) == 2) ? Custom String("NOW: {0}", ((Player Variable(Local Player, CameraMode) == 0) ? Custom String("off") : ((Player Variable(Local Player, CameraMode) == 1) ? Custom String("your hero") : Custom String("watching {0}", Player Variable(Local Player, CameraTarget))))) : ((Player Variable(Local Player, MainMenuCursor) == 3) ? Custom String("NOW: {0}", ((Player Variable(Local Player, CustomSoundtrack) != Null) ? Player Variable(Local Player, CustomSoundtrack) : ((Player Variable(Local Player, GenreIndex) >= 0) ? Global.GenreNames[Player Variable(Local Player, GenreIndex)] : Custom String("silence before the storm")))) : ((Player Variable(Local Player, MainMenuCursor) == 4) ? Custom String("Settle your debts.") : ((Player Variable(Local Player, MainMenuCursor) == 5) ? Custom String("NOW: {0}", ((Player Variable(Local Player, UnkillableMode) == 0) ? Custom String("OFF") : ((Player Variable(Local Player, UnkillableMode) == 1) ? Custom String("1 HP (HEALABLE)") : Custom String("FULL HP")))) : ((Player Variable(Local Player, MainMenuCursor) == 6) ? Custom String("NOW: {0}", ((Player Variable(Local Player, VoiceIndex) == 0) ? Custom String("NORMAL") : ((Player Variable(Local Player, VoiceIndex) == 1) ? Custom String("LOW 0.50x") : ((Player Variable(Local Player, VoiceIndex) == 2) ? Custom String("LOW 0.75x") : ((Player Variable(Local Player, VoiceIndex) == 3) ? Custom String("HIGH 1.25x") : Custom String("HIGH 1.50x")))))) : ((Player Variable(Local Player, MainMenuCursor) == 7) ? ((Player Variable(Local Player, IconIndex) == 0) ? Custom String("NOW: NONE") : Custom String("NOW: {0} {1}", Global.PlayerIcons[Player Variable(Local Player, IconIndex)], Global.IconNames[Player Variable(Local Player, IconIndex)])) : ((Player Variable(Local Player, MainMenuCursor) == 8) ? Custom String("NOW: {0}", (Player Variable(Local Player, CrouchTravelEnabled) ? Custom String("ON") : Custom String("OFF"))) : ((Player Variable(Local Player, MainMenuCursor) == 9) ? Custom String("NOW: {0}", (Player Variable(Local Player, InspectionPrivacyActive) ? Custom String("ON") : Custom String("OFF"))) : ((Player Variable(Local Player, MainMenuCursor) == 10) ? Custom String("STATUS: {0}", (Player Variable(Local Player, LuckActive) ? ((Player Variable(Local Player, LuckSpinCount) > 0) ? Custom String("ROLLING") : Custom String("ACTIVE")) : Custom String("READY"))) : ((Player Variable(Local Player, MainMenuCursor) == 11) ? Custom String("VOTE: {0}", ((Player Variable(Local Player, VotedPlayer) != Null) ? Player Variable(Local Player, VotedPlayer) : Custom String("NONE"))) : ((Player Variable(Local Player, MainMenuCursor) == 12) ? Custom String("DUMMY GAZE: {0}", (Player Variable(Local Player, AllowDummyBotFollow) ? Custom String("ON") : Custom String("OFF"))) : ((Player Variable(Local Player, MainMenuCursor) == 15) ? Custom String("NOW: {0}", (Array Contains(Global.SuperPunchPlayers, Local Player) ? Custom String("ON") : Custom String("OFF"))) : ((Player Variable(Local Player, MainMenuCursor) == 14) ? Custom String("{0} | AIR BOOST: {1}%", (Player Variable(Local Player, MultijumpEnabled) ? Custom String("ON") : Custom String("OFF")), (Player Variable(Local Player, MultijumpLevel) * 100)) : ((Player Variable(Local Player, MainMenuCursor) == 16) ? Custom String("SPEED: {0}% | GRAVITY: {1}%", Player Variable(Local Player, MovementSpeed), Player Variable(Local Player, MovementGravity)) : ((Player Variable(Local Player, MainMenuCursor) == 17) ? Custom String("NOW: {0}", Global.PresenceNames[Player Variable(Local Player, NocturneState)[0]]) : ((Player Variable(Local Player, MainMenuCursor) == 18) ? Custom String("Roll dice or draw an omen.") : ((Player Variable(Local Player, MainMenuCursor) == 19) ? Custom String("RECEIVE: {0}", ((Player Variable(Local Player, NocturneState)[5] == True) ? Custom String("ON") : Custom String("OFF"))) : ((Player Variable(Local Player, MainMenuCursor) == 20) ? Custom String("NOW: {0}", Global.AuraNames[Player Variable(Local Player, NocturneState)[8]]) : Custom String("GHOST: {0} | FLY: {1}", (Player Variable(Local Player, GhostModeActive) ? Custom String("ON") : Custom String("OFF")), (Player Variable(Local Player, FlyModeActive) ? Custom String("ON") : Custom String("OFF"))))))))))))))))))))))))), Top, 3, Color(White), ((Player Variable(Local Player, MainMenuCursor) == 0) ? Color(White) : Custom Color(210, 200, 192, 255)), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("79 - Subroutine: Draw the Soundtrack menu") { event { Subroutine; DrawSoundtrackMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, ((Player Variable(Local Player, CustomSoundtrack) != Null) ? Custom String("{0}\n{1}", Custom String("Hold {0}: {1} back", Input Binding String(Button(Crouch)), Input Binding String(Button(Reload))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))) : Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} +10 / {1} -10", Input Binding String(Button(Ability 1)), Input Binding String(Button(Ability 2)))), Custom String("{0} apply / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee))))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", ((Player Variable(Local Player, CustomSoundtrack) != Null) ? Custom String("SOUNDTRACK LOCKED") : Custom String("3 - SOUL SOUNDTRACK {0}/{1}", (Player Variable(Local Player, GenreCursor) + 1), Count Of(Global.GenreNames))), ((Player Variable(Local Player, CustomSoundtrack) != Null) ? Custom String("NOW: {0}", Player Variable(Local Player, CustomSoundtrack)) : Custom String("NOW: {0}", ((Player Variable(Local Player, GenreIndex) >= 0) ? Global.GenreNames[Player Variable(Local Player, GenreIndex)] : Custom String("silence before the storm"))))), ((Player Variable(Local Player, CustomSoundtrack) != Null) ? Custom String("") : Global.MenuPageNames[Round To Integer((Player Variable(Local Player, GenreCursor) / 20), Down)])), ((Player Variable(Local Player, CustomSoundtrack) != Null) ? Custom String("") : Custom String("> {0}", Global.GenreNames[Player Variable(Local Player, GenreCursor)])))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("80 - Subroutine: Draw the Camera menu") { event { Subroutine; DrawCameraMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} apply / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("2 - SPECTRAL CAMERA {0}/{1}", (Player Variable(Local Player, CameraCursor) + 1), (Count Of(Player Variable(Local Player, CameraTargets)) + 2)), Custom String("NOW: {0}", ((Player Variable(Local Player, CameraMode) == 0) ? Custom String("CAMERA OFF") : ((Player Variable(Local Player, CameraMode) == 1) ? Custom String("YOUR HERO") : Custom String("WATCH {0}", Player Variable(Local Player, CameraTarget)))))), Custom String("> {0}", ((Player Variable(Local Player, CameraCursor) == 0) ? Custom String("CAMERA OFF") : ((Player Variable(Local Player, CameraCursor) == 1) ? Custom String("YOUR HERO") : Custom String("WATCH {0} {1}", Player Variable(Local Player, CameraTargets)[(Player Variable(Local Player, CameraCursor) - 2)], Hero Icon String((Is Duplicating(Player Variable(Local Player, CameraTargets)[(Player Variable(Local Player, CameraCursor) - 2)]) ? Hero Being Duplicated(Player Variable(Local Player, CameraTargets)[(Player Variable(Local Player, CameraCursor) - 2)]) : Hero Of(Player Variable(Local Player, CameraTargets)[(Player Variable(Local Player, CameraCursor) - 2)]))))))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("81 - Subroutine: Draw the Name Color menu") { event { Subroutine; DrawNameColorMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} apply / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("1 - MOONLIT NAME COLOR {0}/{1}", (Player Variable(Local Player, ColorCursor) + 1), Count Of(Global.NameColors)), Custom String("NOW: {0}", Global.ColorNames[Player Variable(Local Player, ColorIndex)])), Custom String("> {0}", Global.ColorNames[Player Variable(Local Player, ColorCursor)]))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("82 - Subroutine: Draw information and controls") { event { Subroutine; DrawInfoMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("0 - RITES / CONTROLS\n"), Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire)))), Custom String("+ {0} apply / {1} back / {2} reset*", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)), Input Binding String(Button(Ultimate)))), Custom String("{2} + {0}: Nocturne | {1} 0.5s: camera ({2} released)", Input Binding String(Button(Melee)), Input Binding String(Button(Interact)), Input Binding String(Button(Crouch)))), Custom String("Inspect: hold {0}; Nocturne closed; Travel off or player/bot/attach", Input Binding String(Button(Crouch)))), Custom String("Soundtrack: {0} + {1} / {2}: +10 / -10", Input Binding String(Button(Crouch)), Input Binding String(Button(Ability 1)), Input Binding String(Button(Ability 2)))), Custom String("Travel ON, Nocturne closed: hold {0}; {1} / {2}: next / prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire)))), Custom String("Travel: {0} use / {1} detach | release {2}: close", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)), Input Binding String(Button(Crouch)))), Custom String("Dead: {0} revive | Multijump ON: tap/hold {0} in air", Input Binding String(Button(Jump)))), Custom String("Punch ON: {0} punch | *reset where shown", Input Binding String(Button(Melee)))), Null, Top, 3, Color(White), Color(White), Color(White), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("83 - Subroutine: Draw the Revenge menu") { event { Subroutine; DrawRevengeMenu; } actions { Call Subroutine(RefreshRevengeTargets); Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} revenge / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", ((Count Of(Player Variable(Local Player, RevengeTargets)) == 0) ? Custom String("4 - BLOOD DEBT / REVENGE") : Custom String("4 - BLOOD DEBT / REVENGE {0}/{1}", (Player Variable(Local Player, RevengeCursor) + 1), Count Of(Player Variable(Local Player, RevengeTargets)))), ((Count Of(Player Variable(Local Player, RevengeTargets)) == 0) ? Custom String("NO OTHER PLAYERS") : Custom String("> {0}", Player Variable(Local Player, RevengeTargets)[Player Variable(Local Player, RevengeCursor)]))), ((Count Of(Player Variable(Local Player, RevengeTargets)) == 0) ? Custom String("") : Custom String("OWED: {0}", ((Index Of Array Value(Player Variable(Local Player, RevengeKillers), Player Variable(Local Player, RevengeTargets)[Player Variable(Local Player, RevengeCursor)]) < 0) ? 0 : Player Variable(Local Player, RevengeDebts)[Index Of Array Value(Player Variable(Local Player, RevengeKillers), Player Variable(Local Player, RevengeTargets)[Player Variable(Local Player, RevengeCursor)])]))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("84 - Subroutine: Draw the Travel menu") { event { Subroutine; DrawTravelMenu; } actions { If((Global.TriggerPlayer.MenuHud != Null)); Destroy HUD Text(Global.TriggerPlayer.MenuHud); End; Global.TriggerPlayer.MenuHud = Null; If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.MenuHudIds))); Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = 0; End; End; Global.TriggerPlayer.TravelCursor %= 5; Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} use / {1} detach | release {2}: close", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)), Input Binding String(Button(Crouch)))), Custom String("\n{0}", Custom String("{0}\n{1}", ((Player Variable(Local Player, TravelCursor) == 0) ? Custom String("1/5 | SPAWN") : ((Player Variable(Local Player, TravelCursor) == 1) ? Custom String("2/5 | OBJECTIVE") : ((Player Variable(Local Player, TravelCursor) == 2) ? Custom String("3/5 | PLAYER/BOT TELEPORT") : ((Player Variable(Local Player, TravelCursor) == 3) ? Custom String("4/5 | PLAYER/BOT ATTACH") : Custom String("5/5 | SELF KILL"))))), ((Player Variable(Local Player, TravelCursor) == 0) ? Custom String("TEAM SPAWN") : ((Player Variable(Local Player, TravelCursor) == 1) ? Custom String("") : ((Player Variable(Local Player, TravelCursor) == 2) ? Custom String("BESIDE: {0}", ((Player Variable(Local Player, TravelTargetCandidate) != Null) ? Player Variable(Local Player, TravelTargetCandidate) : Custom String("NO PUBLIC TARGET"))) : ((Player Variable(Local Player, TravelCursor) == 3) ? Custom String("ABOVE: {0}", ((Player Variable(Local Player, TravelTargetCandidate) != Null) ? Player Variable(Local Player, TravelTargetCandidate) : Custom String("NO PUBLIC TARGET"))) : ((Total Time Elapsed < Player Variable(Local Player, NextSuicideTime)) ? Custom String("WAIT {0}s", Round To Integer((Player Variable(Local Player, NextSuicideTime) - Total Time Elapsed), Up)) : Custom String("CURRENT FORM | 3s COOLDOWN")))))))), Top, 3, Color(White), Custom Color((190 + (X Component Of(Player Variable(Local Player, MenuColor)) * 0.250)), (190 + (Y Component Of(Player Variable(Local Player, MenuColor)) * 0.250)), (190 + (Z Component Of(Player Variable(Local Player, MenuColor)) * 0.250)), 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.MenuHudIds))); Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = Global.TriggerPlayer.MenuHud; End; End; } } rule("85 - Subroutine: Draw the Unkillable menu") { event { Subroutine; DrawUnkillableMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} apply / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("5 - DEATHLESS {0}/3", (Player Variable(Local Player, UnkillableCursor) + 1)), Custom String("NOW: {0}", ((Player Variable(Local Player, UnkillableMode) == 0) ? Custom String("OFF") : ((Player Variable(Local Player, UnkillableMode) == 1) ? Custom String("1 HP (HEALABLE)") : Custom String("FULL HP"))))), Custom String("> {0}", ((Player Variable(Local Player, UnkillableCursor) == 0) ? Custom String("OFF") : ((Player Variable(Local Player, UnkillableCursor) == 1) ? Custom String("1 HP (HEALABLE)") : Custom String("FULL HP")))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("86 - Subroutine: Draw the Hero Voice menu") { event { Subroutine; DrawHeroVoiceMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} apply / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("6 - ECHO VOICE {0}/5", (Player Variable(Local Player, VoiceCursor) + 1)), Custom String("NOW: {0}", ((Player Variable(Local Player, VoiceIndex) == 0) ? Custom String("NORMAL") : ((Player Variable(Local Player, VoiceIndex) == 1) ? Custom String("LOW 0.50x") : ((Player Variable(Local Player, VoiceIndex) == 2) ? Custom String("LOW 0.75x") : ((Player Variable(Local Player, VoiceIndex) == 3) ? Custom String("HIGH 1.25x") : Custom String("HIGH 1.50x"))))))), Custom String("> {0}", ((Player Variable(Local Player, VoiceCursor) == 0) ? Custom String("NORMAL") : ((Player Variable(Local Player, VoiceCursor) == 1) ? Custom String("LOW 0.50x") : ((Player Variable(Local Player, VoiceCursor) == 2) ? Custom String("LOW 0.75x") : ((Player Variable(Local Player, VoiceCursor) == 3) ? Custom String("HIGH 1.25x") : Custom String("HIGH 1.50x")))))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("87 - Subroutine: Draw the Player Icon menu") { event { Subroutine; DrawPlayerIconMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} apply / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("7 - SOUL SIGIL / ICON {0}/{1}", (Player Variable(Local Player, IconCursor) + 1), (Count Of(Global.PlayerIcons) + 1)), ((Player Variable(Local Player, IconIndex) == 0) ? Custom String("NOW: NONE") : Custom String("NOW: {0} {1}", Global.PlayerIcons[Player Variable(Local Player, IconIndex)], Global.IconNames[Player Variable(Local Player, IconIndex)]))), Custom String("{0}\n{1}", Custom String("FLOATING: {0}", ((Player Variable(Local Player, NocturneState)[14] == True) ? Custom String("ON") : Custom String("OFF"))), Custom String("> {0}", ((Player Variable(Local Player, IconCursor) == Count Of(Global.PlayerIcons)) ? Custom String("FLOATING - {0}", ((Player Variable(Local Player, NocturneState)[14] == True) ? Custom String("TURN OFF") : Custom String("TURN ON"))) : ((Player Variable(Local Player, IconCursor) == 0) ? Custom String("NONE") : Custom String("{0} {1}", Global.PlayerIcons[Player Variable(Local Player, IconCursor)], Global.IconNames[Player Variable(Local Player, IconCursor)]))))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("88 - Subroutine: Draw the Luck card") { event { Subroutine; DrawLuckMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, (Player Variable(Local Player, LuckActive) ? Custom String("The wheel is turning...") : Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("Hold {0}", Input Binding String(Button(Crouch))), Custom String("{0} spin / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee))))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("10 - DARK ROULETTE"), Custom String("STATUS: {0}", (Player Variable(Local Player, LuckActive) ? ((Player Variable(Local Player, LuckSpinCount) > 0) ? Custom String("ROLLING") : Custom String("ACTIVE")) : Custom String("READY")))), Custom String("> {0}", (Player Variable(Local Player, LuckActive) ? Custom String("THE WHEEL TURNS...") : Custom String("SPIN THE WHEEL"))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("89 - Subroutine: Draw the active page") { event { Subroutine; DrawActiveMenuPage; } actions { If((Global.TriggerPlayer.MenuPage == -1)); Call Subroutine(DrawMainMenu); Else If((Global.TriggerPlayer.MenuPage == 0)); Call Subroutine(DrawInfoMenu); Else If((Global.TriggerPlayer.MenuPage == 1)); Call Subroutine(DrawNameColorMenu); Else If((Global.TriggerPlayer.MenuPage == 2)); Call Subroutine(DrawCameraMenu); Else If((Global.TriggerPlayer.MenuPage == 3)); Call Subroutine(DrawSoundtrackMenu); Else If((Global.TriggerPlayer.MenuPage == 4)); Call Subroutine(DrawRevengeMenu); Else If((Global.TriggerPlayer.MenuPage == 5)); Call Subroutine(DrawUnkillableMenu); Else If((Global.TriggerPlayer.MenuPage == 6)); Call Subroutine(DrawHeroVoiceMenu); Else If((Global.TriggerPlayer.MenuPage == 7)); Call Subroutine(DrawPlayerIconMenu); Else If((Global.TriggerPlayer.MenuPage == 10)); Call Subroutine(DrawLuckMenu); Else If((Global.TriggerPlayer.MenuPage == 11)); Call Subroutine(DrawVoteMenu); Else If((Global.TriggerPlayer.MenuPage == 13)); Call Subroutine(DrawGhostFlyMenu); Else If((Global.TriggerPlayer.MenuPage == 14)); Call Subroutine(DrawMultijumpMenu); Else If(And((Global.TriggerPlayer.MenuPage >= 17), (Global.TriggerPlayer.MenuPage <= 20))); Call Subroutine(DrawNocturneMenu); Else If((Global.TriggerPlayer.MenuPage == 16)); Call Subroutine(DrawMovementMenu); End; } } rule("90 - Subroutine: Transition the menu color smoothly") { event { Subroutine; TransitionMenuColor; } actions { If(Global.TriggerPlayer.CrouchTravelActive); Chase Player Variable Over Time(Evaluate Once(Global.TriggerPlayer), MenuColor, ((Player Variable(Evaluate Once(Global.TriggerPlayer), TravelCursor) == 0) ? Vector(170, 186, 164) : ((Player Variable(Evaluate Once(Global.TriggerPlayer), TravelCursor) == 1) ? Vector(168, 180, 206) : ((Player Variable(Evaluate Once(Global.TriggerPlayer), TravelCursor) == 2) ? Vector(180, 156, 198) : ((Player Variable(Evaluate Once(Global.TriggerPlayer), TravelCursor) == 3) ? Vector(202, 152, 178) : Vector(206, 112, 134))))), 0.180, None); Else; Chase Player Variable Over Time(Evaluate Once(Global.TriggerPlayer), MenuColor, ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 0) ? Vector(255, 255, 255) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 1) ? Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorCursor)] : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 2) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(168, 180, 206) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 3) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(178, 132, 162) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 4) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(202, 108, 130) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 5) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(210, 194, 162) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 6) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(178, 142, 192) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 7) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(198, 174, 206) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 8) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(170, 142, 174) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 9) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(156, 152, 194) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 10) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(202, 164, 180) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 11) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(208, 184, 144) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 12) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(154, 174, 162) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 13) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(164, 176, 202) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 14) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(180, 164, 202) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 15) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(198, 112, 132) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 16) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(160, 176, 190) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 17) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(174, 188, 186) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 18) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(198, 174, 142) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 19) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(198, 152, 174) * 0.680)) : ((((Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage) == -1) ? Player Variable(Evaluate Once(Global.TriggerPlayer), MainMenuCursor) : Player Variable(Evaluate Once(Global.TriggerPlayer), MenuPage)) == 20) ? ((Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)] * 0.320) + (Vector(172, 168, 206) * 0.680)) : Global.NameColorRGBValues[Player Variable(Evaluate Once(Global.TriggerPlayer), ColorIndex)]))))))))))))))))))))), 0.180, None); End; } } rule("91 - Subroutine: Keep dummy targets stationary and normal AI at reduced speed") { event { Subroutine; LockBot; } actions { Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If(Not(Is Alive(Global.TriggerPlayer))); Global.TriggerPlayer.MenuOpen = False; Global.TriggerPlayer.MeleeConsumed = False; Global.TriggerPlayer.MenuPage = -1; Set Primary Fire Enabled(Global.TriggerPlayer, False); Set Secondary Fire Enabled(Global.TriggerPlayer, False); Set Ability 1 Enabled(Global.TriggerPlayer, False); Set Ability 2 Enabled(Global.TriggerPlayer, False); Set Ultimate Ability Enabled(Global.TriggerPlayer, False); Set Melee Enabled(Global.TriggerPlayer, False); Disallow Button(Global.TriggerPlayer, Button(Primary Fire)); Disallow Button(Global.TriggerPlayer, Button(Secondary Fire)); Disallow Button(Global.TriggerPlayer, Button(Ability 1)); Disallow Button(Global.TriggerPlayer, Button(Ability 2)); Disallow Button(Global.TriggerPlayer, Button(Ultimate)); Disallow Button(Global.TriggerPlayer, Button(Melee)); Disallow Button(Global.TriggerPlayer, Button(Jump)); Disallow Button(Global.TriggerPlayer, Button(Reload)); Disallow Button(Global.TriggerPlayer, Button(Interact)); Set Damage Dealt(Global.TriggerPlayer, 0); Set Healing Dealt(Global.TriggerPlayer, 0); Set Knockback Dealt(Global.TriggerPlayer, 0); Set Damage Received(Global.TriggerPlayer, 100); Set Knockback Received(Global.TriggerPlayer, 100); Set Move Speed(Global.TriggerPlayer, (Is Dummy Bot(Global.TriggerPlayer) ? 0 : 20)); Global.TriggerPlayer.LastHero = Hero Of(Global.TriggerPlayer); Global.TriggerPlayer.DummyBotFollowTarget = Null; Global.TriggerPlayer.BotLocked = True; Disable Nameplates(Global.TriggerPlayer, Filtered Array(Global.HumanPlayers, Player Variable(Current Array Element, NameplatesDisabled))); } } rule("92 - Subroutine: Draw the Vote menu") { event { Subroutine; DrawVoteMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} vote / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("11 - CROWN / VOTE {0}/{1}", (Player Variable(Local Player, VoteCursor) + 1), Count Of(Global.HumanPlayers)), Custom String("VOTE: {0}", ((Player Variable(Local Player, VotedPlayer) != Null) ? Player Variable(Local Player, VotedPlayer) : Custom String("NONE")))), Custom String("> {0}", ((Count Of(Global.HumanPlayers) > 0) ? Custom String("{0} - {1} VOTES", Global.HumanPlayers[Player Variable(Local Player, VoteCursor)], Global.HumanPlayers[Player Variable(Local Player, VoteCursor)].VoteCount) : Custom String("NO PLAYERS"))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("93 - Subroutine: Draw the Ghost / Fly menu") { event { Subroutine; DrawGhostFlyMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} toggle / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("13 - GHOST / FLY {0}/2", (Player Variable(Local Player, GhostFlyCursor) + 1)), Custom String("GHOST: {0} | FLY: {1}", (Player Variable(Local Player, GhostModeActive) ? Custom String("ON") : Custom String("OFF")), (Player Variable(Local Player, FlyModeActive) ? Custom String("ON") : Custom String("OFF")))), Custom String("> {0}", ((Player Variable(Local Player, GhostFlyCursor) == 0) ? Custom String("GHOST: {0}", (Player Variable(Local Player, GhostModeActive) ? Custom String("OFF") : Custom String("ON"))) : Custom String("FLY: {0}", (Player Variable(Local Player, FlyModeActive) ? Custom String("OFF") : Custom String("ON")))))), ((Player Variable(Local Player, GhostFlyCursor) == 0) ? Custom String("Walk through walls; keep the floor.") : Custom String("FLY: {0}% | speed in menu 16", Player Variable(Local Player, MovementSpeed))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("94 - Subroutine: Recount votes and determine a sole leader") { event { Subroutine; RecountVotes; } actions { For Global Variable(VoterIndex, 0, Count Of(Global.HumanPlayers), 1); Set Player Variable(Global.HumanPlayers[Global.VoterIndex], VoteCount, Count Of(Filtered Array(Global.HumanPlayers, (Player Variable(Current Array Element, VotedPlayer) == Global.HumanPlayers[Global.VoterIndex])))); End; Global.VoteLeader = Null; Global.HighestVoteCount = 0; Global.VoteTied = False; Global.VoteLeaderName = Custom String(""); Global.VoteLeaderColor = Color(White); If((Count Of(Global.HumanPlayers) > 0)); Global.VoteLeader = First Of(Sorted Array(Global.HumanPlayers, (0 - Player Variable(Current Array Element, VoteCount)))); Global.HighestVoteCount = Player Variable(Global.VoteLeader, VoteCount); If((Global.HighestVoteCount > 0)); Global.VoteTied = (Count Of(Filtered Array(Global.HumanPlayers, (Player Variable(Current Array Element, VoteCount) == Global.HighestVoteCount))) > 1); If(Global.VoteTied); Global.VoteLeader = Null; End; Else; Global.VoteLeader = Null; End; End; If((Global.VoteLeader != Null)); Global.VoteLeaderName = Player Variable(Global.VoteLeader, DisplayName); Global.VoteLeaderColor = Player Variable(Global.VoteLeader, NameColor); End; } } rule("95 - Subroutine: Start the dynamic left shoulder camera") { event { Subroutine; StartCamera; } actions { Abort If((Global.CameraPlayer == Null)); Abort If(Not(Entity Exists(Global.CameraPlayer))); Abort If((Global.CameraPlayer.CameraMode == 0)); Abort If((Global.CameraPlayer.CameraTarget == Null)); Abort If(Not(Entity Exists(Global.CameraPlayer.CameraTarget))); Start Camera(Evaluate Once(Global.CameraPlayer), Update Every Frame(First Of(Mapped Array(Array(Ray Cast Hit Position((Eye Position(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) + Vector(0, Min(0.750, Max(0.450, (0.450 + ((Max Health(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) - 200) * 0.0006)))), 0)), (((Eye Position(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) + Vector(0, Min(0.750, Max(0.450, (0.450 + ((Max Health(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) - 200) * 0.0006)))), 0)) - (Facing Direction Of(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) * Min(4.500, Max(Global.CameraDistance, (Global.CameraDistance + ((Max Health(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) - 200) * 0.0055)))))) + (Cross Product(Direction From Angles(Horizontal Facing Angle Of(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)), 0), Vector(0, 1, 0)) * Min(1.350, Max(Global.CameraOffset, (Global.CameraOffset + ((Max Health(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) - 200) * 0.0016)))))), Empty Array, Empty Array, False)), (Current Array Element + (Direction Towards(Current Array Element, (Eye Position(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) + Vector(0, Min(0.750, Max(0.450, (0.450 + ((Max Health(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) - 200) * 0.0006)))), 0))) * Min(Global.CameraWallPadding, (Distance Between(Current Array Element, (Eye Position(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) + Vector(0, Min(0.750, Max(0.450, (0.450 + ((Max Health(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) - 200) * 0.0006)))), 0))) * 0.250))))))), Update Every Frame((Eye Position(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) + (Facing Direction Of(Player Variable(Evaluate Once(Global.CameraPlayer), CameraTarget)) * Global.AimDistance))), 0); } } rule("96 - Subroutine: Quiesce the trigger player before cleanup") { event { Subroutine; QuiescePlayer; } actions { Global.SuperPunchPlayers = Remove From Array(Global.SuperPunchPlayers, Global.TriggerPlayer); Call Subroutine(CloseMenu); If(Global.TriggerPlayer.IsHuman); Global.TriggerPlayer.NocturneState[11] = Null; Global.TriggerPlayer.NocturneState[12] = Custom String(""); Global.TriggerPlayer.NocturneState[13] = 0; End; Call Subroutine(CleanupObjectiveIcon); Global.FateResultPlayer = Global.TriggerPlayer; Call Subroutine(CleanupFateResults); Global.FateResultPlayer = Null; Global.MoonlitAuraPlayer = Global.TriggerPlayer; Call Subroutine(CleanupMoonlitAura); Global.MoonlitAuraPlayer = Null; Allow Button(Global.TriggerPlayer, Button(Melee)); Stop Camera(Global.TriggerPlayer); Stop Modifying Hero Voice Lines(Global.TriggerPlayer); Stop Chasing Player Variable(Global.TriggerPlayer, MenuColor); If(Global.TriggerPlayer.TravelAttachmentActive); Detach Players(Global.TriggerPlayer); End; Global.TriggerPlayer.TravelAttachmentActive = False; Global.TriggerPlayer.TravelAttachmentTarget = Null; Global.TriggerPlayer.AttachmentOwnerHero = Null; Global.TriggerPlayer.AttachmentTargetHero = Null; If(Global.TriggerPlayer.NameplatesDisabled); Enable Nameplates(All Players(All Teams), Global.TriggerPlayer); End; Global.TriggerPlayer.NameplatesDisabled = False; Global.TriggerPlayer.UnkillableActive = False; Global.TriggerPlayer.UnkillableMode = 0; Global.TriggerPlayer.UnkillableCursor = 0; Call Subroutine(RestorePlayerLuck); Stop Accelerating(Global.TriggerPlayer); Stop Transforming Throttle(Global.TriggerPlayer); Set Move Speed(Global.TriggerPlayer, 100); Set Gravity(Global.TriggerPlayer, 100); Enable Movement Collision With Environment(Global.TriggerPlayer); Global.TriggerPlayer.NextForcedRevengeTime = 0; Global.TriggerPlayer.ForcedRevengeEndTime = 0; Global.TriggerPlayer.LuckMenuReopenNeeded = False; Global.TriggerPlayer.RevengeDeathPending = False; Global.TriggerPlayer.RevengeClaimant = Null; Global.TriggerPlayer.IsPrepared = False; Global.TriggerPlayer.IsHuman = False; Global.TriggerPlayer.MenuCommand = 0; Global.TriggerPlayer.MenuInputLocked = False; Global.TriggerPlayer.MeleeConsumed = False; Global.TriggerPlayer.MenuOpen = False; Global.TriggerPlayer.CrouchTravelActive = False; Global.TriggerPlayer.TravelCommand = 0; Global.TriggerPlayer.InspectionActive = False; Global.TriggerPlayer.NextTargetTextTime = 0; Global.TriggerPlayer.ReviveTeleportNeeded = False; Global.TriggerPlayer.InspectionTarget = Null; Global.TriggerPlayer.CameraInteractConsumed = False; Global.TriggerPlayer.AllowDummyBotFollow = False; Global.TriggerPlayer.DummyBotTravelTime = 0; Global.TriggerPlayer.DummyBotTravelCursor = 0; Global.TriggerPlayer.GhostModeActive = False; Global.TriggerPlayer.FlyModeActive = False; Global.TriggerPlayer.GhostFlyCursor = 0; Global.TriggerPlayer.MultijumpEnabled = False; Global.TriggerPlayer.MultijumpCursor = 0; Global.TriggerPlayer.MultijumpLevel = 1; Global.TriggerPlayer.MultijumpConsumed = False; Global.TriggerPlayer.JumpWasGrounded = True; Global.TriggerPlayer.NextMultijumpTime = 0; Global.TriggerPlayer.ObjectiveIconPosition = Vector(0, 0.500, 0); Global.TriggerPlayer.GhostFlyPhysicsApplied = False; Global.TriggerPlayer.NextSuicideTime = 0; Global.TriggerPlayer.FlyDirection = Vector(0, 0, 0); Global.TriggerPlayer.FlyVelocityDelta = Vector(0, 0, 0); Global.TriggerPlayer.AttachmentChain = Null; Global.TriggerPlayer.AttachmentChainIndex = 0; Global.TriggerPlayer.AttachmentCycleDetected = False; Global.TriggerPlayer.PlayerListHud = Null; Global.TriggerPlayer.MenuHud = Null; Global.TriggerPlayer.PlayerHudCreated = False; Global.TriggerPlayer.IsClassified = False; Global.TriggerPlayer.IsAutomaticBot = False; } } rule("97 - Subroutine: Clear references to players who actually left") { event { Subroutine; CleanupPlayer; } actions { Global.SuperPunchPlayers = Remove From Array(Global.SuperPunchPlayers, Global.TriggerPlayer); Global.CleanupSubject = Global.TriggerPlayer; Call Subroutine(CleanupObjectiveIcon); Global.FateResultPlayer = Global.TriggerPlayer; Call Subroutine(CleanupFateResults); Global.FateResultPlayer = Null; Global.MoonlitAuraPlayer = Global.TriggerPlayer; Call Subroutine(CleanupMoonlitAura); Global.MoonlitAuraPlayer = Null; Global.LeavingPlayerIndex = Index Of Array Value(Global.HumanPlayers, Global.CleanupSubject); If((Global.LeavingPlayerIndex > -1)); If(Or((Global.LeavingPlayerIndex >= Count Of(Global.PlayerHudSlots)), Or((Global.LeavingPlayerIndex >= Count Of(Global.PlayerListHudIds)), Or((Global.LeavingPlayerIndex >= Count Of(Global.MenuHudIds)), (Global.LeavingPlayerIndex >= Count Of(Global.InspectionTextIds)))))); Global.CleanupPlayerIndex = Global.LeavingPlayerIndex; Global.LeavingPlayerIndex = -2; End; If((Global.LeavingPlayerIndex >= 0)); Global.CleanupPlayerIndex = Global.LeavingPlayerIndex; Global.LeavingDebtIndex = Global.PlayerHudSlots[Global.CleanupPlayerIndex]; Global.MissingHudDeadlines[Global.LeavingDebtIndex] = 0; If((Global.LuckIconIds[Global.LeavingDebtIndex] != 0)); Destroy Icon(Global.LuckIconIds[Global.LeavingDebtIndex]); End; Global.LuckIconIds[Global.LeavingDebtIndex] = 0; If((Global.UnkillableIconIds[Global.LeavingDebtIndex] != 0)); Destroy Icon(Global.UnkillableIconIds[Global.LeavingDebtIndex]); End; Global.UnkillableIconIds[Global.LeavingDebtIndex] = 0; If((Global.CleanupSubject.LuckEffectHud != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject) >= 0)); If((Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject)] == Global.CleanupSubject.LuckEffectHud)); Destroy HUD Text(Global.CleanupSubject.LuckEffectHud); Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject)] = 0; End; End; End; If((Global.CleanupSubject.LuckVisionText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject) >= 0)); If((Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject)] == Global.CleanupSubject.LuckVisionText)); Destroy In-World Text(Global.CleanupSubject.LuckVisionText); Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject)] = 0; End; End; End; If((Global.CleanupSubject.TravelText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject) >= 0)); If((Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject)] == Global.CleanupSubject.TravelText)); Destroy In-World Text(Global.CleanupSubject.TravelText); Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.CleanupSubject)] = 0; End; End; End; Global.CleanupSubject.LuckIcon = Null; Global.CleanupSubject.UnkillableIcon = Null; Global.CleanupSubject.LuckEffectHud = Null; Global.CleanupSubject.LuckVisionText = Null; Global.CleanupSubject.TravelText = Null; Global.CleanupSubject.PlayerListHud = Null; Global.CleanupSubject.MenuHud = Null; Global.CleanupSubject.InspectionText = Null; Global.CleanupSubject.PlayerHudCreated = False; Global.CleanupSubject.IsClassified = False; Set Player Variable(Filtered Array(Global.HumanPlayers, (Player Variable(Current Array Element, VotedPlayer) == Global.CleanupSubject)), VotedPlayer, Null); For Global Variable(VoterIndex, 0, Count Of(Global.HumanPlayers), 1); If((Global.HumanPlayers[Global.VoterIndex] != Global.CleanupSubject)); Global.LeavingRevengeIndex = Index Of Array Value(Player Variable(Global.HumanPlayers[Global.VoterIndex], RevengeKillers), Global.CleanupSubject); If(And((Global.LeavingRevengeIndex >= 0), (Global.LeavingRevengeIndex < Count Of(Player Variable(Global.HumanPlayers[Global.VoterIndex], RevengeDebts))))); Modify Player Variable(Global.HumanPlayers[Global.VoterIndex], RevengeKillers, Remove From Array By Index, Global.LeavingRevengeIndex); Modify Player Variable(Global.HumanPlayers[Global.VoterIndex], RevengeDebts, Remove From Array By Index, Global.LeavingRevengeIndex); End; If((Player Variable(Global.HumanPlayers[Global.VoterIndex], LockedRevengeTarget) == Global.CleanupSubject)); Set Player Variable(Global.HumanPlayers[Global.VoterIndex], LockedRevengeTarget, Null); End; If((Player Variable(Global.HumanPlayers[Global.VoterIndex], SelectedRevengeTarget) == Global.CleanupSubject)); Set Player Variable(Global.HumanPlayers[Global.VoterIndex], SelectedRevengeTarget, Null); End; If((Player Variable(Global.HumanPlayers[Global.VoterIndex], RevengeClaimant) == Global.CleanupSubject)); Set Player Variable(Global.HumanPlayers[Global.VoterIndex], RevengeClaimant, Null); Set Player Variable(Global.HumanPlayers[Global.VoterIndex], RevengeDeathPending, False); Set Player Variable(Global.HumanPlayers[Global.VoterIndex], NextForcedRevengeTime, 0); Set Player Variable(Global.HumanPlayers[Global.VoterIndex], ForcedRevengeEndTime, 0); End; End; End; If((Global.PlayerListHudIds[Global.CleanupPlayerIndex] != 0)); Destroy HUD Text(Global.PlayerListHudIds[Global.CleanupPlayerIndex]); End; If((Global.MenuHudIds[Global.CleanupPlayerIndex] != 0)); Destroy HUD Text(Global.MenuHudIds[Global.CleanupPlayerIndex]); End; If((Global.InspectionTextIds[Global.CleanupPlayerIndex] != 0)); Destroy In-World Text(Global.InspectionTextIds[Global.CleanupPlayerIndex]); End; Global.AvailableHudSlots = Sorted Array(Append To Array(Global.AvailableHudSlots, Global.LeavingDebtIndex), Current Array Element); Modify Global Variable(PlayerListHudIds, Remove From Array By Index, Global.CleanupPlayerIndex); Modify Global Variable(MenuHudIds, Remove From Array By Index, Global.CleanupPlayerIndex); Modify Global Variable(InspectionTextIds, Remove From Array By Index, Global.CleanupPlayerIndex); Modify Global Variable(PlayerHudSlots, Remove From Array By Index, Global.CleanupPlayerIndex); Modify Global Variable(HumanPlayers, Remove From Array By Index, Global.CleanupPlayerIndex); Global.VoterIndex = Count Of(Global.PlayerHudSlots); Global.LastHudSlot = ((Global.VoterIndex == 0) ? -1 : Last Of(Sorted Array(Global.PlayerHudSlots, Current Array Element))); Global.VoteRecountNeeded = True; End; If((Global.LeavingPlayerIndex == -2)); If((Global.CleanupPlayerIndex < Count Of(Global.PlayerHudSlots))); Destroy Icon(Global.LuckIconIds[Global.PlayerHudSlots[Global.CleanupPlayerIndex]]); Global.LuckIconIds[Global.PlayerHudSlots[Global.CleanupPlayerIndex]] = 0; End; If((Global.CleanupPlayerIndex < Count Of(Global.PlayerHudSlots))); Destroy Icon(Global.UnkillableIconIds[Global.PlayerHudSlots[Global.CleanupPlayerIndex]]); Global.UnkillableIconIds[Global.PlayerHudSlots[Global.CleanupPlayerIndex]] = 0; End; If((Global.TriggerPlayer.LuckEffectHud != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.LuckEffectHud)); Destroy HUD Text(Global.TriggerPlayer.LuckEffectHud); Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; If((Global.TriggerPlayer.LuckVisionText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.LuckVisionText)); Destroy In-World Text(Global.TriggerPlayer.LuckVisionText); Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; If((Global.TriggerPlayer.TravelText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.TravelText)); Destroy In-World Text(Global.TriggerPlayer.TravelText); Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; Global.TriggerPlayer.LuckIcon = Null; Global.TriggerPlayer.UnkillableIcon = Null; Global.TriggerPlayer.LuckEffectHud = Null; Global.TriggerPlayer.LuckVisionText = Null; Global.TriggerPlayer.TravelText = Null; Global.TriggerPlayer.PlayerListHud = Null; Global.TriggerPlayer.MenuHud = Null; Global.TriggerPlayer.InspectionText = Null; Global.TriggerPlayer.PlayerHudCreated = False; Global.TriggerPlayer.IsClassified = False; If((Global.CleanupPlayerIndex < Count Of(Global.PlayerListHudIds))); If((Global.PlayerListHudIds[Global.CleanupPlayerIndex] != 0)); Destroy HUD Text(Global.PlayerListHudIds[Global.CleanupPlayerIndex]); End; Modify Global Variable(PlayerListHudIds, Remove From Array By Index, Global.CleanupPlayerIndex); End; If((Global.CleanupPlayerIndex < Count Of(Global.MenuHudIds))); If((Global.MenuHudIds[Global.CleanupPlayerIndex] != 0)); Destroy HUD Text(Global.MenuHudIds[Global.CleanupPlayerIndex]); End; Modify Global Variable(MenuHudIds, Remove From Array By Index, Global.CleanupPlayerIndex); End; If((Global.CleanupPlayerIndex < Count Of(Global.InspectionTextIds))); If((Global.InspectionTextIds[Global.CleanupPlayerIndex] != 0)); Destroy In-World Text(Global.InspectionTextIds[Global.CleanupPlayerIndex]); End; Modify Global Variable(InspectionTextIds, Remove From Array By Index, Global.CleanupPlayerIndex); End; If((Global.CleanupPlayerIndex < Count Of(Global.PlayerHudSlots))); Global.LeavingDebtIndex = Global.PlayerHudSlots[Global.CleanupPlayerIndex]; Global.MissingHudDeadlines[Global.LeavingDebtIndex] = 0; Modify Global Variable(PlayerHudSlots, Remove From Array By Index, Global.CleanupPlayerIndex); Global.AvailableHudSlots = Append To Array(Global.AvailableHudSlots, Global.LeavingDebtIndex); Global.AvailableHudSlots = Sorted Array(Global.AvailableHudSlots, Current Array Element); End; Modify Global Variable(HumanPlayers, Remove From Array By Index, Global.CleanupPlayerIndex); Global.VoterIndex = Count Of(Global.PlayerHudSlots); Global.LastHudSlot = ((Global.VoterIndex == 0) ? -1 : Last Of(Sorted Array(Global.PlayerHudSlots, Current Array Element))); Global.VoteRecountNeeded = True; End; End; Global.TextCleanupPlayer = Global.TriggerPlayer; Call Subroutine(CleanupOrphanedText); Global.LeavingPlayerIndex = -1; Global.CleanupPlayerIndex = -1; Global.LeavingDebtIndex = -1; Global.LeavingRevengeIndex = -1; Global.VoterIndex = 0; Global.CleanupSubject = Null; } } rule("98 - Subroutine: Clean up orphaned text") { event { Subroutine; CleanupOrphanedText; } actions { For Global Variable(TextCleanupCursor, 0, Count Of(Global.TemporaryTextOwners), 1); If(Or((Global.TemporaryTextOwners[Global.TextCleanupCursor] != Null), Or((Global.TemporaryEffectHudIds[Global.TextCleanupCursor] != 0), Or((Global.TemporaryTravelTextIds[Global.TextCleanupCursor] != 0), (Global.TemporaryVisionTextIds[Global.TextCleanupCursor] != 0))))); If(Or(Not(Entity Exists(Global.TemporaryTextOwners[Global.TextCleanupCursor])), And((Global.TextCleanupPlayer != Null), (Global.TemporaryTextOwners[Global.TextCleanupCursor] == Global.TextCleanupPlayer)))); If((Global.TemporaryEffectHudIds[Global.TextCleanupCursor] != 0)); Destroy HUD Text(Global.TemporaryEffectHudIds[Global.TextCleanupCursor]); End; If((Global.TemporaryTravelTextIds[Global.TextCleanupCursor] != 0)); Destroy In-World Text(Global.TemporaryTravelTextIds[Global.TextCleanupCursor]); End; If((Global.TemporaryVisionTextIds[Global.TextCleanupCursor] != 0)); Destroy In-World Text(Global.TemporaryVisionTextIds[Global.TextCleanupCursor]); End; Global.TemporaryEffectHudIds[Global.TextCleanupCursor] = 0; Global.TemporaryTravelTextIds[Global.TextCleanupCursor] = 0; Global.TemporaryVisionTextIds[Global.TextCleanupCursor] = 0; Global.TemporaryTextOwners[Global.TextCleanupCursor] = Null; End; End; End; Global.TextCleanupPlayer = Null; Global.TextCleanupIndex = -1; Global.TextCleanupCursor = 0; } } rule("99 - Subroutine: Prepare the player and initialize variables") { event { Subroutine; PreparePlayer; } actions { Abort If(Is Dummy Bot(Global.TriggerPlayer)); Set Damage Received(Global.TriggerPlayer, 100); Set Knockback Received(Global.TriggerPlayer, 100); Enable Movement Collision With Players(Global.TriggerPlayer); Stop Accelerating(Global.TriggerPlayer); Stop Transforming Throttle(Global.TriggerPlayer); Set Move Speed(Global.TriggerPlayer, 100); Set Gravity(Global.TriggerPlayer, 100); Enable Movement Collision With Environment(Global.TriggerPlayer); Global.TriggerPlayer.AutoHeroSelectionDeadline = 0; Global.TriggerPlayer.AutoHeroSelectionComplete = True; Global.TriggerPlayer.IsClassified = False; Global.TriggerPlayer.IsAutomaticBot = False; Global.TriggerPlayer.IsHuman = False; Global.TriggerPlayer.GenreIndex = -1; Global.TriggerPlayer.CustomSoundtrack = Null; Global.TriggerPlayer.PlayerListUpdatePending = False; If(Or((Global.TriggerPlayer.DisplayName == Null), (Global.TriggerPlayer.DisplayName == Custom String("")))); Global.TriggerPlayer.DisplayName = Null; End; Global.TriggerPlayer.HudSlot = -1; Global.TriggerPlayer.PlayerListHud = Null; Global.TriggerPlayer.PlayerHudCreated = False; Global.TriggerPlayer.MenuOpen = False; Global.TriggerPlayer.GenreCursor = 0; Global.TriggerPlayer.MenuHud = Null; Global.TriggerPlayer.InspectionActive = False; Global.TriggerPlayer.NextTargetTextTime = 0; Global.TriggerPlayer.InspectionTarget = Null; Global.TriggerPlayer.InspectionText = Null; Global.TriggerPlayer.CameraMode = 0; Global.TriggerPlayer.CameraTarget = Null; Global.TriggerPlayer.MeleeConsumed = False; Global.TriggerPlayer.MenuPage = -1; Global.TriggerPlayer.MainMenuCursor = 0; Global.TriggerPlayer.CameraCursor = 0; Global.TriggerPlayer.ColorCursor = 0; Global.TriggerPlayer.ColorIndex = 0; Global.TriggerPlayer.NameColor = Color(White); Global.TriggerPlayer.CameraTargetCandidate = Null; Global.TriggerPlayer.CameraTargets = Empty Array; Global.TriggerPlayer.RevengeCursor = 0; Global.TriggerPlayer.RevengeTargets = Empty Array; Global.TriggerPlayer.RevengeKillers = Empty Array; Global.TriggerPlayer.RevengeDebts = Empty Array; Global.TriggerPlayer.RevengeIndex = -1; Global.TriggerPlayer.RevengeDeathPending = False; Global.TriggerPlayer.RevengeClaimant = Null; Global.TriggerPlayer.NextForcedRevengeTime = 0; Global.TriggerPlayer.ForcedRevengeEndTime = 0; Global.TriggerPlayer.TravelCursor = 0; Global.TriggerPlayer.TravelTargets = Empty Array; Global.TriggerPlayer.TravelTargetCandidate = Null; Global.TriggerPlayer.TravelTextTarget = Null; Global.TriggerPlayer.TravelText = Null; Global.TriggerPlayer.MenuInputLocked = False; Global.TriggerPlayer.LockedRevengeTarget = Null; Global.TriggerPlayer.SelectedRevengeTarget = Null; Global.TriggerPlayer.NameplatesDisabled = False; Global.TriggerPlayer.BotLocked = False; Global.TriggerPlayer.LastHero = Null; Global.TriggerPlayer.InspectionTargets = Empty Array; Global.TriggerPlayer.MenuCommand = 0; Global.TriggerPlayer.LockedTravelType = -1; Global.TriggerPlayer.LockedTravelTarget = Null; Global.TriggerPlayer.UnkillableActive = False; Global.TriggerPlayer.UnkillableCursor = 0; Global.TriggerPlayer.VoiceIndex = 0; Global.TriggerPlayer.VoiceCursor = 0; Global.TriggerPlayer.CrouchTravelActive = False; Global.TriggerPlayer.TravelCommand = 0; Global.TriggerPlayer.CameraInteractConsumed = False; Global.TriggerPlayer.DeathPosition = Vector(0, 0, 0); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Global.TriggerPlayer.ReviveTeleportNeeded = False; Global.TriggerPlayer.JumpReviveConsumed = False; Global.TriggerPlayer.IconIndex = 0; Global.TriggerPlayer.IconCursor = 0; Global.TriggerPlayer.MenuColor = Vector(255, 255, 255); Global.TriggerPlayer.MovementCursor = 0; Global.TriggerPlayer.NocturneState = Array(0, 0, 0, 0, 0, True, 0, 0, 0, False, Custom String("The pages await your hand."), Null, Custom String(""), 0, True); Global.TriggerPlayer.CrouchTravelEnabled = False; Global.TriggerPlayer.InspectionPrivacyActive = False; Global.TriggerPlayer.UnkillableMode = 0; Global.TriggerPlayer.UnkillableIcon = Null; If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Global.UnkillableIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]] = 0; End; Global.TriggerPlayer.LuckActive = False; Global.TriggerPlayer.LuckIcon = Null; If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Global.LuckIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]] = 0; End; Global.TriggerPlayer.VoteCursor = 0; Global.TriggerPlayer.VotedPlayer = Null; Global.TriggerPlayer.VoteCount = 0; Global.TriggerPlayer.LuckSpinCount = 0; Global.TriggerPlayer.LuckSpinInterval = 0; Global.TriggerPlayer.LuckEffect = 0; Global.TriggerPlayer.LuckEffectEndTime = 0; Global.TriggerPlayer.LuckPrivacyActive = False; Global.TriggerPlayer.NextLuckBurnTime = 0; Global.TriggerPlayer.NextLuckSpinTime = 0; Global.TriggerPlayer.LuckIconEndTime = 0; Global.TriggerPlayer.LuckMenuReopenNeeded = False; Global.TriggerPlayer.LuckEffectHud = Null; Global.TriggerPlayer.LuckVisionText = Null; Global.TriggerPlayer.LastTeam = Team Of(Global.TriggerPlayer); Global.TriggerPlayer.TeamCycleTargetTeam = Team Of(Global.TriggerPlayer); Global.TriggerPlayer.DummyBotTravelTime = 0; Global.TriggerPlayer.DummyBotTravelCursor = 0; Global.TriggerPlayer.AllowDummyBotFollow = False; Global.TriggerPlayer.DummyBotFollowTarget = Null; Global.TriggerPlayer.GhostModeActive = False; Global.TriggerPlayer.FlyModeActive = False; Global.TriggerPlayer.GhostFlyCursor = 0; Global.TriggerPlayer.MultijumpEnabled = False; Global.TriggerPlayer.MultijumpCursor = 0; Global.TriggerPlayer.MultijumpLevel = 1; Global.TriggerPlayer.MultijumpConsumed = False; Global.TriggerPlayer.JumpWasGrounded = True; Global.TriggerPlayer.NextMultijumpTime = 0; Global.TriggerPlayer.ObjectiveIconPosition = Vector(0, 0.500, 0); Global.TriggerPlayer.GhostFlyPhysicsApplied = False; Global.TriggerPlayer.NextSuicideTime = 0; Global.TriggerPlayer.MovementGravity = 100; Global.TriggerPlayer.MovementSpeed = 100; Global.TriggerPlayer.FlyDirection = Vector(0, 0, 0); Global.TriggerPlayer.FlyVelocityDelta = Vector(0, 0, 0); Global.TriggerPlayer.AttachmentChain = Null; Global.TriggerPlayer.AttachmentChainIndex = 0; Global.TriggerPlayer.AttachmentCycleDetected = False; Global.TriggerPlayer.InspectionTargetCandidate = Null; Global.TriggerPlayer.TravelDestination = Vector(0, 0, 0); Global.TriggerPlayer.TravelAttachmentTarget = Null; Global.TriggerPlayer.TravelAttachmentActive = False; Global.TriggerPlayer.AttachmentOwnerHero = Null; Global.TriggerPlayer.AttachmentTargetHero = Null; Global.TriggerPlayer.TeamCycleDeadline = 0; Global.TriggerPlayer.WasPrepared = True; Global.TriggerPlayer.TeamChangeProcessed = True; Global.TriggerPlayer.PlayerCycleActive = False; Global.TriggerPlayer.IsPrepared = True; } } rule("100 - Subroutine: Refresh camera targets, including bots") { event { Subroutine; RefreshCameraTargets; } actions { If(And((Global.TriggerPlayer.CameraCursor >= 2), ((Global.TriggerPlayer.CameraCursor - 2) < Count Of(Global.TriggerPlayer.CameraTargets)))); Global.TriggerPlayer.CameraTargetCandidate = Global.TriggerPlayer.CameraTargets[(Global.TriggerPlayer.CameraCursor - 2)]; Else; Global.TriggerPlayer.CameraTargetCandidate = Null; End; Call Subroutine(RefreshPlayerPublicTargets); Global.TriggerPlayer.CameraTargets = Filtered Array(Global.TriggerPlayer.InspectionTargets, Has Spawned(Current Array Element)); If(And((Global.TriggerPlayer.CameraTargetCandidate != Null), Array Contains(Global.TriggerPlayer.CameraTargets, Global.TriggerPlayer.CameraTargetCandidate))); Global.TriggerPlayer.CameraCursor = (Index Of Array Value(Global.TriggerPlayer.CameraTargets, Global.TriggerPlayer.CameraTargetCandidate) + 2); Else If((Global.TriggerPlayer.CameraCursor >= (Count Of(Global.TriggerPlayer.CameraTargets) + 2))); Global.TriggerPlayer.CameraCursor = 0; End; } } rule("101 - Subroutine: Find the nearest public inspection target under the crosshair") { event { Subroutine; RefreshInspectionTarget; } actions { If(Or((Global.TriggerPlayer.InspectionTargetCandidate == Null), Or(Not(Entity Exists(Global.TriggerPlayer.InspectionTargetCandidate)), Or(Not(Has Spawned(Global.TriggerPlayer.InspectionTargetCandidate)), Or(Not(Is Alive(Global.TriggerPlayer.InspectionTargetCandidate)), And(And(Not(Is Dummy Bot(Global.TriggerPlayer.InspectionTargetCandidate)), Not(Player Variable(Global.TriggerPlayer.InspectionTargetCandidate, IsAutomaticBot))), Or(Not(Player Variable(Global.TriggerPlayer.InspectionTargetCandidate, IsHuman)), Or(Player Variable(Global.TriggerPlayer.InspectionTargetCandidate, InspectionPrivacyActive), Player Variable(Global.TriggerPlayer.InspectionTargetCandidate, PlayerListUpdatePending))))))))); Global.TriggerPlayer.InspectionTargetCandidate = Null; Global.TriggerPlayer.InspectionTarget = Null; Else; Global.TriggerPlayer.InspectionTarget = Global.TriggerPlayer.InspectionTargetCandidate; End; } } rule("102 - Subroutine: Refresh Revenge targets") { event { Subroutine; RefreshRevengeTargets; } actions { If((Global.TriggerPlayer.RevengeCursor < Count Of(Global.TriggerPlayer.RevengeTargets))); Global.TriggerPlayer.SelectedRevengeTarget = Global.TriggerPlayer.RevengeTargets[Global.TriggerPlayer.RevengeCursor]; Else; Global.TriggerPlayer.SelectedRevengeTarget = Null; End; Global.TriggerPlayer.RevengeTargets = Filtered Array(Global.HumanPlayers, (Current Array Element != Global.TriggerPlayer)); If((Count Of(Global.TriggerPlayer.RevengeTargets) == 0)); Global.TriggerPlayer.RevengeCursor = 0; Else If(And((Global.TriggerPlayer.SelectedRevengeTarget != Null), Array Contains(Global.TriggerPlayer.RevengeTargets, Global.TriggerPlayer.SelectedRevengeTarget))); Global.TriggerPlayer.RevengeCursor = Index Of Array Value(Global.TriggerPlayer.RevengeTargets, Global.TriggerPlayer.SelectedRevengeTarget); Else If((Global.TriggerPlayer.RevengeCursor >= Count Of(Global.TriggerPlayer.RevengeTargets))); Global.TriggerPlayer.RevengeCursor = 0; End; } } rule("103 - Subroutine: Find the nearest public Travel target under the crosshair") { event { Subroutine; RefreshTravelTarget; } actions { Call Subroutine(RefreshPlayerPublicTargets); Global.TriggerPlayer.TravelTargets = Global.TriggerPlayer.InspectionTargets; If((Count Of(Global.TriggerPlayer.TravelTargets) == 0)); Global.TriggerPlayer.TravelTargetCandidate = Null; Else; Global.TriggerPlayer.TravelTargetCandidate = First Of(Sorted Array(Global.TriggerPlayer.TravelTargets, Angle Between Vectors(Facing Direction Of(Global.TriggerPlayer), Direction Towards(Eye Position(Global.TriggerPlayer), Eye Position(Current Array Element))))); End; } } rule("104 - Subroutine: Restore Luck state for the trigger player") { event { Subroutine; RestorePlayerLuck; } actions { If((Global.TriggerPlayer.LuckIcon != Null)); Destroy Icon(Global.TriggerPlayer.LuckIcon); End; If((Global.TriggerPlayer.LuckEffectHud != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.LuckEffectHud)); Destroy HUD Text(Global.TriggerPlayer.LuckEffectHud); Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; If((Global.TriggerPlayer.LuckVisionText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.LuckVisionText)); Destroy In-World Text(Global.TriggerPlayer.LuckVisionText); Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; Global.TriggerPlayer.LuckIcon = Null; If(Array Contains(Global.HumanPlayers, Global.TriggerPlayer)); Global.LuckIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)]] = 0; End; Global.TriggerPlayer.LuckEffectHud = Null; Global.TriggerPlayer.LuckVisionText = Null; Clear Status(Global.TriggerPlayer, Burning); Clear Status(Global.TriggerPlayer, Hacked); Clear Status(Global.TriggerPlayer, Unkillable); If((Global.TriggerPlayer.LuckEffect == 2)); Stop Accelerating(Global.TriggerPlayer); Set Move Speed(Global.TriggerPlayer, (Global.TriggerPlayer.FlyModeActive ? 0 : Global.TriggerPlayer.MovementSpeed)); End; Set Damage Received(Global.TriggerPlayer, 100); Set Knockback Received(Global.TriggerPlayer, 100); Enable Movement Collision With Players(Global.TriggerPlayer); Set Jump Vertical Speed(Global.TriggerPlayer, 100); Set Projectile Speed(Global.TriggerPlayer, 100); Global.TriggerPlayer.LuckActive = False; Global.TriggerPlayer.LuckSpinCount = 0; Global.TriggerPlayer.LuckSpinInterval = 0; Global.TriggerPlayer.LuckEffect = 0; Global.TriggerPlayer.LuckEffectEndTime = 0; Global.TriggerPlayer.LuckPrivacyActive = False; Global.TriggerPlayer.NextLuckBurnTime = 0; Global.TriggerPlayer.NextLuckSpinTime = 0; Global.TriggerPlayer.LuckIconEndTime = 0; Global.TriggerPlayer.NextForcedRevengeTime = 0; Global.TriggerPlayer.ForcedRevengeEndTime = 0; Global.TriggerPlayer.LuckMenuReopenNeeded = False; Global.TriggerPlayer.UnkillableActive = (Global.TriggerPlayer.UnkillableMode != 0); Global.TriggerPlayer.MenuInputLocked = False; Global.TriggerPlayer.MenuCommand = 0; Allow Button(Global.TriggerPlayer, Button(Primary Fire)); Allow Button(Global.TriggerPlayer, Button(Secondary Fire)); Allow Button(Global.TriggerPlayer, Button(Interact)); Allow Button(Global.TriggerPlayer, Button(Reload)); Allow Button(Global.TriggerPlayer, Button(Ability 1)); Allow Button(Global.TriggerPlayer, Button(Ability 2)); Allow Button(Global.TriggerPlayer, Button(Ultimate)); } } rule("105 - Subroutine: Restore Luck state for the globally active player") { event { Subroutine; RestoreActivePlayerLuck; } actions { Abort If(Or((Global.ActivePlayer == Null), Not(Entity Exists(Global.ActivePlayer)))); If((Global.ActivePlayer.LuckIcon != Null)); Destroy Icon(Global.ActivePlayer.LuckIcon); End; If((Global.ActivePlayer.LuckEffectHud != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer) >= 0)); If((Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer)] == Global.ActivePlayer.LuckEffectHud)); Destroy HUD Text(Global.ActivePlayer.LuckEffectHud); Global.TemporaryEffectHudIds[Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer)] = 0; End; End; End; If((Global.ActivePlayer.LuckVisionText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer) >= 0)); If((Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer)] == Global.ActivePlayer.LuckVisionText)); Destroy In-World Text(Global.ActivePlayer.LuckVisionText); Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.ActivePlayer)] = 0; End; End; End; Global.ActivePlayer.LuckIcon = Null; If(Array Contains(Global.HumanPlayers, Global.ActivePlayer)); Global.LuckIconIds[Global.PlayerHudSlots[Index Of Array Value(Global.HumanPlayers, Global.ActivePlayer)]] = 0; End; Global.ActivePlayer.LuckEffectHud = Null; Global.ActivePlayer.LuckVisionText = Null; Clear Status(Global.ActivePlayer, Burning); Clear Status(Global.ActivePlayer, Hacked); If(Or((Global.ActivePlayer.UnkillableMode == 0), Not(Is Alive(Global.ActivePlayer)))); Clear Status(Global.ActivePlayer, Unkillable); Set Damage Received(Global.ActivePlayer, 100); Set Knockback Received(Global.ActivePlayer, 100); Enable Movement Collision With Players(Global.ActivePlayer); End; If((Global.ActivePlayer.LuckEffect == 2)); Stop Accelerating(Global.ActivePlayer); Set Move Speed(Global.ActivePlayer, (Global.ActivePlayer.FlyModeActive ? 0 : Global.ActivePlayer.MovementSpeed)); End; Set Jump Vertical Speed(Global.ActivePlayer, 100); Set Projectile Speed(Global.ActivePlayer, 100); Global.ActivePlayer.LuckActive = False; Global.ActivePlayer.LuckSpinCount = 0; Global.ActivePlayer.LuckSpinInterval = 0; Global.ActivePlayer.LuckEffect = 0; Global.ActivePlayer.LuckEffectEndTime = 0; Global.ActivePlayer.LuckPrivacyActive = False; Global.ActivePlayer.NextLuckBurnTime = 0; Global.ActivePlayer.NextLuckSpinTime = 0; Global.ActivePlayer.LuckIconEndTime = 0; Global.ActivePlayer.NextForcedRevengeTime = 0; Global.ActivePlayer.ForcedRevengeEndTime = 0; Global.ActivePlayer.LuckMenuReopenNeeded = False; Global.ActivePlayer.UnkillableActive = (Global.ActivePlayer.UnkillableMode != 0); Global.ActivePlayer.MenuInputLocked = False; Global.ActivePlayer.MenuCommand = 0; Allow Button(Global.ActivePlayer, Button(Primary Fire)); Allow Button(Global.ActivePlayer, Button(Secondary Fire)); Allow Button(Global.ActivePlayer, Button(Interact)); Allow Button(Global.ActivePlayer, Button(Reload)); Allow Button(Global.ActivePlayer, Button(Ability 1)); Allow Button(Global.ActivePlayer, Button(Ability 2)); Allow Button(Global.ActivePlayer, Button(Ultimate)); } } rule("106 - Subroutine: Refresh public targets for the trigger player") { event { Subroutine; RefreshPlayerPublicTargets; } actions { Global.TriggerPlayer.InspectionTargets = Filtered Array(All Players(All Teams), And((Current Array Element != Global.TriggerPlayer), And(Entity Exists(Current Array Element), And(Is Alive(Current Array Element), Or(Is Dummy Bot(Current Array Element), Or(Player Variable(Current Array Element, IsAutomaticBot), And(Player Variable(Current Array Element, IsHuman), And(Not(Player Variable(Current Array Element, InspectionPrivacyActive)), Not(Player Variable(Current Array Element, PlayerListUpdatePending)))))))))); } } rule("107 - Subroutine: Refresh public targets for the globally active player") { event { Subroutine; RefreshActivePlayerPublicTargets; } actions { Abort If(Or((Global.ActivePlayer == Null), Not(Entity Exists(Global.ActivePlayer)))); Set Player Variable(Global.ActivePlayer, InspectionTargets, Filtered Array(All Players(All Teams), And((Current Array Element != Global.ActivePlayer), And(Entity Exists(Current Array Element), And(Is Alive(Current Array Element), Or(Is Dummy Bot(Current Array Element), Or(Player Variable(Current Array Element, IsAutomaticBot), And(Player Variable(Current Array Element, IsHuman), And(Not(Player Variable(Current Array Element, InspectionPrivacyActive)), Not(Player Variable(Current Array Element, PlayerListUpdatePending))))))))))); } } rule("108 - Subroutine: Create a dummy bot for the active team") { event { Subroutine; CreateTeamDummyBot; } actions { Create Dummy Bot(All Heroes, Global.ActiveDummyBotTeam, -1, Position Of(First Of(Spawn Points(Global.ActiveDummyBotTeam))), Vector(0, 0, 1)); } } rule("109 - Subroutine: Remove a dummy bot from the active team") { event { Subroutine; RemoveTeamDummyBot; } actions { Abort If((Count Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element))) == 0)); If((Player Variable(First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element))), LuckVisionText) != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element)))) >= 0)); If((Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element))))] == Player Variable(First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element))), LuckVisionText))); Destroy In-World Text(Player Variable(First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element))), LuckVisionText)); Global.TemporaryVisionTextIds[Index Of Array Value(Global.TemporaryTextOwners, First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element))))] = 0; End; End; End; Stop Facing(First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element)))); Stop Throttle In Direction(First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element)))); Destroy Dummy Bot(Global.ActiveDummyBotTeam, Slot Of(First Of(Filtered Array(All Players(Global.ActiveDummyBotTeam), Is Dummy Bot(Current Array Element))))); } } rule("110 - Subroutine: Travel to spawn") { event { Subroutine; TravelToSpawn; } actions { If(Is In Spawn Room(Global.TriggerPlayer)); Small Message(Global.TriggerPlayer, Custom String("Already in spawn.")); Else If((Count Of(Spawn Points(Team Of(Global.TriggerPlayer))) == 0)); Small Message(Global.TriggerPlayer, Custom String("Spawn unavailable.")); Else; If((Global.TriggerPlayer.CameraMode != 0)); Stop Camera(Global.TriggerPlayer); End; Teleport(Global.TriggerPlayer, Position Of(First Of(Spawn Points(Team Of(Global.TriggerPlayer))))); Global.TriggerPlayer.TravelAttachmentActive = False; Global.TriggerPlayer.TravelAttachmentTarget = Null; Global.TriggerPlayer.AttachmentOwnerHero = Null; Global.TriggerPlayer.AttachmentTargetHero = Null; If((Global.TriggerPlayer.CameraMode != 0)); Global.CameraPlayer = Global.TriggerPlayer; Call Subroutine(StartCamera); Global.CameraPlayer = Null; End; End; } } rule("111 - Subroutine: Travel to the objective") { event { Subroutine; TravelToObjective; } actions { Global.TriggerPlayer.TravelDestination = Objective Position(Objective Index); If((Distance Between(Global.TriggerPlayer.TravelDestination, Vector(0, 0, 0)) <= 0.100)); Small Message(Global.TriggerPlayer, Custom String("Objective unavailable.")); Abort; End; Call Subroutine(FindSafeTravelPosition); If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Small Message(Global.TriggerPlayer, Custom String("No safe ground near objective.")); Abort; End; If((Global.TriggerPlayer.CameraMode != 0)); Stop Camera(Global.TriggerPlayer); End; Teleport(Global.TriggerPlayer, Global.TriggerPlayer.SafeRevivePosition); Global.TriggerPlayer.TravelAttachmentActive = False; Global.TriggerPlayer.TravelAttachmentTarget = Null; Global.TriggerPlayer.AttachmentOwnerHero = Null; Global.TriggerPlayer.AttachmentTargetHero = Null; If((Global.TriggerPlayer.CameraMode != 0)); Global.CameraPlayer = Global.TriggerPlayer; Call Subroutine(StartCamera); Global.CameraPlayer = Null; End; } } rule("112 - Subroutine: Travel to the target player") { event { Subroutine; TravelToPlayer; } actions { If(Or(Or((Global.TriggerPlayer.LockedTravelTarget == Null), Not(Entity Exists(Global.TriggerPlayer.LockedTravelTarget))), Or(Not(Is Alive(Global.TriggerPlayer.LockedTravelTarget)), Not(Array Contains(Global.TriggerPlayer.TravelTargets, Global.TriggerPlayer.LockedTravelTarget))))); Small Message(Global.TriggerPlayer, Custom String("Teleport target unavailable.")); Abort; End; Global.TriggerPlayer.TravelDestination = (Position Of(Global.TriggerPlayer.LockedTravelTarget) - (Facing Direction Of(Global.TriggerPlayer.LockedTravelTarget) * 2.250)); Call Subroutine(FindSafeTravelPosition); If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Global.TriggerPlayer.TravelDestination = (Position Of(Global.TriggerPlayer.LockedTravelTarget) + (Facing Direction Of(Global.TriggerPlayer.LockedTravelTarget) * 2.250)); Call Subroutine(FindSafeTravelPosition); End; If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Global.TriggerPlayer.TravelDestination = (Position Of(Global.TriggerPlayer.LockedTravelTarget) + Vector(2.250, 0, 0)); Call Subroutine(FindSafeTravelPosition); End; If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Global.TriggerPlayer.TravelDestination = (Position Of(Global.TriggerPlayer.LockedTravelTarget) + Vector(-2.250, 0, 0)); Call Subroutine(FindSafeTravelPosition); End; If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Global.TriggerPlayer.TravelDestination = (Position Of(Global.TriggerPlayer.LockedTravelTarget) + Vector(0, 0, 2.250)); Call Subroutine(FindSafeTravelPosition); End; If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Global.TriggerPlayer.TravelDestination = (Position Of(Global.TriggerPlayer.LockedTravelTarget) + Vector(0, 0, -2.250)); Call Subroutine(FindSafeTravelPosition); End; If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Small Message(Global.TriggerPlayer, Custom String("No safe ground near target.")); Abort; End; If((Global.TriggerPlayer.CameraMode != 0)); Stop Camera(Global.TriggerPlayer); End; Teleport(Global.TriggerPlayer, Global.TriggerPlayer.SafeRevivePosition); Global.TriggerPlayer.TravelAttachmentActive = False; Global.TriggerPlayer.TravelAttachmentTarget = Null; Global.TriggerPlayer.AttachmentOwnerHero = Null; Global.TriggerPlayer.AttachmentTargetHero = Null; If((Global.TriggerPlayer.CameraMode != 0)); Global.CameraPlayer = Global.TriggerPlayer; Call Subroutine(StartCamera); Global.CameraPlayer = Null; End; } } rule("113 - Subroutine: Find a safe Travel position") { event { Subroutine; FindSafeTravelPosition; } actions { Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort If((Distance Between(Global.TriggerPlayer.TravelDestination, Vector(0, 0, 0)) <= 0.100)); Global.TriggerPlayer.SafeRevivePosition = Nearest Walkable Position(Global.TriggerPlayer.TravelDestination); If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(1.500, 1, 0)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0))) < 1.250)); Global.TriggerPlayer.SafeRevivePosition = Nearest Walkable Position((Global.TriggerPlayer.SafeRevivePosition + Vector(-1.500, 0, 0))); End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(-1.500, 1, 0)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0))) < 1.250)); Global.TriggerPlayer.SafeRevivePosition = Nearest Walkable Position((Global.TriggerPlayer.SafeRevivePosition + Vector(1.500, 0, 0))); End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 1.500)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0))) < 1.250)); Global.TriggerPlayer.SafeRevivePosition = Nearest Walkable Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 0, -1.500))); End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, -1.500)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0))) < 1.250)); Global.TriggerPlayer.SafeRevivePosition = Nearest Walkable Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 0, 1.500))); End; If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) <= 0.100)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 0.250, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 2.500, 0)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 0.250, 0))) < 2.000)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Global.TriggerPlayer.TravelDestination) > 8)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 5, 0)), (Global.TriggerPlayer.SafeRevivePosition - Vector(0, 20, 0)), Empty Array, Empty Array, False), Global.TriggerPlayer.SafeRevivePosition) > 6)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.TravelDestination + Vector(0, 1, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1, 0))) > 0.750)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); End; If((Distance Between(Global.TriggerPlayer.SafeRevivePosition, Vector(0, 0, 0)) > 0.100)); If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(1.500, 1.000, 0)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 0))) < 1.250)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(-1.500, 1.000, 0)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 0))) < 1.250)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 1.500)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 0))) < 1.250)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, -1.500)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 1.000, 0))) < 1.250)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; If((Distance Between(Ray Cast Hit Position((Global.TriggerPlayer.SafeRevivePosition + Vector(0, 0.500, 0)), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 2.750, 0)), Empty Array, Empty Array, False), (Global.TriggerPlayer.SafeRevivePosition + Vector(0, 0.500, 0))) < 2.000)); Global.TriggerPlayer.SafeRevivePosition = Vector(0, 0, 0); Abort; End; Global.TriggerPlayer.SafeRevivePosition += Vector(0, 0.500, 0); End; } } rule("114 - Subroutine: Apply the Multijump choice") { event { Subroutine; ApplyMultijumpPage; } actions { Global.TriggerPlayer.MultijumpCursor %= 11; Global.TriggerPlayer.MultijumpEnabled = (Global.TriggerPlayer.MultijumpCursor != 0); If(Global.TriggerPlayer.MultijumpEnabled); Global.TriggerPlayer.MultijumpLevel = Global.TriggerPlayer.MultijumpCursor; End; Global.TriggerPlayer.MultijumpConsumed = Is Button Held(Global.TriggerPlayer, Button(Jump)); Global.TriggerPlayer.JumpWasGrounded = Is On Ground(Global.TriggerPlayer); Global.TriggerPlayer.NextMultijumpTime = (Total Time Elapsed + 0.300); } } rule("115 - Subroutine: Select Speed or Gravity") { event { Subroutine; ApplyMovementPage; } actions { Global.TriggerPlayer.MovementCursor = ((Global.TriggerPlayer.MovementCursor + 1) % 2); } } rule("116 - Subroutine: Draw Movement and Gravity controls") { event { Subroutine; DrawMovementMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} +{2}%", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), ((((Player Variable(Local Player, MovementCursor) == 0) ? Player Variable(Local Player, MovementSpeed) : Player Variable(Local Player, MovementGravity)) < 100) ? 20 : 100)), Custom String("{0} -{1}%", Input Binding String(Button(Secondary Fire)), ((((Player Variable(Local Player, MovementCursor) == 0) ? Player Variable(Local Player, MovementSpeed) : Player Variable(Local Player, MovementGravity)) <= 100) ? 20 : 100))), Custom String("{0} Speed/Gravity | {1} back | {2} 100% both", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)), Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("16 - SPEED / GRAVITY"), Custom String("{0}\n{1}", Custom String("{0}Speed: {1}% (20-1000%)", ((Player Variable(Local Player, MovementCursor) == 0) ? Custom String("> ") : Custom String(" ")), Player Variable(Local Player, MovementSpeed)), Custom String("{0}Gravity: {1}% (0-500%)", ((Player Variable(Local Player, MovementCursor) == 1) ? Custom String("> ") : Custom String(" ")), Player Variable(Local Player, MovementGravity))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("117 - Subroutine: Draw Multijump choices") { event { Subroutine; DrawMultijumpMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} apply / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("14 - SPECTRAL MULTIJUMP {0}/11", (Player Variable(Local Player, MultijumpCursor) + 1)), Custom String("{0} | AIR BOOST: {1}%", (Player Variable(Local Player, MultijumpEnabled) ? Custom String("ON") : Custom String("OFF")), (Player Variable(Local Player, MultijumpLevel) * 100))), Custom String("> {0}", ((Player Variable(Local Player, MultijumpCursor) == 0) ? Custom String("OFF") : Custom String("AIR BOOST: {0}%", (Player Variable(Local Player, MultijumpCursor) * 100))))), ((Player Variable(Local Player, MultijumpCursor) == 0) ? Custom String("Choose an air boost to jump again.") : Custom String("AIR: TAP/HOLD {0}", Input Binding String(Button(Jump)))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Local Player, MenuColor)), Y Component Of(Player Variable(Local Player, MenuColor)), Z Component Of(Player Variable(Local Player, MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("118 - Subroutine: Repeat air jumps with a cooldown") { event { Subroutine; ProcessMultijump; } actions { If(Is Button Held(Global.ActivePlayer, Button(Jump))); If(Or(Not(Global.ActivePlayer.MultijumpConsumed), (Total Time Elapsed >= Global.ActivePlayer.NextMultijumpTime))); Global.ActivePlayer.NextMultijumpTime = (Total Time Elapsed + 0.300); If(And(Global.ActivePlayer.IsHuman, And(Has Spawned(Global.ActivePlayer), And(Is Alive(Global.ActivePlayer), And(Not(Global.ActivePlayer.FlyModeActive), And(Not(Global.ActivePlayer.TravelAttachmentActive), And(Not(Global.ActivePlayer.JumpReviveConsumed), And(Or((Global.ActivePlayer.LuckEffect != 2), (Global.ActivePlayer.LuckEffectEndTime <= Total Time Elapsed)), Or(Not(Global.ActivePlayer.MultijumpConsumed), And(Not(Global.ActivePlayer.JumpWasGrounded), Not(Is On Ground(Global.ActivePlayer)))))))))))); Global.ActivePlayer.MultijumpConsumed = True; If(And(Not(Global.ActivePlayer.JumpWasGrounded), Not(Is On Ground(Global.ActivePlayer)))); Apply Impulse(Global.ActivePlayer, ((((6 * Global.ActivePlayer.MultijumpLevel) - Y Component Of(Velocity Of(Global.ActivePlayer))) >= 0) ? Vector(0, 1, 0) : Vector(0, -1, 0)), Absolute Value(((6 * Global.ActivePlayer.MultijumpLevel) - Y Component Of(Velocity Of(Global.ActivePlayer)))), To World, Incorporate Contrary Motion); End; Play Effect(All Players(All Teams), Ring Explosion, Global.RGB, (Position Of(Global.ActivePlayer) + Vector(0, 0.050, 0)), 1.500); Else; Global.ActivePlayer.MultijumpConsumed = True; End; End; Else; Global.ActivePlayer.MultijumpConsumed = False; Global.ActivePlayer.NextMultijumpTime = 0; End; Global.ActivePlayer.JumpWasGrounded = Is On Ground(Global.ActivePlayer); } } rule("119 - Subroutine: Apply the Super Punch toggle") { event { Subroutine; ApplySuperPunchPage; } actions { Abort If(Not(Array Contains(Global.HumanPlayers, Global.TriggerPlayer))); Abort If(Or((Global.TriggerPlayer.HudSlot < 0), (Global.TriggerPlayer.HudSlot >= 12))); If(Array Contains(Global.SuperPunchPlayers, Global.TriggerPlayer)); Modify Global Variable(SuperPunchPlayers, Remove From Array By Value, Global.TriggerPlayer); Global.SuperPunchTimes[Global.TriggerPlayer.HudSlot] = 0; Else; Modify Global Variable(SuperPunchPlayers, Append To Array, Global.TriggerPlayer); Global.SuperPunchTimes[Global.TriggerPlayer.HudSlot] = -1; End; } } rule("120 - Subroutine: Apply Super Punch once per swing") { event { Subroutine; ProcessSuperPunch; } actions { Abort If(Or((Global.ActivePlayer.HudSlot < 0), (Global.ActivePlayer.HudSlot >= Count Of(Global.SuperPunchTimes)))); If((Is Meleeing(Global.ActivePlayer) == False)); Global.SuperPunchTimes[Global.ActivePlayer.HudSlot] = 0; Abort; End; If(Or(Not(Global.ActivePlayer.IsHuman), Or(Global.ActivePlayer.IsAutomaticBot, Or(Is Dummy Bot(Global.ActivePlayer), Or(Not(Entity Exists(Global.ActivePlayer)), Or(Not(Has Spawned(Global.ActivePlayer)), Or(Not(Is Alive(Global.ActivePlayer)), Or(Global.ActivePlayer.PlayerCycleActive, Global.ActivePlayer.TeamChangeProcessed)))))))); Global.SuperPunchTimes[Global.ActivePlayer.HudSlot] = -1; Abort; End; If((Global.SuperPunchTimes[Global.ActivePlayer.HudSlot] == 0)); Global.SuperPunchTarget = First Of(Sorted Array(Filtered Array(All Players(All Teams), And((Current Array Element != Global.ActivePlayer), And(Entity Exists(Current Array Element), And(Has Spawned(Current Array Element), And(Is Alive(Current Array Element), And((Distance Between(Position Of(Global.ActivePlayer), Position Of(Current Array Element)) <= 2.500), And(Is In View Angle(Global.ActivePlayer, Eye Position(Current Array Element), 90), Is In Line Of Sight(Eye Position(Global.ActivePlayer), Eye Position(Current Array Element), Barriers Do Not Block LOS)))))))), Distance Between(Position Of(Global.ActivePlayer), Position Of(Current Array Element)))); If((Global.SuperPunchTarget != Null)); Global.SuperPunchTimes[Global.ActivePlayer.HudSlot] = -1; End; If(And((Global.SuperPunchTarget != Null), And(Entity Exists(Global.SuperPunchTarget), And(Has Spawned(Global.SuperPunchTarget), And(Is Alive(Global.SuperPunchTarget), And(Not(Has Status(Global.SuperPunchTarget, Phased Out)), And(Not(Has Status(Global.SuperPunchTarget, Unkillable)), Or(Not(Player Variable(Global.SuperPunchTarget, UnkillableActive)), (Player Variable(Global.SuperPunchTarget, UnkillableMode) == 0))))))))); Kill(Global.SuperPunchTarget, Global.ActivePlayer); End; Global.SuperPunchTarget = Null; End; } } rule("121 - Super Punch: Handle native melee impact") { event { Player Dealt Damage; All; All; } conditions { Global.IsReady == True; Array Contains(Global.SuperPunchPlayers, Event Player) == True; Event Ability == Button(Melee); Hero Of(Event Player) != Hero(Junker Queen); Event Damage > 0; Event Player.IsHuman == True; Event Player.IsAutomaticBot == False; Is Dummy Bot(Event Player) == False; Entity Exists(Event Player) == True; Has Spawned(Event Player) == True; Is Alive(Event Player) == True; Event Player.PlayerCycleActive == False; Event Player.TeamChangeProcessed == False; Victim != Null; Victim != Event Player; Entity Exists(Victim) == True; Has Spawned(Victim) == True; Is Alive(Victim) == True; } actions { If((Global.EventCount < 192)); Global.EventQueue[Global.EventQueueTail] = Array(6, Event Player, Null, Victim, Event Ability, Event Damage, Null, Total Time Elapsed, Null, Null, Null, Null, Null, Null, Null, Or(Has Status(Victim, Phased Out), Or(Has Status(Victim, Unkillable), And(Player Variable(Victim, UnkillableActive), (Player Variable(Victim, UnkillableMode) != 0)))), Event Player.HudSlot, Null, Hero Of(Event Player), Team Of(Event Player), Event Player.ControllerState[36], (Event Player.IsHuman ? Event Player.DisplayName : Custom String("{0}", Event Player)), Player Variable(Victim, ControllerState)[36]); Global.EventQueueTail = ((Global.EventQueueTail + 1) % 256); Global.EventCount += 1; Else; Global.DroppedEventCount += 1; End; } } rule("122 - Super Punch: Handle native melee impact global") { event { Subroutine; NativeEvent89i1; } actions { Abort If(Not(Entity Exists(Global.TriggerPlayer))); Abort If((Global.ActiveEvent[20] != Global.TriggerPlayer.ControllerState[36])); Abort If((Global.ActiveEvent[21] != (Global.TriggerPlayer.IsHuman ? Global.TriggerPlayer.DisplayName : Custom String("{0}", Global.TriggerPlayer)))); Abort If(Or((Global.TriggerPlayer.LastTeam != Team Of(Global.TriggerPlayer)), (Global.TriggerPlayer.TeamCycleTargetTeam != Team Of(Global.TriggerPlayer)))); Abort If((Global.TriggerPlayer.HudSlot != Global.ActiveEvent[16])); Abort If(Not(Array Contains(Global.SuperPunchPlayers, Global.TriggerPlayer))); Abort If(Or((Global.ActiveEvent[16] < 0), (Global.ActiveEvent[16] >= Count Of(Global.SuperPunchTimes)))); Abort If((Global.SuperPunchTimes[Global.ActiveEvent[16]] < 0)); Global.SuperPunchTimes[Global.ActiveEvent[16]] = -1; If(And(Not(Global.ActiveEvent[15]), And(Entity Exists(Global.ActiveEvent[3]), And(Has Spawned(Global.ActiveEvent[3]), And(Is Alive(Global.ActiveEvent[3]), And((Player Variable(Global.ActiveEvent[3], ControllerState)[36] == Global.ActiveEvent[22]), And(Not(Has Status(Global.ActiveEvent[3], Phased Out)), And(Not(Has Status(Global.ActiveEvent[3], Unkillable)), Or(Not(Player Variable(Global.ActiveEvent[3], UnkillableActive)), (Player Variable(Global.ActiveEvent[3], UnkillableMode) == 0)))))))))); Kill(Global.ActiveEvent[3], Global.TriggerPlayer); End; } } rule("123 - Subroutine: Maintain floating player icons once per second") { event { Subroutine; UpdateSocialObjectiveIcons; } actions { For Global Variable(ObjectiveIconIndex, 0, 12, 1); If(And((Global.ObjectiveIconOwners[Global.ObjectiveIconIndex] != Null), Not(And(Entity Exists(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex]), And(Array Contains(Global.HumanPlayers, Global.ObjectiveIconOwners[Global.ObjectiveIconIndex]), And(Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], IsHuman), And(Not(Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], PlayerListUpdatePending)), And(Not(Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], TeamChangeProcessed)), (Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], IconIndex) > 0))))))))); If((Global.ObjectiveIconIds[Global.ObjectiveIconIndex] != 0)); Destroy Icon(Global.ObjectiveIconIds[Global.ObjectiveIconIndex]); End; If(Entity Exists(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex])); Stop Chasing Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], ObjectiveIconPosition); Set Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], ObjectiveIconPosition, Vector(0, 0.500, 0)); End; Global.ObjectiveIconIds[Global.ObjectiveIconIndex] = 0; Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] = 0; Global.ObjectiveIconOwners[Global.ObjectiveIconIndex] = Null; Global.ObjectiveIconTimes[Global.ObjectiveIconIndex] = 0; End; If((Global.ObjectiveIconOwners[Global.ObjectiveIconIndex] == Null)); Global.ObjectiveIconOwners[Global.ObjectiveIconIndex] = First Of(Filtered Array(Global.HumanPlayers, And((Player Variable(Current Array Element, HudSlot) == Global.ObjectiveIconIndex), And(Entity Exists(Current Array Element), And(Player Variable(Current Array Element, IsHuman), And(Not(Player Variable(Current Array Element, PlayerListUpdatePending)), And(Not(Player Variable(Current Array Element, TeamChangeProcessed)), (Player Variable(Current Array Element, IconIndex) > 0)))))))); If((Global.ObjectiveIconOwners[Global.ObjectiveIconIndex] != Null)); Set Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], ObjectiveIconPosition, ((Direction From Angles(Random Real(0, 360), 0) * Random Real(0, 4)) + Vector(0, Random Real(0.500, 3), 0))); Global.ObjectiveIconTimes[Global.ObjectiveIconIndex] = Total Time Elapsed; Chase Player Variable Over Time(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], ObjectiveIconPosition, ((Direction From Angles(Random Real(0, 360), 0) * Random Real(0, 4)) + Vector(0, Random Real(0.500, 3), 0)), 4.500, None); End; End; If((Global.ObjectiveIconOwners[Global.ObjectiveIconIndex] != Null)); If((Total Time Elapsed >= (Global.ObjectiveIconTimes[Global.ObjectiveIconIndex] + 3))); Global.ObjectiveIconTimes[Global.ObjectiveIconIndex] = Total Time Elapsed; Chase Player Variable Over Time(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], ObjectiveIconPosition, ((Direction From Angles(Random Real(0, 360), 0) * Random Real(0, 4)) + Vector(0, Random Real(0.500, 3), 0)), 4.500, None); End; If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] != Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], IconIndex))); If((Global.ObjectiveIconIds[Global.ObjectiveIconIndex] != 0)); Destroy Icon(Global.ObjectiveIconIds[Global.ObjectiveIconIndex]); End; Global.ObjectiveIconIds[Global.ObjectiveIconIndex] = 0; Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] = Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], IconIndex); End; Global.ObjectiveIconPlayer = Global.ObjectiveIconOwners[Global.ObjectiveIconIndex]; If((Global.ObjectiveIconIds[Global.ObjectiveIconIndex] == 0)); If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 1)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 1), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Arrow: Down, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 2)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 2), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Arrow: Left, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 3)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 3), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Arrow: Right, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 4)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 4), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Arrow: Up, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 5)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 5), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Asterisk, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 6)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 6), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Bolt, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 7)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 7), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Checkmark, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 8)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 8), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Circle, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 9)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 9), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Club, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 10)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 10), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Diamond, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 11)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 11), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Dizzy, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 12)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 12), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Exclamation Mark, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 13)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 13), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Eye, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 14)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 14), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Fire, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 15)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 15), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Flag, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 16)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 16), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Halo, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 17)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 17), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Happy, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 18)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 18), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Heart, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 19)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 19), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Moon, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 20)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 20), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), No, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 21)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 21), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Plus, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 22)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 22), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Poison, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 23)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 23), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Poison 2, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 24)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 24), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Question Mark, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 25)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 25), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Radioactive, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 26)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 26), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Recycle, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 27)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 27), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Ring Thick, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 28)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 28), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Ring Thin, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 29)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 29), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Sad, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 30)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 30), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Skull, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 31)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 31), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Spade, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 32)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 32), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Spiral, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 33)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 33), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Stop, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 34)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 34), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Trashcan, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 35)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 35), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), Warning, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); Else If((Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] == 36)); Create Icon((And(Entity Exists(Evaluate Once(Global.ObjectiveIconPlayer)), And((Global.VisibleIconChoices[Evaluate Once(Global.ObjectiveIconIndex)] == 36), (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NocturneState)[14] == True))) ? (Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), InspectionPrivacyActive) ? Array(Evaluate Once(Global.ObjectiveIconPlayer)) : All Players(All Teams)) : Empty Array), (Position Of(Evaluate Once(Global.ObjectiveIconPlayer)) + Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), ObjectiveIconPosition)), X, Visible To Position and Color, Player Variable(Evaluate Once(Global.ObjectiveIconPlayer), NameColor), False); End; Global.ObjectiveIconIds[Global.ObjectiveIconIndex] = Last Created Entity; End; End; End; Global.ObjectiveIconPlayer = Null; } } rule("124 - Subroutine: Remove the objective icon on departure or team change") { event { Subroutine; CleanupObjectiveIcon; } actions { For Global Variable(ObjectiveIconIndex, 0, 12, 1); If((Global.ObjectiveIconOwners[Global.ObjectiveIconIndex] == Global.TriggerPlayer)); If((Global.ObjectiveIconIds[Global.ObjectiveIconIndex] != 0)); Destroy Icon(Global.ObjectiveIconIds[Global.ObjectiveIconIndex]); End; If(Entity Exists(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex])); Stop Chasing Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], ObjectiveIconPosition); Set Player Variable(Global.ObjectiveIconOwners[Global.ObjectiveIconIndex], ObjectiveIconPosition, Vector(0, 0.500, 0)); End; Global.ObjectiveIconIds[Global.ObjectiveIconIndex] = 0; Global.ObjectiveIconChoices[Global.ObjectiveIconIndex] = 0; Global.ObjectiveIconOwners[Global.ObjectiveIconIndex] = Null; Global.ObjectiveIconTimes[Global.ObjectiveIconIndex] = 0; End; End; } } rule("125 - Subroutine: Reset the selected personal menu page") { event { Subroutine; ResetMenuPage; } actions { If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 1)); Global.TriggerPlayer.ColorCursor = ((Global.TriggerPlayer.DisplayName == Custom String("งูแรร์")) ? 2 : 0); Call Subroutine(ApplyNameColorPage); Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 2)); Global.TriggerPlayer.CameraCursor = 0; Call Subroutine(ApplyCameraPage); Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 3)); Abort If((Global.TriggerPlayer.CustomSoundtrack != Null)); Global.TriggerPlayer.GenreIndex = -1; Global.TriggerPlayer.GenreCursor = 0; Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 5)); Global.TriggerPlayer.UnkillableCursor = 0; Call Subroutine(ApplyUnkillablePage); Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 6)); Global.TriggerPlayer.VoiceCursor = 0; Call Subroutine(ApplyHeroVoicePage); Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 7)); Global.TriggerPlayer.IconCursor = ((Global.TriggerPlayer.DisplayName == Custom String("งูแรร์")) ? 23 : 0); Global.TriggerPlayer.NocturneState[14] = True; Call Subroutine(ApplyPlayerIconPage); Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 11)); Global.TriggerPlayer.VotedPlayer = Null; Global.TriggerPlayer.VoteCursor = 0; Global.VoteRecountNeeded = True; Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 13)); Global.TriggerPlayer.GhostModeActive = False; Global.TriggerPlayer.FlyModeActive = False; Global.TriggerPlayer.GhostFlyCursor = 0; Global.TriggerPlayer.GhostFlyPhysicsApplied = False; Call Subroutine(ApplyGhostFlyPhysics); Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 14)); Global.TriggerPlayer.MultijumpCursor = 0; Global.TriggerPlayer.MultijumpLevel = 1; Call Subroutine(ApplyMultijumpPage); Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 16)); Global.TriggerPlayer.MovementCursor = 0; Global.TriggerPlayer.MovementSpeed = 100; Global.TriggerPlayer.MovementGravity = 100; Global.TriggerPlayer.GhostFlyPhysicsApplied = False; Call Subroutine(ApplyGhostFlyPhysics); Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 17)); Global.TriggerPlayer.NocturneState[0] = 0; Global.TriggerPlayer.NocturneState[1] = 0; Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 18)); Global.TriggerPlayer.NocturneState[2] = 0; Global.TriggerPlayer.NocturneState[10] = Custom String("The pages await your hand."); Global.FateResultPlayer = Global.TriggerPlayer; Call Subroutine(CleanupFateResults); Global.FateResultPlayer = Null; Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 19)); Global.TriggerPlayer.NocturneState[4] = 0; Global.TriggerPlayer.NocturneState[5] = True; Global.TriggerPlayer.NocturneState[11] = Null; Global.TriggerPlayer.NocturneState[12] = Custom String(""); Global.TriggerPlayer.NocturneState[13] = 0; Else If((((Global.TriggerPlayer.MenuPage == -1) ? Global.TriggerPlayer.MainMenuCursor : Global.TriggerPlayer.MenuPage) == 20)); Global.TriggerPlayer.NocturneState[7] = 0; Global.TriggerPlayer.NocturneState[8] = 0; Global.TriggerPlayer.NocturneState[9] = False; Global.MoonlitAuraPlayer = Global.TriggerPlayer; Call Subroutine(CleanupMoonlitAura); Global.MoonlitAuraPlayer = Null; Else; Abort; End; Call Subroutine(TransitionMenuColor); Small Message(Global.TriggerPlayer, Custom String("Defaults restored.")); } } rule("126 - Subroutine: Draw Presence, Fates, Whispers and Moonlit Aura") { event { Subroutine; DrawNocturneMenu; } actions { Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Custom String("{0}\n{1}", Custom String("{0} | {1}", Custom String("{0} | {1}", Custom String("Hold {0}: {1} next / {2} prev", Input Binding String(Button(Crouch)), Input Binding String(Button(Primary Fire)), Input Binding String(Button(Secondary Fire))), Custom String("{0} apply / {1} back", Input Binding String(Button(Interact)), Input Binding String(Button(Reload)))), Custom String("{0} reset", Input Binding String(Button(Ultimate)))), Custom String("Hold {0}: {1} close", Input Binding String(Button(Crouch)), Input Binding String(Button(Melee)))), Custom String("\n{0}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", Custom String("{0}\n{1}", ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 17) ? Custom String("17 - SOUL PRESENCE") : ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 18) ? Custom String("18 - FATES") : ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 19) ? Custom String("19 - WHISPERS") : Custom String("20 - MOONLIT AURA")))), ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 17) ? Custom String("NOW: {0}", Global.PresenceNames[Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[0]]) : ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 18) ? Custom String("FATES: {0}", ((Total Time Elapsed < Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[3]) ? Custom String("WAIT {0}s", Round To Integer((Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[3] - Total Time Elapsed), Up)) : Custom String("READY"))) : ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 19) ? Custom String("{0}\n{1}", Custom String("RECEIVE: {0} | {1}", ((Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[5] == True) ? Custom String("ON") : Custom String("OFF")), ((Total Time Elapsed < Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[6]) ? Custom String("WAIT {0}s", Round To Integer((Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[6] - Total Time Elapsed), Up)) : Custom String("READY"))), Custom String("TARGET: {0}", (Not(Is Button Held(Evaluate Once(Global.TriggerPlayer), Button(Crouch))) ? Custom String("HOLD {0} TO AIM", Input Binding String(Button(Crouch))) : (And((Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11] != Null), And(Entity Exists(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11]), And(Array Contains(Global.HumanPlayers, Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11]), And(Player Variable(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11], IsHuman), And(Player Variable(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11], IsPrepared), And(Not(Player Variable(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11], PlayerCycleActive)), And((Player Variable(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11], LastTeam) == Team Of(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11])), And(Has Spawned(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11]), And(Is Alive(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11]), And(Not(Player Variable(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11], InspectionPrivacyActive)), And((Player Variable(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11], NocturneState)[5] == True), And((Is In View Angle(Evaluate Once(Global.TriggerPlayer), Eye Position(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11]), 12) == True), (Is In Line Of Sight(Eye Position(Evaluate Once(Global.TriggerPlayer)), Eye Position(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11]), Barriers Do Not Block LOS) == True))))))))))))) ? Player Variable(Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[11], DisplayName) : Custom String("NO AVAILABLE PLAYER"))))) : Custom String("NOW: {0} | HIDE OTHERS: {1}", Global.AuraNames[Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[8]], ((Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[9] == True) ? Custom String("ON") : Custom String("OFF"))))))), Custom String("> {0}", ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 17) ? Global.PresenceNames[Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[1]] : ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 18) ? Global.FateNames[Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[2]] : ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 19) ? Global.WhisperNames[Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[4]] : Global.AuraNames[Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[7]]))))), ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 17) ? Custom String("A sign beside your name.") : ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 18) ? Custom String("Private result below | 5s cooldown.") : ((Evaluate Once(Global.TriggerPlayer.MenuPage) == 19) ? Custom String("{0}{1}", Custom String("Aim at a player | Any range | 15s cooldown."), ((Total Time Elapsed < Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[13]) ? Custom String("\n{0}", Player Variable(Evaluate Once(Global.TriggerPlayer), NocturneState)[12]) : Custom String(""))) : Custom String("Moonlight in your Name Color.")))))), Top, 3, Color(White), Custom Color(210, 200, 192, 255), Custom Color(X Component Of(Player Variable(Evaluate Once(Global.TriggerPlayer), MenuColor)), Y Component Of(Player Variable(Evaluate Once(Global.TriggerPlayer), MenuColor)), Z Component Of(Player Variable(Evaluate Once(Global.TriggerPlayer), MenuColor)), 255), Visible To String and Color, Visible Never); Global.TriggerPlayer.MenuHud = Last Text ID; } } rule("127 - Subroutine: Apply the personal Nocturne social page") { event { Subroutine; ApplyNocturnePage; } actions { Abort If(Not(Global.TriggerPlayer.IsHuman)); Abort If(Not(Global.TriggerPlayer.IsPrepared)); Abort If(Not(Array Contains(Global.HumanPlayers, Global.TriggerPlayer))); Abort If(Or(Not(Has Spawned(Global.TriggerPlayer)), Not(Is Alive(Global.TriggerPlayer)))); If((Global.TriggerPlayer.MenuPage == 17)); Global.TriggerPlayer.NocturneState[0] = Global.TriggerPlayer.NocturneState[1]; Else If((Global.TriggerPlayer.MenuPage == 18)); If((Total Time Elapsed < Global.TriggerPlayer.NocturneState[3])); Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("Let the raven rest.")); Abort; End; Global.TriggerPlayer.NocturneState[3] = (Total Time Elapsed + 5); If((Global.TriggerPlayer.NocturneState[2] == 0)); Global.TriggerPlayer.NocturneState[10] = Custom String("Moon coin: {0}", ((Random Integer(0, 1) == 0) ? Custom String("MOON") : Custom String("ASH"))); Else If((Global.TriggerPlayer.NocturneState[2] == 1)); Global.TriggerPlayer.NocturneState[10] = Custom String("Bone die (D6): {0}", Random Integer(1, 6)); Else If((Global.TriggerPlayer.NocturneState[2] == 2)); Global.TriggerPlayer.NocturneState[10] = Custom String("Raven die (D20): {0}", Random Integer(1, 20)); Else If((Global.TriggerPlayer.NocturneState[2] == 3)); Global.TriggerPlayer.NocturneState[10] = Custom String("Moonlit chance: {0}%", Random Integer(1, 100)); Else; Global.TriggerPlayer.NocturneState[10] = Random Value In Array(Global.OmenLines); End; Call Subroutine(ShowFateResult); Else If((Global.TriggerPlayer.MenuPage == 19)); If((Global.TriggerPlayer.NocturneState[4] == 0)); Global.TriggerPlayer.NocturneState[5] = (Global.TriggerPlayer.NocturneState[5] == False); Else; If((Total Time Elapsed < Global.TriggerPlayer.NocturneState[6])); Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("Let the echo fade.")); Abort; End; Global.WhisperPlayer = Global.TriggerPlayer; Call Subroutine(RefreshWhisperTarget); Global.WhisperPlayer = Null; Global.WhisperTarget = Null; Global.TriggerPlayer.InspectionTarget = Global.TriggerPlayer.NocturneState[11]; If((Global.TriggerPlayer.InspectionTarget == Null)); Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("Not sent. Aim at an available player.")); Abort; End; Global.TriggerPlayer.NocturneState[6] = (Total Time Elapsed + 15); Small Message(Evaluate Once(Global.TriggerPlayer.InspectionTarget), Custom String("{0}", Evaluate Once(Custom String("{0}: {1}", Global.TriggerPlayer.DisplayName, ((Global.TriggerPlayer.NocturneState[4] == 1) ? Custom String("A greeting through the dusk.") : ((Global.TriggerPlayer.NocturneState[4] == 2) ? Custom String("Respect beneath the moon.") : ((Global.TriggerPlayer.NocturneState[4] == 3) ? Custom String("A withered rose, still cherished.") : ((Global.TriggerPlayer.NocturneState[4] == 4) ? Custom String("A quiet embrace.") : Custom String("Your soul echoes mine."))))))))); Global.TriggerPlayer.NocturneState[12] = Custom String("SENT: {0} -> {1}", Evaluate Once(Global.WhisperNames[Global.TriggerPlayer.NocturneState[4]]), Evaluate Once(Player Variable(Global.TriggerPlayer.InspectionTarget, DisplayName))); Global.TriggerPlayer.NocturneState[13] = (Total Time Elapsed + 3); Small Message(Evaluate Once(Global.TriggerPlayer), Custom String("{0}", Evaluate Once(Global.TriggerPlayer.NocturneState[12]))); End; Else If((Global.TriggerPlayer.MenuPage == 20)); If((Global.TriggerPlayer.NocturneState[7] == 4)); Global.TriggerPlayer.NocturneState[9] = (Global.TriggerPlayer.NocturneState[9] == False); Else; Global.TriggerPlayer.NocturneState[8] = Global.TriggerPlayer.NocturneState[7]; Global.MoonlitAuraPlayer = Global.MoonlitAuraOwners[Global.TriggerPlayer.HudSlot]; Call Subroutine(CleanupMoonlitAura); Global.MoonlitAuraPlayer = Null; Global.MoonlitAuraOwners[Global.TriggerPlayer.HudSlot] = Global.TriggerPlayer; Call Subroutine(UpdateMoonlitAuras); End; End; } } rule("128 - Subroutine: Maintain twelve owner-bound Moonlit Auras") { event { Subroutine; UpdateMoonlitAuras; } actions { For Global Variable(MoonlitAuraIndex, 0, 12, 1); If(Or((Global.MoonlitAuraOwners[Global.MoonlitAuraIndex] != Null), (Global.MoonlitAuraIds[Global.MoonlitAuraIndex] != 0))); If(Or((Global.MoonlitAuraOwners[Global.MoonlitAuraIndex] == Null), Or(Not(Entity Exists(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex])), Or(Not(Player Variable(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex], IsHuman)), Or(Not(Player Variable(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex], IsPrepared)), Or(Not(Array Contains(Global.HumanPlayers, Global.MoonlitAuraOwners[Global.MoonlitAuraIndex])), (Index Of Array Value(Global.MoonlitAuraOwners, Global.MoonlitAuraOwners[Global.MoonlitAuraIndex]) != Global.MoonlitAuraIndex))))))); If((Global.MoonlitAuraIds[Global.MoonlitAuraIndex] != 0)); Destroy Effect(Global.MoonlitAuraIds[Global.MoonlitAuraIndex]); End; Global.MoonlitAuraOwners[Global.MoonlitAuraIndex] = Null; Global.MoonlitAuraIds[Global.MoonlitAuraIndex] = 0; Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] = 0; Global.MoonlitAuraColors[Global.MoonlitAuraIndex] = -1; Else; If(Or(Not(Has Spawned(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex])), Or(Not(Is Alive(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex])), Or((Player Variable(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex], NocturneState)[8] < 1), (Player Variable(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex], NocturneState)[8] > 3))))); If((Global.MoonlitAuraIds[Global.MoonlitAuraIndex] != 0)); Destroy Effect(Global.MoonlitAuraIds[Global.MoonlitAuraIndex]); End; Global.MoonlitAuraIds[Global.MoonlitAuraIndex] = 0; Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] = 0; Global.MoonlitAuraColors[Global.MoonlitAuraIndex] = -1; Else; If(Or((Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] != Player Variable(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex], NocturneState)[8]), (Global.MoonlitAuraColors[Global.MoonlitAuraIndex] != Player Variable(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex], ColorIndex)))); If((Global.MoonlitAuraIds[Global.MoonlitAuraIndex] != 0)); Destroy Effect(Global.MoonlitAuraIds[Global.MoonlitAuraIndex]); End; Global.MoonlitAuraIds[Global.MoonlitAuraIndex] = 0; End; If((Global.MoonlitAuraIds[Global.MoonlitAuraIndex] == 0)); Global.MoonlitAuraPlayer = Global.MoonlitAuraOwners[Global.MoonlitAuraIndex]; Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] = Player Variable(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex], NocturneState)[8]; Global.MoonlitAuraColors[Global.MoonlitAuraIndex] = Player Variable(Global.MoonlitAuraOwners[Global.MoonlitAuraIndex], ColorIndex); If(Or((Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] == 1), (Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] == 2))); Create Effect(Filtered Array(Global.HumanPlayers, And(Entity Exists(Current Array Element), And(Player Variable(Current Array Element, IsHuman), And(Player Variable(Current Array Element, IsPrepared), And(Or((Current Array Element == Evaluate Once(Global.MoonlitAuraPlayer)), (Player Variable(Current Array Element, NocturneState)[9] == False)), And(Entity Exists(Evaluate Once(Global.MoonlitAuraPlayer)), And(Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), IsHuman), And(Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), IsPrepared), And(Array Contains(Global.HumanPlayers, Evaluate Once(Global.MoonlitAuraPlayer)), And(Has Spawned(Evaluate Once(Global.MoonlitAuraPlayer)), And(Is Alive(Evaluate Once(Global.MoonlitAuraPlayer)), And((Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), NocturneState)[8] == Evaluate Once(Global.MoonlitAuraChoices[Global.MoonlitAuraIndex])), (Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), ColorIndex) == Evaluate Once(Global.MoonlitAuraColors[Global.MoonlitAuraIndex])))))))))))))), Ring, Evaluate Once(Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), NameColor)), ((Evaluate Once(Global.MoonlitAuraChoices[Global.MoonlitAuraIndex]) == 1) ? (Position Of(Evaluate Once(Global.MoonlitAuraPlayer)) + Vector(0, 0.050, 0)) : (Eye Position(Evaluate Once(Global.MoonlitAuraPlayer)) + Vector(0, 0.350, 0))), Evaluate Once(((Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] == 1) ? 1 : 0.400)), Visible To Position and Radius); Global.MoonlitAuraIds[Global.MoonlitAuraIndex] = Last Created Entity; Else If((Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] == 3)); Create Effect(Filtered Array(Global.HumanPlayers, And(Entity Exists(Current Array Element), And(Player Variable(Current Array Element, IsHuman), And(Player Variable(Current Array Element, IsPrepared), And(Or((Current Array Element == Evaluate Once(Global.MoonlitAuraPlayer)), (Player Variable(Current Array Element, NocturneState)[9] == False)), And(Entity Exists(Evaluate Once(Global.MoonlitAuraPlayer)), And(Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), IsHuman), And(Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), IsPrepared), And(Array Contains(Global.HumanPlayers, Evaluate Once(Global.MoonlitAuraPlayer)), And(Has Spawned(Evaluate Once(Global.MoonlitAuraPlayer)), And(Is Alive(Evaluate Once(Global.MoonlitAuraPlayer)), And((Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), NocturneState)[8] == Evaluate Once(Global.MoonlitAuraChoices[Global.MoonlitAuraIndex])), (Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), ColorIndex) == Evaluate Once(Global.MoonlitAuraColors[Global.MoonlitAuraIndex])))))))))))))), Cloud, Evaluate Once(Player Variable(Evaluate Once(Global.MoonlitAuraPlayer), NameColor)), (Position Of(Evaluate Once(Global.MoonlitAuraPlayer)) + Vector(0, 0.800, 0)), 0.500, Visible To Position and Radius); Global.MoonlitAuraIds[Global.MoonlitAuraIndex] = Last Created Entity; End; Global.MoonlitAuraPlayer = Null; End; End; End; End; End; Global.MoonlitAuraPlayer = Null; } } rule("129 - Subroutine: Remove a Moonlit Aura without reading departed state") { event { Subroutine; CleanupMoonlitAura; } actions { If((Global.MoonlitAuraPlayer != Null)); For Global Variable(MoonlitAuraIndex, 0, 12, 1); If((Global.MoonlitAuraOwners[Global.MoonlitAuraIndex] == Global.MoonlitAuraPlayer)); If((Global.MoonlitAuraIds[Global.MoonlitAuraIndex] != 0)); Destroy Effect(Global.MoonlitAuraIds[Global.MoonlitAuraIndex]); End; Global.MoonlitAuraOwners[Global.MoonlitAuraIndex] = Null; Global.MoonlitAuraIds[Global.MoonlitAuraIndex] = 0; Global.MoonlitAuraChoices[Global.MoonlitAuraIndex] = 0; Global.MoonlitAuraColors[Global.MoonlitAuraIndex] = -1; End; End; End; Global.MoonlitAuraPlayer = Null; } } rule("130 - Subroutine: Show a private Fate below the Arcade menu") { event { Subroutine; ShowFateResult; } actions { Abort If(Or((Global.TriggerPlayer.HudSlot < 0), (Global.TriggerPlayer.HudSlot >= 12))); If((Global.FateResultHudIds[Global.TriggerPlayer.HudSlot] != 0)); Destroy HUD Text(Global.FateResultHudIds[Global.TriggerPlayer.HudSlot]); End; Global.FateResultOwners[Global.TriggerPlayer.HudSlot] = Global.TriggerPlayer; Global.FateResultDeadlines[Global.TriggerPlayer.HudSlot] = (Total Time Elapsed + 3); Create HUD Text(Evaluate Once(Global.TriggerPlayer), Null, Null, Custom String("\n{0}", Evaluate Once(Global.TriggerPlayer.NocturneState[10])), Top, 4, Color(White), Color(White), Custom Color(218, 198, 142, 255), Visible To, Visible Never); Global.FateResultHudIds[Global.TriggerPlayer.HudSlot] = Last Text ID; } } rule("131 - Subroutine: Expire Fate results and clean the departing owner") { event { Subroutine; CleanupFateResults; } actions { For Global Variable(FateResultIndex, 0, 12, 1); If((Global.FateResultHudIds[Global.FateResultIndex] != 0)); If(Or(And((Global.FateResultPlayer != Null), (Global.FateResultOwners[Global.FateResultIndex] == Global.FateResultPlayer)), Or((Global.FateResultDeadlines[Global.FateResultIndex] <= Total Time Elapsed), Or(Not(Entity Exists(Global.FateResultOwners[Global.FateResultIndex])), Or(Not(Array Contains(Global.HumanPlayers, Global.FateResultOwners[Global.FateResultIndex])), Or(Not(Player Variable(Global.FateResultOwners[Global.FateResultIndex], IsHuman)), Not(Player Variable(Global.FateResultOwners[Global.FateResultIndex], IsPrepared)))))))); Destroy HUD Text(Global.FateResultHudIds[Global.FateResultIndex]); Global.FateResultHudIds[Global.FateResultIndex] = 0; Global.FateResultOwners[Global.FateResultIndex] = Null; Global.FateResultDeadlines[Global.FateResultIndex] = 0; End; End; End; Global.FateResultPlayer = Null; } } rule("132 - Subroutine: Select a willing Whisper recipient without changing consent") { event { Subroutine; RefreshWhisperTarget; } actions { Global.WhisperTarget = Null; Abort If((Global.WhisperPlayer == Null)); Abort If(Not(Entity Exists(Global.WhisperPlayer))); Global.WhisperPlayer.NocturneState[11] = Null; Abort If(Not(Global.WhisperPlayer.IsHuman)); Abort If(Not(Global.WhisperPlayer.IsPrepared)); Abort If(Not(Array Contains(Global.HumanPlayers, Global.WhisperPlayer))); Abort If(Or(Not(Has Spawned(Global.WhisperPlayer)), Not(Is Alive(Global.WhisperPlayer)))); Global.WhisperTarget = Player Closest To Reticle(Global.WhisperPlayer, All Teams); Abort If((Global.WhisperTarget == Null)); Abort If((Global.WhisperTarget == Global.WhisperPlayer)); Abort If(Not(Entity Exists(Global.WhisperTarget))); Abort If(Not(Array Contains(Global.HumanPlayers, Global.WhisperTarget))); Abort If(Not(Player Variable(Global.WhisperTarget, IsHuman))); Abort If(Not(Player Variable(Global.WhisperTarget, IsPrepared))); Abort If(Player Variable(Global.WhisperTarget, PlayerCycleActive)); Abort If((Player Variable(Global.WhisperTarget, LastTeam) != Team Of(Global.WhisperTarget))); Abort If(Or(Not(Has Spawned(Global.WhisperTarget)), Not(Is Alive(Global.WhisperTarget)))); Abort If(Player Variable(Global.WhisperTarget, InspectionPrivacyActive)); Abort If((Player Variable(Global.WhisperTarget, NocturneState)[5] == False)); Abort If((Is In View Angle(Global.WhisperPlayer, Eye Position(Global.WhisperTarget), 12) == False)); Abort If((Is In Line Of Sight(Eye Position(Global.WhisperPlayer), Eye Position(Global.WhisperTarget), Barriers Do Not Block LOS) == False)); Global.WhisperPlayer.NocturneState[11] = Global.WhisperTarget; Global.WhisperTarget = Null; } } rule("133 - Subroutine: Close Crouch Travel before opening Nocturne") { event { Subroutine; CloseCrouchTravel; } actions { If((Global.TriggerPlayer.MenuHud != Null)); Destroy HUD Text(Global.TriggerPlayer.MenuHud); End; If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.MenuHudIds))); Global.MenuHudIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = 0; End; End; Global.TriggerPlayer.MenuHud = Null; Global.TriggerPlayer.CrouchTravelActive = False; Global.TriggerPlayer.TravelCommand = 0; Global.TriggerPlayer.TravelTargets = Empty Array; Global.TriggerPlayer.TravelTargetCandidate = Null; If((Global.TriggerPlayer.TravelText != Null)); If((Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer) >= 0)); If((Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] == Global.TriggerPlayer.TravelText)); Destroy In-World Text(Global.TriggerPlayer.TravelText); Global.TemporaryTravelTextIds[Index Of Array Value(Global.TemporaryTextOwners, Global.TriggerPlayer)] = 0; End; End; End; Global.TriggerPlayer.TravelText = Null; Global.TriggerPlayer.TravelTextTarget = Null; Global.TriggerPlayer.LockedTravelType = -1; Global.TriggerPlayer.LockedTravelTarget = Null; If(Global.TriggerPlayer.NameplatesDisabled); Enable Nameplates(All Players(All Teams), Global.TriggerPlayer); Global.TriggerPlayer.NameplatesDisabled = False; End; If((Global.TriggerPlayer.InspectionText != Null)); Destroy In-World Text(Global.TriggerPlayer.InspectionText); End; If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) >= 0)); If((Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer) < Count Of(Global.InspectionTextIds))); Global.InspectionTextIds[Index Of Array Value(Global.HumanPlayers, Global.TriggerPlayer)] = 0; End; End; Global.TriggerPlayer.InspectionText = Null; Global.TriggerPlayer.InspectionTarget = Null; Global.TriggerPlayer.InspectionTargets = Empty Array; Global.TriggerPlayer.InspectionActive = False; Allow Button(Global.TriggerPlayer, Button(Primary Fire)); Allow Button(Global.TriggerPlayer, Button(Secondary Fire)); Allow Button(Global.TriggerPlayer, Button(Interact)); } } rule("134 - Subroutine: Control players from global context") { event { Subroutine; ProcessGlobalController; } actions { Abort If(Not(Entity Exists(Global.TriggerPlayer))); If((Count Of(Global.TriggerPlayer.ControllerState) < 37)); Global.ControllerGeneration += 1; Global.TriggerPlayer.ControllerState = Empty Array; Global.TriggerPlayer.ControllerState[36] = Global.ControllerGeneration; Global.TriggerPlayer.ControllerTimes = Empty Array; End; Call Subroutine(Controller01a); Call Subroutine(Controller01b); Call Subroutine(Controller02); If(Or(Is Dummy Bot(Global.TriggerPlayer), Global.TriggerPlayer.IsAutomaticBot)); Call Subroutine(Controller03c); Call Subroutine(Controller03f); Call Subroutine(Controller03g); Call Subroutine(Controller03h); Call Subroutine(Controller18i); Call Subroutine(Controller18j); Else If(And(Global.TriggerPlayer.IsHuman, And(Not(Is Dummy Bot(Global.TriggerPlayer)), Not(Global.TriggerPlayer.IsAutomaticBot)))); Call Subroutine(Controller05); Call Subroutine(Controller05b); If(Or(Global.TriggerPlayer.MenuOpen, Or((Global.TriggerPlayer.MenuCommand != 0), Global.TriggerPlayer.MenuInputLocked))); Call Subroutine(Controller05c); Call Subroutine(Controller05d); Call Subroutine(Controller05e); Call Subroutine(Controller05f); Call Subroutine(Controller06); Call Subroutine(Controller08); Call Subroutine(Controller10); Call Subroutine(Controller11); Else; Global.TriggerPlayer.ControllerState[13] = 0; Global.TriggerPlayer.ControllerState[14] = 0; Global.TriggerPlayer.ControllerState[15] = 0; Global.TriggerPlayer.ControllerState[16] = 0; End; Call Subroutine(Controller12c); Call Subroutine(Controller12d); Call Subroutine(Controller12f); Call Subroutine(Controller12g); Call Subroutine(Controller13); Call Subroutine(Controller18c); Call Subroutine(Controller18g); If(Or((Count Of(Global.LuckVisionViewers) > 0), And((Global.TriggerPlayer.LuckVisionText != Null), (Global.TriggerPlayer.LuckVisionText != 0)))); Call Subroutine(Controller18i); End; If(Or((Count Of(Global.LuckVisionViewers) > 0), And((Global.TriggerPlayer.LuckVisionText != Null), (Global.TriggerPlayer.LuckVisionText != 0)))); Call Subroutine(Controller18j); End; Call Subroutine(Controller18k); Call Subroutine(Controller19); If(Global.TriggerPlayer.CrouchTravelActive); Call Subroutine(Controller19a); Call Subroutine(Controller19b); Call Subroutine(Controller19c); Call Subroutine(Controller19d); Call Subroutine(Controller19e); Call Subroutine(Controller19g); End; If(Not(Global.TriggerPlayer.CrouchTravelActive)); Global.TriggerPlayer.ControllerState[30] = 0; Global.TriggerPlayer.ControllerState[32] = 0; End; If(Global.TriggerPlayer.TravelAttachmentActive); Call Subroutine(Controller19f); End; If(Global.TriggerPlayer.TravelAttachmentActive); Call Subroutine(Controller19h); End; End; } } rule("135 - Subroutine: Drain the native event queue") { event { Subroutine; ProcessGlobalEventQueue; } actions { Global.InitialEventCount = Global.EventCount; For Global Variable(EventCursor, 0, Global.InitialEventCount, 1); Global.ActiveEvent = Global.EventQueue[Global.EventQueueHead]; Global.EventQueue[Global.EventQueueHead] = Null; Global.EventQueueHead = ((Global.EventQueueHead + 1) % 256); Global.EventCount -= 1; Global.TriggerPlayer = Global.ActiveEvent[1]; If((Global.ActiveEvent[0] == 0)); Call Subroutine(NativeEvent03i); Else If((Global.ActiveEvent[0] == 1)); Call Subroutine(NativeEvent04); Else If((Global.ActiveEvent[0] == 2)); Call Subroutine(NativeEvent12e); Else If((Global.ActiveEvent[0] == 3)); Call Subroutine(NativeEvent16a); Else If((Global.ActiveEvent[0] == 4)); Call Subroutine(NativeEvent17); Else If((Global.ActiveEvent[0] == 5)); Call Subroutine(NativeEvent18f); Else If((Global.ActiveEvent[0] == 6)); Call Subroutine(NativeEvent89i1); End; End; Global.TriggerPlayer = Null; Global.ActiveEvent = Null; } } rule("136 - Subroutine: Reconcile departed players from global context") { event { Subroutine; ProcessGlobalLeaves; } actions { For Global Variable(PendingLeaveCursor, 0, Count Of(Global.PendingLeaves), 1); If((Global.PendingLeaves[Global.PendingLeaveCursor] != Null)); Global.ActiveEvent = Global.PendingLeaves[Global.PendingLeaveCursor]; If((Total Time Elapsed >= (Global.ActiveEvent[7] + 0.500))); Global.TriggerPlayer = Global.ActiveEvent[1]; Global.PendingLeaves[Global.PendingLeaveCursor] = Null; If(Not(And(Entity Exists(Global.TriggerPlayer), Array Contains(Global.PlayerListSnapshot, Global.TriggerPlayer)))); If(Entity Exists(Global.TriggerPlayer)); Global.TriggerPlayer.IsPrepared = False; Global.TriggerPlayer.IsHuman = False; Global.TriggerPlayer.TeamChangeProcessed = False; Global.TriggerPlayer.PlayerCycleActive = False; End; Call Subroutine(CleanupPlayer); End; End; End; End; If(((Global.SchedulerStep % 20) == 0)); For Global Variable(MissingPlayerCursor, (Count Of(Global.HumanPlayers) - 1), -1, -1); Global.TriggerPlayer = Global.HumanPlayers[Global.MissingPlayerCursor]; If(And(Entity Exists(Global.TriggerPlayer), Array Contains(Global.PlayerListSnapshot, Global.TriggerPlayer))); Global.MissingHudDeadlines[Global.PlayerHudSlots[Global.MissingPlayerCursor]] = 0; Else If((Global.MissingHudDeadlines[Global.PlayerHudSlots[Global.MissingPlayerCursor]] == 0)); Global.MissingHudDeadlines[Global.PlayerHudSlots[Global.MissingPlayerCursor]] = (Total Time Elapsed + 0.500); Else If((Total Time Elapsed >= Global.MissingHudDeadlines[Global.PlayerHudSlots[Global.MissingPlayerCursor]])); If(Entity Exists(Global.TriggerPlayer)); Global.TriggerPlayer.IsPrepared = False; Global.TriggerPlayer.IsHuman = False; Global.TriggerPlayer.TeamChangeProcessed = False; Global.TriggerPlayer.PlayerCycleActive = False; End; Call Subroutine(CleanupPlayer); End; End; End; Global.ActiveEvent = Null; Global.TriggerPlayer = Null; } } rule("137 - Subroutine: Cache visible player icon choices") { event { Subroutine; ProcessVisibleIcons; } actions { For Global Variable(ObjectiveIconIndex, 0, 12, 1); Global.ObjectiveIconPlayer = Global.ObjectiveIconOwners[Global.ObjectiveIconIndex]; Global.VisibleIconChoices[Global.ObjectiveIconIndex] = (And(Entity Exists(Global.ObjectiveIconPlayer), And(Array Contains(Global.HumanPlayers, Global.ObjectiveIconPlayer), Global.ObjectiveIconPlayer.IsHuman)) ? Global.ObjectiveIconPlayer.IconIndex : 0); End; Global.ObjectiveIconPlayer = Null; } }