Hello! I want to create a file that can store player data and change it (for example, A player joining the server will generate an A player's profile. yml)
This is my skript:
En:
My problem is that he doesn't create a file, but I'm not sure if he will type in the file.
plz help me
This is my skript:
code_language.skript:
options:
#系統設定#
#---玩家檔案---#
player_file: "plugins\Sug\player\%uuud of player%(%player%).yml"
On Join:
if {資料系統(v0.001).%player%} is not set:
if {新玩家123te.%player%} is not set:
set {資料系統(v0.001).%player%} to player
set {新玩家.%player%} to player
message "&f&l系統&7&l>&a&l正在創建資料中. . .!&c&l由於您是新加入的可能需要花個&f&l10秒&c&l~&f&l3分鐘"
create file {@player_file}
wait 50 tick
set {創建資料(1)} to a random integer between 3 and 8
message "&f&l系統&7&l>&a&l正在創建資料中. . .!&d&l%{創建資料(1)}%/100..."
wait 3 tick
delete {創建資料(1)}
set {玩家的勝場.player} to 0
set {創建資料(2)} to a random integer between 9 and 35
message "&f&l系統&7&l>&a&l正在寫入資料中. . .!&d&l%{創建資料(2)}%/100..."
wait 3 tick
delete {創建資料(2)}
wait 30 tick
write "#玩家資料#" at line 1 to file {player_file}
write "玩家ID : %player%" at line 2 to file {player_file}
write "玩家UUID : %uuid of player%" at line 3 to file {player_file}
write "玩家勝場 : %{玩家的勝場.player}%" at line 4 to file {player_file}
write "玩家勝場 : %{玩家的金錢.player}%" at line 5 to file {player_file}
wait 150 tick
set {創建資料(3)} to a random integer between 50 and 79
message "&f&l系統&7&l>&a&l正在校驗資料中. . .!&d&l%{創建資料(3)}%/100..."
wait 3 tick
delete {創建資料(3)}
wait 10 tick
message "&f&l系統&7&l>&a&l完成! 歡迎你的到來!"
if {新玩家.%player%} is set:
message "&f&l系統&7&l>&a&l正在更新中. . .!&c&l可能需要花一些時間"
En:
code_language.skript:
Options:
#system program#
#--- Player Profile---#
Player_file: "plugins\Sug\player\%uuud of player%(%player%).yml"
On Join:
If {data system (v0.001).%player%} is not set:
If {new player 123te.%player%} is not set:
Set {data system (v0.001).%player%} to player
Set {new player.%player%} to player
Message "&f&l system &7&l>&a&l is creating the data. . .!&c&l may need to spend a &f&l10 seconds &c&l~&f&l3 minutes because you are new to join"
Create file {@player_file}
Wait 50 tick
Set {create data(1)} to a random integer between 3 and 8
Message "&f&l system &7&l>&a&l is creating data. . .!&d&l%{Create material(1)}%/100..."
Wait 3 tick
Delete {create material(1)}
Set {the player's win.player} to 0
Set {create data(2)} to a random integer between 9 and 35
Message "&f&l system &7&l>&a&l is writing in the data. . .!&d&l%{Create material(2)}%/100..."
Wait 3 tick
Delete {create material (2)}
Wait 30 tick
Write "# player data#" at line 1 to file {player_file}
Write "Player ID: %player%" at line 2 to file {player_file}
Write "player UUID : %uuid of player%" at line 3 to file {player_file}
Write "The player wins: %{the player's win.player}%" at line 4 to file {player_file}
Write "Player wins: %{player's money.player}%" at line 5 to file {player_file}
Wait 150 tick
Set {create data(3)} to a random integer between 50 and 79
Message "&f&l system &7&l>&a&l is verifying the data. . .!&d&l%{Create material(3)}%/100..."
Wait 3 tick
Delete {create material(3)}
Wait 10 tick
Message "&f&l system &7&l>&a&l complete! Welcome to your arrival!"
If {new player.%player%} is set:
Message "&f&l system &7&l>&a&l is being updated. . .!&c&l may take some time"
My problem is that he doesn't create a file, but I'm not sure if he will type in the file.
plz help me