TheFakeOri Posted July 29, 2020 Share Posted July 29, 2020 every 3 seconds: loop all players: if {mana.%player%} is less than {manamax.%player%}: add 1 to {mana.%player%} Link to comment Share on other sites More sharing options...
farwl Posted July 29, 2020 Share Posted July 29, 2020 looks right 1 Graphic Designer - Skript Developer - Professional Builder - Content Creator Been on Minehut since January 2018. Throughout my time here I've mastered the skills you see above. I make free logos, banners, and server art for users on Minehut. I'm a proficient Skript developer. I'm also really good at building, you can see my portfolio by clicking here. Feel free to say hi if you see me somewhere Amethyst Studios Discord Link to comment Share on other sites More sharing options...
Checkmate128 Posted July 29, 2020 Share Posted July 29, 2020 inside of a loop going through all players use %loop-player% in place of %player%. Other than that I see no issues. Here is the corrected code: every 3 seconds: loop all players: if {mana.%loop-player%} is less than {manamax.%loop-player%}: add 1 to {mana.%loop-player%} Owner of oldgaffle.minehut.gg. (my paintball server) Owner of karted.minehut.gg. (my mario kart server) Advocate of individual freedom, especially freedom of speech. Cooler than Stalemate128. Link to comment Share on other sites More sharing options...
farwl Posted July 29, 2020 Share Posted July 29, 2020 I recommend using UUIDs so stats save if a player changes their name. Graphic Designer - Skript Developer - Professional Builder - Content Creator Been on Minehut since January 2018. Throughout my time here I've mastered the skills you see above. I make free logos, banners, and server art for users on Minehut. I'm a proficient Skript developer. I'm also really good at building, you can see my portfolio by clicking here. Feel free to say hi if you see me somewhere Amethyst Studios Discord Link to comment Share on other sites More sharing options...
farwl Posted July 29, 2020 Share Posted July 29, 2020 Also use list variables because they're better If you ever want to make Mana leaderboard you'd need to be using list variables. Graphic Designer - Skript Developer - Professional Builder - Content Creator Been on Minehut since January 2018. Throughout my time here I've mastered the skills you see above. I make free logos, banners, and server art for users on Minehut. I'm a proficient Skript developer. I'm also really good at building, you can see my portfolio by clicking here. Feel free to say hi if you see me somewhere Amethyst Studios Discord Link to comment Share on other sites More sharing options...
TheFakeOri Posted July 29, 2020 Author Share Posted July 29, 2020 (edited) ty now it works i change it a bit and it still work every 1 seconds: loop all players: if {mana.%loop-player%} is less than {manamax.%loop-player%}: add {manareg.%loop-player%} to {mana.%loop-player%} and i dont know how to use list variables Edited July 29, 2020 by iro Link to comment Share on other sites More sharing options...
AWorthySon Posted July 30, 2020 Share Posted July 30, 2020 On 7/29/2020 at 11:02 PM, iro said: ty now it works i change it a bit and it still work every 1 seconds: loop all players: if {mana.%loop-player%} is less than {manamax.%loop-player%}: add {manareg.%loop-player%} to {mana.%loop-player%} and i dont know how to use list variables Heya! For a more long term solution, may I recommended `While` loops. This way you don't have to use "Loop-player", no more of that confusing stuff on join: while player is online: if {mana.%player's uuid%} is less than {manamax.%player's uuid%}: add {manareg.%player's uuid%} to {mana.%player's uuid%} #It's highly recommended to use UUID, Universal Unique Identifier (or something like that) #This way, if they change their name, could be hacked, mandatory, or just of interest, it will save their data. List variables, also commonly known as "Arrays". It's essentially what the name says it is. This way you can store many values in a single variable, in the long run you can loop these if necessary. A benefit is also they're easy to delete, you can see the mass/amount, etc, etc. A list variable could look like this: `{Players::Queue::*}` it could also just look like this: `{Queue::*}` You see the end is a `star`, that's the index/indices. The index is kinda like a slot. Let's say we add 3 players to variable, you can access them by typing: `send "Player 1: %{Queue::1}%"`, if you want to display every value in the list, simply type: `send "Player Queue: %{Queue::*}%"`. That would send every value in that variable. If you want to add a player, simply do `add player to {Queue::*}`, wanna remove somebody, simply do `remove player from {Queue::*}`. I hope this gives you a short introduction to lists, and the potential it has in the future. You're always free to add to this post, or message me personally. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now