Aller au contenu
  • 0

GUI items n'exécutent pas la commande requise


Question

Posté(e) (modifié)

Version de Minecraft : 1.8.9
Version de Skript : 2.6

Addons utilisés: ExtrasSK, Skellet, SkExtras, SkQuery, SkQuery 3&4, SkRayfall+ v1.9.14, Skript2.2, TuSKe, Umbaska, WildSkript.

Type du skript : configuration rôles lg-uhc

Description du script :

Bonjour! J'essaie de refaire un plugin lguhc en partant de rien car mon ancien script était tout pourri.
J'essaie de créer un Gui qui permet de configurer les rôles présents dans la partie et tout marche très bien! Tout? Non! Les Simples Villageois et SImples Loup-Garous réfractaires résistent encore et toujours a mes efforts!
Je vais vous expliquer ce que je pense être la racine du problème. Ses deux rôles sont les seuls à ne pas avoir d'état binaire ("on" ou "off"), en effet ils sont définis par un chiffre qui va de 0 à 3 qui représente le nombre de joueurs maximum pouvant posséder ce rôle dans la partie.
Ils ont donc chacun un GUI séparé des autres rôles mais tout de même lié au GUI principal, il y a donc dans ces GUI des items correspondant a chacun des nombres du rôle. Cliquer dessus est sensé exécuter une commande qui set le nombre maximum de SV/LG. Le problème, c'est que lorsque je clique sur l'un de ses items, non seulement la commande ne s'exécute pas mais en plus je peut bouger les items dans mon inventaire.

Enfin bref, ça ne marche comme il faut, je me casse la tête depuis 1h sur ce problème et je vous demande donc votre aide.
Merci infiniment.

Voici une version abrégée du code (version complète plus bas):

#######################
# Main
#######################



command /lg [<text>]:
	trigger:
		if arg 1 is "config":
			if player is op:
				wait 3 ticks
				open chest with 1 rows named "&eOptions de Configuration" to player
				wait 2 ticks
				format slot 0 of player with book named "&eConfiguration des rôles" to run [make player execute command "§lgconfig roles"]
				
			
			
#######################
# Menu de Config
#######################	



command /§lgconfig <text>:
	trigger:
		if arg 1 is "roles":
			open chest with 8 rows named "&eConfiguration des rôles" to player
			wait 2 ticks
			if {lguhc_config_role.Loup-Garou} is more than 0:
				format slot 18 of player with cactus green named "&cLoup-Garou" to run [make player execute command "§lgconfigroles Loup-Garou"]
			else:
				format slot 18 of player with rose red named "&cLoup-Garou" to run [make player execute command "§lgconfigroles Loup-Garou"]

			if {lguhc_config_role.SimpleVillageois} is more than 0:
				format slot 68 of player with cactus green named "&aSimple Villageois" to run [make player execute command "§lgconfigroles Simple Villageois"]
			else:
				format slot 68 of player with rose red named "&aSimple Villageois" to run [make player execute command "§lgconfigroles Simple Villageois"]
				
		
command /§lgconfigroles <text>:
	trigger:
		if arg 1 is "Simple Villageois":
			make player execute command "§configsv"
		if arg 1 is "Loup-Garou":
			make player execute command "§configlg"
			
			
command /§configsv:
	trigger:
		open chest with 1 rows named "&eSimple Villageois" to player
		format slot 0 of player with rose red named "&cSimple Villageois: 0" to run [make player execute command "§configsv2 zero"]
		format slot 1 of player with cactus green named "&eSimple Villageois: 1" to run [make player execute command "§configsv2 un"]
		format slot 2 of player with cactus green named "&eSimple Villageois: 2" to run [make player execute command "§configsv2 deux"]
		format slot 3 of player with cactus green named "&eSimple Villageois: 3" to run [make player execute command "§configsv2 trois"]
		
command /§configsv2 <text>:
	trigger:
		if arg 1 is "zero":
			set {lguhc_config_role.SimpleVillageois} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.SimpleVillageois}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "un":
			set {lguhc_config_role.SimpleVillageois} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.SimpleVillageois}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "deux":
			set {lguhc_config_role.SimpleVillageois} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.SimpleVillageois}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "trois":
			set {lguhc_config_role.SimpleVillageois} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.SimpleVillageois}%"
			make player execute command "§lgconfig roles"
			
