Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Characters expression

Open JavierKasunic opened this issue 10 years ago • 7 comments

The first suggestion is this expression:

char[acter]s from "a" to "o" #Or like SkQuery `a-z`, and if I'm not wrong, it's the regex (I think).

With support for random too.

JavierKasunic avatar Aug 18 '16 17:08 JavierKasunic

Skript already has support for this. It's just a matter of an addon developer using them.

https://github.com/bensku/Skript/blob/master/src/main/java/ch/njol/skript/registrations/EventValues.java#L68-L76

TheLimeGlass avatar Aug 26 '16 02:08 TheLimeGlass

Event values are buggy. Very buggy.

And I'm afraid that I have no idea how that could be fixed. Skript could really use complete rewrite.

bensku avatar Aug 28 '16 10:08 bensku

Not sure if this is still something you'd like to tackle in the foreseeable future Bensku, given how big of a project you say it is. I think we could possibly move all of these big suggestions and projects (new parser, event value rework, Skript for Sponge, etc.) into one big checklist issue and close these old ones. I can do that for you if you'd like, just let me know.

TheBentoBox avatar Dec 29 '16 16:12 TheBentoBox

This feature is suppose to work. Like say the time of a expression is -1 meaning the past state of an event.

So a developer can make an event value for event-location using the past location in an event. Then in skript you should be able to use past event-location and vice versa for future event-location future event-location

Example https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/vehicle/VehicleMoveEvent.html the getFrom() would be the past location and the getTo() would be the future location.

I thought this feature was the coolest thing ever when I first read it in the source code. Then I played with it for awhile and found out it didn't even work. I was really sad.

Would love to see a fix for this if you can. I have no clue where the syntax testing for the past and future part of the syntax is. If anyone knows, can you direct me to that class. Thanks

TheLimeGlass avatar Dec 29 '16 20:12 TheLimeGlass

Fixing is not priority. Maybe at some point (new parser?).

bensku avatar Jan 10 '17 13:01 bensku

Edited the issue to only have the suggestion that is feasible to add, the rest are either impossible due to bugs or behavior of Skript itself.

FranKusmiruk avatar Jul 09 '20 22:07 FranKusmiruk

it took 7 years and I don't use this anymore but the feature was done, glad to see this project is still going strong!

JavierKasunic avatar Feb 17 '24 21:02 JavierKasunic