Aller au contenu

Messages recommandés

Posté(e)

Version Minecraft / Skript 1.11.2

Type : Loterie

 

Salut, j'aimerais avoir un skript qui permet au joueurs quand il clique sur le PNJ une sorte de coffre s'ouvre (Loterie)

Avec :

48% d'obtenir du charbon

10% d'obtenir du fer

10% d'obtenir de l'or

10% d'obtenir du lapis

10% d'obtenir de la redstone

5% d'obtenir de l'emeraude

5% d'obtenir de l'obsidienne

2% d'obtenir du diamant

quand le joueur obtient un item ça fait : &6[&cLoterie&6] &eTu a obtenu &aITEM

Si le joueur obtient du diamant tout le serveur prévenu.

On ne peut jouer que 1 fois par jours

Merci de votre aide !! :D

AltaWineMomoth

Posté(e)

on click on villager:
   chance of 48%:
       open chest with 1 rows named "&6[&cLoterie&6]" to player
       wait 3 ticks 
       format slot 4 of player with compass named "&aCharbon" to close then run [make player execute command "鹰loteriegive charbon"]
   chance of 10%:
       open chest with 1 rows named "&6[&cLoterie&6]" to player
       wait 3 ticks 
       format slot 4 of player with compass named "&aFer" to close then run [make player execute command "鹰loteriegive fer"]
   chance of 10%:
       open chest with 1 rows named "&6[&cLoterie&6]" to player
       wait 3 ticks 
       format slot 4 of player with compass named "&aOr" to close then run [make player execute command "鹰loteriegive or"]
   chance of 10%:
       open chest with 1 rows named "&6[&cLoterie&6]" to player
       wait 3 ticks 
       format slot 4 of player with compass named "&aLapis" to close then run [make player execute command "鹰loteriegive lapis"]
   chance of 10%:
       open chest with 1 rows named "&6[&cLoterie&6]" to player
       wait 3 ticks 
       format slot 4 of player with compass named "&aRedstone" to close then run [make player execute command "鹰loteriegive redstone"]
   chance of 5%:
       open chest with 1 rows named "&6[&cLoterie&6]" to player
       wait 3 ticks 
       format slot 4 of player with compass named "&aEmeraude" to close then run [make player execute command "鹰loteriegive emeraude"]
   chance of 5%:
       open chest with 1 rows named "&6[&cLoterie&6]" to player
       wait 3 ticks 
       format slot 4 of player with compass named "&aObsidienne" to close then run [make player execute command "鹰loteriegive obsidienne"]
   chance of 2%:
       open chest with 1 rows named "&6[&cLoterie&6]" to player
       wait 3 ticks 
       format slot 4 of player with compass named "&aDiamant" to close then run [make player execute command "鹰loteriegive diamant"]

command /鹰loteriegive <text>:
   if arg 1 is "charbon":
       give a coal to player
       message "&6[&cLoterie&6] &eTu a obtenu &adu charbon&e."
   if arg 1 is "fer":
       give a iron ingot to player
       message "&6[&cLoterie&6] &eTu a obtenu &adu fer&e."
   if arg 1 is "or":
       give a gold ingot to player
       message "&6[&cLoterie&6] &eTu a obtenu &ade l'or&e."
   if arg 1 is "lapis":
       give a lapis ore to player
       message "&6[&cLoterie&6] &eTu a obtenu &adu lapis&e."
   if arg 1 is "redstone":
       give a redstone to player
       message "&6[&cLoterie&6] &eTu a obtenu &ade la redstone&e."
   if arg 1 is "emeraude":
       give a emerald to player
       message "&6[&cLoterie&6] &eTu a obtenu &aune émeraude&e."
   if arg 1 is "obsidienne":
       give a obsidian to player
       message "&6[&cLoterie&6] &eTu a obtenu &ade l'obsidienne&e."
   if arg 1 is "diamant":   
       give a diamond to player
       broadcast "&6[&cLoterie&6] &e%player% a obtenu &aun diamant"

 

J'ai pas testé, mais je pense que c'est bon.

Posté(e)

Comment ça Byezo ? le jeu va ouvrir que un menu, et une fois que le joueur clique ça le ferme et lui give se qu'il a gagné.

Et AltaWineMomoth, désolé je l'oublie tout le temps :)

Posté(e)

Quelque chose de plus propre deja, mais pour le charbon qui a 100% de win c'est normale sinon ya des chance que le joueur ne drops rien, fin c'est un peux compliquer a expliquer, teste le et dit moi si sa te va

 

 

on click on villager:
   cancel event
   open chest with 1 row named "&4[&6Loterie&4]" to player

   chance of 10%:
       format slot 4 of player with compass named "&aFer" to be unstealable
       wait 3 seconds
       close player's inventory
       give a iron ingot to player
       message "&6[&cLoterie&6] &eTu a obtenu &adu fer&e."
       stop
   chance of 10%:
       format slot 4 of player with compass named "&aOr" to be unstealable
       wait 3 seconds
       close player's inventory
       give a gold ingot to player
       message "&6[&cLoterie&6] &eTu a obtenu &ade l'or&e."
       stop
   chance of 10%:
       format slot 4 of player with compass named "&aLapis" to be unstealable
       wait 3 seconds
       close player's inventory
       give a lapis ore to player
       message "&6[&cLoterie&6] &eTu a obtenu &adu lapis&e."
       stop
   chance of 10%:
       format slot 4 of player with compass named "&aRedstone" to be unstealable
       wait 3 seconds
       close player's inventory
       give a redstone to player
       message "&6[&cLoterie&6] &eTu a obtenu &ade la redstone&e."
       stop
   chance of 5%:
       format slot 4 of player with compass named "&aEmeraude" to be unstealable
       wait 3 seconds
       close player's inventory
       give a emerald to player
       message "&6[&cLoterie&6] &eTu a obtenu &aune émeraude&e."
       stop
   chance of 5%:
       format slot 4 of player with compass named "&aObsidienne" to be unstealable
       wait 3 seconds
       close player's inventory
       give a obsidian to player
       message "&6[&cLoterie&6] &eTu a obtenu &ade l'obsidienne&e."
       stop
   chance of 2%:
       format slot 4 of player with compass named "&aDiamant" to be unstealable
       wait 3 seconds
       close player's inventory
       give player a diamond
       broadcast "&6[&cLoterie&6] &e%player% a obtenu &aun diamant"
       stop
   chance of 100%:
       format slot 4 of player with compass named "&aCharbon" to be unstealable
       wait 3 seconds
       close player's inventory
       give a coal to player
       message "&6[&cLoterie&6] &eTu a obtenu &adu charbon&e."
   stop

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