list 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. DankThanos

    How to make a system that removes a specific index of list and move all indexes after that down 1 step?

    I am making a /changelog command and I am trying to make a remove system, by running the command /changelog remove 2 it should remove the 2nd row of the changelog and move the rows beneath it up one step. Although, the last row doesn't seem to correctly change position. if i would have the...
  2. llamab0i

    Create Empty List/Array

    How do I make an empty list? In my code I just do set {list::*} to "", but then there's an annoying empty first value. There has to be a better way
  3. xWires

    Solved Removing an element from a list variable not working properly

    When I remove an element from a list variable, instead of deleting the element, it is just set to <none>, so if you remove the first element of a list with delete {testlist::1} and use this code to look at the list of variables: loop {testlist::*}: send "%loop-index%. ""%loop-value%""" it...
  4. V

    How to make a Scale(List)

    I still don't understand how to make a scale I want each player with the "magic" perm to have a mana scale, and I can describe different conditions so that this scale (Mana) can Decrease (-) and Increase (+) Separately for each player
  5. ReaMart

    Solved Get length of list

    I'd like a way to do something when the length of my list is above two aka the list contains more than two items. It could be a conditional or something to be in an if statement.
  6. J

    Search and retrieve keyword to retrieve from list

    PLEASE DO NOT REACT TO ANYTHING BUT THE FINAL QUESTION Don't get confused by the long intro, i'm simply attempting to describe my idea, current problem and thought process. Before finally asking the one question i have deduced will allow me to succeed. INTRO BELOW Basicly what i'm imagining...
  7. 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...
  8. Z

    Solved Can't remove location from list variable

    I've encountered a really weird problem, and I can't find the solution. I have 2 different tools that I use to add locations to list variable, and the other one would be used to remove location from list variable. BUT this one (if {br.mythic.chest.locations::*} contains {_loc}:) is not working...
  9. 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?
  10. 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...
  11. H

    Solved Help with list variables.

    I'm trying to make it so you can see the time you must wait to use a command again. I understand that you can use "cooldownmessage:" and %remaining time% for that, but it shows 2 decimal places. I want it to only show whole seconds. Here is the code that I tried. I cannot figure out why it does...
  12. M

    Solved Need Help {in a hurry}

    Skript Version: 2.2-dev36 Minecraft Version: 1.8.9 Code command /revive [<offlineplayer>]: aliases: rev trigger: if player has permission "events.moderator": if arg-1 is a player: make console execute command "scoreboard teams join Dead %arg-1%" make console execute...
  13. 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...
  14. W

    Solved Help with making a moving gradient for a name.

    Hello. I would like to have a rainbow-ish coloured name tag in my Minecraft server. For example, my name tag would be: WilliamPlays0402 0.5s later: WilliamPlays0402 0.5s later: WilliamPlays0402 etc.. This is what I've achieved so far: every 5 tick: add 1 to {60ticktime} if {60ticktime} is...
  15. acai

    Skript List Variables

    [DELETED]
  16. P

    advanced looting system

    Hey, I'm trying to randomize the list but I'm failing to do so. Can you help me? on load: delete {ore.loot.list::*} add 2 iron ingot to {ore.loot.list::*} add 1 iron ingot to {ore.loot.list::*} add 1 iron ingot to {ore.loot.list::*} add 1 iron ingot to {ore.loot.list::*}...
  17. 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...
  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. ItsMCB

    Points Leaderboard

    I've been trying to create a Points Leaderboard, I'm confused to what I'm doing wrong. command /egranking: trigger: loop {Points::%player%}: add 1 to {_size} if {_low.to.high.list::%loop-value%} is not set: set {_low.to.high.list::%loop-value%}...
  20. CreeperOverLord7

    Solved How to detect last in a list variable?

    Basically what the title says, is there a way to detect the last number in a list variable? So for example, I have "Line 1" stored in {example::1} and "Line 2" stored in {example::2}, and so on up to 10. Is there a way to make Skript detect the max is 10 and make it use the value somewhere...