Improving certain skript for $50.

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

I read that variables are very buggy, they will be overwritten, if you got to many the whole variable file will reset.
So is that a good idea?
This never happened to me so chances are, it's the problem of someone who had this bug. If variables are being overwritten, it's likely that it's the code that's causing the variables to be overwritten.

Trust me, variables are way more efficient and causes less problems than YML.
 
I don't get why people are so obsessed with using YML for storing variables.

Saving and Reparsing YML data back into Skript takes considerably longer than using in-built variables.

YML should only be used for configuration files that are only required once.

If you really want to use YML, load all of your variables from YML once during start up, and save them back into the YML file once when the Skript reloads.


there are lots off faction like plugins out there with source codes you could us

Mate. That's called plagiarism. Something we don't condone. If there are "lots of faction like plugins out there", why don't you just use one of them?

Edit: Also, the script is in a whole different language. We can't tell what the context to anything is.
code_language.skript:
set {_r2} to "Inwoner"
Huh?
code_language.skript:
send "{@prefix} &7Je moet &6Koning &7of &6Hertog &7zijn om dat te kunnen!"
Wha?

code_language.skript:
message "{@prefix} &7Je zit niet in een &6kingdom&7."
Yeah I can kinda make out that one. But not really.
 
Thank you for answering me,
I could perhaps arrange your problem if you tell me why you do not use the faction (plugin)
Because the faction plugin doesn't do exactly what i want it to do.
I don't get why people are so obsessed with using YML for storing variables.

Saving and Reparsing YML data back into Skript takes considerably longer than using in-built variables.

YML should only be used for configuration files that are only required once.

If you really want to use YML, load all of your variables from YML once during start up, and save them back into the YML file once when the Skript reloads.




Mate. That's called plagiarism. Something we don't condone. If there are "lots of faction like plugins out there", why don't you just use one of them?

Edit: Also, the script is in a whole different language. We can't tell what the context to anything is.
code_language.skript:
set {_r2} to "Inwoner"
Huh?
code_language.skript:
send "{@prefix} &7Je moet &6Koning &7of &6Hertog &7zijn om dat te kunnen!"
Wha?

code_language.skript:
message "{@prefix} &7Je zit niet in een &6kingdom&7."
Yeah I can kinda make out that one. But not really.
Maybe yaml takes longer but will changing all yaml to variables remove the lagg?
And when i worked with variables and i deleted them they wouldn't be deleted but just set to none or some thing like that.
But if it keeps all these variables the variable file would become pretty big.

And the language off the skript is Dutch i can understand that would be a small problem but you can try putting some thing you don't understand in google translate :emoji_stuck_out_tongue: .
So (This is all translated by google translate):

Inwoner = Resident
Je moet Koning of Hertog zijn om dat te kunnen! = You must be King or Duke to be able to do that!
Je zit niet in een kingdom = You are not in a kingdom

Its not perfect but you will understand the meaning off it.

So who can improve this skript (Remove the lag it creates) without losing the current data it created?
(I can probably turn the yaml stuff into variables with a simple skript)
 
Last edited by a moderator:
Maybe yaml takes longer but will changing all yaml to variables remove the lagg?
And when i worked with variables and i deleted them they wouldn't be deleted but just set to none or some thing like that.
But if it keeps all these variables the variable file would become pretty big.

Yes it will remove lag. And the variable file is "cleaned up" every time you reload skript so you should not have to worry about the file getting too large if you restart your server from time to time.
 
Yes it will remove lag. And the variable file is "cleaned up" every time you reload skript so you should not have to worry about the file getting too large if you restart your server from time to time.
Okay so now i am searching for some one who can do this job :emoji_grinning: .
@Gatt Could you maybe do this?
Or @Snow-Pyon do you already have a pc :emoji_slight_smile: ?
I am still searching for people who can do the job.
With "The job" i don't mean only changing the Yaml to variables but also bug fixes and improving other things.
 
Okay so now i am searching for some one who can do this job :emoji_grinning: .
@Gatt Could you maybe do this?
Or @Snow-Pyon do you already have a pc :emoji_slight_smile: ?
I am still searching for people who can do the job.
With "The job" i don't mean only changing the Yaml to variables but also bug fixes and improving other things.

Just add a feature where if a player hasn't logged in a week the kingdom will be deleted.
 
Maybe try re-writing it so it's cleaner + more efficient? The lag can also come from your provider (depending on how many players there are) or anything else since there are many factors to creating lag.
I am still having this problem i did tons of research but still skript seems to be causing some lag but like you said there are also some other things and i doubt that the yaml is the real problem after allot off tests i did with it.

I took a timings v2 report maybe some users can tell me some more about it:
https://timings.aikar.co/?id=8c477937cf644ec4a0ccab2edb3911b3

Thanks in advance <3
[doublepost=1498247463,1498246739][/doublepost]
It lags because it's not optimized... like, at all.

I guarantee you that your script will speed up if you remove everything regarding YAML values. YAML support in Skript is terrible, to say the least - whichever addon you're using (to handle YAML) parses the file every single time you use its syntax (horrible for performance).
Could you improve the skript? Cuz i am still searching for some one who could do this.

Also, i made this skript out off a early version from this skript:
https://www.spigotmc.org/resources/clans-core-new-replacement-of-factions-skript.21708/
If i would edit the newest version off that skript like i did with the other one will it fix all the lagg?
His skript still uses yaml at first his skript used variables but he removed it for the reason the variables would be overwritten.
 
I am still having this problem i did tons of research but still skript seems to be causing some lag but like you said there are also some other things and i doubt that the yaml is the real problem after allot off tests i did with it.

I took a timings v2 report maybe some users can tell me some more about it:
https://timings.aikar.co/?id=8c477937cf644ec4a0ccab2edb3911b3

Thanks in advance <3
[doublepost=1498247463,1498246739][/doublepost]
Could you improve the skript? Cuz i am still searching for some one who could do this.

Also, i made this skript out off a early version from this skript:
https://www.spigotmc.org/resources/clans-core-new-replacement-of-factions-skript.21708/
If i would edit the newest version off that skript like i did with the other one will it fix all the lagg?
His skript still uses yaml at first his skript used variables but he removed it for the reason the variables would be overwritten.


The only fix right now can be upgrading your ram, as I see you have about 6gb and 80ish players online, so maybe try upgrading to 8gb and see if it still lags.
 
The only fix right now can be upgrading your ram, as I see you have about 6gb and 80ish players online, so maybe try upgrading to 8gb and see if it still lags.
But most of the time there is like 2 gb's of free memory with 80 players? So that wouldn't really help right.
What is the:
Skript::Event: ch.njol.skript.command.Commands$1 (PlayerCommandPreprocessEvent) ??
 
Last edited by a moderator:
But most of the time there is like 2 gb's of free memory with 80 players? So that wouldn't really help right.
What is the:
Skript::Event: ch.njol.skript.command.Commands$1 (PlayerCommandPreprocessEvent) ??

ch.njol.skript.command.Commands is the commands you make with skript, and (PlayerCommandPreprocessEvent) is probably when a player executes that.. if not try it yourself and see. Maybe one of the commands you created has an error in it.
 
Just want to let you know it was indeed the yaml stuff, i changed it all to variables and look at it now!!!
https://timings.aikar.co/?id=b1ab20c531dd47a2a1a7633ab0686f86
This is just proof to people who keep saying skript always causes lagg and you shouldn't use it etc, skript is as fast as you "Skript" it.

Thanks a lot all of you for helping me :emoji_slight_smile: .
 
Last edited by a moderator:
  • Like
Reactions: Duetro