What is wrong? It doesnt work

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
Why doesnt this work?

Code:
code_language.skript:
command /setminigamelobby:
    description: Sets the minigame specified lobby
    permission: lobbyminigame.setlobby
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if {_lobby} is set:
            delete {_lobby}
            set {_lobby} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the lobby"
        else:
            set {_lobby} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the lobby"
            
command /setminigamemap:
    description: Sets the minigame specified map
    permission: lobbyminigame.setmap
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if {_map} is set:
            delete {_map}
            set {_map} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the map"
        else:
            set {_map} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the map"


on load:
    if {_ingame} is not set:
        set {_ingame} to false
    if {_ingame} is true:
        set {_ingame} to false


command /startminigame [<text>]:
    description: Activate a Lobby Minigame
    permission: minigame.start
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if arg-1 is not set:
            send "&8[&bMinigame&8] &7You must specify a minigame"
            send "&bMinigames: &fTag"
        else:
            if arg-1 is "Tag":
                if amount of all players = 1:
                    send "&8[&bMinigame&8] &7There are not enough players online to do that"
                    stop
                else:
                    if amount of all players = 2:
                        teleport players to {_lobby}
                        set {_time} to 30
                    while {_time} is more than 0:
                        set player's level to {_time}
                    if {_time} is 30 or 10:
                        play raw sound "random.orb" at player with pitch 1 volume 1
                        broadcast "&8[&bMinigame&8] &7The game will start in &b%{_time}% seconds"
                    if {_time} is 9 or 8 or 7 or 6 or 4 or 3 or 2 or 1:
                        play raw sound "random.orb" at player with pitch 1 volume 1
                        broadcast "&e%{_time}% Seconds Left"
                        remove 1 from {_time}
                        wait 1 second
                    set player's level to 0
                    add amount of all players to {players}
                    loop all players:
                        add loop-player to {players::*}
                        teleport loop-player to {_map}
                    if {_It} is not set:
                        set {_It} to a random element out of {players::*}
                        broadcast "&8[&bMinigame&8] &b%{_It}% &7is the tagger"
                    wait 5 seconds
                    set {_ingame} to true
                    
command /stopminigame [<text>]:
    description: Deactivate a Lobby Minigame
    permission: minigame.stop
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if arg-1 is not set:
            send "&8[&bMinigame&8] &7You must specify a minigame"
            send "&bMinigames: &fTag"
        else:
            if arg-1 is "Tag":
                if {_ingame} is true:
                    set {_ingame} to false
                    loop all players:
                        add loop-player to {players::*}
                        teleport loop-player to {_lobby}
                        broadcast "&8[&bMinigame&8] &b%player% &7has stopped the current minigame"
 
Why doesnt this work?

Code:
code_language.skript:
command /setminigamelobby:
    description: Sets the minigame specified lobby
    permission: lobbyminigame.setlobby
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if {_lobby} is set:
            delete {_lobby}
            set {_lobby} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the lobby"
        else:
            set {_lobby} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the lobby"
           
command /setminigamemap:
    description: Sets the minigame specified map
    permission: lobbyminigame.setmap
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if {_map} is set:
            delete {_map}
            set {_map} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the map"
        else:
            set {_map} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the map"


on load:
    if {_ingame} is not set:
        set {_ingame} to false
    if {_ingame} is true:
        set {_ingame} to false


command /startminigame [<text>]:
    description: Activate a Lobby Minigame
    permission: minigame.start
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if arg-1 is not set:
            send "&8[&bMinigame&8] &7You must specify a minigame"
            send "&bMinigames: &fTag"
        else:
            if arg-1 is "Tag":
                if amount of all players = 1:
                    send "&8[&bMinigame&8] &7There are not enough players online to do that"
                    stop
                else:
                    if amount of all players = 2:
                        teleport players to {_lobby}
                        set {_time} to 30
                    while {_time} is more than 0:
                        set player's level to {_time}
                    if {_time} is 30 or 10:
                        play raw sound "random.orb" at player with pitch 1 volume 1
                        broadcast "&8[&bMinigame&8] &7The game will start in &b%{_time}% seconds"
                    if {_time} is 9 or 8 or 7 or 6 or 4 or 3 or 2 or 1:
                        play raw sound "random.orb" at player with pitch 1 volume 1
                        broadcast "&e%{_time}% Seconds Left"
                        remove 1 from {_time}
                        wait 1 second
                    set player's level to 0
                    add amount of all players to {players}
                    loop all players:
                        add loop-player to {players::*}
                        teleport loop-player to {_map}
                    if {_It} is not set:
                        set {_It} to a random element out of {players::*}
                        broadcast "&8[&bMinigame&8] &b%{_It}% &7is the tagger"
                    wait 5 seconds
                    set {_ingame} to true
                   
