Aller au contenu
  • 0

Mettre une valeur sur un chunk


Question

Posté(e) (modifié)

Version de Minecraft : 1.12.2
Version de Skript : jsp

Addons utilisés: skquerry, skrayfall, skript-npc, wildskript

Type du skript : Bonjour je suis en train de faire une location de chunk pour mon serveur mais je n'arrive pas à mettre de cooldown sur un chunk depuis l'évenement "every seconds:"

Description du script : Bonjour je suis en train de faire une location de chunk pour mon serveur mais je n'arrive pas à mettre de cooldown sur un chunk depuis l'évenement "every seconds:" Voici ce que j'ai fait:

Edit: je bloque à la fin de mon skript si dessous

#/hangsellchunk id:
command /hangsellchunk <number>:
	trigger:
		if {grade.%player%} is "{@grade-admin}":
			if {hang.%chunk at player%} is not set:
				set {hang.%chunk at player%} to true
				set {hang.%chunk at player%.id} to arg-1
			else:
				send "{@staff} Ce chunk est déjà en état de location" to player
		else:
			send "{@staff} Vous ne pouvez pas faire ceci" to player

command /hangtakechunk:
	trigger:
		if {grade.%player%} is "{@grade-admin}":
			if {hang.%chunk at player%} is true:
				delete {hang.%chunk at player%}
				delete {hang.%chunk at player%.id}
				send "{@staff} Le chunk vient d'être enlever de son état de location" to player
			else:
				send "{@staff} Ce chunk n'est pas en état de location" to player
		else:
			send "{@staff} Vous ne pouvez pas faire ceci"

on right click on iron block:
	if {hang.%chunk at event-block%} is true:
		if {hang.%chunk at event-block%.id} = 1:
			open chest with 3 rows named "&8&lHangar: &r&fZone industrielle" to player
			wait a tick
			set {_s} to 0
			loop 27 times:
				format slot {_s} of player with 1 gray stained glass pane named " " to be unstealable
				add 1 to {_s}
			if {hang.%chunk at event-block%.1::owner} is not set:
				unformat slot 11 of player
				format slot 11 of player with 1 sunflower named "&e&lRent" with lore "&8---------------", " " and "&a&nPrice: &r&a350 000&a$ &c/ week" to close then run [make console execute command "/ppsbuy %player% hangar1zi"]
				unformat slot 15 of  player
				format slot 15 of player with book named "&d&lStats" with lore "&8---------------", " ", "&6&nChest: &r&448" and "&9&nSize: &r&b16x16 &o(1 Chunk)" to be unstealable
			if {hang.%chunk at player%.1::owner} is set:
				unformat slot 15 of player
				format slot 15 of player with 1 book named "&c&nPosseded" with lore "&8---------------", " " and "&4Owner: &5%{hang.%chunk at player%::owner}%" to be unstealable

command /ppstp <player> <text>:
	permission: op
	trigger:
		if arg-2 is "hangar1zi":
			teleport player at {hang.1.co}

command /ppssetco <text>:
	permission: op
	trigger:
		if arg-1 is "hangar1zi":
			set {hang.1.co} to location at player

command /ppsbuy <player> <text>:
	permission: console
	trigger:
		if arg-2 is "hangar1zi":
			if {money::%arg-1%} >= 350000:
				set {hang.%chunk at event-block%.1::owner} to arg-1
				set {hang.%chunk at event-block%.1.cooldown} to 604800

every seconds:
	if {hang.%chunk at ???%.1.cooldown} <= 1:
		remove 1 from {hang.%chunk at ???%.1.cooldown}
	if {hang.%chunk at ????%.1.cooldown} = 0:
		delete {hang.%chunk at ???%.1::owner}

 

Modifié par Valty__
modif de code

1 réponse à 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.