Aller au contenu

Question

Posté(e)

Version de Minecraft : 1.8.0
Version de Skript : 2.1.2

Addons utilisés: Umbaska, SkRayFall, SkQuery, RandomSK.

Type du skript : Séléctionner des joueurs

Description du script :

Bonjour, j'ai créer un skript qui séléctionne un joueur aléatoire dans un monde maintenant je ne sais pas comment give un item au joueur restant (les joueurs qui n'ont pas été séléctionner)
voila le code

 

command /random:
    trigger:
        if player is in "world":
            clear player's inventory
            loop all players:
                add loop-player to {_WAW::*}
            set {_nombre} to 1
            loop 1 times:
                set {joueur%{_nombre}%} to random element out of {_WAW::*}
                remove {joueur%{_nombre}%} from {_WAW::*}
                add 1 to {_nombre}
                set slot 0 of {joueur1} to diamond sword of sharpness 100 and unbreaking 100 with name "&cL'arme du loup"
                equip {joueur1} with golden chestplate of protection 100 and unbreaking 100 
                equip {joueur1} with golden helmet of protection 100 and unbreaking 100 
                equip {joueur1} with golden leggings of protection 100 and unbreaking 100 
                equip {joueur1} with golden boots of protection 100 and unbreaking 100 
            message "&cLe loup est: %{joueur1}%"

4 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Bonjour,
J'ai déjà eût à faire un skript comme ça, tu à deux solutions, soit tu donne leurs items grâce à la liste, comme ça:
 

                set slot 0 of {_WAW::*} to diamond sword of sharpness 100 and unbreaking 100 with name "&cL'arme du loup"
                equip {_WAW::*} with golden chestplate of protection 100 and unbreaking 100 
                equip {_WAW::*} with golden helmet of protection 100 and unbreaking 100 
                equip {_WAW::*} with golden leggings of protection 100 and unbreaking 100 
                equip {_WAW::*} with golden boots of protection 100 and unbreaking 100 

ou alors tu met tous les joueurs restant dans une variable que tu appelle  {joueur2}  et tu leurs give à eux  😉

En espérant avoir pût t'aider

  • 0
Posté(e) (modifié)

Bonjour déjà MERCI juste comment faire pour mettre les joueurs restant dans une variable ?

ps.tu ne peut pas donner/equiper à la variable {_WAW::*} il y as une erreur

slot 3 of <...>' can only accept a single inventory holder, not more (random.sk, line 18: set slot 3 of {_WAW::*} to golden sword')

 

Merci encore !

Modifié par ambroiselebs
  • 0
Posté(e)

Rebonjour,
désolée du retards j'ai fait une petite pause pc ;) 
Je te propose ça:

set {_j1} to a random player of {tln::*}
			remove {_j2::*} from {_j1} #des qu'un joueurs rejoint je l'add à la liste {_j2::*}
			send {_j1} title "&6Vous êtes le monstre" with subtitle "&4Tuer tous les survivants"
			send {_j2::*} title "&6Vous êtes un survivant" with subtitle "&4Sauver votre peau"
			apply blindness 2 to the {_j2::*} 
			remove {_j1} from {_j1}

 

Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.