LoloGaming360YT Posté(e) le 1 novembre 2021 Posté(e) le 1 novembre 2021 (modifié) Version de Minecraft : 1.7.10 Version de Skript : 2.2 Type du skript : Skript d'élection de maire Description du script : Je suis à la recherche d'un skript permettant de faire des élections de maire pour un serveur RP moddé, nous fonctionnons avec la version 2.2 de skript et pour notre plugins de permissions, nous utilisons PermissionEX. Si vous pouvez nous aider cela serait cool de votre part Dans le cadre d'ajout de fonctionnalités à notre serveur RolePlay Minecraft, cela serait un moyen d'élire des maires et de faire participer nos joueurs à l'activité du serveur. Permissions éventuelles: Aucune Commandes: Faudrait faire en sorte que cela soit disponible sur une /election et que cela ouvre un menu avec deux possibilités qui sont les suivante: 1. Se présenter en tant que maire 2. Voter pour un joueur Modifié le 1 novembre 2021 par LoloGaming360YT
krlekraft Posté(e) le 25 décembre 2021 Posté(e) le 25 décembre 2021 (modifié) Le 01/11/2021 à 07:18, LoloGaming360YT a dit : Version de Minecraft : 1.7.10 Version de Skript : 2.2 Type du skript : Skript d'élection de maire Description du script : Je suis à la recherche d'un skript permettant de faire des élections de maire pour un serveur RP moddé, nous fonctionnons avec la version 2.2 de skript et pour notre plugins de permissions, nous utilisons PermissionEX. Si vous pouvez nous aider cela serait cool de votre part Dans le cadre d'ajout de fonctionnalités à notre serveur RolePlay Minecraft, cela serait un moyen d'élire des maires et de faire participer nos joueurs à l'activité du serveur. Permissions éventuelles: Aucune Commandes: Faudrait faire en sorte que cela soit disponible sur une /election et que cela ouvre un menu avec deux possibilités qui sont les suivante: 1. Se présenter en tant que maire 2. Voter pour un joueur Alors c'est pas finit car le script ne marche pas complétement donc si il y a quelqu'un qui souhaite le finir, il peut. Le seul truc qui ne marche pas c'est la tête des candidats qui s'affiche dans le gui et quand on clique dessus ça vote pour eux. Le code : options: click: BLOCK_LEVER_CLICK pf: &8[&e&lElections&8]&r variables: {vote.%player%} = false {candidat.%player%} = false command /election [<text>] [<text>]: trigger: if arg 1 is not set: play sound "{@click}" with volume 1 to player wait 3 ticks open chest with 3 rows named "&8&l» &eMaire Menu &8&l«" to player format slot 0 of player with black glass pane named "&5" to be unstealable format slot 1 of player with black glass pane named "&5" to be unstealable format slot 2 of player with black glass pane named "&5" to be unstealable format slot 3 of player with black glass pane named "&5" to be unstealable format slot 4 of player with skull of player named "&8&l» &7%player%" with lore "" to be unstealable format slot 5 of player with black glass pane named "&5" to be unstealable format slot 6 of player with black glass pane named "&5" to be unstealable format slot 7 of player with black glass pane named "&5" to be unstealable format slot 8 of player with black glass pane named "&5" to be unstealable format slot 9 of player with black glass pane named "&5" to be unstealable format slot 10 of player with black glass pane named "&5" to be unstealable format slot 11 of player with black glass pane named "&5" to be unstealable format slot 12 of player with map named "&eSe présenter" with lore "&7➜ Se présenter en tant que maire" to close then run [make player execute command "election candidature"] format slot 13 of player with black glass pane named "&5" to be unstealable format slot 14 of player with paper named "&eVoter pour un joueur" with lore "&7➜ Voter pour un joueur en tant que maire" to close then run [make player execute command "election liste"] format slot 15 of player with black glass pane named "&5" to be unstealable format slot 16 of player with black glass pane named "&5" to be unstealable format slot 17 of player with black glass pane named "&5" to be unstealable format slot 18 of player with black glass pane named "&5" to be unstealable format slot 19 of player with black glass pane named "&5" to be unstealable format slot 20 of player with black glass pane named "&5" to be unstealable format slot 21 of player with black glass pane named "&5" to be unstealable format slot 22 of player with barrier named "&c ✖ Fermer" to close then run [make player execute command ""] format slot 23 of player with black glass pane named "&5" to be unstealable format slot 24 of player with black glass pane named "&5" to be unstealable format slot 25 of player with black glass pane named "&5" to be unstealable format slot 26 of player with black glass pane named "&5" to be unstealable if arg 1 is "candidature": if arg 2 is not set: play sound "{@click}" with volume 1 to player wait 3 ticks open chest with 3 rows named "&8&l» &bSe présenter &8&l«" to player format slot 0 of player with black glass pane named "&5" to be unstealable format slot 1 of player with black glass pane named "&5" to be unstealable format slot 2 of player with black glass pane named "&5" to be unstealable format slot 3 of player with black glass pane named "&5" to be unstealable format slot 4 of player with paper named "&cEtes vous sûr de vouloir vous présenter ?" with lore "&fVous pouvez annuler en faisant %nl%&7/election candidature annuler" to be unstealable format slot 5 of player with black glass pane named "&5" to be unstealable format slot 6 of player with black glass pane named "&5" to be unstealable format slot 7 of player with black glass pane named "&5" to be unstealable format slot 8 of player with black glass pane named "&5" to be unstealable format slot 9 of player with black glass pane named "&5" to be unstealable format slot 10 of player with black glass pane named "&5" to be unstealable format slot 11 of player with black glass pane named "&5" to be unstealable format slot 12 of player with lime concrete named "&a&lOui" with lore "&7➜ Se présenter en tant que maire" to close then run [make player execute command "election candidature oui"] format slot 13 of player with black glass pane named "&5" to be unstealable format slot 14 of player with red concrete named "&4&lNon" with lore "&7➜ Annuler" to close then run [make player execute command "election"] format slot 15 of player with black glass pane named "&5" to be unstealable format slot 16 of player with black glass pane named "&5" to be unstealable format slot 17 of player with black glass pane named "&5" to be unstealable format slot 18 of player with black glass pane named "&5" to be unstealable format slot 19 of player with black glass pane named "&5" to be unstealable format slot 20 of player with black glass pane named "&5" to be unstealable format slot 21 of player with black glass pane named "&5" to be unstealable format slot 22 of player with black glass pane named "&5" to be unstealable format slot 23 of player with black glass pane named "&5" to be unstealable format slot 24 of player with black glass pane named "&5" to be unstealable format slot 25 of player with black glass pane named "&5" to be unstealable format slot 26 of player with barrier named "&c← Retour" to close then run [make player execute command "election"] if arg 1 is "liste": wait 3 ticks play sound "{@click}" with volume 1 to player open chest with 6 rows named "&8&l» &aListe des candidats &8&l«" to player wait a tick set {_slot} to 0 loop {maire::*}: set {_p} to loop-value parsed as offline player if {_p} is offline: format slot {_slot} of player with {_p}'s skull named "%{_p}%" with lore "&fClique pour voter pour ce candidat %nl% &fUn vote maximal" to close then run [make player execute command "election vote %{_p}%"] else: format slot {_slot} of player with {_p}'s skull named "%{_p}%" with lore "&fClique pour voter pour ce candidat %nl% &fUn vote maximal" to close then run [make player execute command "election vote %{_p}%"] add 1 to {_slot} format slot 53 of player with barrier named "&c← Retour" to close then run [make player execute command "election"] if arg 1 is "candidature": if arg 2 is "oui": if {candidat.%player%} is false: add player to {maire::*} set {maire.%player%} to player set {candidat.%player%} to true send "{@pf} Tu es à présent candidat pour devenir maire !" else: send "{@pf} Tu es déjà candidat !" if arg 1 is "candidature": if arg 2 is "annuler": if {candidat.%player%} is true: remove player from {maire::*} set {candidat.%player%} to false send "{@pf} Tu n'es plus candidat pour devenir maire !" else: send "{@pf} Tu n'es pas candidat !" if arg 1 is "vote": if {vote.%player%} is false: if {maire::*} contains arg 2: set {vote.%player%} to true send "{@pf} Tu as voté pour le candidat &c%arg-2% !" else: send "{@pf} Ce candidat n'exite pas !" else: send "{@pf} Tu as déjà voté !" command /reset [<player>]: #c'est une commande pour supprimer toutes les variables sur un joueur, c'était pour mes tests permission: reset.use trigger: set {vote.%arg-1%} to false set {candidat.%arg-1%} to false remove arg-1 from {maire::*} send "reset" Modifié le 25 décembre 2021 par krlekraft
Leuthio Posté(e) le 11 janvier 2022 Posté(e) le 11 janvier 2022 Le 25/12/2021 à 22:49, krlekraft a dit : Alors c'est pas finit car le script ne marche pas complétement donc si il y a quelqu'un qui souhaite le finir, il peut. Le seul truc qui ne marche pas c'est la tête des candidats qui s'affiche dans le gui et quand on clique dessus ça vote pour eux. Le code : options: click: BLOCK_LEVER_CLICK pf: &8[&e&lElections&8]&r variables: {vote.%player%} = false {candidat.%player%} = false command /election [<text>] [<text>]: trigger: if arg 1 is not set: play sound "{@click}" with volume 1 to player wait 3 ticks open chest with 3 rows named "&8&l» &eMaire Menu &8&l«" to player format slot 0 of player with black glass pane named "&5" to be unstealable format slot 1 of player with black glass pane named "&5" to be unstealable format slot 2 of player with black glass pane named "&5" to be unstealable format slot 3 of player with black glass pane named "&5" to be unstealable format slot 4 of player with skull of player named "&8&l» &7%player%" with lore "" to be unstealable format slot 5 of player with black glass pane named "&5" to be unstealable format slot 6 of player with black glass pane named "&5" to be unstealable format slot 7 of player with black glass pane named "&5" to be unstealable format slot 8 of player with black glass pane named "&5" to be unstealable format slot 9 of player with black glass pane named "&5" to be unstealable format slot 10 of player with black glass pane named "&5" to be unstealable format slot 11 of player with black glass pane named "&5" to be unstealable format slot 12 of player with map named "&eSe présenter" with lore "&7➜ Se présenter en tant que maire" to close then run [make player execute command "election candidature"] format slot 13 of player with black glass pane named "&5" to be unstealable format slot 14 of player with paper named "&eVoter pour un joueur" with lore "&7➜ Voter pour un joueur en tant que maire" to close then run [make player execute command "election liste"] format slot 15 of player with black glass pane named "&5" to be unstealable format slot 16 of player with black glass pane named "&5" to be unstealable format slot 17 of player with black glass pane named "&5" to be unstealable format slot 18 of player with black glass pane named "&5" to be unstealable format slot 19 of player with black glass pane named "&5" to be unstealable format slot 20 of player with black glass pane named "&5" to be unstealable format slot 21 of player with black glass pane named "&5" to be unstealable format slot 22 of player with barrier named "&c ✖ Fermer" to close then run [make player execute command ""] format slot 23 of player with black glass pane named "&5" to be unstealable format slot 24 of player with black glass pane named "&5" to be unstealable format slot 25 of player with black glass pane named "&5" to be unstealable format slot 26 of player with black glass pane named "&5" to be unstealable if arg 1 is "candidature": if arg 2 is not set: play sound "{@click}" with volume 1 to player wait 3 ticks open chest with 3 rows named "&8&l» &bSe présenter &8&l«" to player format slot 0 of player with black glass pane named "&5" to be unstealable format slot 1 of player with black glass pane named "&5" to be unstealable format slot 2 of player with black glass pane named "&5" to be unstealable format slot 3 of player with black glass pane named "&5" to be unstealable format slot 4 of player with paper named "&cEtes vous sûr de vouloir vous présenter ?" with lore "&fVous pouvez annuler en faisant %nl%&7/election candidature annuler" to be unstealable format slot 5 of player with black glass pane named "&5" to be unstealable format slot 6 of player with black glass pane named "&5" to be unstealable format slot 7 of player with black glass pane named "&5" to be unstealable format slot 8 of player with black glass pane named "&5" to be unstealable format slot 9 of player with black glass pane named "&5" to be unstealable format slot 10 of player with black glass pane named "&5" to be unstealable format slot 11 of player with black glass pane named "&5" to be unstealable format slot 12 of player with lime concrete named "&a&lOui" with lore "&7➜ Se présenter en tant que maire" to close then run [make player execute command "election candidature oui"] format slot 13 of player with black glass pane named "&5" to be unstealable format slot 14 of player with red concrete named "&4&lNon" with lore "&7➜ Annuler" to close then run [make player execute command "election"] format slot 15 of player with black glass pane named "&5" to be unstealable format slot 16 of player with black glass pane named "&5" to be unstealable format slot 17 of player with black glass pane named "&5" to be unstealable format slot 18 of player with black glass pane named "&5" to be unstealable format slot 19 of player with black glass pane named "&5" to be unstealable format slot 20 of player with black glass pane named "&5" to be unstealable format slot 21 of player with black glass pane named "&5" to be unstealable format slot 22 of player with black glass pane named "&5" to be unstealable format slot 23 of player with black glass pane named "&5" to be unstealable format slot 24 of player with black glass pane named "&5" to be unstealable format slot 25 of player with black glass pane named "&5" to be unstealable format slot 26 of player with barrier named "&c← Retour" to close then run [make player execute command "election"] if arg 1 is "liste": wait 3 ticks play sound "{@click}" with volume 1 to player open chest with 6 rows named "&8&l» &aListe des candidats &8&l«" to player wait a tick set {_slot} to 0 loop {maire::*}: set {_p} to loop-value parsed as offline player if {_p} is offline: format slot {_slot} of player with {_p}'s skull named "%{_p}%" with lore "&fClique pour voter pour ce candidat %nl% &fUn vote maximal" to close then run [make player execute command "election vote %{_p}%"] else: format slot {_slot} of player with {_p}'s skull named "%{_p}%" with lore "&fClique pour voter pour ce candidat %nl% &fUn vote maximal" to close then run [make player execute command "election vote %{_p}%"] add 1 to {_slot} format slot 53 of player with barrier named "&c← Retour" to close then run [make player execute command "election"] if arg 1 is "candidature": if arg 2 is "oui": if {candidat.%player%} is false: add player to {maire::*} set {maire.%player%} to player set {candidat.%player%} to true send "{@pf} Tu es à présent candidat pour devenir maire !" else: send "{@pf} Tu es déjà candidat !" if arg 1 is "candidature": if arg 2 is "annuler": if {candidat.%player%} is true: remove player from {maire::*} set {candidat.%player%} to false send "{@pf} Tu n'es plus candidat pour devenir maire !" else: send "{@pf} Tu n'es pas candidat !" if arg 1 is "vote": if {vote.%player%} is false: if {maire::*} contains arg 2: set {vote.%player%} to true send "{@pf} Tu as voté pour le candidat &c%arg-2% !" else: send "{@pf} Ce candidat n'exite pas !" else: send "{@pf} Tu as déjà voté !" command /reset [<player>]: #c'est une commande pour supprimer toutes les variables sur un joueur, c'était pour mes tests permission: reset.use trigger: set {vote.%arg-1%} to false set {candidat.%arg-1%} to false remove arg-1 from {maire::*} send "reset" Tu te complique trop la vie avec t'es Text etc... Ton code devient trop gros à cause de sa...
krlekraft Posté(e) le 11 janvier 2022 Posté(e) le 11 janvier 2022 Il y a 1 heure, Leuthio a dit : Tu te complique trop la vie avec t'es Text etc... Ton code devient trop gros à cause de sa... Mes "textes" ?
Joriis Posté(e) le 4 mars 2022 Posté(e) le 4 mars 2022 Le sujet a été résolu partiellement. Il a donc été verrouillé. Cordialement, l'équipe.
Messages recommandés