Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- cmd_point: /point
- start: 0
- page_size: 8
- first join:
- if {point::%uuid of player%} is not set:
- execute console command "{@cmd_point} create %player%"
- else:
- if "%{point::%uuid of player%}%" is not "%player%":
- set {point::%uuid of player%} to "%player%"
- send "§bTransfert de votre ancien compte bancaire." to player
- join:
- if {point::%uuid of player%} is not set:
- execute console command "{@cmd_point} create %player%"
- else:
- if "%{point::%uuid of player%}%" is not "%player%":
- set {point::%uuid of player%} to "%player%"
- send "§bTransfert de votre ancien compte bancaire." to player
- command {@cmd_point} [<text>] [<text>] [<text>]:
- trigger:
- if argument 1 is "help" or "h" or "?":
- if argument 2 parsed as number is set:
- add "§b{@cmd_point} h,help,?§3 [page=1]§f affiche l'aide" to {_commands::*}
- add "§b{@cmd_point} create§3 <uuid>§f créer un compte." to {_commands::*}
- add "§b{@cmd_point} del,delete§3 <uuid>§f supprimer un compte." to {_commands::*}
- add "§b{@cmd_point} give/take/set§3 <uuid> <amount>§f faire varier le montant d'un compte." to {_commands::*}
- add "§b{@cmd_point}§3 <uuid=you>§f voir l'argent d'un joueur." to {_commands::*}
- add "§b{@cmd_point} top§3 [page=1]§f voir le classement." to {_commands::*}
- if argument 2 parsed as number is bigger than 0:
- if argument 2 parsed as number is smaller or equal to rounded up (size of {_commands::*} / {@page_size}):
- send "§8§m-------------------------%nl%§8Page %argument 2 parsed as number%/%rounded up (size of {_commands::*} / {@page_size})%" to sender
- loop {_commands::*}:
- send "%loop-value%" to sender
- send "§8§m-------------------------" to sender
- else:
- send "§cErreur: La page demandée n'a pas pu être affichée." to sender
- else:
- send "§cErreur: La page demandée n'a pas pu être affichée." to sender
- else:
- execute sender command "{@cmd_point} ? 1"
- else if argument 1 is "create":
- if argument 2 parsed as player is set:
- execute sender command "{@cmd_point} create %uuid of argument 2 parsed as player%"
- else if argument 2 is set:
- loop all players:
- if "%uuid of loop-player%" is "%argument 2%":
- set {_found} to "%loop-player%"
- exit loop
- if {_found} is set:
- if {point::%argument 2%} is not set:
- set {point::%argument 2%} to "%{_found}%"
- if {point::%argument 2%::value} is not set:
- set {point::%argument 2%::value} to {@start}
- send "§bCréation du compte:§3 %{_found}% --> {@start}$%nl%§bChemin d'accès:§f %argument 2%" to sender and "%{_found}%" parsed as player
- else:
- send "§cErreur: Ce compte existe déjà." to sender
- else:
- send "§cErreur: Aucun joueur connecté n'est associé à cet UUID." to sender
- else:
- send "§cErreur: {@cmd_point} h,help,? [page=1] pour afficher l'aide." to sender
- else if argument 1 is "del" or "delete":
- if argument 2 is set:
- if "%argument 2%" parsed as offline player is online:
- if {point::%uuid of argument 2 parsed as offline player%} is set:
- clear {point::%uuid of argument 2 parsed as offline player%::value}
- clear {point::%uuid of argument 2 parsed as offline player%}
- send "§bSuppression du compte bancaire§3 %argument 2%§b effecutée.%nl%§bAncien chemin:§f %uuid of argument 2 parsed as offline player%" to sender and argument 2 parsed as offline player
- else:
- send "§cErreur: Ce compte bancaire n'existe pas." to sender
- else:
- loop {point::*}:
- if "%loop-value%" is "%argument 2 parsed as offline player%":
- set {_found} to "%loop-index%"
- exit loop
- if {_found} is set:
- clear {point::%uuid of argument 2 parsed as offline player%::value}
- clear {point::%uuid of argument 2 parsed as offline player%}
- send "§bSuppression du compte bancaire§3 %argument 2%§b effecutée.%nl%§bAncien chemin:§f %uuid of argument 2 parsed as offline player%" to sender
- else:
- send "§cErreur: Ce compte bancaire n'existe pas." to sender
- else:
- send "§cErreur: {@cmd_point} h,help,? [page=1] pour afficher l'aide." to sender
- else if argument 1 is "take" or "give" or "set":
- if argument 2 is set:
- if argument 3 parsed as number is set:
- loop {point::*}:
- if "%loop-value%" is "%argument 2 parsed as offline player%":
- set {_found} to "%loop-index%"
- exit loop
- if {_found} is set:
- if argument 1 is "take":
- if {point::%uuid of argument 2 parsed as offline player%::value} is bigger or equal to argument 3 parsed as number:
- set {_point} to argument 3 parsed as number * -1
- else if argument 1 is "give":
- set {_point} to argument 3 parsed as number
- if argument 1 is "take" or "give":
- if "%sender%" is not "%argument 2%":
- send "§bNouveau montant du joueur§3 %argument 2%§b:§3 %{point::%uuid of argument 2 parsed as offline player%::value} + {_point}%$%nl%§f%{_point}%$" to sender and argument 2 parsed as player
- else:
- send "§bNouveau montant du joueur§3 %argument 2%§b:§3 %{point::%uuid of argument 2 parsed as offline player%::value} + {_point}%$%nl%§f%{_point}%$" to sender
- set {point::%uuid of argument 2 parsed as offline player%::value} to {point::%uuid of argument 2 parsed as offline player%::value} + {_point}
- else if argument 3 parsed as number is bigger or equal to 0:
- if "%sender%" is not "%argument 2%":
- send "§bNouveau montant du joueur§3 %argument 2%§b:§3 %argument 3 parsed as number%$" to sender and argument 2 parsed as player
- else:
- send "§bNouveau montant du joueur§3 %argument 2%§b:§3 %argument 3 parsed as number%$" to sender
- set {point::%uuid of argument 2 parsed as offline player%::value} to argument 3 parsed as number
- else:
- send "§cErreur: Un compte bancaire ne peut être négatif." to sender
- else:
- send "§cErreur: Ce compte bancaire n'existe pas." to sender
- else:
- send "§cErreur: {@cmd_point} h,help,? [page=1] pour afficher l'aide." to sender
- else:
- send "§cErreur: {@cmd_point} h,help,? [page=1] pour afficher l'aide." to sender
- else if argument 1 is "top":
- if argument 2 parsed as number is set:
- if argument 2 parsed as number is bigger than 0:
- if argument 2 parsed as number is smaller or equal to rounded up (size of {point::*} / {@page_size}):
- loop {point::*}:
- set {_liste::%loop-value%} to {point::%loop-index%::value}
- while size of {_liste::*} is not 0:
- loop {_liste::*}:
- if {_max} is not set:
- set {_max} to loop-value
- set {_index} to loop-index
- else if loop-value is bigger or equal to {_max}:
- set {_max} to loop-value
- set {_index} to loop-index
- clear {_liste::%{_index}%}
- add {_max} to {_value::*}
- add {_index} to {_account::*}
- do [clear {_max}]->[clear {_index}]
- set {_index} to 0
- send "§8§m-------------------------%nl%§8Page %argument 2 parsed as number%/%rounded up (size of {point::*} / {@page_size})%" to sender
- loop size of {point::*} times:
- if {_index} >= argument 2 parsed as number * {@page_size} - {@page_size}:
- if {_index} < argument 2 parsed as number * {@page_size}:
- set {_checked} to {_index} + 1
- send "§b##%{_checked}% - %{_account::%{_checked}%}%:§f %{_value::%{_checked}%}%" to sender
- else:
- exit loop
- add 1 to {_index}
- send "§8§m-------------------------" to sender
- else:
- send "§cErreur: La page demandée n'a pas pu être affichée." to sender
- else:
- send "§cErreur: La page demandée n'a pas pu être affichée." to sender
- else:
- execute sender command "{@cmd_point} %argument 1% 1"
- else if argument 1 is not set:
- execute sender command "{@cmd_point} %player%"
- else:
- loop {point::*}:
- if "%{point::%uuid of argument 1 parsed as offline player%}%" is "%argument 1%":
- set {_found} to loop-index
- exit loop
- if {_found} is set:
- send "§bPoint de§3 %argument 1%§b:§f %{point::%uuid of argument 1 parsed as offline player%::value}%" to sender
- else:
- send "§cErreur: Ce compte bancaire n'existe pas." to sender
Advertisement
Add Comment
Please, Sign In to add comment