Aller au contenu

Messages recommandés

Posté(e)

Bonjour ! Je voudrais de l'aide pour crée un mini-jeux dans minecraft :

 

Pierre, Papier et Ciseau :

 

Version serveur : 1.8.8

 

 

 

Je voudrais qu'on puisse faire une demande de jeux grâce a ça : /pfc {player}

et que ça envoie un message du style 

&4[PFC] &f≫ &cPersonneQuiDemandeDeJouer &fviens de vous faire une demande de PFC. Faite "/pfc PersonneQuiDemandeDeJouer" pour accepté le duel !

 

 

et je voudrais que ça ouvre un GUI quand l'adversaire aura acceptée la demande comme ceci svp1910173894_SkriptPFC.thumb.png.8dcbb72ad40b47c4e83550277e408096.png

 

et une fois choisi je voudrais que un GUI s'ouvert avec les résultat comme sur la photo si possible 2018-11-16_20_43_06.thumb.png.30f8e491f39ffba6fdf2c57eb57c677c.png

 

Merci de m'aide 

  • J'aime 1
Posté(e) (modifié)

Bonjour, j'ai fait ta demande, mais j'ai une petite question, le gagnant gagne de la money ? si oui, combien ?


[edit]

Tien voici le skript, ( sa ne donne pas de money )

 

command /pfc <player> [<text>]:
	trigger:
	
		if arg 2 is "refusé":
			if {demande.%player%.%arg 1%} is true:
				send "&4[PFC] &f> &c%player% &fviens de refusé votre demande de PFC !" to arg 1
				send "&4[PFC] &f> Vous avez refusé la demande de PFC avec &c%arg 1% &f!" to player
				delete {demande.%arg 1%.%player%}
				delete {demande.%player%.%arg 1%}
				delete {CPFC.%player%}
				delete {CPFC.%arg 1%}
				delete {Counter.ResultPFC}
				delete {InGamePFC.%player%}
				delete {InGamePFC.%arg 1%}
				stop
			else:
				send "&4[PFC] &f> Vous n'avez aucune demande de PFC avec &c%arg 1% &f" to player 
			stop
	
		if {demande.%player%.%arg 1%} isn't set:
			send "&4[PFC] &f> &c%player% &fviens de vous faire une demande de PFC. Faite ""/pfc %player%"" pour accepté le duel !" to arg 1
			send "&4[PFC] &f> Vous pouvez également faire ""/pfc %player% refusé"" pour décliner le duel !" to arg 1
			send "&4[PFC] &f> &aVous venez d'envoyer une demande de PFC à &c%arg 1% &a!" to player
			set {demande.%arg 1%.%player%} to true
			
		else if {demande.%player%.%arg 1%} is set:
			send "&4[PFC] &f> &aVous venez d'accepté le duel de PFC avec &c%arg 1% &a!" to player
			send "&4[PFC] &f> &c%player% &aviens d'accepté le duel de PFC avec vous !" to arg 1
			delete {demande.%arg 1%.%player%}
			delete {demande.%player%.%arg 1%}
			delete {CPFC.%player%}
			delete {CPFC.%arg 1%}
			delete {choix.%player%}
			delete {choix.%arg 1%}
			delete {InGamePFC.%player%}
			delete {InGamePFC.%arg 1%}
			
			set {InGamePFC.%player%} to true
			set {InGamePFC.%arg 1%} to true
			
			open chest with 3 rows named "&6Choix" to player
			open chest with 3 rows named "&6Choix" to arg 1
			wait 2 ticks
			format slot 11 of player with stone named "&3Pierre" to close then run [make player execute command "/§choix %arg 1% pierre"]
			format slot 13 of player with paper named "&3Papier" to close then run [make player execute command "/§choix %arg 1% papier"]
			format slot 15 of player with shears named "&3Ciseau" to close then run [make player execute command "/§choix %arg 1% ciseau"]

			format slot 11 of arg 1 with stone named "&3Pierre" to close then run [make arg 1 execute command "/§choix %player% pierre"]
			format slot 13 of arg 1 with paper named "&3Papier" to close then run [make arg 1 execute command "/§choix %player% papier"]
			format slot 15 of arg 1 with shears named "&3Ciseau" to close then run [make arg 1 execute command "/§choix %player% ciseau"]
			
			
