variables

  • 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. Z

    Can't understand this structure

    I'm trying to use "if size of a variable", but it isn't working Addons: Skellet, SkQuery, skRayFall, Skbee, skript-gui Code: if size of {compactors::%player's uuid%::*} is 7: send "work" to player
  2. SubSplash

    Solved How to set a variable to the amount of seconds in another variable?

    Hello! I need help setting a variable to the amount of seconds in another variable, for example: every 1 second: loop all players: if {timer.toggled::%loop-player's uuid%} is true: add 1 second to {timeinseconds::%loop-player's uuid%} command /converttimeintonumbers: permission...
  3. Tubl

    Variables not saving after restart

    I was messing around with skript making random stuff and i realized when i restart my server the variables get reset to their default amount. Is there a way to fix this?
  4. M

    Variable wont update when promted to

    Hi so I am working on this gui-menu skript where you can upgrade your armor. I chose to save and display the "level" of the players armor with a numeral variable. However, for some reason it wont update, it just wont. I tried defining it as a number with: variables: {_var.%player%} = 0...
  5. Z

    Solved Kits claiming interfering with totems?

    Explanation of what the skript should do: - Every time someone buys something using buycraft, a permission of the set is assigned to the player. - If a player has a permission, he can do "/kits" and then auto fill his bought kit/s. - Only the one he bought will be displayed and working when...
  6. N

    Solved Shop Skript but how do i use list variables to add more than 1 item

    Ive made this skript however i can only have 1 item I would like to have more than 1 item in the shop from using the command but i don't know how to do this on right click on villager: if name of villager is "&6&lTestShop": set metadata tag "Shop-Test" of player to chest inventory with 2...
  7. Drakem

    Solved error on victim is a player

    I'm trying to make a double jump script, and I want it to have a few seconds of immunity when it drops. I used a boolean variable that will be deactivated a few seconds after the jump, but it gives me an error on damage: victim is player damage was caused by fall if {%player%.jump} is...
  8. CreeperOverLord7

    Solved Different variables are seemingly the same

    Skript Version: 2.6.1 Skript Authors: Njol, Mirreski, SkriptLang Team and Contributors Minecraft Version: 1.16.5 (Paper version git-Paper-794) Full Code: # set a and b set {a} to...
  9. T

    Solved math with variables?

    Any ideas how i can make this work so that {total.bj.%player%} is both {chosen.bj.%player%.1} and {chosen.bj.%player%.2} basically variable3 = variable1 + variable2 command /playgame [<number>] [<text>] [<text>]: trigger: if arg-1 and arg-2 and arg-3 is set: if arg-2...
  10. L

    Need help with setting variable to scoreboard value

    Hi, I'm really new to Skript and I am having some trouble trying to figure out how to assign a numerical scoreboard value to a variable. Here is my code: on rightclick: if held item is a diamond pickaxe with custom model data 1: set {Team} to the 1st line of lore of item...
  11. HonestlyPanda

    Help With Player Vars

    Im making a partical command for all players but my code doesnt work.. what is wrong with it?? command /raincloud: trigger: if {raincloud::%player's uuid%} is false: set {rancloud::%player's uuid%} to true send "&aRaincloud Enabled!" else if...
  12. J

    Solved I don't know what i did wrong. Can someone help me?

    Hello! I need help with one of my Skripts i have constructed. I just began using variables but i don't know what i did wrong because it does not work. Can you help? options: {Superhand::%player%} = 1 {SuperhandEnabled::%player%} = false command /superhand <number>: trigger...
  13. WeakBrainStorm

    Enchantments from variables in a gui

    im trying to make a gear upgrade gui. but i cant use variables to the enchantment set slot 0 of player's current inventory to iron sword of sharpness {%player%.sharpness} it dosent work... only if i type a number instead of the variable
  14. W

    Mob level script help

    I am looking to make a script that assigns mobs with a "Level". Then it assigns the mob a hologram, that displays the level. I am having trouble with de-assigning the hologram when the mob despawns/gets killed. Have a look for yourself. #goal: when a mob spawns, it assingns the mob a random...
  15. T

    Solved SKRIPT-YAML BUG?

    Hello, so the last month or so I've been remaking my skripts using skript-yaml because I find out that it's a very good way to store player data without having any serious lag issues with many variables. However I've been dealing with a very weird issue, the yaml files of each player just...
  16. KingDooms

    Variables don't check other variables???

    So basically, I was making a cooldown command, incase any cooldown that I make gets stuck, but for some reason, it doesn't work. Basically how it works is it checks for any variable (that I manually insert) that is more than 0, we will call this a check, after 5 ticks, which should be enough for...
  17. 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...
  18. Skizzors

    Help with custom blocks.

    I'm trying to recreate titanium from hypixel skyblock inside of skript, but I have no way of determining whether they broke the block i want instead of a placed polished diorite. Here's my code so far: options: block: polished diorite name: "test" on break of ancient debris: chance...
  19. C

    Solved How to make an event when a variable hits a certain number?

    So, I've looked around for a solid bit, and have found absolutely nothing about this. I'm trying to make a treadmill, and when the player reaches the end of that treadmill, it teleports them to the back of it, and adds 1 to the counter. Then, once that counter reaches 15, it gives 20 seconds of...
  20. T

    Solved SKRIPT: List Variables Fail to load

    Hello! So basicly I've some list variables which store some values and they work but the problem is that when I restart my server they fail to load. I checked the logs for this and the error that I get is this: " [16:43:37] [Server thread/ERROR]: #!#! Unable to load (all) variables: [16:43:37]...