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. H

    Problem in setting list variable value

    I want to change multiple value of list at once. For example, I already have written down this phrase. set {list::*} to 100 But results are not what I expect. This phrase removes previous data of list, and inserts new data. So, list's (index : value) set to (1:100) How can I solve this issue?
  2. B

    Solved add variable to variable

    I can't add variable to variable.. Am I have to add an addon? or I can solve it by other way? if clicked slot is 4: set {_pay} to 0 loop {NUM::%player%} times: add {STOCKPAY::%{BUY::%player%}%} to {_pay} message "%{_pay}%" to player
  3. A

    Solved add string to player variable

    im trying to add "text" to {test::%player's uuid%} but it doesnt seem to work command /wip: trigger: add "text" to {test::%player's uuid%} send {test::%player's uuid%} to player
  4. mrclipse

    list variables

    I'm making a faction plugin for my anarchy server that doesn't have land claims, you can do /fcreate [<text>] to make a faction, but I want to check if that faction name has been taken already so there aren't 2 identical factions. I tried using a list variable to store all of the faction names...
  5. C

    Item stored in variable with metadata value?

    Script Version: 2.6-beta2 Minecraft Version: 1.17.1 Full Code: command /metadatatest: trigger: # not working part set {_diamond} to diamond set metadata value "number" of {_diamond} to 6 send "%metadata value "number" of {_diamond}%" # working part...
  6. 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...
  7. 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}
  8. 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...
  9. 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...
  10. 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.
  11. 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:
  12. 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...
  13. 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#
  14. 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.
  15. 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
  16. 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%}...
  17. 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
  18. 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.
  19. S

    error code inventory of the player is not a world

    i fixed it.
  20. 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...