2019-02-03 12:38:45 Skript

某日本製経済化プラグインをSk化しました。 Shopと連携出来ます。

Copy Copied! Full
options: default: 1000 function comma(int:integer) :: text: set {_str} to "%{_int}%" set {_arr::*} to {_str} split at "" loop {_arr::*}: if loop-value is not "": add 1 to {_n} loop {_arr::*}: if loop-value is not "": set {_list::%{_n}%} to "%loop-value%" subtract 1 from {_n} set {_i} to -1 loop {_list::*}: if loop-value is not "": add 1 to {_i} set {__i} to {_i}/3 if "%{__i}%" does not contain ".": if {__str} is set: set {__str} to "%{__str}%,%loop-value%" else: set {__str} to "%loop-value%" else: if {__str} is set: set {__str} to "%{__str}%%loop-value%" else: set {__str} to "%loop-value%" set {_arr::*} to {__str} split at "" loop {_arr::*}: if loop-value is not "": add 1 to {_n} loop {_arr::*}: if loop-value is not "": if {___str} is set: set {___str} to "%loop-value%%{___str}%" else: set {___str} to "%loop-value%" subtract 1 from {_n} return "%{___str}%" command /jecon [<text>] [<offline player>] [<int>]: aliases: /money trigger: if arg 1 is not set: if player has permission "jecon.show": set {_a} to floor("%{money::%player's uuid%}%" parsed as number) set {_a} to comma({_a}) send "[Jecon] %player%の所持金:%{_a}% 円." to player else: send "&cSorry, You don't have permission!" to player else if arg 1 is "show": if player has permission "jecon.show.other": if arg 2 is set: set {_a} to comma("%{money::%arg 2's uuid%}%" parsed as integer) send "[Jecon] %arg 2%の所持金:%{_a}% 円." to player else: send "&cUsage: /jecon show <player>" to player else: send "&cSorry, You don't have permission!" to player else if arg 1 is "pay": if arg 2 is set: if arg 3 is set: if player has permission "jecon.pay": if {money::%player's uuid%} >= arg 3: set {_a} to comma("%arg 3%" parsed as integer) remove arg 3 from {money::%player's uuid%} add arg 3 to {money::%arg 2's uuid%} send "[Jecon] &a%arg 2%に%{_a}% 円を送金しました。" to player send "[Jecon] &a%player%から%{_a}% 円が送金されました。" to arg 2 else: send "&c所持金が足りません。" to player else: send "&cSorry, You don't have permission!" to player else: send "&c金額が指定されていません。" to player else: send "&cプレイヤーが指定されていません。" to player else if arg 1 is "give": if arg 2 is set: if arg 3 is set: if player has permission "jecon.give": set {_a} to comma("%arg 3%" parsed as integer) add arg 3 to {money::%arg 2's uuid%} send "[Jecon] &a%arg 2%に%{_a}% 円付与しました。" to player else: send "&cSorry, You don't have permission!" to player else: send "&c金額が指定されていません。" to player else: send "&cプレイヤーが指定されていません。" to player else if arg 1 is "take": if arg 2 is set: if arg 3 is set: if player has permission "jecon.take": if {money::%player's uuid%} >= arg 3: set {_a} to comma("%arg 3%" parsed as integer) remove arg 3 from {money::%arg 2's uuid%} send "[Jecon] &a%arg 2%から%{_a}% 円徴収しました。" to player else: set {_a} to comma("%{money::%arg 2's uuid%}%" parsed as integer) send "[Jecon] &a%arg 2%から%{_a}% 円徴収しました。" to player set {money::%arg 2's uuid%} to 0 else: send "&cSorry, You don't have permission!" to player else: send "&c金額が指定されていません。" to player else: send "&cプレイヤーが指定されていません。" to player else if arg 1 is "set": if arg 2 is set: if arg 3 is set: if player has permission "jecon.set": set {_a} to comma("%arg 3%" parsed as integer) set {money::%arg 2's uuid%} to arg 3 send "[Jecon] &a%arg 2%の所持金を%{_a}% 円に設定しました。" to player else: send "&cSorry, You don't have permission!" to player else: send "&c金額が指定されていません。" to player else: send "&cプレイヤーが指定されていません。" to player else if arg 1 is "reload": if player has permission "jecon.reload": console command "sk reload Jecon" send "[&aJecon&f] Config has been reloaded!!" to player else: send "&cSorry, You don't have permission!" to player else if arg 1 is "total": loop {money::*}: add loop-value to {_a} set {_a} to floor({_a}) set {_a} to comma({_a}) send "[&aJecon&f] 現在の合計流通金額は%{_a}% 円です。" else if arg 1 is "list": loop all players: set {_a} to floor({money::%loop-player's uuid%}) set {_a} to comma({_a}) send "[&aJecon&f] %loop-player%: %{_a}% 円" to player else if arg 1 is "help": send "&a========= &fJecon &a=========" to player send "/money show [player] - [player]の所持金を表示します。" to player send "/money pay <player> <amount> - お金を送金します。" to player send "/money give <player> <amount> - お金を与えます。" to player send "/money take <player> <amount> - お金を徴収します。" to player send "/money set <player> <amount> - お金を設定します。" to player send "/money total - 合計流通量を表示します。" to player send "/money list - オンラインの所持金リストを表示します。" to player send "/money reload - 設定をリロードします。" to player send "/money help - このヘルプを表示します。" else: send "[Jecon] &c不明なコマンドです。" to player on join: if {money::%player's uuid%} is not set: set {money::%player's uuid%} to {@default}
某日本製経済化プラグインをSk化しました。
Shopと連携出来ます。
RECOMMEND