Aller au contenu

Echange d'inventaires entre 2 joueurs


Messages recommandés

Posté(e)

Bonsoir à vous. Je recherche depuis quelques jours un skript permettant de:

-Give l'inventaire d'un joueur (J1) à un autre joueur (J2)

-Give l'inventaire du joueur J2 au joueur J1

Plus concrètement, j'aimerais que ce skript puisse faire un échange d'inventaire entre le joueur qui entre la commande ainsi que le joueur qu'il entrera dans cette dernière ou qu'il pointera avec son curseur.

 

@EnderRaider m'a déjà été à en faire un que voici: (Merci à lui :))

command /InventaireGive:
   trigger:
       loop player's inventory:
           add loop-value to {inventory.%player%::*}
       loop {inventory.%player%::*}:
           give loop-value to target player
       loop target player's inventory:
           add loop-value to {inventory.%target player%::*}
       loop {inventory.%target player%::*}:
           give loop-value to player

 

Cependant, j'ai 2 erreurs: http://prntscr.com/adk06i J'ai essayé plusieurs choses mais rien ne marche :/

Merci d'avance :)

Posté(e)

Test ceci :

command /inventairegive:
   trigger:
       clear {inventory.%player%::*}
       add items in the player's inventory to {inventory.%player%::*}
       loop all items in the target player's inventory:
           clear {inventory.%target-player%::*}
           add items in the target player's inventory to {inventory.%target-player%::*}
           clear target player's inventory
           give {inventory.%player%::*} to target player
           clear player's inventory
           give {inventory.%target-player%::*} to player

Posté(e)
Test ceci :

command /inventairegive:
   trigger:
       clear {inventory.%player%::*}
       add items in the player's inventory to {inventory.%player%::*}
       loop all items in the target player's inventory:
           clear {inventory.%target-player%::*}
           add items in the target player's inventory to {inventory.%target-player%::*}
           clear target player's inventory
           give {inventory.%player%::*} to target player
           clear player's inventory
           give {inventory.%target-player%::*} to player

Bonsoir,

J'ai testé le code et malheureusement, j'ai 3 erreurs dessus :/ : http://prntscr.com/ado0l8

×
×
  • 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.