variable

  • 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 comminuty!

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

  1. C

    Variables and arguments

    I want to /setbal for a player and the amount, but when on the last line the code is wrong and i don't know how to fix it command /setbal <player> <number>: permission: op permission message: "&4&lUhh, you can't do that" aliases: /sbal trigger: if arg-2 is not set: send "&c/setbal...
  2. G

    Leaderboards

    Hi everyone! Im want to make a point leaderboard. I dont know how to do that, Maybe you know, so please if you can, make it! Thanks! My points var: {%player%.points}
  3. K

    How to list multiple values in variable

    Hey, I need to list all the values in some variable to appear in chat. My current code looks like this if arg 1 is "add": set {%arg-2%::ploc} to location of player add arg-2 to {_projects::*} broadcast "&8[&aBuild&8] &7New project has been created: &a%arg-2%" if arg 1...
  4. B

    How to check if a name has been taken

    Hello, how do I check if a name has been taken? I'm making a skript where people can create worlds but I want to know if the name they type in has been taken EX: command /example <text>: trigger: if arg-1 is in {taken}: stop trigger # say stuff else: # world creation cmd I tried...
  5. C

    Solved Custom variable prefix

    I have made custom xp variables per player. I need to make a custom prefix for the player that includes the level variable I have made using skript.
  6. konnte

    How to check if a Var reached a number?

    Hey, I'm working on a levelsystem. Im trying to figur out how to check if a var reached a number like not with >= or =. Something like this if {xp} reached 10: set {level} to 1 if {xp} reached 50: set {level} to 2: if {xp} reached 100: set {level} to 3:
  7. H

    Transfer Player Variables Across Commands??

    So, I have a skript. One part of it sets a {example::%player's uuid%} variable. I want to know how I can take that variable and transfer it to a command run by a different player, with no arguments. Player 1: *gets variable set to their uuid* Player 2: *runs other command, uses...
  8. J

    Ranking system?

    How can I create a ranking system with a skript? I have a list in which the kills of a player are listed. How can I make it so that when I enter /stats that there is, for example, Place: 14#
  9. Squarebuilder

    Solved Set variable to lore of item

    Hello, for one of my scripts I have to set a variable on the lore of an item. Does anyone know how to do that? on right-click: set {_variable} to lore of event-item Error Code: {_variable} can only be set to an object, not more.
  10. B

    Giving items to variable

    I want to give items to a variable but it gives this error: set slot 4 of {spleef.alive::*} to clock named "&e&lŽaidimu Pasirinkimai" with lore "&8Click on me" set slot 0 and 1 and 2 and 3 and 5 and 6 and 7 and 8 of {spleef.alive::*} to air
  11. UntitledGaming

    custom variable shop not working

    i dont understand whats wrong because it doesnt send any errors it just doesnt work pls if you know a solution pls help on inventory click: if name of player's inventory is "&7&lKITPVP EXTRA ITEMS": if clicked slot is 13: cancel event if {balance::%player%}...
  12. J

    Solved Duel Clicked Player

    Hello. How can I make that if I do a right click on a player that this is then challenged with a certain command? Example: execute player command "/ 1vs1 duel %{clicked.player}%" Spigot Version: 1.8.8
  13. K

    Solved Set location to a variable.

    on join: set {spawn.%player%} to location at (0.5, 66, -1.5) in world "sb%player%" I'm guessing there is an error because the world has %player% in it but I don't know how to fix this.
  14. S

    error code inventory of the player is not a world

    i fixed it.
  15. Y

    Variables with all players who have ever joined?

    Hey, so for my SoupPvP server I made the "currency" called KillPoints, when you kill a player you get one and when you die you lose one. Basically I'm trying to make a command to reset the server's killpoints for when I do stat resets, and I cant figure out how to get all players who have ever...
  16. L

    uuid in variable

    variables: {%uuid of player%.name} = "" does not work, any suggestions?
  17. B

    Solved Help with some characters can't replaced.

    Can someone help me with color format isn't replaced Method 1: #looping command /acac [<text>]: trigger: if arg is not set: set {_arg} to "null" set {_name} to "null" if arg is set: set {_arg} to "%arg%" set {_name} to "%arg%"...
  18. P

    Define a variable properly

    Hello everybody. Lately I haven't been able to properly define a skript variable. Indeed I would like to use the condition : if "% event-region%" contains {my_variable}: However I would like to be able to modify {my_variable} to be able to add or remove text. For example if the variable is set...
  19. C

    Problem with Variables

    No matter whether the first or the 2nd command. The Else against if {s.team.% Name of player%} is not "blue" runs. How can I fix it? Even if the variable {s.team.%name of player%} is not set I get the same output from the first else...
  20. ItsMCB

    Solved Enable/Disable Scoreboard with %loop-player% and %player%

    I'm trying to create a command that will toggle the scoreboard for that certain player. One player might want to play with it on while another might want it off. This gives them that option. I have gotten the enable and disable part of the code to work, but I'm not sure how I can fit it in with...