Aller au contenu

Messages recommandés

Posté(e) (modifié)

Version de Minecraft : 1.8.8
Version de Skript : 2.2-Fixes-V8B

Type du skript : machien de traitement

Description du script :

Quand on click sur une stone dans une region xxx

unknown.png

quand on mes les ingredient ah droit un quartz nomé name1 a gauche charbon nome name
unknown.png

apres 10seconds
unknown.png

apres 10seconds

unknown.png

apres 10seconds
unknown.png

apres 10seconds

unknown.png

apres 10seconds sa enleve un quartz et charbon name et give un quartz name2

unknown.png

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

bonjour,

voici ton skript

on rightclick on stone:
	open virtual chest with 6 rows named "&7&lMachine de Traitement" to player
	make player execute command "/§traitement"

command /§traitement:
	trigger:
		set {inventaire.%player%} to true
		wait a tick
		add 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 and 53 to {_config::*}
		loop {_config::*}:
			format gui slot loop-value of player with light gray glass named "" to run:
				stop
		add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
		loop {_conf::*}:
			format gui slot loop-value of player with red glass named "" to run:
				stop
		format gui slot 40 of player with barrier named "&cAucun item ne peut être posé" to run:
			stop
		while {inventaire.%player%} is true:
			wait a second
			if slot 10 of current inventory of player is quartz named "name1":
				if slot 16 of current inventory of player is coal named "name":
					set {inventaire.%player%} to false
					set {while} to 10
					while {while} is more than 0:
						wait a second
						if slot 10 of current inventory of player is quartz named "name1":
							if slot 16 of current inventory of player is coal named "name":
								remove 1 from {while}
							else:
								add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
								set {inventaire.%player%} to true
								make player execute command "/§traitement"
								stop
						else:
							add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
							set {inventaire.%player%} to true
							make player execute command "/§traitement"
							stop
					format gui slot 11 of player with light green glass named "" to run:
						stop
					format gui slot 15 of player with light green glass named "" to run:
						stop
					set {while} to 10
					while {while} is more than 0:
						wait a second
						if slot 10 of current inventory of player is quartz named "name1":
							if slot 16 of current inventory of player is coal named "name":
								remove 1 from {while}
							else:
								add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
								set {inventaire.%player%} to true
								make player execute command "/§traitement"
								stop
						else:
							add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
							set {inventaire.%player%} to true
							make player execute command "/§traitement"
							stop
					format gui slot 12 of player with light green glass named "" to run:
						stop
					format gui slot 14 of player with light green glass named "" to run:
						stop
					set {while} to 10
					while {while} is more than 0:
						wait a second
						if slot 10 of current inventory of player is quartz named "name1":
							if slot 16 of current inventory of player is coal named "name":
								remove 1 from {while}
							else:
								add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
								set {inventaire.%player%} to true
								make player execute command "/§traitement"
								stop
						else:
							add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
							set {inventaire.%player%} to true
							make player execute command "/§traitement"
							stop
					format gui slot 13 of player with light green glass named "" to run:
						stop
					set {while} to 10
					while {while} is more than 0:
						wait a second
						if slot 10 of current inventory of player is quartz named "name1":
							if slot 16 of current inventory of player is coal named "name":
								remove 1 from {while}
							else:
								add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
								set {inventaire.%player%} to true
								make player execute command "/§traitement"
								stop
						else:
							add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
							set {inventaire.%player%} to true
							make player execute command "/§traitement"
							stop
					format gui slot 22 of player with light green glass named "" to run:
						stop
					set {while} to 10
					while {while} is more than 0:
						wait a second
						if slot 10 of current inventory of player is quartz named "name1":
							if slot 16 of current inventory of player is coal named "name":
								remove 1 from {while}
							else:
								add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
								set {inventaire.%player%} to true
								make player execute command "/§traitement"
								stop
						else:
							add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
							set {inventaire.%player%} to true
							make player execute command "/§traitement"
							stop
					format gui slot 31 of player with light green glass named "" to run:
						stop
					set {while} to 10
					while {while} is more than 0:
						wait a second
						if slot 10 of current inventory of player is quartz named "name1":
							if slot 16 of current inventory of player is coal named "name":
								remove 1 from {while}
							else:
								add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
								set {inventaire.%player%} to true
								make player execute command "/§traitement"
								stop
						else:
							add 11, 15, 12, 14, 13, 22 and 31 to {_conf::*}
							set {inventaire.%player%} to true
							make player execute command "/§traitement"
							stop
					format gui slot 40 of player with quartz_item named "name2" to run:
						give quartz_item named "name2" to player
						make player execute command "/§traitement"
						stop
					play raw sound "random.levelup" at player with pitch 1 volume 10
					clear {while}
					wait a second
					set {while} to 0

on inventory close:
	wait a tick
	set {inventaire.%player%} to false

command /name:
	trigger:
		give coal named "name" to player
		give quartz_item named "name1" to player

par contre il y a 2 problèmes

si le joueur quitte la machine alors les items dans les slots disparation et ne seront pas drop.

je n'arrive pas à enlever 1 charbon et 1 quartz dans les 2 slots

remove 1 of quartz_item from player's tool
remove 1 of coal from player's tool

les remove ne marche pas car sa enlève que les items dans l'inventaire et pas le menu

pour pouvoir régler ces problèmes il faudrait que je récupère le nombres de charbon et de quartz qu'il y a dans les slots (car sa peut varier) mais je n'y suis pas arriver

sinon tu as la command /name qui permet de give le charbon et le quartz renommé (Attention les renommés avec une enclume ne marche pas)

Modifié par zarco70
Posté(e)

Qu'est ce qui ne marche pas? car sinon on ne peut pas t'aider.

As-tu des erreurs? Quelque chose ne fonctionne pas correctement? Si oui, quoi?

Posté(e) (modifié)

Je ne peux pas t'aider si tu ne me dis pas d'ou vient le problème site moi ou montre un screen des erreurs.

Modifié par zarco70
  • 2 semaines aprè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.