Jump to content

Help on skript?


ItsKirby

Recommended Posts

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 by ItsKirby

2021-06-09_20_22_08.jpg.422c39613f8b72de894e5ec1f3377dca.jpg

Yo who actually reads these

[Vip] - 12/29/2020
[Pro] - 1/25/2022
 

 

 

Link to comment
Share on other sites

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

tumblr_lqahoaPLkC1ql1l0v.gif

Feel free to add me on discord if you:

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with plugins

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with skripts

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need to vent about something

tumblr_lqahoaPLkC1ql1l0v.gif

>[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]<

Link to comment
Share on other sites

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.

2021-06-09_20_22_08.jpg.422c39613f8b72de894e5ec1f3377dca.jpg

Yo who actually reads these

[Vip] - 12/29/2020
[Pro] - 1/25/2022
 

 

 

Link to comment
Share on other sites

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

tumblr_lqahoaPLkC1ql1l0v.gif

Feel free to add me on discord if you:

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with plugins

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with skripts

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need to vent about something

tumblr_lqahoaPLkC1ql1l0v.gif

>[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]<

Link to comment
Share on other sites

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

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...