command /§configlg [<text>]:
	trigger:
		if arg 1 is not set:
			open chest with 1 rows named "&eLoup-Garou" to player
			format slot 0 of player with rose red named "&cLoup-Garou: 0" to run [make player execute command "§configlg 0"]
			format slot 1 of player with cactus green named "&eLoup-Garou: 1" to run [make player execute command "§configlg 1"]
			format slot 2 of player with cactus green named "&eLoup-Garou: 2" to run [make player execute command "§configlg 2"]
			format slot 3 of player with cactus green named "&eLoup-Garou: 3" to run [make player execute command "§configlg 3"]
		if arg 1 is "0":
			set {lguhc_config_role.Loup-Garou} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.Loup-Garou}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "1":
			set {lguhc_config_role.Loup-Garou} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.Loup-Garou}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "2":
			set {lguhc_config_role.Loup-Garou} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.Loup-Garou}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "3":
			set {lguhc_config_role.Loup-Garou} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.Loup-Garou}%"
			make player execute command "§lgconfig roles"
			

 

 

et voici la version complète:

 

 

command /lg [<text>]:
	trigger:
		if arg 1 is "start":
			if player is op:
				set {lguhc_gamestate} to "En jeu"
				set {lguhc_whitelist} to ""
				loop all players:
					set {lguhc_whitelist} to "%{lguhc_whitelist}% %loop-player%"
				stop
		if arg 1 is "set":
			if player is op:
				set {lguhc_whitelist} to ""
				set {timer_epi.episodes} to 1
				set {lguhc_groupes_number} to 5
				set {lguhc_test_sb} to 10
				set {lguhc_annonce_roles} to false
				
				set {lguhc_nombre.Assassin} to 0
				set {lguhc_nombre.Ange} to 0
				set {lguhc_nombre.LoupGarou} to 0
				set {lguhc_nombre.VilainPetitLoup} to 0
				set {lguhc_nombre.LoupGarouFeutré} to 0
				set {lguhc_nombre.LoupGarouPerfide} to 0
				set {lguhc_nombre.LoupGarouAmnésique} to 0
				set {lguhc_nombre.InfectPèreDesLoups} to 0
				set {lguhc_nombre.LoupGarouBlanc} to 0
				set {lguhc_nombre.Voleur} to 0
				set {lguhc_nombre.Cupidon} to 0
				set {lguhc_nombre.EnfantSauvage} to 0
				set {lguhc_nombre.Voyante} to 0
				set {lguhc_nombre.Renard} to 0
				set {lguhc_nombre.Détective} to 0
				set {lguhc_nombre.MontreurDOurs} to 0
				set {lguhc_nombre.Citoyen} to 0
				set {lguhc_nombre.Sorcière} to 0
				set {lguhc_nombre.Corbeau} to 0
				set {lguhc_nombre.Ancien} to 0
				set {lguhc_nombre.Soeurs} to 0
				set {lguhc_nombre.PetiteFille} to 0
				set {lguhc_nombre.Chasseur} to 0
				set {lguhc_nombre.Chaman} to 0
				set {lguhc_nombre.Salvateur} to 0
				set {lguhc_nombre.Mineur} to 0
				set {lguhc_nombre.SimpleVillageois} to 0
				
				loop all players:
					set {lguhc_morts.%loop-player%} to 0
					set {lguhc_role.%loop-player%} to ""
				message "&aset effectué avec succès!"
				stop
		if arg 1 is "config":
			if player is op:
				wait 3 ticks
				open chest with 1 rows named "&eOptions de Configuration" to player
				wait 2 ticks
				format slot 0 of player with book named "&eConfiguration des rôles" to run [make player execute command "§lgconfig roles"]
				
			
			
#######################
# Menu de Config
#######################	



