ncobrail Posté(e) le 21 décembre 2015 Posté(e) le 21 décembre 2015 Bonjour la communauté Skript-MC ! Aujourd'hui je vous demande un skript : "PvP BOX" Alors voilà les explications. EXPLICATION: Je suis entrain de développer un serveur Faction, et j'aimerai intégrer un PvP Box, quand le joueur fait la commande /pvpbox join sa le tp dans un petit hub ou il perd tous son stuff et il peut choisir entre trois kits : Archer / Gladiateur / Sorcier (je le ferai par moi même). Et quand le joueur fait la commande /pvpbox leave il retp à l'endroit ou il avait fait la commande /pvpbox join, et il a de nouveau son stuff de PvP Faction. Si le joueur ah un kit par exemple Archer sur lui et qui fait la commande /pvpbox leave sa lui enlève son kit archer pour lui remettre le stuff qui l'avait au tous débuts. Donc voilà, si vous avez pas tous compris, je vous réexpliquerai ! Merci d'avance :)
Protoxy Posté(e) le 23 décembre 2015 Posté(e) le 23 décembre 2015 [spoiler=Voici le script demandé] command /pvpbox <text>: trigger: if arg-1 is "join": set {inventory.%player%} to player's serialized inventory wait 15 ticks send "&7[&9PVPBox&7] &aInventaire sauvergardé !" clear the player's inventory send "&7[&9PVPBox&7] &aTéléportation en cours ..." set {back.%player%} to location of player teleport player to {pvpbox.tp} give 1 chest named "&aChoix du kit &7/pkit [&aGladiateur&7/&aArcher&7/&aSorcier&7]" set {drop.%player%} to false if arg-1 is "leave": teleport player to {back.%player%} set {drop.%player%} to true clear the player's inventory restore inventory of player from {inventory.%player%} if arg-1 is "setspawn": player has permission "skript.op": set {pvpbox.tp} to location of player on drop: {drop.%player%} is false: cancel event on death: victim is a player: {drop.%player%} is false: clear drops command /pkit <text>: trigger: {drop.%player%} is false: if arg-1 is "gladiateur": equip player with 1 iron helmet equip player with 1 iron chestplate equip player with 1 iron leggings equip player with 1 iron boots give 1 diamond sword to player if arg-1 is "archer": equip player with 1 iron helmet equip player with 1 iron chestplate equip player with 1 iron leggings equip player with 1 iron boots give 1 diamond sword to player if arg-1 is "sorcier": equip player with 1 iron helmet equip player with 1 iron chestplate equip player with 1 iron leggings equip player with 1 iron boots give 1 diamond sword to player
kumakuma215 Posté(e) le 23 décembre 2015 Posté(e) le 23 décembre 2015 command /pvpbox <text>: trigger: if arg-1 is "join": set {inventory.%player%} to player's serialized inventory wait 15 ticks send "&7[&9PVPBox&7] &aInventaire sauvergardé !" clear the player's inventory send "&7[&9PVPBox&7] &aTéléportation en cours ..." set {back.%player%} to location of player teleport player to {pvpbox.tp} give 1 chest named "&aChoix du kit &7/pkit [&aGladiateur&7/&aArcher&7/&aSorcier&7]" set {drop.%player%} to false if arg-1 is "leave": teleport player to {back.%player%} set {drop.%player%} to true clear the player's inventory restore inventory of player from {inventory.%player%} if arg-1 is "setspawn": player has permission "skript.op": set {pvpbox.tp} to location of player on drop: {drop.%player%} is false: cancel event on death: victim is a player: clear drops command /pkit <text>: trigger: {drop.%player%} is false: if arg-1 is "gladiateur": equip player with 1 iron helmet equip player with 1 iron chestplate equip player with 1 iron leggings equip player with 1 iron boots give 1 diamond sword to player if arg-1 is "archer": equip player with 1 iron helmet equip player with 1 iron chestplate equip player with 1 iron leggings equip player with 1 iron boots give 1 diamond sword to player if arg-1 is "sorcier": equip player with 1 iron helmet equip player with 1 iron chestplate equip player with 1 iron leggings equip player with 1 iron boots give 1 diamond sword to player Heyheyhey! Petite faute! Pour ton on death, met une verification avant de clear les drops '-'.
ncobrail Posté(e) le 23 décembre 2015 Auteur Posté(e) le 23 décembre 2015 Okey, tous est OK ! Merci beaucoup, et dans ton code il y a une erreur : give 1 chest named "&aChoix du kit &7/pkit [&aGladiateur&7/&aArcher&7/&aSorcier&7]" Tu a oublié le to player ;D Je met en résolu. Encore merci.
kumakuma215 Posté(e) le 23 décembre 2015 Posté(e) le 23 décembre 2015 Okey, tous est OK ! Merci beaucoup, et dans ton code il y a une erreur : give 1 chest named "&aChoix du kit &7/pkit [&aGladiateur&7/&aArcher&7/&aSorcier&7]" Tu a oublié le to player ;D Je met en résolu. Encore merci. Moi, je dis non :p. Car si tu fais en multi-monde (Factions + PvpBox sur le meme serveur), bah ton clear drops risque de te faire chier un peu ^^. Je te conseille de faire une vérif de la variable {drops.%player%}
ncobrail Posté(e) le 23 décembre 2015 Auteur Posté(e) le 23 décembre 2015 Moi, je dis non :p. Car si tu fais en multi-monde (Factions + PvpBox sur le meme serveur), bah ton clear drops risque de te faire chier un peu ^^. Je te conseille de faire une vérif de la variable {drops.%player%} J'ai repris le Skript que @Adriix34 ma donné (Celui qui la modifié y a environ 2/3 minutes).
Messages recommandés