command /§choix <player> <text>:
	trigger:
		if arg 2 is "pierre":
			set {choix.%player%} to "pierre"
			set {CPFC.%player%} to true
		if arg 2 is "papier":
			set {choix.%player%} to "papier"
			set {CPFC.%player%} to true
		if arg 2 is "ciseau":
			set {choix.%player%} to "ciseau"
			set {CPFC.%player%} to true
		send "&aEn attente de &c%arg 1% &a!" to player
		wait 5 ticks
		open chest with 3 rows named "&6Voir Résultat" to player
		wait 2 ticks
		format slot 13 of player with paper named "&6Voir les résulats" to close then run [make player execute command "/§resultOK %arg 1%"]
		
		
command /§ResultOK <player>:
	trigger:
		if {CPFC.%arg 1%} is true:
			wait 3 ticks
			open chest with 3 rows named "&6Résultat" to player
			wait 3 ticks
			open chest with 3 rows named "&6Résultat" to arg 1
				
			wait 2 ticks
			format slot 9 of player with player's skull named "&6%player%" to be unstealable
			format slot 9 of arg 1 with player's skull named "&6%player%" to be unstealable
			format slot 17 of player with skull of arg 1 named "&6%arg 1%" to be unstealable
			format slot 17 of arg 1 with skull of arg 1 named "&6%arg 1%" to be unstealable
			
			format slot 4 of player with white glass pane named "" to be unstealable
			format slot 13 of player with white glass pane named "" to be unstealable
			format slot 22 of player with white glass pane named "" to be unstealable
			
			format slot 4 of arg 1 with white glass pane named "" to be unstealable
			format slot 13 of arg 1 with white glass pane named "" to be unstealable
			format slot 22 of arg 1 with white glass pane named "" to be unstealable
			
			if {choix.%player%} is "pierre":
				format slot 11 of player with stone named "&3Pierre" to be unstealable
				format slot 11 of arg 1 with stone named "&3Pierre" to be unstealable
			else if {choix.%player%} is "papier":
				format slot 11 of player with paper named "&3Papier" to be unstealable
				format slot 11 of arg 1 with paper named "&3Papier" to be unstealable
			else if {choix.%player%} is "ciseau":
				format slot 11 of player with shears named "&3Ciseau" to be unstealable
				format slot 11 of arg 1 with shears named "&3Ciseau" to be unstealable

			if {choix.%arg 1%} is "pierre":
				format slot 15 of player with stone named "&3Pierre" to be unstealable
				format slot 15 of arg 1 with stone named "&3Pierre" to be unstealable
			else if {choix.%arg 1%} is "papier":
				format slot 15 of player with paper named "&3Papier" to be unstealable
				format slot 15 of arg 1 with paper named "&3Papier" to be unstealable
			else if {choix.%arg 1%} is "ciseau":
				format slot 15 of player with shears named "&3Ciseau" to be unstealable
				format slot 15 of arg 1 with shears named "&3Ciseau" to be unstealable
			
			wait 3 seconds
			close player's inventory
			close arg-1's inventory
				
			if {choix.%player%} is "pierre":
				if {choix.%arg 1%} is "pierre":
					send "&4[PFC] &f> &6Egalité !" to player
					send "&4[PFC] &f> &6Egalité !" to arg 1
					stop

				if {choix.%arg 1%} is "papier":
					send "&4[PFC] &f> &cPerdu !" to player
					send "&4[PFC] &f> &aGagné !" to arg 1
					
				if {choix.%arg 1%} is "ciseau":
					send "&4[PFC] &f> &aGagné !" to player
					send "&4[PFC] &f> &cPerdu !" to arg 1
					
			if {choix.%player%} is "papier":
				if {choix.%arg 1%} is "pierre":
					send "&4[PFC] &f> &aGagné !" to player
					send "&4[PFC] &f> &cPerdu !" to arg 1
					stop

				if {choix.%arg 1%} is "papier":
					send "&4[PFC] &f> &6Egalité !" to player
					send "&4[PFC] &f> &6Egalité !" to arg 1
					
				if {choix.%arg 1%} is "ciseau":
					send "&4[PFC] &f> &cPerdu !" to player
					send "&4[PFC] &f> &aGagné !" to arg 1
					
			if {choix.%player%} is "ciseau":
				if {choix.%arg 1%} is "pierre":
					send "&4[PFC] &f> &cPerdu !" to player
					send "&4[PFC] &f> &aGagné !" to arg 1
					stop

				if {choix.%arg 1%} is "papier":
					send "&4[PFC] &f> &aGagné !" to player
					send "&4[PFC] &f> &cPerdu !" to arg 1
					
				if {choix.%arg 1%} is "ciseau":
					send "&4[PFC] &f> &6Egalité !" to player
					send "&4[PFC] &f> &6Egalité !" to arg 1


			
			
			delete {demande.%arg 1%.%player%}
			delete {demande.%player%.%arg 1%}
			delete {CPFC.%player%}
			delete {CPFC.%arg 1%}
			delete {choix.%player%}
			delete {choix.%arg 1%}
			delete {InGamePFC.%player%}
			delete {InGamePFC.%arg 1%}
			
			
		else:
			send "&cLe joueur n'as pas fait sont choix !" to player
			wait 3 ticks
			open chest with 3 rows named "&6Voir Résultat" to player
			wait 2 ticks
			format slot 13 of player with paper named "&6Voir les résulats" to close then run [make player execute command "/§resultOK %arg 1%"]
			stop