command /§lgconfig <text>:
	trigger:
		if arg 1 is "roles":
			open chest with 8 rows named "&eConfiguration des rôles" to player
			wait 2 ticks
			if {lguhc_config_role.Assassin} is "on":
				format slot 0 of player with cactus green named "&6Assassin" to run [make player execute command "§lgconfigroles Assassin"]
			else:
				format slot 0 of player with rose red named "&6Assassin" to run [make player execute command "§lgconfigroles Assassin"]

			if {lguhc_config_role.Ange} is "on":
				format slot 1 of player with cactus green named "&6Ange" to run [make player execute command "§lgconfigroles Ange"]
			else:
				format slot 1 of player with rose red named "&6Ange" to run [make player execute command "§lgconfigroles Ange"]

			if {lguhc_config_role.Loup-Garou} is more than 0:
				format slot 18 of player with cactus green named "&cLoup-Garou" to run [make player execute command "§lgconfigroles Loup-Garou"]
			else:
				format slot 18 of player with rose red named "&cLoup-Garou" to run [make player execute command "§lgconfigroles Loup-Garou"]

			if {lguhc_config_role.VilainPetitLoup} is "on":
				format slot 19 of player with cactus green named "&cVilain Petit Loup" to run [make player execute command "§lgconfigroles Vilain Petit Loup"]
			else:
				format slot 19 of player with rose red named "&cVilain Petit Loup" to run [make player execute command "§lgconfigroles Vilain Petit Loup"]
			wait 2 ticks
			if {lguhc_config_role.Loup-GarouFeutré} is "on":
				format slot 20 of player with cactus green named "&cLoup-Garou Feutré" to run [make player execute command "§lgconfigroles Loup-Garou Feutré"]
			else:
				format slot 20 of player with rose red named "&cLoup-Garou Feutré" to run [make player execute command "§lgconfigroles Loup-Garou Feutré"]

			if {lguhc_config_role.Loup-GarouPerfide} is "on":
				format slot 21 of player with cactus green named "&cLoup-Garou Perfide" to run [make player execute command "§lgconfigroles Loup-Garou Perfide"]
			else:
				format slot 21 of player with rose red named "&cLoup-Garou Perfide" to run [make player execute command "§lgconfigroles Loup-Garou Perfide"]

			if {lguhc_config_role.InfectPèreDesLoups} is "on":
				format slot 22 of player with cactus green named "&cInfect Père des Loups" to run [make player execute command "§lgconfigroles Infect Père des Loups"]
			else:
				format slot 22 of player with rose red named "&cInfect Père des Loups" to run [make player execute command "§lgconfigroles Infect Père des Loups"]

			if {lguhc_config_role.Loup-GarouAmnésique} is "on":
				format slot 23 of player with cactus green named "&cLoup-Garou Amnésique" to run [make player execute command "§lgconfigroles Loup-Garou Amnésique"]
			else:
				format slot 23 of player with rose red named "&cLoup-Garou Amnésique" to run [make player execute command "§lgconfigroles Loup-Garou Amnésique"]
			wait 2 ticks
			if {lguhc_config_role.Loup-GarouBlanc} is "on":
				format slot 24 of player with cactus green named "&cLoup-Garou Blanc" to run [make player execute command "§lgconfigroles Loup-Garou Blanc"]
			else:
				format slot 24 of player with rose red named "&cLoup-Garou Blanc" to run [make player execute command "§lgconfigroles Loup-Garou Blanc"]

			if {lguhc_config_role.EnfantSauvage} is "on":
				format slot 36 of player with cactus green named "&eEnfant Sauvage" to run [make player execute command "§lgconfigroles Enfant Sauvage"]
			else:
				format slot 36 of player with rose red named "&eEnfant Sauvage" to run [make player execute command "§lgconfigroles Enfant Sauvage"]

			if {lguhc_config_role.Cupidon} is "on":
				format slot 37 of player with cactus green named "&eCupidon" to run [make player execute command "§lgconfigroles Cupidon"]
			else:
				format slot 37 of player with rose red named "&eCupidon" to run [make player execute command "§lgconfigroles Cupidon"]

			if {lguhc_config_role.Voleur} is "on":
				format slot 38 of player with cactus green named "&eVoleur" to run [make player execute command "§lgconfigroles Voleur"]
			else:
				format slot 38 of player with rose red named "&eVoleur" to run [make player execute command "§lgconfigroles Voleur"]
			wait 2 ticks
			if {lguhc_config_role.Voyante} is "on":
				format slot 54 of player with cactus green named "&aVoyante" to run [make player execute command "§lgconfigroles Voyante"]
			else:
				format slot 54 of player with rose red named "&aVoyante" to run [make player execute command "§lgconfigroles Voyante"]

			if {lguhc_config_role.Détective} is "on":
				format slot 55 of player with cactus green named "&aDétective" to run [make player execute command "§lgconfigroles Détective"]
			else:
				format slot 55 of player with rose red named "&aDétective" to run [make player execute command "§lgconfigroles Détective"]

			if {lguhc_config_role.Renard} is "on":
				format slot 56 of player with cactus green named "&aRenard" to run [make player execute command "§lgconfigroles Renard"]
			else:
				format slot 56 of player with rose red named "&aRenard" to run [make player execute command "§lgconfigroles Renard"]

			if {lguhc_config_role.MontreurDOurs} is "on":
				format slot 57 of player with cactus green named "&aMontreur d'Ours" to run [make player execute command "§lgconfigroles Montreur d'Ours"]
			else:
				format slot 57 of player with rose red named "&aMontreur d'Ours" to run [make player execute command "§lgconfigroles Montreur d'Ours"]
			wait 2 ticks
			if {lguhc_config_role.Citoyen} is "on":
				format slot 58 of player with cactus green named "&aCitoyen" to run [make player execute command "§lgconfigroles Citoyen"]
			else:
				format slot 58 of player with rose red named "&aCitoyen" to run [make player execute command "§lgconfigroles Citoyen"]

			if {lguhc_config_role.Corbeau} is "on":
				format slot 59 of player with cactus green named "&aCorbeau" to run [make player execute command "§lgconfigroles Corbeau"]
			else:
				format slot 59 of player with rose red named "&aCorbeau" to run [make player execute command "§lgconfigroles Corbeau"]

			if {lguhc_config_role.Sorcière} is "on":
				format slot 60 of player with cactus green named "&aSorcière" to run [make player execute command "§lgconfigroles Sorcière"]
			else:
				format slot 60 of player with rose red named "&aSorcière" to run [make player execute command "§lgconfigroles Sorcière"]

			if {lguhc_config_role.Ancien} is "on":
				format slot 61 of player with cactus green named "&aAncien" to run [make player execute command "§lgconfigroles Ancien"]
			else:
				format slot 61 of player with rose red named "&aAncien" to run [make player execute command "§lgconfigroles Ancien"]
			wait 2 ticks
			if {lguhc_config_role.Soeurs} is "on":
				format slot 62 of player with cactus green named "&aSoeurs" to run [make player execute command "§lgconfigroles Soeurs"]
			else:
				format slot 62 of player with rose red named "&aSoeurs" to run [make player execute command "§lgconfigroles Soeurs"]

			if {lguhc_config_role.PetiteFille} is "on":
				format slot 63 of player with cactus green named "&aPetite Fille" to run [make player execute command "§lgconfigroles Petite Fille"]
			else:
				format slot 63 of player with rose red named "&aPetite Fille" to run [make player execute command "§lgconfigroles Petite Fille"]

			if {lguhc_config_role.Chasseur} is "on":
				format slot 64 of player with cactus green named "&aChasseur" to run [make player execute command "§lgconfigroles Chasseur"]
			else:
				format slot 64 of player with rose red named "&aChasseur" to run [make player execute command "§lgconfigroles Chasseur"]

			if {lguhc_config_role.Chaman} is "on":
				format slot 65 of player with cactus green named "&aChaman" to run [make player execute command "§lgconfigroles Chaman"]
			else:
				format slot 65 of player with rose red named "&aChaman" to run [make player execute command "§lgconfigroles Chaman"]
			wait 2 ticks
			if {lguhc_config_role.Salvateur} is "on":
				format slot 66 of player with cactus green named "&aSalvateur" to run [make player execute command "§lgconfigroles Salvateur"]
			else:
				format slot 66 of player with rose red named "&aSalvateur" to run [make player execute command "§lgconfigroles Salvateur"]

			if {lguhc_config_role.Mineur} is "on":
				format slot 67 of player with cactus green named "&aMineur" to run [make player execute command "§lgconfigroles Mineur"]
			else:
				format slot 67 of player with rose red named "&aMineur" to run [make player execute command "§lgconfigroles Mineur"]

			if {lguhc_config_role.SimpleVillageois} is more than 0:
				format slot 68 of player with cactus green named "&aSimple Villageois" to run [make player execute command "§lgconfigroles Simple Villageois"]
			else:
				format slot 68 of player with rose red named "&aSimple Villageois" to run [make player execute command "§lgconfigroles Simple Villageois"]
				
		