command /stopminigame [<text>]:
    description: Deactivate a Lobby Minigame
    permission: minigame.stop
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if arg-1 is not set:
            send "&8[&bMinigame&8] &7You must specify a minigame"
            send "&bMinigames: &fTag"
        else:
            if arg-1 is "Tag":
                if {_ingame} is true:
                    set {_ingame} to false
                    loop all players:
                        add loop-player to {players::*}
                        teleport loop-player to {_lobby}
                        broadcast "&8[&bMinigame&8] &b%player% &7has stopped the current minigame"
Men you are using a underscore variable local variable delete wend event finish use {lobby} not {_lobby}
[doublepost=1502577099,1502576914][/doublepost]
Why doesnt this work?

Code:
code_language.skript:
command /setminigamelobby:
    description: Sets the minigame specified lobby
    permission: lobbyminigame.setlobby
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if {_lobby} is set:
            delete {_lobby}
            set {_lobby} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the lobby"
        else:
            set {_lobby} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the lobby"
           
command /setminigamemap:
    description: Sets the minigame specified map
    permission: lobbyminigame.setmap
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if {_map} is set:
            delete {_map}
            set {_map} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the map"
        else:
            set {_map} to player's location
            send "&8[&bMinigame&8] &7You have set the location of the map"


on load:
    if {_ingame} is not set:
        set {_ingame} to false
    if {_ingame} is true:
        set {_ingame} to false


command /startminigame [<text>]:
    description: Activate a Lobby Minigame
    permission: minigame.start
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if arg-1 is not set:
            send "&8[&bMinigame&8] &7You must specify a minigame"
            send "&bMinigames: &fTag"
        else:
            if arg-1 is "Tag":
                if amount of all players = 1:
                    send "&8[&bMinigame&8] &7There are not enough players online to do that"
                    stop
                else:
                    if amount of all players = 2:
                        teleport players to {_lobby}
                        set {_time} to 30
                    while {_time} is more than 0:
                        set player's level to {_time}
                    if {_time} is 30 or 10:
                        play raw sound "random.orb" at player with pitch 1 volume 1
                        broadcast "&8[&bMinigame&8] &7The game will start in &b%{_time}% seconds"
                    if {_time} is 9 or 8 or 7 or 6 or 4 or 3 or 2 or 1:
                        play raw sound "random.orb" at player with pitch 1 volume 1
                        broadcast "&e%{_time}% Seconds Left"
                        remove 1 from {_time}
                        wait 1 second
                    set player's level to 0
                    add amount of all players to {players}
                    loop all players:
                        add loop-player to {players::*}
                        teleport loop-player to {_map}
                    if {_It} is not set:
                        set {_It} to a random element out of {players::*}
                        broadcast "&8[&bMinigame&8] &b%{_It}% &7is the tagger"
                    wait 5 seconds
                    set {_ingame} to true
                   
command /stopminigame [<text>]:
    description: Deactivate a Lobby Minigame
    permission: minigame.stop
    permission message: &c&l(!) You do not have permission to do this (!)
    trigger:
        if arg-1 is not set:
            send "&8[&bMinigame&8] &7You must specify a minigame"
            send "&bMinigames: &fTag"
        else:
            if arg-1 is "Tag":
                if {_ingame} is true:
                    set {_ingame} to false
                    loop all players:
                        add loop-player to {players::*}
                        teleport loop-player to {_lobby}
                        broadcast "&8[&bMinigame&8] &b%player% &7has stopped the current minigame"
&8[&bMinigame&8]
And you are doing the minigane with the color all the time define domes options like this
code_language.skript:
Options:
    Logo: &8[&bMinigame&8]
Example
Send "{@logo}something"
 
Really -_-

I told you this several weeks ago. Local and global variables are different.
 
Really -_-

I told you this several weeks ago. Local and global variables are different.
Hey can you help me with muy 1 vs 1 thebtrouble is if someone disconet The arena stay close And The player does not win
 
Status
Not open for further replies.