Voila, j'ai rajouter une commande "/pfc <JoueurQuiADemander> refusé" pour refusé la demande, si il y a des choses que tu veut changer dit moi ?

Modifié par Wildteams
Ajout du code
Posté(e) (modifié)

Merci le skript marche mais tu peut juste si possible bloque les demandes de jeux a sois mémé si tu c'est le faire stp ?

 

et si possible je veux bien avec un systéme de money (Pour jouer il faudrait mettre 250$ pour essayer de gagner 500)

Modifié par maxouviclouis
Posté(e) (modifié)

Ok pas de soucis, ( désoler du retard )

[EDIT]

Voici le code ! ?

 

command /pfc <player> [<text>]:
	trigger:
		if arg 1 is "%player%":
			send "&4[PFC] &f> &cVous ne pouvez pas jouer contre vous même !" to player
			stop
	
		if arg 2 is "refusé":
			if {demande.%player%.%arg 1%} is true:
				send "&4[PFC] &f> &c%player% &fviens de refusé votre demande de PFC !" to arg 1
				send "&4[PFC] &f> Vous avez refusé la demande de PFC avec &c%arg 1% &f!" to player
				delete {demande.%arg 1%.%player%}
				delete {demande.%player%.%arg 1%}
				delete {CPFC.%player%}
				delete {CPFC.%arg 1%}
				delete {Counter.ResultPFC}
				delete {InGamePFC.%player%}
				delete {InGamePFC.%arg 1%}
				stop
			else:
				send "&4[PFC] &f> Vous n'avez aucune demande de PFC avec &c%arg 1% &f" to player 
			stop
	
		if {demande.%player%.%arg 1%} isn't set:
			if player's account >= 250:
				if account of arg 1 >= 250:
					remove 250 from player's account
					remove 250 from account of arg 1
					send "&4[PFC] &f> &c%player% &fviens de vous faire une demande de PFC. Faite ""/pfc %player%"" pour accepté le duel ! &6&l( 250$ )" to arg 1
					send "&4[PFC] &f> Vous pouvez également faire ""/pfc %player% refusé"" pour décliner le duel !" to arg 1
					send "&4[PFC] &f> &aVous venez d'envoyer une demande de PFC à &c%arg 1% &a! &6&l( 250$ )" to player
					set {demande.%arg 1%.%player%} to true
				else:
					send "&4[FPC] &f> &6%arg 1% &cn'a pas assez pour jouer !" to player
					stop
			else:
				send "&4[PFC] &f> &cVous n'avez pas 250$ pour jouer !" to player
				stop
			
		else if {demande.%player%.%arg 1%} is set:
			send "&4[PFC] &f> &aVous venez d'accepté le duel de PFC avec &c%arg 1% &a!" to player
			send "&4[PFC] &f> &c%player% &aviens d'accepté le duel de PFC avec vous !" to arg 1
			delete {demande.%arg 1%.%player%}
			delete {demande.%player%.%arg 1%}
			delete {CPFC.%player%}
			delete {CPFC.%arg 1%}
			delete {choix.%player%}
			delete {choix.%arg 1%}
			delete {InGamePFC.%player%}
			delete {InGamePFC.%arg 1%}
			
			set {InGamePFC.%player%} to true
			set {InGamePFC.%arg 1%} to true
			
			open chest with 3 rows named "&6Choix" to player
			open chest with 3 rows named "&6Choix" to arg 1
			wait 2 ticks
			format slot 11 of player with stone named "&3Pierre" to close then run [make player execute command "/§choix %arg 1% pierre"]
			format slot 13 of player with paper named "&3Papier" to close then run [make player execute command "/§choix %arg 1% papier"]
			format slot 15 of player with shears named "&3Ciseau" to close then run [make player execute command "/§choix %arg 1% ciseau"]

			format slot 11 of arg 1 with stone named "&3Pierre" to close then run [make arg 1 execute command "/§choix %player% pierre"]
			format slot 13 of arg 1 with paper named "&3Papier" to close then run [make arg 1 execute command "/§choix %player% papier"]
			format slot 15 of arg 1 with shears named "&3Ciseau" to close then run [make arg 1 execute command "/§choix %player% ciseau"]
			
			