command /§lgconfigroles <text>:
	trigger:
		if arg 1 is "Assassin":
			if {lguhc_config_role.Assassin} is "on":
				set {lguhc_config_role.Assassin} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Assassin} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Assassin}%"
		if arg 1 is "Ange":
			if {lguhc_config_role.Ange} is "on":
				set {lguhc_config_role.Ange} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Ange} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Ange}%"
		if arg 1 is "Vilain Petit Loup":
			if {lguhc_config_role.VilainPetitLoup} is "on":
				set {lguhc_config_role.VilainPetitLoup} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.VilainPetitLoup} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.VilainPetitLoup}%"
		if arg 1 is "Loup-Garou Feutré":
			if {lguhc_config_role.Loup-GarouFeutré} is "on":
				set {lguhc_config_role.Loup-GarouFeutré} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Loup-GarouFeutré} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Loup-GarouFeutré}%"
		if arg 1 is "Loup-Garou Perfide":
			if {lguhc_config_role.Loup-GarouPerfide} is "on":
				set {lguhc_config_role.Loup-GarouPerfide} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Loup-GarouPerfide} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Loup-GarouPerfide}%"
		if arg 1 is "Infect Père des Loups":
			if {lguhc_config_role.InfectPèreDesLoups} is "on":
				set {lguhc_config_role.InfectPèreDesLoups} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.InfectPèreDesLoups} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.InfectPèreDesLoups}%"
		if arg 1 is "Loup-Garou Amnésique":
			if {lguhc_config_role.Loup-GarouAmnésique} is "on":
				set {lguhc_config_role.Loup-GarouAmnésique} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Loup-GarouAmnésique} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Loup-GarouAmnésique}%"
		if arg 1 is "Loup-Garou Blanc":
			if {lguhc_config_role.Loup-GarouBlanc} is "on":
				set {lguhc_config_role.Loup-GarouBlanc} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Loup-GarouBlanc} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Loup-GarouBlanc}%"
		if arg 1 is "Enfant Sauvage":
			if {lguhc_config_role.EnfantSauvage} is "on":
				set {lguhc_config_role.EnfantSauvage} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.EnfantSauvage} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.EnfantSauvage}%"
		if arg 1 is "Cupidon":
			if {lguhc_config_role.Cupidon} is "on":
				set {lguhc_config_role.Cupidon} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Cupidon} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Cupidon}%"
		if arg 1 is "Voleur":
			if {lguhc_config_role.Voleur} is "on":
				set {lguhc_config_role.Voleur} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Voleur} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Voleur}%"
		if arg 1 is "Voyante":
			if {lguhc_config_role.Voyante} is "on":
				set {lguhc_config_role.Voyante} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Voyante} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Voyante}%"
		if arg 1 is "Détective":
			if {lguhc_config_role.Détective} is "on":
				set {lguhc_config_role.Détective} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Détective} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Détective}%"
		if arg 1 is "Renard":
			if {lguhc_config_role.Renard} is "on":
				set {lguhc_config_role.Renard} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Renard} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Renard}%"
		if arg 1 is "Montreur d'Ours":
			if {lguhc_config_role.MontreurDOurs} is "on":
				set {lguhc_config_role.MontreurDOurs} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.MontreurDOurs} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.MontreurDOurs}%"
		if arg 1 is "Citoyen":
			if {lguhc_config_role.Citoyen} is "on":
				set {lguhc_config_role.Citoyen} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Citoyen} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Citoyen}%"
		if arg 1 is "Corbeau":
			if {lguhc_config_role.Corbeau} is "on":
				set {lguhc_config_role.Corbeau} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Corbeau} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Corbeau}%"
		if arg 1 is "Sorcière":
			if {lguhc_config_role.Sorcière} is "on":
				set {lguhc_config_role.Sorcière} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Sorcière} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Sorcière}%"
		if arg 1 is "Ancien":
			if {lguhc_config_role.Ancien} is "on":
				set {lguhc_config_role.Ancien} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Ancien} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Ancien}%"
		if arg 1 is "Soeurs":
			if {lguhc_config_role.Soeurs} is "on":
				set {lguhc_config_role.Soeurs} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Soeurs} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Soeurs}%"
		if arg 1 is "Petite Fille":
			if {lguhc_config_role.PetiteFille} is "on":
				set {lguhc_config_role.PetiteFille} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.PetiteFille} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.PetiteFille}%"
		if arg 1 is "Chasseur":
			if {lguhc_config_role.Chasseur} is "on":
				set {lguhc_config_role.Chasseur} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Chasseur} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Chasseur}%"
		if arg 1 is "Chaman":
			if {lguhc_config_role.Chaman} is "on":
				set {lguhc_config_role.Chaman} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Chaman} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Chaman}%"
		if arg 1 is "Salvateur":
			if {lguhc_config_role.Salvateur} is "on":
				set {lguhc_config_role.Salvateur} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Salvateur} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Salvateur}%"
		if arg 1 is "Mineur":
			if {lguhc_config_role.Mineur} is "on":
				set {lguhc_config_role.Mineur} to "off"
				make player execute command "§lgconfig roles"
			else:
				set {lguhc_config_role.Mineur} to "on"
				make player execute command "§lgconfig roles"
			message "{@lgTitle} &3%arg 1%: &e%{lguhc_config_role.Mineur}%"
		if arg 1 is "Simple Villageois":
			make player execute command "§configsv"
		if arg 1 is "Loup-Garou":
			make player execute command "§configlg"
			
			
