Shadow_UTubes Posted December 8, 2021 Share Posted December 8, 2021 (edited) Hi so im making a Skript so when the queue hits enough people it makes console run a command to teleport everyone in the list to the arena heres my code so far (or make all players execute a the command /tp_vilage) #Make it teleport all players command /queue_vilage: trigger: if {QueueVilage::*} does not contain player: add player to {QueueVilage::*} else: send "&aAlready in queue!" loop {QueueVilage::*}: add 1 to {_vilagequeue} if {_vilagequeue} is 2: execute player command "/tp_vilage" #only teleports last person to join the queue command /unqueue_vilage: trigger: remove player from {QueueVilage::*} if {QueueVilage::*} contains player: subtract 1 from {_vilagequeue} send "&cNo longer in queue" command /queue_list_vilage: permission: op trigger: send "&aPeople in the queue: &f%{QueueVilage::*}%" command /queue_vilage_amount: permission: op trigger: send "There are %{_vilagequeue}% people in the queue" command /queue_vilage_reset: trigger: clear {Variable2::*} send "&cCleared the queue!" trigger: set {_vilagequeue} to 0 my code for /tp_vilage command /tp_vilage: trigger: set {_x} to random integer between -28 and 28 set {_z} to random integer between 211 and 151 set {_loc} to location({_x}, 0, {_z}) set {_loc2} to location of block below highest block at {_loc} loop blocks between {_loc} and {_loc2}: if loop-block is air: set {_bloc} to block below loop-block teleport player to {_bloc} stop loop Edited December 8, 2021 by Shadow_UTubes didn't finish my sentence Link to comment Share on other sites More sharing options...
Mrbizarre Posted December 8, 2021 Share Posted December 8, 2021 This goes in #skript realases Link to comment Share on other sites More sharing options...
Pryzmm Posted December 8, 2021 Share Posted December 8, 2021 2 hours ago, Mrbizarre said: This goes in #skript realases I think they mean to ask how to get a player in a list variable to execute a command 3 hours ago, Shadow_UTubes said: Hi so im making a Skript so when the queue hits enough people it makes console run a command to teleport everyone in the list to the arena heres my code so far (or make all players execute a the command /tp_vilage) #Make it teleport all players command /queue_vilage: trigger: if {QueueVilage::*} does not contain player: add player to {QueueVilage::*} else: send "&aAlready in queue!" loop {QueueVilage::*}: add 1 to {_vilagequeue} if {_vilagequeue} is 2: execute player command "/tp_vilage" #only teleports last person to join the queue command /unqueue_vilage: trigger: remove player from {QueueVilage::*} if {QueueVilage::*} contains player: subtract 1 from {_vilagequeue} send "&cNo longer in queue" command /queue_list_vilage: permission: op trigger: send "&aPeople in the queue: &f%{QueueVilage::*}%" command /queue_vilage_amount: permission: op trigger: send "There are %{_vilagequeue}% people in the queue" command /queue_vilage_reset: trigger: clear {Variable2::*} send "&cCleared the queue!" trigger: set {_vilagequeue} to 0 my code for /tp_vilage command /tp_vilage: trigger: set {_x} to random integer between -28 and 28 set {_z} to random integer between 211 and 151 set {_loc} to location({_x}, 0, {_z}) set {_loc2} to location of block below highest block at {_loc} loop blocks between {_loc} and {_loc2}: if loop-block is air: set {_bloc} to block below loop-block teleport player to {_bloc} stop loop Try doing this for looping players in a variable: loop all players where [{MyList::*} contains input]: Owner of Lifestealed, Labs, Encore, UNOfficially and Observed OG [VIP] 12/26/20 - 10/27/2021 OG [PRO] 12/27/21 - 11/18/2022 OG [LEGEND] 11/18/2022 - 3/14/2023 [DEFAULT] 3/14/2023 - 5/8/2024 [MOD] 5/8/2024 - Present Link to comment Share on other sites More sharing options...
Shadow_UTubes Posted December 8, 2021 Author Share Posted December 8, 2021 im confused where do I insert that? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now