#Bedwars Skript

1 messages Β· Page 1 of 1 (latest)

visual pollen
#

Trying to make a bedwars skript but having a problem starting it

#
function StartBedwarsGame(players: players):
  set {_teams} to {"Red", "Blue", "Yellow", "Green"} # Define the list of team options
  set {_playersAssigned} to "" # Initialize an empty list to keep track of assigned players
  
  loop {_teams} as {_team}:
    if {_teams} is empty or {_playersAssigned::*} is empty: # Check if there are no more teams left or if the player is already assigned
      break # If no more teams are left or the player is already assigned, exit the loop
      
    set {_player} to random player in players # Pick a random player from the list
    remove {_player} from players # Remove the picked player from the list of available players
    add loop-player to {_playersAssigned} # Add the player to the list of assigned players
    
    teleport loop-player to location of {_team} # Teleport the player to the team location
    call BedwarsStartDown(loop-player) # Call the function for each player individually


function BedwarsStartDown(players: players):
  loop players:
    set {_location} to location of loop-player
    loop 5 times:
      set {_check} to location of loop-player
      if {_check} is not {_location}:
        teleport loop-player to {_location}
      wait 1 second
    
    broadcast "&cThe game will start in 5 seconds"
    wait 2 seconds
    broadcast "&cThe game will start in 3"
    wait 1 second
    broadcast "&cThe game will start in 2"
    wait 1 second
    broadcast "&cThe game will start in 1"
    wait 1 second
    broadcast "&cGo! Good luck to all players!"
  
  stop
glacial delta
#

Dont tell me

#

Is this ai generated bruh

visual pollen
#

i got some help from ai, but ive mostly been trying myself and just getting it checked by ai

glacial delta
#

Aight well

#

Send error logs

visual pollen
glacial delta
#

πŸ’€

#

Wait

#

Ill get home soon

#

Ill help ya very soon

visual pollen
#

alr

glacial delta
visual pollen
#

so this?

function StartBedwarsGame(players: players):
  set {_teams} to {"Red", "Blue", "Yellow", "Green"} # Define the list of team options
  set {_playersAssigned} to "" # Initialize an empty list to keep track of assigned players
  
  loop {_team}:
    if {_teams} is empty or {_playersAssigned::*} is empty: # Check if there are no more teams left or if the player is already assigned
      break # If no more teams are left or the player is already assigned, exit the loop
      
    set {_player} to random player in players # Pick a random player from the list
    remove {_player} from players # Remove the picked player from the list of available players
    add loop-player to {_playersAssigned} # Add the player to the list of assigned players
    
    teleport loop-player to location of {_team} # Teleport the player to the team location
    call BedwarsStartDown(loop-player) # Call the function for each player individually


function BedwarsStartDown(players: players):
  loop players:
    set {_location} to location of loop-player
    loop 5 times:
      set {_check} to location of loop-player
      if {_check} is not {_location}:
        teleport loop-player to {_location}
      wait 1 second
    
    broadcast "&cThe game will start in 5 seconds"
    wait 2 seconds
    broadcast "&cThe game will start in 3"
    wait 1 second
    broadcast "&cThe game will start in 2"
    wait 1 second
    broadcast "&cThe game will start in 1"
    wait 1 second
    broadcast "&cGo! Good luck to all players!"
  
  stop
zenith elbow
#

you can't loop a single value

#

seriously this AI generated code is shit

visual pollen
#

so how would i fix it

#

i started skript yesterday 😭

tribal quail
viral turtle
stable bough
stable bough
#

bro lets talk on #general or dms this is a thread

zenith elbow
#

There’s far more information on python online

viral turtle
pearl beacon
#

πŸ’€

visual pollen
tribal quail
#

Cool

pearl beacon
#

Skywars is pretty simple

visual pollen
cinder perch
visual pollen
#

instead of using ai !

cinder perch
#

Www

onyx quest
#

W

#

Goated