command /§configsv:
	trigger:
		open chest with 1 rows named "&eSimple Villageois" to player
		format slot 0 of player with rose red named "&cSimple Villageois: 0" to run [make player execute command "§configsv2 zero"]
		format slot 1 of player with cactus green named "&eSimple Villageois: 1" to run [make player execute command "§configsv2 un"]
		format slot 2 of player with cactus green named "&eSimple Villageois: 2" to run [make player execute command "§configsv2 deux"]
		format slot 3 of player with cactus green named "&eSimple Villageois: 3" to run [make player execute command "§configsv2 trois"]
		
command /§configsv2 <text>:
	trigger:
		if arg 1 is "zero":
			set {lguhc_config_role.SimpleVillageois} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.SimpleVillageois}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "un":
			set {lguhc_config_role.SimpleVillageois} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.SimpleVillageois}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "deux":
			set {lguhc_config_role.SimpleVillageois} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.SimpleVillageois}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "trois":
			set {lguhc_config_role.SimpleVillageois} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.SimpleVillageois}%"
			make player execute command "§lgconfig roles"
			
command /§configlg [<text>]:
	trigger:
		if arg 1 is not set:
			open chest with 1 rows named "&eLoup-Garou" to player
			format slot 0 of player with rose red named "&cLoup-Garou: 0" to run [make player execute command "§configlg 0"]
			format slot 1 of player with cactus green named "&eLoup-Garou: 1" to run [make player execute command "§configlg 1"]
			format slot 2 of player with cactus green named "&eLoup-Garou: 2" to run [make player execute command "§configlg 2"]
			format slot 3 of player with cactus green named "&eLoup-Garou: 3" to run [make player execute command "§configlg 3"]
		if arg 1 is "0":
			set {lguhc_config_role.Loup-Garou} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.Loup-Garou}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "1":
			set {lguhc_config_role.Loup-Garou} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.Loup-Garou}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "2":
			set {lguhc_config_role.Loup-Garou} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.Loup-Garou}%"
			make player execute command "§lgconfig roles"
		if arg 1 is "3":
			set {lguhc_config_role.Loup-Garou} to arg 1
			message "{@lgTitle} &3Nombre de Simples Villageois: &e%{lguhc_config_role.Loup-Garou}%"
			make player execute command "§lgconfig roles"
			

 

Modifié par PamplemousseUHC

2 réponses à cette question

Messages recommandés

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.