ItsKirby Posted July 4, 2021 Share Posted July 4, 2021 (edited) I am trying to make a Guess the number skript, but the skript doesn't function properly. It doens't give errors but it doesn't do anything. If there is anything i can do please tell me. Im not a good skripter so there will be some problems. options: num1: 1 num2: 10 prefix: &lEvent every 20 seconds: if {toggle::player's uuid} is true: if {test::player's uuid} is not set: set {test::player's uuid} to false if {test::player's uuid} is false: set {number::player's uuid} to random integer between {@num1} and {@num2} set {test::player's uuid} to true send "{@prefix} &8| &7Guess a number between &r{@num1} &7and &r{@num2} &7using &r/Guess!" to all players command /guess [<number>]: aliases: g, game trigger: if {test::player's uuid} is true: if arg-1 is set: if arg-1 < {number::player's uuid}: send "{@prefix} &8| &7Too low!" to player if arg-1 > {number::player's uuid}: send "{@prefix} &8| &7Too High!" to player if arg-1 = {number::player's uuid}: set {test::player's uuid} to false send "{@prefix} &8| &r%player% &7has gotten the correct number &r[%{number::player's uuid}%]7!" to all players else: send "{@prefix} &8| &7Give a guess!" to player else: send "{@prefix} &8| &7Event hasn't started!" to player command /toggle [<text>]: permission: * permission message: &cInsufficent Permissions! trigger: if arg-1 is "false": set {toggle::player's uuid} to false if arg-1 is "true": set {toggle::player's uuid} to true send "{@prefix} &8| &7Game has been turned on" to player else: send "{@prefix} &8| &7Do you want to toggle game or not? &8[&rTrue&8] &7or &8[&rFalse&8]" to player Edited July 4, 2021 by ItsKirby Yo who actually reads these [Vip] - 12/29/2020[Pro] - 1/25/2022 Link to comment Share on other sites More sharing options...
StarBunnie Posted July 4, 2021 Share Posted July 4, 2021 Hmm it's weird that it's not giving an error because in here: every 20 seconds: if {toggle::player's uuid} is true: if {test::player's uuid} is not set: set {test::player's uuid} to false if {test::player's uuid} is false: set {number::player's uuid} to random integer between {@num1} and {@num2} set {test::player's uuid} to true send "{@prefix} &8| &7Guess a number between &r{@num1} &7and &r{@num2} &7using &r/Guess!" to all players You need to loop all players and use loop-player instead otherwise skript won't know which player to use Feel free to add me on discord if you: need help with plugins need help with skripts need to vent about something >[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]< Link to comment Share on other sites More sharing options...
ItsKirby Posted July 4, 2021 Author Share Posted July 4, 2021 35 minutes ago, StarBunnie said: Hmm it's weird that it's not giving an error because in here: every 20 seconds: if {toggle::player's uuid} is true: if {test::player's uuid} is not set: set {test::player's uuid} to false if {test::player's uuid} is false: set {number::player's uuid} to random integer between {@num1} and {@num2} set {test::player's uuid} to true send "{@prefix} &8| &7Guess a number between &r{@num1} &7and &r{@num2} &7using &r/Guess!" to all players You need to loop all players and use loop-player instead otherwise skript won't know which player to use So what would i do? Do i loop all players and use loop-player's uuid in the variable? Im not too great with skript so i am not sure what to do. Yo who actually reads these [Vip] - 12/29/2020[Pro] - 1/25/2022 Link to comment Share on other sites More sharing options...
StarBunnie Posted July 4, 2021 Share Posted July 4, 2021 2 hours ago, ItsKirby said: So what would i do? Do i loop all players and use loop-player's uuid in the variable? Im not too great with skript so i am not sure what to do. yep what u said Feel free to add me on discord if you: need help with plugins need help with skripts need to vent about something >[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]< Link to comment Share on other sites More sharing options...
ItsKirby Posted July 4, 2021 Author Share Posted July 4, 2021 13 hours ago, StarBunnie said: yep what u said I wouldn't need to change anything? If so i will try it out with the loops. 1 Yo who actually reads these [Vip] - 12/29/2020[Pro] - 1/25/2022 Link to comment Share on other sites More sharing options...
_Tarna_ Posted July 4, 2021 Share Posted July 4, 2021 There is no player in a periodical event so ya you need to loop all players. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
ItsKirby Posted July 4, 2021 Author Share Posted July 4, 2021 8 minutes ago, _Tarna_ said: There is no player in a periodical event so ya you need to loop all players. Got it, Thanks you two. 1 Yo who actually reads these [Vip] - 12/29/2020[Pro] - 1/25/2022 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