1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Skript Lists Request

Discussion in 'Requests' started by CormanYT, Apr 26, 2019.

Tags:
  1. CormanYT

    CormanYT Active Member

    Joined:
    Jan 6, 2018
    Messages:
    122
    Likes Received:
    4
    Category: Skript Addon / Script with Skript-Mirror

    Suggested name: AdvSK

    Spigot/Skript Version: 1.8 to 1.13.2 should work, but 1.12.2 preferred.

    What I want:

    This is probably a very difficult request, but it would be extremely useful. Lately I've been using Python and it has an amazing method for lists which I'd like to use in Skript, where you can set variables to list and get items of it. I want to be able to do that with Skript with syntax similar to this:

    Code (Text):
    1. set {this} to [player, "Hello!"]
    2. this[1] #would be equal to player
    3. add ["Yes", "No"] to {this} #Support for lists in list
    I have another simpler suggestion, I want to be able to define variables easier with syntax like:

    Code (Text):
    1. {this} = 5 #Works like:
    2. #set {this} to 5
    Ideas for commands:

    It's more of an addon idea.

    Ideas for permissions:

    It's more of an addon idea.

    When I'd like it by:

    Quickest: One Day (If you can somehow do it in one day than props to you.)
    Expecting: 5 days to 3 weeks
    Longest: 3 weeks to 2 months
    Overall: I expect it in about 1 day to 2 months.
     
  2. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    These are impossible to make, as skript-mirror uses the first 2 syntaxes already. However, something like this is already implemented into skript-mirror using those syntaxes. It's a little different tho: the first one (to create a list) returns a array (different from a Skript list), but you can convert those to a Skript list by using ...%array%. The second syntax, to get a list value by index, is already in skript-mirror as well, but only works on arrays (and just like most programming languages the index starts at 0). The last one is also impossible, since it's Skript syntax. It's from the is equal to condition, and since conditions can also be written without if and :, the line will be seen as a condition. So you will have to do something different as syntaxes (maybe something instead of the brackets).
     
  3. CormanYT

    CormanYT Active Member

    Joined:
    Jan 6, 2018
    Messages:
    122
    Likes Received:
    4
    I can always change the syntax a bit, but if its able to be done in skript-mirror I'll create a skript-mirror script for it. Thanks!
     
  4. BrettPlayMC

    Supporter

    Joined:
    Jan 26, 2017
    Messages:
    715
    Likes Received:
    53
    Please mark this thread as solved then.
     

Share This Page

Loading...