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. 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:
  2. 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...
  3. 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#
  4. 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.
  5. 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
  6. 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%}...
  7. 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
  8. 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.
  9. S

    error code inventory of the player is not a world

    i fixed it.
  10. 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...
  11. L

    uuid in variable

    variables: {%uuid of player%.name} = "" does not work, any suggestions?
  12. 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%"...
  13. 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...
  14. 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...
  15. 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...
  16. Hakuyamu

    text from url is "<none>"

    I cannot figure out why my code just gives me "<none>" instead of the content of the url. set {_votes} to text from url "https://minecraft-server.eu/api/votes/getForServer/1be38" message "{@prefix} &7Seit letztem Reset wurden auf &nVote1 &b%{_votes}% &7Votes gezählt!" The url...
  17. A

    Is there anyway better to do this?

    Here's all my code. It's for a custom sign shop. on rightclick on sign: if {sign.%player%} is "true": if {%2nd line of event-block%} is not set: set {%2nd line of event-block%} to 2nd line of event-block set {%2nd line of event-block%} to 2nd line of...
  18. N

    Solved Why does it crash my server after someone moves when he was afk?

    Well for some reason my code just makes the server crash when someone comes back from being afk. I have no idea why. Here is my code: command /setlimbo: permission: admin trigger: set {limbo} to location of player send "&eYou set the Limbo spawn to your current...
  19. Ronnoc2w

    Solved Add percentage of variable to variable

    Hello guys, I want to make a skript so you can add percent of a variable to a variable. I think my code explains what I mean: command /test: trigger: send "CN: 50 +10%%" set {_test} to 50 add 10% of {_test} to {_test} send "NN: %{_test}%" Thanks already :D...
  20. P

    Custom crafting recipe

    Hi,I want to script an object that is in Hypixel SkyBlock (golem armor). Unfortunately, I do not know how to do it, that you can only craft the item once you have reached the required "iron level".Is it possible to ask script for a player's Iron Level with a variable, for example on crafting...