Alright now that i understand you have a few good options for this. First and probably the best. Get happyhud. and skript-placeholder.
Make a placeholder for your status effect that would output something like true or false then go in happyhud set up a listener for your placeholder. and you just made a hud element that will appear whenever a player has the thing. or just make the vanilla hearts change to a different color with a condition in happyhud. if you decide to go this route message me on discord and i will walk you through it Mittens#2223
Secondly you can use skript and quite a few other things to make particle effects and add a hologram to the players to notify others
Lastly Your new code is not bad memory wise. here are a few tips on making it run a bit faster.
- Any delay over five ticks is a bit overkill. and delays are only proportional to better performance up to 25 ticks i think (Not 100% sure) then it starts to go the other way and takes more just waiting to do the thing (don't use 25 fopr everything it depends on the thing. i honestly rarely use more than 2)
- Don't use else at all. just use if false if true take a look at this load runner article (take it with a grain of salt) Loadrunner you did a good job with this one but there is one else in there
- here is another one you did already. don't use any || / && in if statements. for some reason skript takes a million years to proses them
- here in your code
Code:
if {skills.protcharm.%player%.inuse} isn't set:
set {skills.protcharm.%player%.inuse} to false
You set it to false only to set it to true right after. switch that and set it to true right away. it's not much but it's one cycle
- Right before the loop you do the action bar message then like 1.5 ticks later the loop does it again. remove that top one
- Remove that if false under the loop and just remove 1 tab from wait 1 seconds on if true. that way it will just wait reguardless.
like so
Code:
loop 30 times:
if {skills.protcharm.%player%.inuse} is true:
execute console command "title %player% actionbar {""text"":"":skill_shield:""}"
wait 1 second
- Used 'Exit' (Without quotes) whenever you can. as it will stop skript going into unnecessary checks
Please note these are quite extream and don't use them to often but for this case i esemate maybe a 60% boost to the first version