Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "Sleep 'N Yeet! By: Block#12425. Version: 1.3.2. Use Workshop Settings to change the game! Additional language support: Simplified CN."
  • Description: "Sleep 'N Yeet! By: Block#12425. Version: 1.4.0. Use Workshop Settings to change the game! Additional language support: Simplified CN."
  • }
  • lobby
  • {
  • Allow Players Who Are In Queue: Yes
  • Match Voice Chat: Enabled
  • Max Spectators: 6
  • Return To Lobby: Never
  • }
  • modes
  • {
  • Deathmatch
  • {
  • enabled maps
  • {
  • Workshop Island
  • Workshop Island Night
  • Workshop Chamber
  • }
  • }
  • General
  • {
  • Allow Hero Switching: Off
  • Game Mode Start: Immediately
  • Hero Limit: Off
  • Respawn Time Scalar: 20%
  • }
  • }
  • heroes
  • {
  • General
  • {
  • Ana
  • {
  • Biotic Grenade: Off
  • Damage Dealt: 10%
  • Movement Speed: 110%
  • No Scope: On
  • Primary Fire: Off
  • Quick Melee: Off
  • Ultimate Generation - Combat Nano Boost: 0%
  • Ultimate Generation - Passive Nano Boost: 0%
  • Ultimate Generation Nano Boost: 10%
  • }
  • enabled heroes
  • {
  • Ana
  • }
  • }
  • }
  • }
  • variables {
  • global:
  • 0: stringCreator
  • 1: stringVersion
  • 2: stringDiscordLink
  • 3: stringCode
  • 4: stringGHLink
  • 5: stringProjectLink
  • 6: stringLeft
  • 7: stringRight
  • 8: stringObjective
  • 9: stringPick
  • 10: stringEscape
  • 11: stringDiscord
  • 12: stringSubtitle
  • 13: stringProject
  • 14: stringUltEscape
  • 15: stringTranslation
  • 16: stringGraspEscape
  • 17: stringTitle
  • 18: stringAnaBotSpawn
  • 19: stringGH
  • 20: canAutoEscape
  • 21: sleepDuration
  • 22: ultPercentage
  • 23: pickupRadius
  • 24: positionArray
  • 25: throwStrength
  • 26: scale
  • 27: moveSpeed
  • 28: sleepCD
  • 29: jumpSpeed
  • 30: aiNumber
  • 31: aimInaccuracyExtremes
  • 32: spawnAI
  • 33: willAttackPlayers
  • 34: willEscape
  • 35: willJump
  • 36: willRoam
  • 37: willUlt
  • 38: isDebug
  • 39: leader
  • 40: leaderArray
  • 41: titleColorR
  • 42: titleColorG
  • 43: titleColorB
  • 44: y
  • 45: spawnPositionArray
  • player:
  • 0: playerCarried
  • 1: thrower
  • 2: i
  • 3: j
  • 4: targetedPlayer
  • 5: isChasing
  • 6: aimInaccuracy
  • 4: ready
  • 5: scoreTime
  • 6: score
  • 7: targetedPlayer
  • 8: isChasing
  • 9: aimInaccuracy
  • }
  • subroutines {
  • 0: languageDetection
  • 1: englishStrings
  • 2: simplifiedChineseStrings
  • 3: autoEscape
  • 4: targetRoam
  • 5: hudCreation
  • 6: debug
  • 7: ringCreation
  • }
  • rule ("Constant Strings") {
  • event {
  • Ongoing - Global;
  • }
  • actions {
  • Set Global Variable(stringCreator, Custom String("Block#12425", Null, Null, Null));
  • Set Global Variable(stringVersion, Custom String("1.3.2", Null, Null, Null));
  • Set Global Variable(stringVersion, Custom String("1.4.0", Null, Null, Null));
  • Set Global Variable(stringDiscordLink, Custom String("discord.gg/CSKSVDH", Null, Null, Null));
  • Set Global Variable(stringProjectLink, Custom String("workshop.codes/sleepyeet", Null, Null, Null));
  • Set Global Variable(stringProjectLink, Custom String("workshop.codes/QKTTV", Null, Null, Null));
  • Set Global Variable(stringCode, Custom String("Code: QKTTV", Null, Null, Null));
  • Set Global Variable(stringGHLink, Custom String("grandeurhammers.com/discord", Null, Null, Null));
  • }
  • }
  • rule ("Language Detection") {
  • event {
  • Subroutine;
  • languageDetection;
  • }
  • actions {
  • If(Compare(Custom String("{0}", Hero(Ana), Null, Null), ==, Custom String("Ana", Null, Null, Null)));
  • Call Subroutine(englishStrings);
  • Else If(Compare(Custom String("{0}", Hero(Ana), Null, Null), ==, Custom String("安娜", Null, Null, Null)));
  • Call Subroutine(simplifiedChineseStrings);
  • Else;
  • Call Subroutine(englishStrings);
  • }
  • }
  • rule ("English") {
  • event {
  • Subroutine;
  • englishStrings;
  • }
  • actions {
  • Set Global Variable(stringSubtitle, Custom String("Created by: {0}. Version: {1}", Global.stringCreator, Global.stringVersion, Null));
  • Set Global Variable(stringLeft, Custom String(": to pick up sleeping player", Null, Null, Null));
  • Set Global Variable(stringRight, Custom String(": to yeet carried player", Null, Null, Null));
  • Set Global Variable(stringObjective, Custom String("Yeet sleeping players off the island!", Null, Null, Null));
  • Set Global Variable(stringPick, Custom String("Picked up", Null, Null, Null));
  • Set Global Variable(stringEscape, Custom String(": To escape her grasp!", Null, Null, Null));
  • Set Global Variable(stringDiscord, Custom String("Join the discord: {0} (All caps)", Global.stringDiscordLink, Null, Null));
  • Set Global Variable(stringProject, Custom String("Project: {0} (All lowercase)", Global.stringProjectLink, Null, Null));
  • Set Global Variable(stringProject, Custom String("Project: {0}", Global.stringProjectLink, Null, Null));
  • Set Global Variable(stringUltEscape, Custom String(": To gain a speed boost and wake up if asleep!", Null, Null, Null));
  • Set Global Variable(stringTranslation, Custom String("", Null, Null, Null));
  • Set Global Variable(stringGraspEscape, Custom String(" escaped!", Null, Null, Null));
  • Set Global Variable(stringTitle, Custom String("Sleep 'N Yeet", Null, Null, Null));
  • Set Global Variable(stringAnaBotSpawn, Custom String("{0} Ana bots Enabled. Current count:", Ability Icon String(Hero(Torbjörn), Button(Ability 2)), Null, Null));
  • Set Global Variable(stringAnaBotSpawn, Custom String("{0} Bots Enabled. Current count:", Ability Icon String(Hero(Echo), Button(Ultimate)), Null, Null));
  • Set Global Variable(stringGH, Custom String("{0} Certified by Grandeur Hammers", Ability Icon String(Hero(Torbjörn), Button(Ability 2)), Null, Null));
  • }
  • }
  • rule ("Simplified CN (Thanks to Zesty for translation)") {
  • event {
  • Subroutine;
  • simplifiedChineseStrings;
  • }
  • actions {
  • Set Global Variable(stringSubtitle, Custom String("由{0}制作。版本:{1}", Global.stringCreator, Global.stringVersion, Null));
  • Set Global Variable(stringLeft, Custom String(":捡起沉睡的玩家", Null, Null, Null));
  • Set Global Variable(stringRight, Custom String(":抛投抓住的玩家", Null, Null, Null));
  • Set Global Variable(stringObjective, Custom String("把睡着的玩家丢出小岛!", Null, Null, Null));
  • Set Global Variable(stringPick, Custom String("捡起", Null, Null, Null));
  • Set Global Variable(stringEscape, Custom String(":逃离她的魔爪!", Null, Null, Null));
  • Set Global Variable(stringDiscord, Custom String("加入Discord:{0}(全大写)", Global.stringDiscordLink, Null, Null));
  • Set Global Variable(stringProject, Custom String("项目:{0}(全小写)", Global.stringProjectLink, Null, Null));
  • Set Global Variable(stringUltEscape, Custom String(":获得加速,如果是沉睡状态则将睡醒!", Null, Null, Null));
  • Set Global Variable(stringTranslation, Custom String("由Zesty#51453翻译", Null, Null, Null));
  • Set Global Variable(stringGraspEscape, Custom String("逃脱了!", Null, Null, Null));
  • Set Global Variable(stringTitle, Custom String("梦中丢人", Null, Null, Null));
  • Set Global Variable(stringAnaBotSpawn, Custom String("{0} 启用了安娜机器人。目前数量:", Ability Icon String(Hero(Torbjörn), Button(Ability 2)), Null, Null));
  • Set Global Variable(stringGH, Custom String("{0} 由Grandeur Hammers认证", Ability Icon String(Hero(Torbjörn), Button(Ability 2)), Null, Null));
  • }
  • }
  • rule ("New Player Setup") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Is Game In Progress == True;
  • }
  • actions {
  • Set Objective Description(Event Player, Global.stringObjective, Visible To);
  • Start Heal Over Time(Event Player, Event Player, 9999, 9999);
  • Set Player Variable(Event Player, playerCarried, Empty Array);
  • Start Scaling Player(Event Player, Divide(Global.scale, 100), False);
  • Start Modifying Hero Voice Lines(Event Player, Add(Divide(Subtract(Global.scale, 100), -180), 1), False);
  • Set Move Speed(Event Player, Global.moveSpeed);
  • Set Jump Vertical Speed(Event Player, Global.jumpSpeed);
  • Set Player Variable(Event Player, scoreTime, Match Time);
  • Set Player Variable(Event Player, score, 0);
  • }
  • }
  • rule ("Ana Initial Setup") {
  • event {
  • Ongoing - Global;
  • }
  • actions {
  • Set Global Variable(sleepDuration, Workshop Setting Real(Custom String("General", Null, Null, Null), Custom String("Sleep Duration in Seconds (Default󠀺 5)", Null, Null, Null), 5, 1, 10, 0));
  • Set Global Variable(ultPercentage, Workshop Setting Integer(Custom String("General", Null, Null, Null), Custom String("Ultimate Percentage Added per elimination (Default󠀺 20%)", Null, Null, Null), 20, 0, 100, 0));
  • Set Global Variable(pickupRadius, Workshop Setting Real(Custom String("General", Null, Null, Null), Custom String("Pickup Radius in Meters (Default󠀺 1.5)", Null, Null, Null), 1.5, 0.5, 20, 0));
  • Set Global Variable(canAutoEscape, Workshop Setting Toggle(Custom String("General", Null, Null, Null), Custom String("Auto escape from players (Default󠀺 disabled)", Null, Null, Null), False, 0));
  • Set Global Variable(throwStrength, Workshop Setting Integer(Custom String("General", Null, Null, Null), Custom String("Throw Strength Percentage (Default󠀺 100%)", Null, Null, Null), 100, 25, 175, 0));
  • Set Global Variable(scale, Workshop Setting Real(Custom String("General", Null, Null, Null), Custom String("Scale Percentage of Ana (Default󠀺 100%)", Null, Null, Null), 100, 10, 500, 0));
  • Set Global Variable(moveSpeed, Workshop Setting Real(Custom String("General", Null, Null, Null), Custom String("Move Speed Percentage of Ana (Default󠀺 100%)", Null, Null, Null), 100, 10, 500, 0));
  • Set Global Variable(sleepCD, Workshop Setting Real(Custom String("General", Null, Null, Null), Custom String("Sleep Dart Cooldown in Seconds (Default󠀺 2)", Null, Null, Null), 2, 0, 20, 0));
  • Set Global Variable(jumpSpeed, Workshop Setting Real(Custom String("General", Null, Null, Null), Custom String("Jump Speed Percentage (Default󠀺 100%)", Null, Null, Null), 100, 0, 500, 0));
  • }
  • }
  • rule ("Pickup player") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • Has Status(Event Player, Asleep) == False;
  • Entity Exists(First Of(Sorted Array(Filtered Array(All Players(All Teams), And(And(And(And(Has Status(Current Array Element, Asleep), Compare(Current Array Element, !=, Event Player)), Compare(Distance Between(Event Player, Current Array Element), <=, Global.pickupRadius)), Not(Entity Exists((Current Array Element).thrower))), Is On Ground(Current Array Element))), Distance Between(Event Player, Current Array Element)))) == True;
  • }
  • actions {
  • Modify Player Variable(Event Player, playerCarried, Append To Array, First Of(Sorted Array(Filtered Array(All Players(All Teams), And(And(Has Status(Current Array Element, Asleep), Compare(Current Array Element, !=, Event Player)), Compare((Event Player).thrower, ==, Null))), Distance Between(Current Array Element, Event Player))));
  • Set Player Variable(Last Of((Event Player).playerCarried), thrower, Event Player);
  • Attach Players(Last Of((Event Player).playerCarried), Event Player, Vector(0, Multiply(Add(2, Index Of Array Value((Event Player).playerCarried, Last Of((Event Player).playerCarried))), Divide(Global.scale, 100)), 0));
  • Play Effect(Event Player, Buff Impact Sound, Color(White), Event Player, 200);
  • Small Message(Event Player, Custom String("{0} {1}!", Global.stringPick, Last Of((Event Player).playerCarried), Null));
  • Wait(0.25, Ignore Condition);
  • }
  • }
  • rule ("Reset Thrower") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Is On Ground(Event Player) == True;
  • Is True For All(((Event Player).thrower).playerCarried, Compare(Current Array Element, !=, Event Player)) == True;
  • }
  • actions {
  • Wait(0.5, Abort When False);
  • Set Player Variable(Event Player, thrower, Null);
  • }
  • }
  • rule ("Sleep Setup With Player") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Has Status(Event Player, Asleep) == True;
  • Count Of((Event Player).playerCarried) > 0;
  • }
  • actions {
  • If(Compare(Count Of((Event Player).playerCarried), >, 0));
  • Detach Players(First Of((Event Player).playerCarried));
  • Set Player Variable(First Of((Event Player).playerCarried), thrower, Null);
  • Modify Player Variable(Event Player, playerCarried, Remove From Array By Index, 0);
  • }
  • }
  • rule ("Sleep Setup") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Has Status(Event Player, Asleep) == True;
  • }
  • actions {
  • Set Ability Cooldown(Event Player, Button(Ability 1), 0);
  • }
  • }
  • rule ("Throw player") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Is Button Held(Event Player, Button(Secondary Fire)) == True;
  • Has Status(Event Player, Asleep) == False;
  • Count Of((Event Player).playerCarried) > 0;
  • }
  • actions {
  • While(Compare((Event Player).playerCarried, !=, Empty Array));
  • Detach Players(First Of((Event Player).playerCarried));
  • Apply Impulse(First Of((Event Player).playerCarried), Vector(X Component Of(Facing Direction Of(Event Player)), -0.1, Z Component Of(Facing Direction Of(Event Player))), Multiply(Global.throwStrength, 0.4), To World, Cancel Contrary Motion);
  • Modify Player Variable(Event Player, playerCarried, Remove From Array By Index, 0);
  • Wait(0.05, Ignore Condition);
  • End;
  • }
  • }
  • rule ("Escape from grasp") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Has Status(Event Player, Asleep) == False;
  • Is Button Held(Event Player, Button(Jump)) == True;
  • (Event Player).thrower != Null;
  • Is True For Any(((Event Player).thrower).playerCarried, Compare(Current Array Element, ==, Event Player)) == True;
  • }
  • actions {
  • Detach Players(Event Player);
  • Set Player Variable(Event Player, i, Index Of Array Value(((Event Player).thrower).playerCarried, Event Player));
  • Small Message((Event Player).thrower, Custom String("{0}{1}", Event Player, Global.stringGraspEscape, Null));
  • Modify Player Variable((Event Player).thrower, playerCarried, Remove From Array By Index, (Event Player).i);
  • While(Compare(Count Of(((Event Player).thrower).playerCarried), >=, Add((Event Player).i, 1)));
  • "Sometimes the array has a player that does not exist. This check will prevent a weird small message from being sent."
  • If(Compare(Value In Array(((Event Player).thrower).playerCarried, (Event Player).i), !=, Null));
  • Small Message((Event Player).thrower, Custom String("{0}{1}", Value In Array(((Event Player).thrower).playerCarried, (Event Player).i), Global.stringGraspEscape, Null));
  • End;
  • Detach Players(Value In Array(((Event Player).thrower).playerCarried, (Event Player).i));
  • Set Player Variable(Value In Array(((Event Player).thrower).playerCarried, (Event Player).i), thrower, Null);
  • Modify Player Variable((Event Player).thrower, playerCarried, Remove From Array By Index, (Event Player).i);
  • Wait(0.05, Ignore Condition);
  • End;
  • Set Player Variable(Event Player, thrower, Null);
  • }
  • }
  • rule ("Too Far Gone kill credit") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Y Component Of(Position Of(Event Player)) < -5;
  • Y Component Of(Position Of(Event Player)) < If-Then-Else(Compare(Current Map, ==, Map(Workshop Chamber)), 41, -5);
  • (Event Player).ready != False;
  • }
  • actions {
  • Kill(Event Player, (Event Player).thrower);
  • Set Player Variable(Event Player, ready, False);
  • Set Ultimate Charge((Event Player).thrower, Add(Ultimate Charge Percent((Event Player).thrower), Global.ultPercentage));
  • Wait(0.25, Ignore Condition);
  • Set Player Variable(Event Player, playerCarried, Empty Array);
  • Set Player Variable(Event Player, thrower, Null);
  • }
  • }
  • rule ("Using Ultimate") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Is Using Ultimate(Event Player) == True;
  • }
  • actions {
  • Set Move Speed(Event Player, Multiply(Global.moveSpeed, 1.4));
  • }
  • }
  • rule ("Is not using Ultimate") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Is Using Ultimate(Event Player) == False;
  • }
  • actions {
  • Set Move Speed(Event Player, Global.moveSpeed);
  • }
  • }
  • rule ("Ult Cancels Sleep") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Has Status(Event Player, Asleep) == True;
  • Is Button Held(Event Player, Button(Ultimate)) == True;
  • Ultimate Charge Percent(Event Player) == 100;
  • }
  • actions {
  • Clear Status(Event Player, Asleep);
  • Wait(0.8, Ignore Condition);
  • Press Button(Event Player, Button(Ultimate));
  • Wait(1.2, Ignore Condition);
  • If(Compare(Ultimate Charge Percent(Event Player), >, 0));
  • If(And(Compare(Ultimate Charge Percent(Event Player), >, 0), Not(Is Using Ultimate(Event Player))));
  • Set Ultimate Charge(Event Player, 0);
  • }
  • }
  • rule ("Slept for too long") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Has Status(Event Player, Asleep) == True;
  • (Event Player).thrower == Null;
  • }
  • actions {
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Respawn(Event Player);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Wait(1, Abort When False);
  • Set Status(Event Player, Null, Phased Out, 5);
  • Clear Status(Event Player, Asleep);
  • }
  • }
  • rule ("Auto Escape Subroutine") {
  • event {
  • Subroutine;
  • autoEscape;
  • }
  • actions {
  • Start Holding Button(Event Player, Button(Jump));
  • Wait(0.016, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Jump));
  • }
  • }
  • rule ("Auto Escape") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.canAutoEscape == True;
  • Entity Exists((Event Player).thrower) == True;
  • Has Status(Event Player, Asleep) == False;
  • }
  • actions {
  • Call Subroutine(autoEscape);
  • }
  • }
  • rule ("Manual Sleep") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Has Status(Event Player, Asleep) == True;
  • }
  • actions {
  • Set Status(Event Player, Null, Asleep, Global.sleepDuration);
  • }
  • }
  • rule ("Entity Check") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Count Of((Event Player).playerCarried) > 0;
  • Is True For Any((Event Player).playerCarried, Not(Entity Exists(Current Array Element))) == True;
  • }
  • actions {
  • For Player Variable(Event Player, j, 0, Count Of((Event Player).playerCarried), 1);
  • If(Not(Entity Exists(Value In Array((Event Player).playerCarried, (Event Player).j))));
  • Modify Player Variable(Event Player, playerCarried, Remove From Array By Index, (Event Player).j);
  • End;
  • End;
  • }
  • }
  • rule ("Sleep Dart Manual CD") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Ability Cooldown(Event Player, Button(Ability 1)) > 0;
  • }
  • actions {
  • Set Ability Cooldown(Event Player, Button(Ability 1), Global.sleepCD);
  • }
  • }
  • rule ("Record new match time after score change") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • (Event Player).score != Score Of(Event Player);
  • }
  • actions {
  • Set Player Variable(Event Player, scoreTime, Match Time);
  • Set Player Variable(Event Player, score, Score Of(Event Player));
  • }
  • }
  • rule ("Initial Setup") {
  • event {
  • Ongoing - Global;
  • }
  • actions {
  • Set Global Variable(spawnAI, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots Spawn", Null, Null, Null), True, 0));
  • Set Global Variable(aiNumber, Workshop Setting Integer(Custom String("Bots", Null, Null, Null), Custom String("Number of minimum required bots/players", Null, Null, Null), 8, 0, 10, 0));
  • Set Global Variable(aimInaccuracyExtremes, Workshop Setting Real(Custom String("Bots", Null, Null, Null), Custom String("Range of Aim Error", Null, Null, Null), 2, 0, 10, 0));
  • "This array is used by the bots to find different spots on the map"
  • Set Global Variable(positionArray, Array(Vector(25, 0, 0), Vector(25, 0, 12.5), Vector(25, 0, -12.5), Vector(-25, 0, 0), Vector(-25, 0, 12.5), Vector(-25, 0, -12.5), Vector(0, 0, 25), Vector(12.5, 0, 25), Vector(-12.5, 0, 25), Vector(0, 0, -25), Vector(12.5, 0, -25), Vector(-12.5, 0, -25)));
  • Set Global Variable(positionArray, If-Then-Else(Compare(Current Map, ==, Map(Workshop Chamber)), Array(Vector(27, 46, 0), Vector(27, 46, 13.5), Vector(27, 46, -13.5), Vector(-27, 46, 0), Vector(-27, 0, 13.5), Vector(-27, 46, -13.5), Vector(0, 46, 27), Vector(13.5, 46, 27), Vector(-27, 46, 27), Vector(0, 46, -27), Vector(13.5, 46, -27), Vector(-13.5, 46, -27)), Array(Vector(25, 0, 0), Vector(25, 0, 12.5), Vector(25, 0, -12.5), Vector(-25, 0, 0), Vector(-25, 0, 12.5), Vector(-25, 0, -12.5), Vector(0, 0, 25), Vector(12.5, 0, 25), Vector(-25, 0, 25), Vector(0, 0, -25), Vector(12.5, 0, -25), Vector(-12.5, 0, -25))));
  • Set Global Variable(willAttackPlayers, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Attack players (shoot sleep dart, chase, and yeet)", Null, Null, Null), True, 0));
  • Set Global Variable(willEscape, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will attempt to escape", Null, Null, Null), True, 0));
  • Set Global Variable(willJump, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will jump", Null, Null, Null), True, 0));
  • Set Global Variable(willRoam, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will roam around the map", Null, Null, Null), True, 0));
  • Set Global Variable(willUlt, Workshop Setting Toggle(Custom String("Bots", Null, Null, Null), Custom String("Bots will use ultimate", Null, Null, Null), True, 0));
  • }
  • }
  • rule ("Spawn AI") {
  • event {
  • Ongoing - Global;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Number Of Players(All Teams) < Global.aiNumber;
  • }
  • actions {
  • Wait(1, Abort When False);
  • Create Dummy Bot(Hero(Ana), All Teams, -1, Nearest Walkable Position(Vector(Random Real(-20, 20), 0, Random Real(-20, 20))), Vector(0, 0, 0));
  • Set Player Variable(Last Created Entity, aimInaccuracy, Vector(Random Real(Multiply(-1, Global.aimInaccuracyExtremes), Global.aimInaccuracyExtremes), 0, Random Real(Multiply(-1, Global.aimInaccuracyExtremes), Global.aimInaccuracyExtremes)));
  • Loop If Condition Is True;
  • }
  • }
  • rule ("Delete AI") {
  • event {
  • Ongoing - Global;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Number Of Players(All Teams) > Global.aiNumber;
  • Count Of(Filtered Array(All Players(All Teams), Is Dummy Bot(Current Array Element))) > 0;
  • }
  • actions {
  • Wait(1, Abort When False);
  • Destroy Dummy Bot(All Teams, Slot Of(Random Value In Array(Filtered Array(All Players(All Teams), Is Dummy Bot(Current Array Element)))));
  • Wait(1, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule ("Reset Player Target on Spawn") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • Is Alive(Event Player) == True;
  • Has Spawned(Event Player) == True;
  • }
  • actions {
  • Call Subroutine(targetRoam);
  • }
  • }
  • rule ("Target Roam Subroutine") {
  • event {
  • Subroutine;
  • targetRoam;
  • }
  • actions {
  • Set Player Variable(Event Player, targetedPlayer, First Of(Sorted Array(Filtered Array(All Living Players(All Teams), And(Not(Has Status(Current Array Element, Asleep)), Compare(Event Player, !=, Current Array Element))), Distance Between(Event Player, Current Array Element))));
  • Start Facing(Event Player, Direction Towards(Event Player, Add(Add((Event Player).targetedPlayer, Multiply(Velocity Of((Event Player).targetedPlayer), Square Root(Divide(Raise To Power(Distance Between(Event Player, (Event Player).targetedPlayer), 2), Subtract(3600, Raise To Power(Speed Of((Event Player).targetedPlayer), 2)))))), (Event Player).aimInaccuracy)), 600, To World, Direction and Turn Rate);
  • Set Player Variable(Event Player, aimInaccuracy, Vector(Random Real(Multiply(-1, Global.aimInaccuracyExtremes), Global.aimInaccuracyExtremes), 0, Random Real(Multiply(-1, Global.aimInaccuracyExtremes), Global.aimInaccuracyExtremes)));
  • }
  • }
  • rule ("Roam") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).isChasing == False;
  • Has Status(Event Player, Asleep) == False;
  • }
  • actions {
  • If(Compare(Global.willRoam, ==, True));
  • Start Throttle In Direction(Event Player, Vector(Random Real(-1, 1), 0, Random Real(-1, 1)), 1, To World, Replace existing throttle, Direction and Magnitude);
  • Else;
  • Stop Throttle In Direction(Event Player);
  • End;
  • If(And(Compare(Random Integer(0, 5), <=, 3), Compare(Global.willJump, ==, True)));
  • Start Holding Button(Event Player, Button(Jump));
  • Wait(0.016, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Jump));
  • End;
  • Wait(0.7, Abort When False);
  • Loop If Condition Is True;
  • }
  • }
  • rule ("Target Player while Roaming") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).isChasing == False;
  • Has Status(Event Player, Asleep) == False;
  • (Event Player).playerCarried == Empty Array;
  • }
  • actions {
  • Call Subroutine(targetRoam);
  • Wait(5, Abort When False);
  • Loop;
  • }
  • }
  • rule ("Shoot sleep") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).isChasing == False;
  • Ability Cooldown(Event Player, Button(Ability 1)) == 0;
  • Has Status(Event Player, Asleep) == False;
  • Global.willAttackPlayers == True;
  • }
  • actions {
  • If(Compare(Random Integer(0, 1), ==, 1));
  • Start Holding Button(Event Player, Button(Ability 1));
  • Wait(0.016, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Ability 1));
  • End;
  • Wait(1, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule ("Target Sleeping Player") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • Has Status((Event Player).targetedPlayer, Asleep) == True;
  • (Event Player).playerCarried == Empty Array;
  • Global.willAttackPlayers == True;
  • }
  • actions {
  • Set Player Variable(Event Player, isChasing, True);
  • Start Throttle In Direction(Event Player, Direction Towards(Event Player, (Event Player).targetedPlayer), 1, To World, Replace existing throttle, Direction and Magnitude);
  • Communicate(Event Player, Hello);
  • }
  • }
  • rule ("Launch Player") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).isChasing == True;
  • Or(Or(Or(Compare(X Component Of(Position Of(Event Player)), >=, Subtract(17, Divide(Multiply(Global.throwStrength, 0.4), 10))), Compare(X Component Of(Position Of(Event Player)), <=, Add(-17, Divide(Multiply(Global.throwStrength, 0.4), 10)))), Compare(Z Component Of(Position Of(Event Player)), >=, Subtract(17, Divide(Multiply(Global.throwStrength, 0.4), 10)))), Compare(Z Component Of(Position Of(Event Player)), <=, Add(-17, Divide(Multiply(Global.throwStrength, 0.4), 10)))) == True;
  • Count Of((Event Player).playerCarried) > 0;
  • Global.willAttackPlayers == True;
  • }
  • actions {
  • Start Holding Button(Event Player, Button(Secondary Fire));
  • Wait(0.016, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Secondary Fire));
  • Communicate(Event Player, Goodbye);
  • }
  • }
  • rule ("Pick Up Player") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).isChasing == True;
  • Count Of(Filtered Array(All Living Players(All Teams), And(Compare(Distance Between(Current Array Element, Event Player), <=, Subtract(Global.pickupRadius, Multiply(Global.pickupRadius, 0.333))), Has Status(Current Array Element, Asleep)))) > 0;
  • (Event Player).playerCarried == Empty Array;
  • Global.willAttackPlayers == True;
  • }
  • actions {
  • Stop Forcing Throttle(Event Player);
  • "Easter Egg: Bot randomly teabags opponents."
  • If(Compare(Random Real(0, 1), >, 0.7));
  • Wait(0.25, Ignore Condition);
  • Stop Throttle In Direction(Event Player);
  • Start Holding Button(Event Player, Button(Crouch));
  • Wait(0.1, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Crouch));
  • Wait(0.15, Ignore Condition);
  • Start Holding Button(Event Player, Button(Crouch));
  • Wait(0.1, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Crouch));
  • Wait(0.1, Ignore Condition);
  • End;
  • Start Holding Button(Event Player, Button(Primary Fire));
  • Wait(0.016, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • Wait(0.25, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule ("Move to Edge With Player") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).isChasing == True;
  • Count Of((Event Player).playerCarried) > 0;
  • Global.willAttackPlayers == True;
  • }
  • actions {
  • Start Throttle In Direction(Event Player, Direction Towards(Event Player, First Of(Sorted Array(Global.positionArray, Distance Between(Event Player, Current Array Element)))), 1, To World, Replace existing throttle, Direction and Magnitude);
  • Set Player Variable(Event Player, targetedPlayer, First Of(Sorted Array(Global.positionArray, Distance Between(Event Player, Current Array Element))));
  • Wait(3, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule ("Death Reset") {
  • event {
  • Player Died;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • }
  • actions {
  • Set Player Variable(Event Player, targetedPlayer, Null);
  • Set Player Variable(Event Player, isChasing, False);
  • Stop Forcing Throttle(Event Player);
  • }
  • }
  • rule ("Sleep Reset") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • Has Status(Event Player, Asleep) == True;
  • }
  • actions {
  • Stop Facing(Event Player);
  • Set Player Variable(Event Player, targetedPlayer, Null);
  • Set Player Variable(Event Player, isChasing, False);
  • Stop Forcing Throttle(Event Player);
  • }
  • }
  • rule ("Escape") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).thrower != Null;
  • Has Status(Event Player, Asleep) == False;
  • Global.willEscape == True;
  • }
  • actions {
  • Call Subroutine(autoEscape);
  • Wait(0.25, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • rule ("Ultimate usage") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • Ultimate Charge Percent(Event Player) == 100;
  • Is Alive(Event Player) == True;
  • Has Spawned(Event Player) == True;
  • Global.willUlt == True;
  • }
  • actions {
  • Start Holding Button(Event Player, Button(Ultimate));
  • Wait(0.016, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Ultimate));
  • }
  • }
  • rule ("Retreat from map edge") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • Or(Or(Or(Compare(Add(X Component Of(Position Of(Event Player)), 2), >=, 21), Compare(Subtract(X Component Of(Position Of(Event Player)), 2), <=, -21)), Compare(Add(Z Component Of(Position Of(Event Player)), 2), >=, 21)), Compare(Subtract(Z Component Of(Position Of(Event Player)), 2), <=, -21)) == True;
  • }
  • actions {
  • Start Throttle In Direction(Event Player, Direction Towards(Event Player, Vector(0, 0, 0)), 1, To World, Replace existing throttle, Direction and Magnitude);
  • Set Player Variable(Event Player, isChasing, True);
  • Wait(0.7, Ignore Condition);
  • Loop If Condition Is True;
  • Set Player Variable(Event Player, isChasing, False);
  • }
  • }
  • rule ("Stop Chasing After Removing Carried Players") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).playerCarried == Empty Array;
  • }
  • actions {
  • Set Player Variable(Event Player, isChasing, False);
  • }
  • }
  • rule ("Stop Staring at Dead Target") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • Y Component Of((Event Player).targetedPlayer) <= -1;
  • Entity Exists((Event Player).targetedPlayer) == True;
  • (Event Player).isChasing == True;
  • }
  • actions {
  • Set Player Variable(Event Player, isChasing, False);
  • }
  • }
  • rule ("Stop targeting dead player") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • ((Event Player).targetedPlayer).thrower != Null;
  • Entity Exists((Event Player).targetedPlayer) == True;
  • }
  • actions {
  • Set Player Variable(Event Player, isChasing, False);
  • }
  • }
  • rule ("Pick up players while going to edge") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Global.spawnAI == True;
  • Is Dummy Bot(Event Player) == True;
  • (Event Player).isChasing == True;
  • Count Of(Filtered Array(All Living Players(All Teams), And(And(Compare(Distance Between(Current Array Element, Event Player), <=, Subtract(Global.pickupRadius, Multiply(Global.pickupRadius, 0.333))), Has Status(Current Array Element, Asleep)), Compare((Current Array Element).thrower, ==, Null)))) > 0;
  • Entity Exists((Event Player).targetedPlayer) == False;
  • Global.willAttackPlayers == True;
  • }
  • actions {
  • Start Holding Button(Event Player, Button(Primary Fire));
  • Wait(0.016, Ignore Condition);
  • Stop Holding Button(Event Player, Button(Primary Fire));
  • }
  • }
  • rule ("Initial Setup") {
  • event {
  • Ongoing - Global;
  • }
  • actions {
  • Set Global Variable(isDebug, Workshop Setting Toggle(Custom String("Debug", Null, Null, Null), Custom String("Enable Debug HUD", Null, Null, Null), False, 0));
  • Set Global Variable(leader, Null);
  • Set Global Variable(titleColorR, 255);
  • Set Global Variable(titleColorG, 0);
  • Set Global Variable(titleColorB, 0);
  • If(Compare(Current Map, ==, Map(Workshop Chamber)));
  • Set Global Variable(y, 46);
  • Else;
  • Set Global Variable(y, 0);
  • End;
  • Set Global Variable(spawnPositionArray, Array(Vector(15, Global.y, 15), Vector(10, Global.y, 15), Vector(5, Global.y, 15), Vector(0, Global.y, 15), Vector(-5, Global.y, 15), Vector(-10, Global.y, 15), Vector(-15, Global.y, 15), Vector(15, Global.y, 10), Vector(15, Global.y, 5), Vector(15, Global.y, 0), Vector(15, Global.y, -5), Vector(15, Global.y, -10), Vector(15, Global.y, -15), Vector(10, Global.y, -15), Vector(5, Global.y, -15), Vector(0, Global.y, -15), Vector(-5, Global.y, -15), Vector(-10, Global.y, -15), Vector(-15, Global.y, -15), Vector(-15, Global.y, 10), Vector(-15, Global.y, 5), Vector(-15, Global.y, 0), Vector(-15, Global.y, -5), Vector(-15, Global.y, -10)));
  • Call Subroutine(hudCreation);
  • Call Subroutine(languageDetection);
  • Call Subroutine(ringCreation);
  • If(Compare(Current Map, ==, Map(Workshop Chamber)));
  • Create Beam Effect(All Players(All Teams), Grapple Beam, Vector(21, 46, 21), Vector(24.495, 101, 24.495), Color(White), Visible To);
  • Create Beam Effect(All Players(All Teams), Grapple Beam, Vector(21, 46, -21), Vector(24.495, 101, -24.495), Color(White), Visible To);
  • Create Beam Effect(All Players(All Teams), Grapple Beam, Vector(-21, 46, 21), Vector(-24.495, 101, 24.495), Color(White), Visible To);
  • Create Beam Effect(All Players(All Teams), Grapple Beam, Vector(-21, 46, -21), Vector(-24.495, 101, -24.495), Color(White), Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Create Effect(All Players(All Teams), Sphere, Color(Purple), Vector(0, 120, 0), 40, Visible To);
  • Else If(Compare(Current Map, ==, Map(Workshop Island Night)));
  • Create Effect(All Players(All Teams), Cloud, Color(White), Vector(0, -1, 0), 20, Visible To);
  • End;
  • If(Compare(Global.isDebug, ==, True));
  • Call Subroutine(debug);
  • Else;
  • Disable Inspector Recording;
  • }
  • }
  • rule ("Assembling Heroes Setup") {
  • event {
  • Ongoing - Global;
  • }
  • conditions {
  • Is Assembling Heroes == True;
  • }
  • actions {
  • Set Player Variable(All Players(All Teams), playerCarried, Null);
  • Set Player Variable(All Players(All Teams), thrower, Null);
  • Set Player Variable(All Players(All Teams), targetedPlayer, Null);
  • Set Player Variable(All Players(All Teams), isChasing, False);
  • Detach Players(All Players(All Teams));
  • Set Move Speed(All Players(All Teams), 100);
  • Set Match Time(10);
  • }
  • }
  • rule ("HUD Creation Subroutine") {
  • event {
  • Subroutine;
  • hudCreation;
  • }
  • actions {
  • Create HUD Text(All Players(All Teams), Null, Null, Global.stringDiscord, Right, -1, Null, Null, Color(Green), Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Null, Global.stringProject, Right, -0.99, Null, Null, Color(Green), Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Null, Global.stringCode, Right, -0.9, Null, Null, Color(Aqua), Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Null, Global.stringCode, Right, -0.9, Null, Null, Custom Color(Global.titleColorR, Global.titleColorG, Global.titleColorB, 255), Visible To String and Color, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Null, Custom String(" \n{0}", Global.stringGH, Null, Null), Right, -0.89, Null, Null, Color(Yellow), Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Global.stringTranslation, Null, Right, -2, Null, Color(White), Null, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Null, Global.stringGHLink, Right, -0.88, Null, Null, Color(Yellow), Visible To and String, Default Visibility);
  • Create HUD Text(Filtered Array(All Players(All Teams), Compare(Ultimate Charge Percent(Current Array Element), ==, 100)), Null, Null, Custom String("{0}{1}", Input Binding String(Button(Ultimate)), Global.stringUltEscape, Null), Top, 1.2, Null, Null, Color(Green), Visible To and String, Visible Never);
  • Create HUD Text(Filtered Array(All Players(All Teams), Not(Has Status(Current Array Element, Asleep))), Null, Null, Custom String("{0}{1}", Input Binding String(Button(Primary Fire)), Global.stringLeft, Null), Top, 1, Null, Null, Color(Aqua), Visible To and String, Visible Never);
  • Create HUD Text(Filtered Array(All Players(All Teams), Not(Has Status(Current Array Element, Asleep))), Null, Null, Custom String("{0}{1}", Input Binding String(Button(Secondary Fire)), Global.stringRight, Null), Top, 1.1, Null, Null, Color(Orange), Visible To and String, Visible Never);
  • Create HUD Text(Filtered Array(All Players(All Teams), And(And(Compare(((Current Array Element).thrower).playerCarried, ==, Current Array Element), Not(Has Status(Current Array Element, Asleep))), Compare(Global.canAutoEscape, ==, False))), Null, Null, Custom String("{0}{1}", Input Binding String(Button(Jump)), Global.stringEscape, Null), Top, 1.3, Null, Null, Color(Yellow), Visible To and String, Default Visibility);
  • If(Compare(Global.spawnAI, ==, True));
  • Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0} {1}", Global.stringAnaBotSpawn, Count Of(Filtered Array(All Players(All Teams), Is Dummy Bot(Current Array Element))), Null), Left, 1, Null, Null, Color(White), Visible To and String, Default Visibility);
  • }
  • }
  • rule ("Other Effect Creation") {
  • event {
  • Subroutine;
  • ringCreation;
  • }
  • actions {
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(0, All Teams), Asleep), Compare((Players In Slot(0, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(0, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(1, All Teams), Asleep), Compare((Players In Slot(1, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(1, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(2, All Teams), Asleep), Compare((Players In Slot(2, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(2, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(3, All Teams), Asleep), Compare((Players In Slot(3, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(3, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(4, All Teams), Asleep), Compare((Players In Slot(4, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(4, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(5, All Teams), Asleep), Compare((Players In Slot(5, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(5, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(6, All Teams), Asleep), Compare((Players In Slot(6, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(6, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(7, All Teams), Asleep), Compare((Players In Slot(7, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(7, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(8, All Teams), Asleep), Compare((Players In Slot(8, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(8, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(9, All Teams), Asleep), Compare((Players In Slot(9, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(9, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(10, All Teams), Asleep), Compare((Players In Slot(10, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(10, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(11, All Teams), Asleep), Compare((Players In Slot(11, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, Color(Red), Position Of(Players In Slot(11, All Teams)), Global.pickupRadius, Visible To Position and Radius);
  • Create Effect(Filtered Array(Sorted Array(All Players(All Teams), Multiply(-1, Score Of(Current Array Element))), And(Compare(Number Of Players(All Teams), >, 0), Compare(Current Array Index, !=, 0))), Good Aura, Color(Yellow), First Of(Sorted Array(All Players(All Teams), Multiply(-1, Score Of(Current Array Element)))), Multiply(Divide(Global.scale, 100), 2), Visible To Position and Radius);
  • Create In-World Text(Filtered Array(Sorted Array(All Players(All Teams), Multiply(-1, Score Of(Current Array Element))), And(Compare(Number Of Players(All Teams), >, 0), Compare(Current Array Index, !=, 0))), Custom String("#1", Null, Null, Null), First Of(Sorted Array(All Players(All Teams), Multiply(-1, Score Of(Current Array Element)))), 2.0, Clip Against Surfaces, Visible To and Position, Color(Yellow), Default Visibility);
  • Create In-World Text(All Players(All Teams), Global.stringTitle, Vector(0, 20, 113), 4, Clip Against Surfaces, Visible To Position and String, Color(Yellow), Default Visibility);
  • Create In-World Text(All Players(All Teams), Global.stringSubtitle, Vector(0, 15, 113), 2, Clip Against Surfaces, Visible To and String, Color(White), Default Visibility);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(0, All Teams), Asleep), Compare((Players In Slot(0, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(0, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(0, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(1, All Teams), Asleep), Compare((Players In Slot(1, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(1, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(1, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(2, All Teams), Asleep), Compare((Players In Slot(2, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(2, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(2, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(3, All Teams), Asleep), Compare((Players In Slot(3, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(3, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(3, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(4, All Teams), Asleep), Compare((Players In Slot(4, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(4, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(4, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(5, All Teams), Asleep), Compare((Players In Slot(5, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(5, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(5, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(6, All Teams), Asleep), Compare((Players In Slot(6, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(6, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(6, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(7, All Teams), Asleep), Compare((Players In Slot(7, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(7, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(7, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(8, All Teams), Asleep), Compare((Players In Slot(8, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(8, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(8, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(9, All Teams), Asleep), Compare((Players In Slot(9, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(9, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(9, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(10, All Teams), Asleep), Compare((Players In Slot(10, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(10, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(10, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create Effect(If-Then-Else(And(Has Status(Players In Slot(11, All Teams), Asleep), Compare((Players In Slot(11, All Teams)).thrower, ==, Null)), All Players(All Teams), Empty Array), Ring, If-Then-Else(Compare(Players In Slot(11, All Teams), !=, Global.leader), Color(Red), Color(Yellow)), Position Of(Players In Slot(11, All Teams)), Global.pickupRadius, Visible To Position Radius and Color);
  • Create In-World Text(Filtered Array(All Players(All Teams), And(And(Compare(Global.leader, !=, Null), Compare(Current Array Element, !=, Global.leader)), Is Alive(Global.leader))), Custom String("#1", Null, Null, Null), Global.leader, 2.0, Clip Against Surfaces, Visible To and Position, Custom Color(255, 221, 0, 255), Default Visibility);
  • Create In-World Text(All Players(All Teams), Global.stringTitle, Vector(0, Add(20, Global.y), 113), 4, Clip Against Surfaces, Visible To String and Color, Custom Color(Global.titleColorR, Global.titleColorG, Global.titleColorB, 255), Default Visibility);
  • Create In-World Text(All Players(All Teams), Global.stringSubtitle, Vector(0, Add(15, Global.y), 113), 2, Clip Against Surfaces, Visible To and String, Color(White), Default Visibility);
  • }
  • }
  • rule ("Debug Mode Setup") {
  • event {
  • Subroutine;
  • debug;
  • }
  • actions {
  • Create HUD Text(Host Player, Server Load Average, String("Server Load Average", Null, Null, Null), Null, Left, 0, Color(White), Color(White), Color(White), Visible To and String, Default Visibility);
  • Create HUD Text(Host Player, Position Of(Host Player), Custom String("Host Player Position", Null, Null, Null), Null, Left, 1, Color(White), Color(White), Color(White), Visible To and String, Default Visibility);
  • }
  • }
  • rule ("Set New First Place") {
  • event {
  • Ongoing - Global;
  • }
  • conditions {
  • Or(And(Compare(Score Of(Global.leader), <, Score Of(First Of(Sorted Array(All Players(All Teams), Multiply(-1, Score Of(Current Array Element)))))), Entity Exists(Global.leader)), And(Compare(Global.leader, ==, Null), Compare(Score Of(First Of(Sorted Array(All Players(All Teams), Multiply(-1, Score Of(Current Array Element))))), >, 0))) == True;
  • }
  • actions {
  • Stop Forcing Player Outlines(Global.leader, All Players(All Teams));
  • Wait(0.016, Ignore Condition);
  • Set Global Variable(leaderArray, Sorted Array(All Players(All Teams), Multiply(-1, Score Of(Current Array Element))));
  • If(Compare(Count Of(Filtered Array(Global.leaderArray, Compare(Score Of(Current Array Element), >=, Score Of(First Of(Global.leaderArray))))), >, 1));
  • Set Global Variable(leader, First Of(Sorted Array(Global.leaderArray, Multiply(-1, (Current Array Element).scoreTime))));
  • Else;
  • Set Global Variable(leader, First Of(Global.leaderArray));
  • End;
  • Stop Forcing Player Outlines(Global.leader, All Players(All Teams));
  • Start Forcing Player Outlines(Global.leader, All Players(All Teams), True, Custom Color(255, 221, 0, 255), Always);
  • }
  • }
  • rule ("Destroy Leader") {
  • event {
  • Ongoing - Global;
  • }
  • conditions {
  • Entity Exists(Global.leader) == False;
  • }
  • actions {
  • Set Global Variable(leader, Null);
  • }
  • }
  • rule ("Leader Setup New Player") {
  • event {
  • Player Joined Match;
  • All;
  • All;
  • }
  • actions {
  • Start Forcing Player Outlines(Global.leader, Event Player, True, Custom Color(255, 221, 0, 255), Always);
  • }
  • }
  • rule ("Player Teleport") {
  • event {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions {
  • Has Spawned(Event Player) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions {
  • Wait(0.016, Ignore Condition);
  • Teleport(Event Player, Sorted Array(Randomized Array(Global.spawnPositionArray), Count Of(Players Within Radius(Current Array Element, 10, All Teams, Off))));
  • Wait(0.016, Ignore Condition);
  • Set Facing(Event Player, Direction Towards(Event Player, Vector(0, Add(Global.y, Subtract(Eye Position(Event Player), Position Of(Event Player))), 0)), To World);
  • Set Player Variable(Event Player, ready, True);
  • }
  • }
  • rule ("Chase Color") {
  • event {
  • Ongoing - Global;
  • }
  • actions {
  • Chase Global Variable At Rate(titleColorB, 255, 300, Destination and Rate);
  • Wait Until(Compare(Global.titleColorB, ==, 255), 9999);
  • Stop Chasing Global Variable(titleColorB);
  • Chase Global Variable At Rate(titleColorR, 0, 300, Destination and Rate);
  • Wait Until(Compare(Global.titleColorR, ==, 0), 9999);
  • Stop Chasing Global Variable(titleColorR);
  • Chase Global Variable At Rate(titleColorG, 255, 300, Destination and Rate);
  • Wait Until(Compare(Global.titleColorG, ==, 255), 9999);
  • Stop Chasing Global Variable(titleColorG);
  • Chase Global Variable At Rate(titleColorB, 0, 300, Destination and Rate);
  • Wait Until(Compare(Global.titleColorB, ==, 0), 9999);
  • Stop Chasing Global Variable(titleColorB);
  • Chase Global Variable At Rate(titleColorR, 255, 300, Destination and Rate);
  • Wait Until(Compare(Global.titleColorR, ==, 255), 9999);
  • Stop Chasing Global Variable(titleColorR);
  • Chase Global Variable At Rate(titleColorG, 0, 300, Destination and Rate);
  • Wait Until(Compare(Global.titleColorG, ==, 0), 9999);
  • Stop Chasing Global Variable(titleColorG);
  • Loop;
  • }
  • }
Join the Workshop.codes Discord