MasterBroNetwork Posted August 24, 2020 Share Posted August 24, 2020 Hey uh how do I save player data with a Skript for like levels and all of that? Â Enjoy your life because you never know when it could end. Former VIPÂ - Minehut OWNER - Arcame Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 24, 2020 Share Posted August 24, 2020 What do you mean? You want to save player data like their level amount into a variable with skript? Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper  - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
AWorthySon Posted August 25, 2020 Share Posted August 25, 2020 Heya I think you are referring to Variables. If you would like to store a (custom) level, a simple solution would be to do this: set {Level::%player's uuid%} to 20 or If you want player data like experience levels, you can simply do: send "You are currently level %level of player%" to player https://skripthub.net/docs/?id=928 Remember a variable can store pretty much anything as long as it's a valid "type". Using Skripthub, expressions in green, those return a value or determine one. When you want to send an expression, it returns a value. Many expressions can also be edited. You can of course mathematically add/subtract if appropriate. set player's level to 20  I hope this provides an answer.  Feel free to contact me or continue this thread if you need more help  1  Link to comment Share on other sites More sharing options...
MasterBroNetwork Posted August 25, 2020 Author Share Posted August 25, 2020 1 hour ago, AWorthySon said: Heya I think you are referring to Variables. If you would like to store a (custom) level, a simple solution would be to do this: set {Level::%player's uuid%} to 20 or If you want player data like experience levels, you can simply do: send "You are currently level %level of player%" to player https://skripthub.net/docs/?id=928 Remember a variable can store pretty much anything as long as it's a valid "type". Using Skripthub, expressions in green, those return a value or determine one. When you want to send an expression, it returns a value. Many expressions can also be edited. You can of course mathematically add/subtract if appropriate. set player's level to 20  I hope this provides an answer.  Feel free to contact me or continue this thread if you need more help  Mainly on how to save player data so it stays after a server restart.  Enjoy your life because you never know when it could end. Former VIP - Minehut OWNER - Arcame Link to comment Share on other sites More sharing options...
ztimhirsch1 Posted August 25, 2020 Share Posted August 25, 2020 What type of player data do you mean? If I helped you add a reaction to my post. Â First Joined Oct 29 15:01 GMT 2017 VIP since 9/26/2020 Link to comment Share on other sites More sharing options...
AWorthySon Posted August 25, 2020 Share Posted August 25, 2020 1 hour ago, DivisionG said: Mainly on how to save player data so it stays after a server restart. All variables except local variables are saved in the memory until deleted. Whenever the server shuts down, it's written down into the variable.csv file. Unless that file is touched, variables/data WILL NOT be lost. Â Example of "LOCAL" variables. command /test: trigger: set {_hey} to "hey!" send {_hey} to player command /test2: trigger: send {_hey} to player #This will NOT send anything. Everything else are just regular variables, and will not delete unless you manually do it. You can change the value if you wish to. 1 Â Link to comment Share on other sites More sharing options...
MasterBroNetwork Posted August 27, 2020 Author Share Posted August 27, 2020 On 8/25/2020 at 9:30 PM, AWorthySon said: All variables except local variables are saved in the memory until deleted. Whenever the server shuts down, it's written down into the variable.csv file. Unless that file is touched, variables/data WILL NOT be lost.  Example of "LOCAL" variables. command /test: trigger: set {_hey} to "hey!" send {_hey} to player command /test2: trigger: send {_hey} to player #This will NOT send anything. Everything else are just regular variables, and will not delete unless you manually do it. You can change the value if you wish to. Thanks @AWorthySon for your assistance! So backing up data like scores and all of that is as easy as copying the .csv file?  Enjoy your life because you never know when it could end. Former VIP - Minehut OWNER - Arcame Link to comment Share on other sites More sharing options...
AWorthySon Posted August 27, 2020 Share Posted August 27, 2020 (edited) 2 hours ago, DivisionG said: Thanks @AWorthySon for your assistance! So backing up data like scores and all of that is as easy as copying the .csv file? Skript does everything for you. All Scores/data will be in the .csv file. Don't touch it There is an automatic backup system, you'll find backups of the variables.csv file in the backups folder, but yes, you can copy-paste the .csv file if you'd like. Reminder: The file only updates when you close the server. Edited August 27, 2020 by AWorthySon 1  Link to comment Share on other sites More sharing options...
MasterBroNetwork Posted August 28, 2020 Author Share Posted August 28, 2020 17 hours ago, AWorthySon said: Skript does everything for you. All Scores/data will be in the .csv file. Don't touch it There is an automatic backup system, you'll find backups of the variables.csv file in the backups folder, but yes, you can copy-paste the .csv file if you'd like. Reminder:Â The file only updates when you close the server. Thanks, good to know. Â Enjoy your life because you never know when it could end. Former VIPÂ - Minehut OWNER - Arcame 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