command /§choix <player> <text>:
	trigger:
		if arg 2 is "pierre":
			set {choix.%player%} to "pierre"
			set {CPFC.%player%} to true
		if arg 2 is "papier":
			set {choix.%player%} to "papier"
			set {CPFC.%player%} to true
		if arg 2 is "ciseau":
			set {choix.%player%} to "ciseau"
			set {CPFC.%player%} to true
		send "&aEn attente de &c%arg 1% &a!" to player
		wait 5 ticks
		open chest with 3 rows named "&6Voir Résultat" to player
		wait 2 ticks
		format slot 13 of player with paper named "&6Voir les résulats" to close then run [make player execute command "/§resultOK %arg 1%"]
		
		
command /§ResultOK <player>:
	trigger:
		if {CPFC.%arg 1%} is true:
			wait 3 ticks
			open chest with 3 rows named "&6Résultat" to player
			wait 3 ticks
			open chest with 3 rows named "&6Résultat" to arg 1
				
			wait 2 ticks
			format slot 9 of player with player's skull named "&6%player%" to be unstealable
			format slot 9 of arg 1 with player's skull named "&6%player%" to be unstealable
			format slot 17 of player with skull of arg 1 named "&6%arg 1%" to be unstealable
			format slot 17 of arg 1 with skull of arg 1 named "&6%arg 1%" to be unstealable
			
			format slot 4 of player with white glass pane named "" to be unstealable
			format slot 13 of player with white glass pane named "" to be unstealable
			format slot 22 of player with white glass pane named "" to be unstealable
			
			format slot 4 of arg 1 with white glass pane named "" to be unstealable
			format slot 13 of arg 1 with white glass pane named "" to be unstealable
			format slot 22 of arg 1 with white glass pane named "" to be unstealable
			
			if {choix.%player%} is "pierre":
				format slot 11 of player with stone named "&3Pierre" to be unstealable
				format slot 11 of arg 1 with stone named "&3Pierre" to be unstealable
			else if {choix.%player%} is "papier":
				format slot 11 of player with paper named "&3Papier" to be unstealable
				format slot 11 of arg 1 with paper named "&3Papier" to be unstealable
			else if {choix.%player%} is "ciseau":
				format slot 11 of player with shears named "&3Ciseau" to be unstealable
				format slot 11 of arg 1 with shears named "&3Ciseau" to be unstealable

			if {choix.%arg 1%} is "pierre":
				format slot 15 of player with stone named "&3Pierre" to be unstealable
				format slot 15 of arg 1 with stone named "&3Pierre" to be unstealable
			else if {choix.%arg 1%} is "papier":
				format slot 15 of player with paper named "&3Papier" to be unstealable
				format slot 15 of arg 1 with paper named "&3Papier" to be unstealable
			else if {choix.%arg 1%} is "ciseau":
				format slot 15 of player with shears named "&3Ciseau" to be unstealable
				format slot 15 of arg 1 with shears named "&3Ciseau" to be unstealable
			
			wait 3 seconds
			close player's inventory
			close arg-1's inventory
				
			if {choix.%player%} is "pierre":
				if {choix.%arg 1%} is "pierre":
					send "&4[PFC] &f> &6Egalité !" to player
					send "&4[PFC] &f> &6Egalité !" to arg 1
					stop

				if {choix.%arg 1%} is "papier":
					send "&4[PFC] &f> &cPerdu !" to player
					send "&4[PFC] &f> &aGagné !" to arg 1
					add 500 to account of arg 1
					send "&4[PFC] &f> &2+500$" to arg 1
					
				if {choix.%arg 1%} is "ciseau":
					send "&4[PFC] &f> &aGagné !" to player
					send "&4[PFC] &f> &cPerdu !" to arg 1
					add 500 to player's account
					send "&4[PFC] &f> &2+500$" to player
					
			if {choix.%player%} is "papier":
				if {choix.%arg 1%} is "pierre":
					send "&4[PFC] &f> &aGagné !" to player
					send "&4[PFC] &f> &cPerdu !" to arg 1
					add 500 to player's account
					send "&4[PFC] &f> &2+500$" to player
					stop

				if {choix.%arg 1%} is "papier":
					send "&4[PFC] &f> &6Egalité !" to player
					send "&4[PFC] &f> &6Egalité !" to arg 1
					
				if {choix.%arg 1%} is "ciseau":
					send "&4[PFC] &f> &cPerdu !" to player
					send "&4[PFC] &f> &aGagné !" to arg 1
					add 500 to account of arg 1
					send "&4[PFC] &f> &2+500$" to arg 1
					
			if {choix.%player%} is "ciseau":
				if {choix.%arg 1%} is "pierre":
					send "&4[PFC] &f> &cPerdu !" to player
					send "&4[PFC] &f> &aGagné !" to arg 1
					add 500 to account of arg 1
					send "&4[PFC] &f> &2+500$" to arg 1
					stop

				if {choix.%arg 1%} is "papier":
					send "&4[PFC] &f> &aGagné !" to player
					send "&4[PFC] &f> &cPerdu !" to arg 1
					add 500 to player's account
					send "&4[PFC] &f> &2+500$" to player
				if {choix.%arg 1%} is "ciseau":
					send "&4[PFC] &f> &6Egalité !" to player
					send "&4[PFC] &f> &6Egalité !" to arg 1


			
			
			delete {demande.%arg 1%.%player%}
			delete {demande.%player%.%arg 1%}
			delete {CPFC.%player%}
			delete {CPFC.%arg 1%}
			delete {choix.%player%}
			delete {choix.%arg 1%}
			delete {InGamePFC.%player%}
			delete {InGamePFC.%arg 1%}
			
			
		else:
			send "&cLe joueur n'as pas fait sont choix !" to player
			wait 3 ticks
			open chest with 3 rows named "&6Voir Résultat" to player
			wait 2 ticks
			format slot 13 of player with paper named "&6Voir les résulats" to close then run [make player execute command "/§resultOK %arg 1%"]
			stop

 

Modifié par Wildteams
Posté(e) (modifié)

Oui, déjà j'aurai pu mettre les deux joueurs dans une variable pour évitez de faire ' send " ~~~~  " to player /   to arg 1 ' mais ' send "~~~~" to {var} '

 

Modifié par Wildteams
  • J'aime 1
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.