Solved Skript Lists Request

  • 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!

CormanYT

Active Member
Jan 6, 2018
122
5
18
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:
set {this} to [player, "Hello!"]
this[1] #would be equal to player
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:
{this} = 5 #Works like:
#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.
 
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).
 
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).
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!