Skript: message x times

Created on 17 Nov 2019  路  10Comments  路  Source: SkriptLang/Skript

Description

able to send a message x amount of times, example:

send "hello" to player 5 times
message "" to player 125 times
send "CREATIVE MESSAGE" to all players 3 times
enhancement lowest

Most helpful comment

Edit: as they gave me dislikes i revenge too. Thanks
Edit2: seems they don't stop dislike. 1 dislike for me = 5 dislikes

@Misio12320
Grow up. We have asked you several times to stop with the incessant spamming of reactions. If someone dislikes your response, thats fine, but no need to go click dislike on every single reply to this thread.
If you can't act maturely and in a professional manner we will have to take further action against your account.
You have already been warned before by Bensku, consider this your last warning.

All 10 comments

You can already do that with loops, but a thing like this can be added to EffMessage (and EffBroadcast), or a more general thing like [run[ effect]] %effect% %number% times or repeat %effect% %number% times, would be a nice shortcut for single line codes.

there could also be something like [run[ effect]] %effect% after %timespan% for a shortcut to wait

Sure, just make a separate issue for it lol

His suggestion is better and cleaner than loops. There should be more aliases replacing loops.

His suggestion has nothing to do with loops. It was mention a do something after a time span.
Ill all fairness it would the same effect as

wait x ticks
do something

It really serves no purpose.

And the dislike boi is back
Agree with @ShaneBeee though, we're not gonna ask to replace every expression that needs 2+ lines by an alias.

gonna ask to replace every expression that needs 2+ lines by an alias

It's called syntax sugar, something Skript doesn't really take care of but may be benefical in some cases.

The only issue I have with this is the fact that people are going to overuse it, making the code unreadable. We should think a bit more before adding such features to Skript.

Personally, I think the repeat one is good but I do not think we should add something similar for waiting

Edit: as they gave me dislikes i revenge too. Thanks
Edit2: seems they don't stop dislike. 1 dislike for me = 5 dislikes

@Misio12320
Grow up. We have asked you several times to stop with the incessant spamming of reactions. If someone dislikes your response, thats fine, but no need to go click dislike on every single reply to this thread.
If you can't act maturely and in a professional manner we will have to take further action against your account.
You have already been warned before by Bensku, consider this your last warning.

His suggestion has nothing to do with loops. It was mention a do something after a time span.
Ill all fairness it would the same effect as
It really serves no purpose.

yeah but couldn't the wait be ran asynchronously?

yeah but couldn't the wait be ran asynchronously?

two things here:
1) to answer this question, I suck with anything to do with async stuff. So to be quite honest, I don't know how to answer this.

2) In my opinion (and I want to make it clear, this is just my opinion, and not a final answer to this thread) syntaxes like this are useless.
As snow stated, this is just syntax sugar. It brings nothing new to Skript other than people being able to write less lines.
Less lines does not always mean better/cleaner/more efficient code. In some cases it actually just makes code messier, harder to read and less efficient.
I'm not entirely sure why so many users are becoming so obsessed with fitting as much as possible in one line of code.
Do also remember, that fitting more into one line is harder on the parser. Look at the many many item type expressions, ie:

give player a diamond sword of sharpness 3 and unbreaking 2 named "My Sword" with lore "ooo some lore", "fancy another line" and "look mah, I'm in Minecraft" with custom model data 3

Lines like this tend to slow down the parser, and in some cases cause issues to arise, potentially even crashing Skript.
On top of that many people have started noticing Skript giving errors that are not actually directed at the real issue. I've seen people simply miss a ' in player's and get silly errors like "the player is not in a world" or something like that. This is because the parser is trying to parse like 5+ expressions in one line, the poor parser is having a rough day.

In my opinion, Skript is getting quite bloated. I don't feel we need more effects/expressions that are strictly syntax sugar and allow the users to write less lines.

We should rather focus on fixing bugs, and bringing new things to Skript that can not currently be done without the need for addons.

I REPEAT... this is just my opinion, this is in no way me say "no we won't add this"

Was this page helpful?
0 / 5 - 0 ratings