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 community!

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

  1. L

    uuid in variable

    variables: {%uuid of player%.name} = "" does not work, any suggestions?
  2. 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%"...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. Ronnoc2w

    Solved Add variables to variables

    Hello guys I wanted to make a token system but I cannot add a custom number to a variable :/ Here is my code: (Problem in line 9) command /eco [<text>] [<text>] [<text>]: trigger: if player has permission "tokenapi.eco" or "tokenapi.*": if arg-1 is set...
  12. A

    HolographicDisplaysAddon | hologram visible default

    Hello, I need help with Hologram visible default, I cant understand their syntax. I wrote this, but it doesnt work. I need to disable it. set {_hologram} to visible by default of the hologram {_hologram}
  13. T

    Solved Clicker Not Working (Variables)

    when I do /bal even after clicking with the button it shows <none> anyone know? Skript: options: money: 0 price: 10 command /start: trigger: if {start.%player%} is not set: send "&b---Start---" give 1 oak button named "&b&lClicker Button" to player...
  14. C

    How to set a block to a block name stored in a variable

    Hi! I want to set a block to another block which is stored in a variable. This is the line of code ive tried: set block at location of block to {block} The location of block is the location of a block which was broken because what i want is a system where when a block is broken, its gets...
  15. P

    if {mana::%player's uuid%} is more than {@1}-1:

    Hey. if {mana::%player's uuid%} is more than {@1}-1: It's not working and there are 0 errors.
  16. T

    Split

    What i want is that it says 1,000 instead of 1000 in my variable {gold::%player%} I found this skript: but how do i make it work for my variable? function spaced(n: text) :: text: set {_s::*} to split {_n} at "." if {_s::*} is not set: return a({_n}) else: return...
  17. G

    Skript MySQL with SkQuery

    English/Englisch: Hey, I want to connect my scripts to MySQL. I know how it works. But I have a problem. If I reload or stope and start with my server, all variables are deleted from the cloud system what is wanted, so that the map resets and all old data is loaded. So I would like to take...
  18. NCSGeek

    Solved Help with decaying list values

    Full script: https://pastebin.com/dJxWdCEW Hello all! In my script, im looking to have values in {%player%-tpa::*} be removed from that list after a given amount of time. Im not quite sure how to go about this, however. Above is my current script. I have no addons installed, and I'm on...
  19. L

    Enchantment level through variable.

    Hello :emoji_slight_smile: I'm using a function through a GUI to declare the level of an enchantment, but this variable can have a lot of different values (from 0 to 36) and I wouldn't be able to list every single enchantment on the code, therefore I have to use this code: enchant {_p}'s tool...
  20. TheBlazeTuber

    Solved Adding coordinates to set variable

    Minecraft Version: 1.12.2 Full Code: if player has permission "tbt.wands.netherwand.arrowrain": if name of player's tool is "&4Nether Wand": cancel event if line 1 of lore of player's tool is "&4Arrow Rain": set...