Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #---------- Variables ----------#
- Variables:
- {disguise.sheep.%player%} = false
- {disguise.creeper.%player%} = false
- #---------- Paramètres & Sécurité ----------#
- On join:
- Give a chest named "&6[&eAnimals&6]" to the player
- Display board named "&6[&eAnimals&6]" to player
- Make score "&4Pas d'animal" in board of player to 0
- Move display of player to sidebar
- On quit:
- Remove every chest named "&6[&eAnimals&6]" from the player
- Set {disguise.sheep.%player%} to false
- Set {disguise.creeper.%player%} to false
- Undisguise player
- On place of chest:
- If player is holding a chest named "&6[&eAnimals&6]":
- Cancel event
- On load:
- Broadcast "&6[&eAnimals&6] &aLoaded"
- On unload:
- Broadcast "&6[&eAnimals&6] &cUnloaded"
- #---------- Menu ----------#
- On rightclick with a chest:
- If player is holding a chest named "&6[&eAnimals&6]":
- Open chest with 1 rows named "&6[&eAnimals&6]" to player
- Wait 1 tick
- Format slot 0 of player with sheep spawn egg named "&7Mouton" to close then run [make player execute command "/disguise sheep"]
- Format slot 1 of player with creeper spawn egg named "&2Creeper" to close then run [make player execute command "/disguise creeper"]
- Format slot 8 of player with 166 named "§4Enlever le déguisement" to close then run [make player execute command "/disguise clear"]
- #---------- Commandes ----------#
- Command /disguise [<text>]:
- Trigger:
- If args 1 is "sheep":
- If {disguise.sheep.%player%} is true:
- Send "&6[&eAnimals&6] &3Vous êtes déjà déguisé en &7Mouton§3..."
- Else:
- If {disguise.creeper.%player%} is true:
- Set {disguise.creeper.%player%} to false
- Remove every tnt named "&2Boum..." from the player
- Send "&6[&eAnimals&6] &aVous êtes maintenant déguisé en &7Mouton &a!"
- Set {disguise.sheep.%player%} to true
- Disguise player as "sheep"
- #-- ScoreBoard --#
- Display board named "&6[&eAnimals&6]" to player
- Make score "§7Mouton" in board of player to 0
- Move display of player to sidebar
- If args 1 is "creeper":
- If {disguise.creeper.%player%} is true:
- Send "&6[&eAnimals&6] &3Vous êtes déjà déguisé en &2Creeper§3..."
- Else:
- If {disguise.sheep.%player%} is true:
- Set {disguise.sheep.%player%} to false
- Send "&6[&eAnimals&6] &aVous êtes maintenant déguisé en &2Creeper &a!"
- Set {disguise.creeper.%player%} to true
- Disguise player as "creeper"
- #-- ScoreBoard --#
- Display board named "&6[&eAnimals&6]" to player
- Make score "§2Creeper" in board of player to 0
- Move display of player to sidebar
- #-- Items --#
- Give a tnt named "&2Boum..." to the player
- If args 1 is "clear":
- Display board named "&6[&eAnimals&6]" to player
- Make score "&4Pas d'animal" in board of player to 0
- Move display of player to sidebar
- If {disguise.sheep.%player%} is true:
- Send "&6[&eAnimals&6] &5Vous n'êtes plus déguisé."
- Set {disguise.sheep.%player%} to false
- Undisguise player
- stop
- If {disguise.creeper.%player%} is true:
- Send "&6[&eAnimals&6] &5Vous n'êtes plus déguisé."
- Remove every tnt named "&2Boum..." from the player
- Set {disguise.creeper.%player%} to false
- Undisguise player
- stop
- Else:
- Send "&6[&eAnimals&6] &2Vous n'êtes pas déguisé..."
- #----- Petites Commandes Utiles -----
- Command /chest:
- Trigger:
- Give a chest named "&6[&eAnimals&6]" to the player
- Command /var:
- Trigger:
- Send "{disguise.sheep.%player%} = %{disguise.sheep.%player%}%"
- Send "{disguise.creeper.%player%} = %{disguise.creeper.%player%}%"
- Command /heal:
- Trigger:
- Heal the player
- #---------- Effets ----------#
- #----- Mouton -----#
- On rightclick on a grass:
- If {disguise.sheep.%player%} is true:
- If player's food level is smaller than 10:
- Add 1 to hunger of player
- Set the clicked block to dirt
- On damage:
- If victim is a player:
- If {disguise.sheep.%victim%} is true:
- Play raw sound "mob.sheep.say" at victim with pitch 1 volume 10
- On damage:
- If victim is a sheep:
- If {disguise.sheep.%attacker%} is true:
- Send "&6[&eAnimals&6] §5Mais c'est ton cousin, ne lui fait pas de mal !" to the attacker
- Cancel event
- On damage:
- If victim is a player:
- If {disguise.sheep.%attacker%} is true:
- If {disguise.sheep.%victim%} is true:
- Send "&6[&eAnimals&6] §5Mais c'est ton cousin, ne lui fait pas de mal !" to the attacker
- Cancel event
- #----- Creeper -----#
- On rightclick with a tnt:
- If player is holding a tnt named "&2Boum...":
- If {disguise.creeper.%player%} is true:
- Set {_waited} to difference between {creeper.lastexplode.%player%} and now
- If {_waited} is less than 5 seconds:
- Send "&6[&eAnimals&6] &3Tu doit attendre %difference between 5 seconds and {_waited}% avant de pouvoir exploser."
- Stop
- Create explosion of force 3 at player
- Set {creeper.lastexplode.%player%} to now
- On place of tnt:
- If player is holding a tnt named "&2Boum...":
- If {disguise.creeper.%player%} is true:
- Cancel event
- On damage:
- If victim is a player:
- If {disguise.creeper.%victim%} is true:
- Play raw sound "mob.creeper.say" at victim with pitch 1 volume 10
- On damage:
- If damage was caused by block explosion:
- If victim is a player:
- If {disguise.creeper.%victim%} is true:
- Cancel event
- Damage victim by 3.5 hearts
- On damage:
- If victim is a creeper:
- If {disguise.creeper.%attacker%} is true:
- Cancel event
- Send "&6[&eAnimals&6] §5Mais c'est ton cousin, ne lui fait pas de mal !" to the attacker
- On damage:
- If victim is a player:
- If {disguise.creeper.%victim%} is true:
- If {disguise.creeper.%attacker%} is true:
- Send "&6[&eAnimals&6] §5Mais c'est ton cousin, ne lui fait pas de mal !" to the attacker
- Cancel event
- #Addons utilisés : SkQuery, Umbaska, ProtocolLib
Advertisement
Add Comment
Please, Sign In to add comment