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

    Solved Issue with list variables

    I tried to use "add 1 to {test::%{a} + 1%::1}". Actually, I want to use "add 1 to {test::*::1}", but I realized that * must be at the end, so I used another way as above. However, "add 1 to {test::%{a} + 1%::1}" also encountered an error "can't understand this condition". At first I thought...
  2. K

    Add players to team

    Hello. I need to add a player to the var and then recognize if 5 players are in var. Is it possible to do this? Thank you Heres my code but that code do not check, if players are in red or blue team. Thanks
  3. P

    Solved Removing a variable of an item from the player's (error) inventory

    I am trying to make a simple shop skript so when you buy an item it removes a specified price of coal (in this case) from your inventory. But it doesn't work. on inventory click: if name of event-inventory is "&8Are you sure?": if event-item is lime wool: close player's...
  4. 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...
  5. C

    Setting variables to URLs

    Hello, I am trying to set my variable to a line on a webpage. This webpage is a .txt document on my website. for example, https://www.google.com/robots.txt ?
  6. GDude_

    Solved Global variables problem.

    I need help with global variables because they don't work. I get no errors with the code but it still doesn't work. Skript Version: 2.5.3 I also have tried many other versions and more updated ones, even dev ones and they still don't work. Addons: Skungee, SkQuery, Ersatz, SkMorkaz, TuSKe, and...
  7. L

    Solved [SELF SOLVED] Help with variables

    Help me with this code, I don't know why it doesn't work. # SCRIPT 1 command /add: trigger: add "%player%,%now%" to {italia.richieste.new::*} # SCRIPT 2 command /richieste <text>: usage: {@prefix} &aSintassi: &f/richieste <nazione> trigger: if arg 1 is "italia"...
  8. O

    Solved Adding a variable to player's balance

    I found an issue regarding adding variables to a player's balance. I don't think you need my whole code, so here's the line of code: add {_a} to player's balance It doesn't seem to work and the error is: Can't understand this condition/effect: add {_a} to player's balance
  9. W

    List variable issue?

    Hey everyone, I'm currently using list variables and I'm having trouble getting them to do what I want. My test code should have 3 variables in"{testvar::*}", however, after adding 10 onto Test1 its adds another blank variable to "{testvar::*}". The output is my code is shown here. Any help is...
  10. S

    Solved A variable can carry a block ?

    E.g. save an event-block into a list variable {block::*}. It's possible ? Because I'm not getting. on place: add event-block to {blocks::*} on break: loop all blocks in {blocks::*}: broadcast "%loop-block%" Doesn't broadcast. Works if I change to: on break: loop {blocks::*} ...
  11. J

    Capture Point Capping

    Im having trouble with a KOTH, so as long as a player is in the control point, it will keep adding points until it reaches 500, I have no trouble when players are no longer capping the point, but when they go back into the point it adds all the points that the player would have gained if he was...
  12. SwiftSwordMC

    NPC storage system

    Hey everyone, so I'm fairly new to skript and there's many things I have no idea about but basically I'm trying to make an npc that on right click, opens a chest gui that contains 2 items: 1 cauldron labeled "Small Personal Vault" and gold horse armor labeled "Upgrade Vault". If you click the...
  13. KJPAKA

    Error loading variables.

    Information: Hello, I have had this issue for a couple of months now its been on and off and I don't know what triggers it so I finally decided to make a forum post explaining my issue. So whenever I start/restart my server it won't load some variables saved from the session before the...
  14. 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...
  15. J

    Function to Mob Spawn depending on Room teleport

    So I wanna make it so custom mobs spawn in set locations depending on the room the players enter. For example if player Steve gets teleported to room 1, mobs spawn at locations A & B of the room 1. then Steve moves to room 2, mobs spawn at locations A & B of room 2. The thing is room teleport...
  16. F

    Solved how do i create variables

    actually im bad at skript just help command /ban %{_player}%: permission: ban permission message: &cYou are not allowed to use this plugin. trigger: set {_player} to player make player execute command "/tempban %{_player}% 1w Breaking rules" broadcast "&aStaff has been banned...
  17. A

    Solved Save Argument in a list

    hello, how do I turn an argument into a variable, and then put it in a list, and how can I load that argument back from that list? as an example: I've entered an argument, /engineer create name. I save it in a list. Then I type /engineer edit name, and if I enter the same name as what I saved...
  18. J

    Solved Teleport player to random saved location

    #--- TELEPORT LOCATIONS ---# options: dungeon1: 0, 45, 0 dungeon2: 0, 100, 0 dungeon3: 0, 90, 0 dungeon4: 0, 30, 0 dungeon5: 0, 200, 0 on load: add "{@dungeon1}" to {dungeonlist::*} add "{@dungeon2}" to {dungeonlist::*} add "{@dungeon3}" to {dungeonlist::*}...
  19. L

    Solved How to check if multiple variables are true?

    I'm relatively new to skript, so work with me here, I have a parkourdone::%player%.easy variable that goes from easy on the end to medium, hard, and extra hard. The variables are set to true or false at a certain point, but how can I check if all 4 variables are true at one point? Example: on...
  20. P

    Replace variables

    I have a question Im making the "ontime" script, and want to replace the "<none>" to "0" How do i do that?