Classement
Contenu populaire
Affichage du contenu avec la meilleure réputation le 31/07/2017 dans toutes les zones
-
Salut, juste pour m'amuser j'ai fait le principe de @Random mais en passant par une fonction. en fait la méthode que je vais afficher ici va permettre de répondre a deux autres personnes qui mon demander une aide particulière, donc je fait une pierre de coup ^^ PS: j'ai utiliser Skript 2.2 et SkQuery seulment function setslot(Player: player, Slot: objects, Item: item): loop {_Slot::*}: format slot loop-value of {_Player} with {_Item} named " " to close command /shop: trigger: wait 2 ticks open chest with 3 rows named "Coffre Shop" to player wait a tick setslot(player, (0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,17,18,19,20,21,22,23,24,25 and 26),1 white stained glass pane) format slot 11 of player with 1 golden ingot named "&9Vendre" with lore "&cClick pour vendre||&cde ta position" to close then run [make player execute command "/sell.1"] format slot 16 of player with 1 eye of ender named "&6Téléportation" with lore "&cClick pour te téléporter||&cau warp" to close then run [make player execute command "/warp shop"] command /sell.1: trigger: wait 2 ticks open chest with 3 rows named "tém vandre ?" to player wait a tick setslot(player, (0,1,2,3,4,5,6,7,8,9,11,12,14,15,17,18,19,20,21,22,23,24 and 25),1 white stained glass pane) format slot 10 of player with 1 magenta wool named "&9Blocks de couleurs" with lore "&7Liste de tout les blocks de couleurs" to close then run [make player execute command "/sell.couleurs"] format slot 13 of player with 1 creeper spawn egg named "&9Pillage" with lore "&7Liste des objets utiles au pillage." to close then run [make player execute command "/sell.pillage"] format slot 16 of player with 1 diamond named "&9Minerais" with lore "&7Liste de tout les minerais." to close then run [make player execute command "/sell.minerai"] format slot 26 of player with 1 black stained glass named "&3Page suivante" to close then run [make player execute command "/sell.2"] command /sell.pillage: trigger: wait 2 ticks open chest with 3 rows named "Coffre de pillage" to player wait a tick setslot(player, (0,1,2,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,25 and 26),1 white stained glass pane) format slot 10 of player with 8 tnt to run [make player execute command "/sell 46 8"] format slot 11 of player with 1 creeper spawn egg to run [make player execute command "/sell 383:50 1"] format slot 12 of player with 1 flint and steel to run [make player execute command "/sell 259 1"] format slot 13 of player with 8 sticky piston to run [make player execute command "/sell 29 8"] format slot 14 of player with 8 piston to run [make player execute command "/sell 33 8"] format slot 15 of player with 4 ender pearl to run [make player execute command "/sell 368 4"] format slot 16 of player with 2 boat to run [make player execute command "/sell 333 2"] command /sell.minerai: trigger: wait 2 ticks open chest with 5 rows named "Coffre de minerais" to player wait 1 ticks setslot(player, (0,1,2,3,4,5,6,7,8,9,17,18,26,27,35,37,38,39,40,41,42,43 and 44),1 white stained glass pane) format slot 10 of player with 5 gold ore to run [make player execute command "/sell 14 5"] format slot 11 of player with 5 iron ore to run [make player execute command "/sell 15 5"] format slot 12 of player with 5 coal ore to run [make player execute command "/sell 16 16"] format slot 13 of player with 5 lapis lazuli ore to run [make player execute command "/sell 21 5"] format slot 14 of player with 5 diamond ore to run [make player execute command "/sell 56 5"] format slot 15 of player with 5 inactive redstone ore to run [make player execute command "/sell 73 5"] format slot 16 of player with 5 emerald ore to run [make player execute command "/sell 129 5"] format slot 19 of player with 2 gold ingot to run [make player execute command "/sell 266 2"] format slot 20 of player with 2 iron ingot to run [make player execute command "/sell 265 2"] format slot 21 of player with 2 coal to run [make player execute command "/sell 263 2"] format slot 22 of player with 2 lapis lazuli to run [make player execute command "/sell 351:4 2"] format slot 23 of player with 2 diamond to run [make player execute command "/sell 264 2"] format slot 24 of player with 2 redstone to run [make player execute command "/sell 331 2"] format slot 25 of player with 2 emerald to run [make player execute command "/sell 388 2"] format slot 28 of player with 1 block of gold to run [make player execute command "/sell 41 1"] format slot 29 of player with 1 block of iron to run [make player execute command "/sell 42 1"] format slot 30 of player with 1 block of coal to run [make player execute command "/sell 173 1"] format slot 31 of player with 1 lapis lazuli block to run [make player execute command "/sell 22 1"] format slot 32 of player with 1 block of diamond to run [make player execute command "/sell 57 1"] format slot 33 of player with 1 block of redstone to run [make player execute command "/sell 152 1"] format slot 34 of player with 1 block of emerald to run [make player execute command "/sell 133 1"] format slot 36 of player with 1 black stained glass pane named "&9Précédent" to close then run [make player execute command "/sell.1"] Voila ton code ce voie alèger de quelque dizaine de ligne pour le même résultat ;) si tu veux des explication sur comment fonctionne la fonction, hésite pas, mais bon sa me parais compréhensible :)2 points
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
Tu peux également répéter une action plusieurs fois en changeant une variable, exemple set {_slot} to 0 loop 20 times: format slot {_slot} of player with 1 white stained glass pane named " " to close add 1 to {_slot} Ça répétera l'action dans le loop, ici ça remplira le slot de variable {_slot}, ensuite ça ajoutera 1 à cette variable pour ajouter 1 au numéro de l'emplacement, pour ensuite répéter 20 fois l'action (dans mon exemple)1 point
-
Je te conseille très fortement d'utiliser TuSKe pour les menus. Entre autres, c'est moins buggé, ça permet de formatter plusieurs slots sur plusieurs joueurs en une seule ligne et ça a plus de possibilité. J'ai fait un tutoriel dessus.1 point
-
Une autre remarque que je peux faire c'est que Skellett est plus fiable, complet et récent que skMorkaz (utilisé ici) pour l’événement "on inventory click"1 point
-
Salut voila pour toi l'amis [spoiler=CODE ] on join: delete {rad.%player%} command /rad <text>: trigger: if arg-1 is not set: message "&cVous devez définir votre messages." if arg-1 is set: if player is holding a 4447: if {rad.%player%} is set: loop all players: if "%{rad.%loop-player%}%" is "%{rad.%player%}%": add 1 to {_nombresurfreq} message "&eVotre message va être envoyer..." to player send "&e[&6RADIO-&c%{rad.%player%}%&e] &f%player% &5--> %arg-1%" to loop-player message "&eVotre message à bien été envoyer a&6 %{_nombresurfreq}%&e sur votre fréquence." else: message "&cIl n'y a personne sur cette fréquence." else: message "&cVous devez définir votre fréquence. (en cliquant sur votre radio." else: message "&cVous devez tenir la radio dans votre main." on rightclick with 4447: open chest with 3 rows named "&e&l● &a&lRadio - Accueil &e&l●" to player set {_s} to -1 wait a tick loop 27 times: add 1 to {_s} set slot {_s} of player's current inventory to 1 of White Stained Glass Pane named "&r " set slot 9 of player's current inventory to 1 of red wool named "&6&lFréquence » &e&l -1 Mhz" set slot 10 of player's current inventory to 1 of red wool named "&6&lFréquence » &e&l -5 Mhz" set slot 11 of player's current inventory to 1 of red wool named "&6&lFréquence » &e&l -50 Mhz" set slot 12 of player's current inventory to 1 of red wool named "&6&lFréquence » &e&l -100 Mhz" set slot 13 of player's current inventory to 1 of redstone torch named "&6&lFréquence » &e&%{rad.%player%}%" set slot 14 of player's current inventory to 1 of green wool named "&6&lFréquence » &e&l +1 Mhz" set slot 15 of player's current inventory to 1 of green wool named "&6&lFréquence » &e&l +5 Mhz" set slot 16 of player's current inventory to 1 of green wool named "&6&lFréquence » &e&l + 50 Mhz" set slot 17 of player's current inventory to 1 of green wool named "&6&lFréquence » &e&l + 100 Mhz" on inventory click: if inventory name of player's current inventory contains "&e&l● &a&lRadio - Accueil &e&l●": cancel event if clicked slot is 9: set {rad.%player%} to "-1" message "&aVous êtes maintenant sur la fréquence %{rad.%player%}%" if clicked slot is 10: set {rad.%player%} to "-5" message "&aVous êtes maintenant sur la fréquence %{rad.%player%}%" if clicked slot is 11: set {rad.%player%} to "-50" message "&aVous êtes maintenant sur la fréquence %{rad.%player%}%" if clicked slot is 12: set {rad.%player%} to "-100" message "&aVous êtes maintenant sur la fréquence %{rad.%player%}%" if clicked slot is 14: set {rad.%player%} to "+1" message "&aVous êtes maintenant sur la fréquence %{rad.%player%}%" if clicked slot is 15: set {rad.%player%} to "+5" message "&aVous êtes maintenant sur la fréquence %{rad.%player%}%" if clicked slot is 16: set {rad.%player%} to "+50" message "&aVous êtes maintenant sur la fréquence %{rad.%player%}%" if clicked slot is 17: set {rad.%player%} to "+100" message "&aVous êtes maintenant sur la fréquence %{rad.%player%}%"1 point
