Aller au contenu

Messages recommandés

Posté(e) (modifié)

Version de Minecraft : 1.12.2
Version de Skript : derniere version

Type du skriptSort sur une blaze rod avec cooldown

Description du script :

Bonjour je voudrais un skript de sort avec cooldown:

Item pour les sort: Blaze Rod

 

Sort 1:

nom: &5Sort de &lSOIN

cooldown entre chaque click droit: 1 minutes

effet: instant_healt niveau 2 

 

Sort 2:

nom: &4Degat

description: si on fait un click droit sur un joueur qui est a une distance maximale de 10 block, provoquer un effect de degat instantané de niveau 2 sur le joueur

cooldown entre chaque click droit: 1 minutes 30 secondes

effet: degat instantané niveau 2 sur le joueur visée

 

Sort 3:

nom: &1Vitesse

cooldown entre chaque click droit: 2 minutes 15 secondes

effet: vitesse 2 pendant 30 secondes

 

 

Sort 4:

nom: &2Lenteur

description: si on fait un click droit sur un joueur qui est a une distance maximale de 10 block, provoquer un effect de lenteur de niveau 1 sur le joueur pendant 5 secondes

cooldown entre chaque click droit: 2 minutes

effet: vitesse 2 pendant 30 secondes

 

Sort 5:

nom: &3Coeur bonus

cooldown entre chaque click droit: 4 minutes

effet: absorption de niveau 10 pendant 1 minutes 30 secondes

 

 

Sort bonus (si possible):

nom: &aPrison

description: si on fait un click droit sur un joueur qui est a une distance maximale de 10 block, l'entourer de dale pour plus qu'il ne bougent en faisant en sorte a ce qu'il peut frapper les joueur a l'exterieur et pareil pour ceux a l'exterieur. supprimer les dalle au bout de 5 secondes

cooldown entre chaque click droit: 5 minutes

Si possible: me faire des commande avec permission pour give les 5 sort et le bonus si vous le faite. Merci

Cordialement. killian das neves

 

Modifié par strykerz_2_0
mal ecrit
Posté(e)
# - nom des sorts (si tu changes le nom, faut aussi le changer de le on rightclick (sans couleur), et durée des cooldowns
options:
  cooldownTime: 60, 90, 135, 120, 240, 300
  nameSorts: &5Sort de &lSOIN, &4Degat, &1Vitesse, &2Lenteur, &3Coeur bonus, &aPrison

# - Give baguette  
command /givesort:
	trigger:
		give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:" and "&5Sort de &lSOIN" to the player
		
# - Utilisation de la baguette		
on rightclick with blaze rod:
	if name of player's tool is "&5Baguette":
		set {_time} to "{@cooldownTime}"
		set {_time::*} to {_time} split at ", "
		set {_sort} to "{@nameSorts}"
		set {_sort::*} to {_sort} split at ", "
		loop {_sort::*}:
			if uncolored loop-value is uncolored line 2 of lore of player's tool:
				set {_cooldown} to "%{_time::%loop-index%}% seconds" parsed as timespan
		set {_waited} to difference between {cooldown::%uncolored line 2 of lore of player's tool%::%player%} and now
		if {_waited} < {_cooldown}:
			message "&cVous devez attendre avant de réutiliser ce sort: &6%uncolored line 2 of lore of player's tool%"
			stop
		
		# - Sort soin
		if uncolored line 2 of lore of player's tool is "Sort de SOIN":
			heal player by 4 hearts
			message "&aVous avez été heal" to the player
		
		# - Sort degat
		if uncolored line 2 of lore of player's tool is "Degat":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					damage targeted entity by 6 hearts
					message "&aLa cible a été touché ! (Degat)" to the player
					stop
			message "&cVous avez loupé votre cible ! (Degat)" to the player
			
		# - Sort vitesse
		if uncolored line 2 of lore of player's tool is "Vitesse":
			apply speed 2 to player for 30 seconds
			message "&aVous avez reçu un boost de vitesse" to the player
			
		# - Sort lenteur
		if uncolored line 2 of lore of player's tool is "Lenteur":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					apply slowness 1 to targeted entity for 5 seconds
					message "&aLa cible a été touché ! (Lenteur)" to the player
					stop
			message "&cVous avez loupé votre cible ! (Lenteur)" to the player
			
		# - Sort coeur bonus
		if uncolored line 2 of lore of player's tool is "Coeur bonus":
			apply absorption 10 to player for 90 seconds
			message "&aVous avez reçu un boost de vie" to the player
			
		# - Sort prison
		if uncolored line 2 of lore of player's tool is "Prison":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					set {_p} to targeted player's location
					set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p}, z-coord of {_p} + 1
					set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p}, z-coord of {_p} - 1
					loop blocks within {_pos1} to {_pos2}:
						if block at loop-block's location is air:
							add loop-block's location to {_location::*}
							set block at loop-block's location to smooth stone slab
					set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p} +2, z-coord of {_p} + 1
					set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p} +2, z-coord of {_p} - 1
					loop blocks within {_pos1} to {_pos2}:
						if block at loop-block's location is air:
							add loop-block's location to {_location::*}
							set block at loop-block's location to smooth stone slab
					set block at {_p} to air
					message "&aLa cible a été touché ! (Prison)" to the player
					set {_decompte} to 0
					while {_decompte} < 5:
						add 1 to {_decompte}
						wait 1 second
					loop {_location::*}:
						set block at {_location::%loop-index%} to air
					stop
			message "&cVous avez loupé votre cible ! (Prison)" to the player
		set {cooldown::%uncolored line 2 of lore of player's tool%::%player%} to now

# - Changement de sort		
on leftclick with blaze rod:
	if name of player's tool is "&5Baguette":
		set {_sort} to "{@nameSorts}"
		set {_sort::*} to {_sort} split at ", "
		loop {_sort::*}:
			if uncolored loop-value is uncolored line 2 of lore of player's tool:
				set {_nb} to loop-index parsed as number +1
				if loop-index parsed as number = 6:
					set {_nb} to 1
				set line 2 of lore of player's tool to "&1%{_sort::%{_nb}%}%"
				message "&6Le sort %{_sort::%{_nb}%}% &6est actif" to the player
				stop

Hésites pas à faire des retours, des trucs que tu veux en plus, à modifier etc

Posté(e) (modifié)
il y a 18 minutes, Eralysium a dit :

# - nom des sorts (si tu changes le nom, faut aussi le changer de le on rightclick (sans couleur), et durée des cooldowns
options:
  cooldownTime: 60, 90, 135, 120, 240, 300
  nameSorts: &5Sort de &lSOIN, &4Degat, &1Vitesse, &2Lenteur, &3Coeur bonus, &aPrison

# - Give baguette  
command /givesort:
	trigger:
		give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:" and "&5Sort de &lSOIN" to the player
		
# - Utilisation de la baguette		
on rightclick with blaze rod:
	if name of player's tool is "&5Baguette":
		set {_time} to "{@cooldownTime}"
		set {_time::*} to {_time} split at ", "
		set {_sort} to "{@nameSorts}"
		set {_sort::*} to {_sort} split at ", "
		loop {_sort::*}:
			if uncolored loop-value is uncolored line 2 of lore of player's tool:
				set {_cooldown} to "%{_time::%loop-index%}% seconds" parsed as timespan
		set {_waited} to difference between {cooldown::%uncolored line 2 of lore of player's tool%::%player%} and now
		if {_waited} < {_cooldown}:
			message "&cVous devez attendre avant de réutiliser ce sort: &6%uncolored line 2 of lore of player's tool%"
			stop
		
		# - Sort soin
		if uncolored line 2 of lore of player's tool is "Sort de SOIN":
			heal player by 4 hearts
			message "&aVous avez été heal" to the player
		
		# - Sort degat
		if uncolored line 2 of lore of player's tool is "Degat":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					damage targeted entity by 6 hearts
					message "&aLa cible a été touché ! (Degat)" to the player
					stop
			message "&cVous avez loupé votre cible ! (Degat)" to the player
			
		# - Sort vitesse
		if uncolored line 2 of lore of player's tool is "Vitesse":
			apply speed 2 to player for 30 seconds
			message "&aVous avez reçu un boost de vitesse" to the player
			
		# - Sort lenteur
		if uncolored line 2 of lore of player's tool is "Lenteur":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					apply slowness 1 to targeted entity for 5 seconds
					message "&aLa cible a été touché ! (Lenteur)" to the player
					stop
			message "&cVous avez loupé votre cible ! (Lenteur)" to the player
			
		# - Sort coeur bonus
		if uncolored line 2 of lore of player's tool is "Coeur bonus":
			apply absorption 10 to player for 90 seconds
			message "&aVous avez reçu un boost de vie" to the player
			
		# - Sort prison
		if uncolored line 2 of lore of player's tool is "Prison":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					set {_p} to targeted player's location
					set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p}, z-coord of {_p} + 1
					set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p}, z-coord of {_p} - 1
					loop blocks within {_pos1} to {_pos2}:
						if block at loop-block's location is air:
							add loop-block's location to {_location::*}
							set block at loop-block's location to smooth stone slab
					set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p} +2, z-coord of {_p} + 1
					set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p} +2, z-coord of {_p} - 1
					loop blocks within {_pos1} to {_pos2}:
						if block at loop-block's location is air:
							add loop-block's location to {_location::*}
							set block at loop-block's location to smooth stone slab
					set block at {_p} to air
					message "&aLa cible a été touché ! (Prison)" to the player
					set {_decompte} to 0
					while {_decompte} < 5:
						add 1 to {_decompte}
						wait 1 second
					loop {_location::*}:
						set block at {_location::%loop-index%} to air
					stop
			message "&cVous avez loupé votre cible ! (Prison)" to the player
		set {cooldown::%uncolored line 2 of lore of player's tool%::%player%} to now

# - Changement de sort		
on leftclick with blaze rod:
	if name of player's tool is "&5Baguette":
		set {_sort} to "{@nameSorts}"
		set {_sort::*} to {_sort} split at ", "
		loop {_sort::*}:
			if uncolored loop-value is uncolored line 2 of lore of player's tool:
				set {_nb} to loop-index parsed as number +1
				if loop-index parsed as number = 6:
					set {_nb} to 1
				set line 2 of lore of player's tool to "&1%{_sort::%{_nb}%}%"
				message "&6Le sort %{_sort::%{_nb}%}% &6est actif" to the player
				stop

Hésites pas à faire des retours, des trucs que tu veux en plus, à modifier etc

on pourrais mettre une permission sur la commande

 

et j'ai trois erreurs: 

':" and "&5Sort de &lSOIN"' is not a valid item data (sort.sk line 9: give 1 blaze rod nemed "&5Baguette" with lore "&6Sort actif:" and "&5Sort de &lSOIN" to the player')

Can't understand this loop: 'loop blocks within {_pos1} to {_pos2}:' (sort.sk, line 66: loop blocks within {_pos1} to {_pos2}:')

Can't understand this loop: 'loop blocks within {_pos1} to {_pos2}' (sort.sk, line 72 loop blocks within {_pos1} to {_pos2}:')

 

Modifié par strykerz_2_0
Posté(e) (modifié)
command /givesort:
	permissions: blabla
	trigger:
		give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:" and "&5Sort de &lSOIN" to the player

Pour le reste ça doit être du à ta version de skript. 
Essaye pour le lore de faire

give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:%nl%&5Sort de &lSOIN" to the player
ou
give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:||&5Sort de &lSOIN" to the player

Et dis moi si y en a un des deux qui te crée bien 2 lignes dans le lore

Et pour le système de prison si cette syntaxe fonctionne pas dans ta version je te ferai un autre système (surement un peu sale x) )

Modifié par Eralysium
Posté(e) (modifié)
Il y a 2 heures, Eralysium a dit :

command /givesort:
	permissions: blabla
	trigger:
		give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:" and "&5Sort de &lSOIN" to the player

Pour le reste ça doit être du à ta version de skript. 
Essaye pour le lore de faire


give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:%nl%&5Sort de &lSOIN" to the player
ou
give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:||&5Sort de &lSOIN" to the player

Et dis moi si y en a un des deux qui te crée bien 2 lignes dans le lore

Et pour le système de prison si cette syntaxe fonctionne pas dans ta version je te ferai un autre système (surement un peu sale x) )

Rien ne marche😥...

Modifié par strykerz_2_0
Posté(e)

merde y a pas de s à permission, et pour l'autre erreur c'est juste un problème de nom:
rajoute ça:
 

on rightclick:
	broadcast "%event-block%"

Puis tu cliques sur la dalle de stone lisse (clique droit), et tu remplaces dans le skript "smooth stone slab" par le nom que skript a renvoyé
(après vire ce bout de code)

Posté(e)
il y a 3 minutes, Eralysium a dit :

merde y a pas de s à permission, et pour l'autre erreur c'est juste un problème de nom:
rajoute ça:
 


on rightclick:
	broadcast "%event-block%"

Puis tu cliques sur la dalle de stone lisse (clique droit), et tu remplaces dans le skript "smooth stone slab" par le nom que skript a renvoyé
(après vire ce bout de code)

j'ai pas compris XD y a pas moyen que tu fasse le changement et que tu me renvois le code stp je suis nul en skript pour l'instant

Posté(e)

bah tu ajoutes

on rightclick:
	broadcast "%event-block%"

au skript. Tu reloads. Tu fais un clique droit sur une dalle de pierre lisse et tu me dis ce que ça écrit dans le chat

Posté(e)
il y a 3 minutes, Eralysium a dit :

bah tu ajoutes


on rightclick:
	broadcast "%event-block%"

au skript. Tu reloads. Tu fais un clique droit sur une dalle de pierre lisse et tu me dis ce que ça écrit dans le chat

quand je pose la dalle

double stone brick slab item

quand je fais click droit

stone slab item

Posté(e)
# - nom des sorts (si tu changes le nom, faut aussi le changer de le on rightclick (sans couleur), et durée des cooldowns
options:
  cooldownTime: 60, 90, 135, 120, 240, 300
  nameSorts: &5Sort de &lSOIN, &4Degat, &1Vitesse, &2Lenteur, &3Coeur bonus, &aPrison

# - Give baguette  
command /givesort:
	permission: blabla
	trigger:
		give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:" and "&5Sort de &lSOIN" to the player
		
# - Utilisation de la baguette		
on rightclick with blaze rod:
	if name of player's tool is "&5Baguette":
		set {_time} to "{@cooldownTime}"
		set {_time::*} to {_time} split at ", "
		set {_sort} to "{@nameSorts}"
		set {_sort::*} to {_sort} split at ", "
		loop {_sort::*}:
			if uncolored loop-value is uncolored line 2 of lore of player's tool:
				set {_cooldown} to "%{_time::%loop-index%}% seconds" parsed as timespan
		set {_waited} to difference between {cooldown::%uncolored line 2 of lore of player's tool%::%player%} and now
		if {_waited} < {_cooldown}:
			message "&cVous devez attendre avant de réutiliser ce sort: &6%uncolored line 2 of lore of player's tool%"
			stop
		
		# - Sort soin
		if uncolored line 2 of lore of player's tool is "Sort de SOIN":
			heal player by 4 hearts
			message "&aVous avez été heal" to the player
		
		# - Sort degat
		if uncolored line 2 of lore of player's tool is "Degat":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					damage targeted entity by 6 hearts
					message "&aLa cible a été touché ! (Degat)" to the player
					stop
			message "&cVous avez loupé votre cible ! (Degat)" to the player
			
		# - Sort vitesse
		if uncolored line 2 of lore of player's tool is "Vitesse":
			apply speed 2 to player for 30 seconds
			message "&aVous avez reçu un boost de vitesse" to the player
			
		# - Sort lenteur
		if uncolored line 2 of lore of player's tool is "Lenteur":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					apply slowness 1 to targeted entity for 5 seconds
					message "&aLa cible a été touché ! (Lenteur)" to the player
					stop
			message "&cVous avez loupé votre cible ! (Lenteur)" to the player
			
		# - Sort coeur bonus
		if uncolored line 2 of lore of player's tool is "Coeur bonus":
			apply absorption 10 to player for 90 seconds
			message "&aVous avez reçu un boost de vie" to the player
			
		# - Sort prison
		if uncolored line 2 of lore of player's tool is "Prison":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					set {_p} to targeted player's location
					set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p}, z-coord of {_p} + 1
					set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p}, z-coord of {_p} - 1
					loop blocks within {_pos1} to {_pos2}:
						if block at loop-block's location is air:
							add loop-block's location to {_location::*}
							set block at loop-block's location to stone slab
					set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p} +2, z-coord of {_p} + 1
					set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p} +2, z-coord of {_p} - 1
					loop blocks within {_pos1} to {_pos2}:
						if block at loop-block's location is air:
							add loop-block's location to {_location::*}
							set block at loop-block's location to stone slab
					set block at {_p} to air
					message "&aLa cible a été touché ! (Prison)" to the player
					set {_decompte} to 0
					while {_decompte} < 5:
						add 1 to {_decompte}
						wait 1 second
					loop {_location::*}:
						set block at {_location::%loop-index%} to air
					stop
			message "&cVous avez loupé votre cible ! (Prison)" to the player
		set {cooldown::%uncolored line 2 of lore of player's tool%::%player%} to now

# - Changement de sort		
on leftclick with blaze rod:
	if name of player's tool is "&5Baguette":
		set {_sort} to "{@nameSorts}"
		set {_sort::*} to {_sort} split at ", "
		loop {_sort::*}:
			if uncolored loop-value is uncolored line 2 of lore of player's tool:
				set {_nb} to loop-index parsed as number +1
				if loop-index parsed as number = 6:
					set {_nb} to 1
				set line 2 of lore of player's tool to "&1%{_sort::%{_nb}%}%"
				message "&6Le sort %{_sort::%{_nb}%}% &6est actif" to the player
				stop

 

  • J'aime 1
Posté(e)
il y a 25 minutes, Eralysium a dit :

# - nom des sorts (si tu changes le nom, faut aussi le changer de le on rightclick (sans couleur), et durée des cooldowns
options:
  cooldownTime: 60, 90, 135, 120, 240, 300
  nameSorts: &5Sort de &lSOIN, &4Degat, &1Vitesse, &2Lenteur, &3Coeur bonus, &aPrison

# - Give baguette  
command /givesort:
	permission: blabla
	trigger:
		give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:" and "&5Sort de &lSOIN" to the player
		
# - Utilisation de la baguette		
on rightclick with blaze rod:
	if name of player's tool is "&5Baguette":
		set {_time} to "{@cooldownTime}"
		set {_time::*} to {_time} split at ", "
		set {_sort} to "{@nameSorts}"
		set {_sort::*} to {_sort} split at ", "
		loop {_sort::*}:
			if uncolored loop-value is uncolored line 2 of lore of player's tool:
				set {_cooldown} to "%{_time::%loop-index%}% seconds" parsed as timespan
		set {_waited} to difference between {cooldown::%uncolored line 2 of lore of player's tool%::%player%} and now
		if {_waited} < {_cooldown}:
			message "&cVous devez attendre avant de réutiliser ce sort: &6%uncolored line 2 of lore of player's tool%"
			stop
		
		# - Sort soin
		if uncolored line 2 of lore of player's tool is "Sort de SOIN":
			heal player by 4 hearts
			message "&aVous avez été heal" to the player
		
		# - Sort degat
		if uncolored line 2 of lore of player's tool is "Degat":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					damage targeted entity by 6 hearts
					message "&aLa cible a été touché ! (Degat)" to the player
					stop
			message "&cVous avez loupé votre cible ! (Degat)" to the player
			
		# - Sort vitesse
		if uncolored line 2 of lore of player's tool is "Vitesse":
			apply speed 2 to player for 30 seconds
			message "&aVous avez reçu un boost de vitesse" to the player
			
		# - Sort lenteur
		if uncolored line 2 of lore of player's tool is "Lenteur":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					apply slowness 1 to targeted entity for 5 seconds
					message "&aLa cible a été touché ! (Lenteur)" to the player
					stop
			message "&cVous avez loupé votre cible ! (Lenteur)" to the player
			
		# - Sort coeur bonus
		if uncolored line 2 of lore of player's tool is "Coeur bonus":
			apply absorption 10 to player for 90 seconds
			message "&aVous avez reçu un boost de vie" to the player
			
		# - Sort prison
		if uncolored line 2 of lore of player's tool is "Prison":
			loop all players in radius 10 around the player:
				if loop-player is targeted entity:
					set {_p} to targeted player's location
					set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p}, z-coord of {_p} + 1
					set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p}, z-coord of {_p} - 1
					loop blocks within {_pos1} to {_pos2}:
						if block at loop-block's location is air:
							add loop-block's location to {_location::*}
							set block at loop-block's location to stone slab
					set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p} +2, z-coord of {_p} + 1
					set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p} +2, z-coord of {_p} - 1
					loop blocks within {_pos1} to {_pos2}:
						if block at loop-block's location is air:
							add loop-block's location to {_location::*}
							set block at loop-block's location to stone slab
					set block at {_p} to air
					message "&aLa cible a été touché ! (Prison)" to the player
					set {_decompte} to 0
					while {_decompte} < 5:
						add 1 to {_decompte}
						wait 1 second
					loop {_location::*}:
						set block at {_location::%loop-index%} to air
					stop
			message "&cVous avez loupé votre cible ! (Prison)" to the player
		set {cooldown::%uncolored line 2 of lore of player's tool%::%player%} to now

# - Changement de sort		
on leftclick with blaze rod:
	if name of player's tool is "&5Baguette":
		set {_sort} to "{@nameSorts}"
		set {_sort::*} to {_sort} split at ", "
		loop {_sort::*}:
			if uncolored loop-value is uncolored line 2 of lore of player's tool:
				set {_nb} to loop-index parsed as number +1
				if loop-index parsed as number = 6:
					set {_nb} to 1
				set line 2 of lore of player's tool to "&1%{_sort::%{_nb}%}%"
				message "&6Le sort %{_sort::%{_nb}%}% &6est actif" to the player
				stop

 

il me reste 1 erreur:

';" and "&5Sort de &lSOIN"' is not a valid item data (sort.sk, line 10: give 1 blaze rod named "&5Baguette" with lore "&6Sort actif:" and "&5Sort de &lSOIN

Posté(e)
# - Give baguette  
command /givesort:
	permission: blabla
	trigger:
		set {_item} to blaze rod named "&5Baguette" with lore "&6Sort actif:"
		add "&5Sort de &lSOIN" to {_item}'s lore
		give {_item} to the player

 

Posté(e)
à l’instant, Eralysium a dit :

# - Give baguette  
command /givesort:
	permission: blabla
	trigger:
		set {_item} to blaze rod named "&5Baguette" with lore "&6Sort actif:"
		add "&5Sort de &lSOIN" to {_item}'s lore
		give {_item} to the player

 

meme erreur

Posté(e)

Eralysium ma fini le code sur discord voila le code:

en tout cas merci a lui de m'avoir aider

# - nom des sorts (si tu changes le nom, faut aussi le changer de le on rightclick (sans couleur), et durée des cooldowns
options:
  cooldownTime: 60, 90, 135, 120, 240, 300
  nameSorts: &5Sort de &lSOIN, &4Degat, &1Vitesse, &2Lenteur, &3Coeur bonus, &aPrison

# - Give baguette  
command /givesort:
    permission: blabla
    trigger:
        set {_item} to blaze rod named "&5Baguette"
        add "&6Sort actif:" to {_item}'s lore
        add "&5Sort de &lSOIN" to {_item}'s lore
        give {_item} to the player
        
# - Utilisation de la baguette        
on rightclick with blaze rod:
    if name of player's tool is "&5Baguette":
        set {_time} to "{@cooldownTime}"
        set {_time::*} to {_time} split at ", "
        set {_sort} to "{@nameSorts}"
        set {_sort::*} to {_sort} split at ", "
        loop {_sort::*}:
            if uncolored loop-value is uncolored line 2 of lore of player's tool:
                set {_cooldown} to "%{_time::%loop-index%}% seconds" parsed as timespan
        set {_waited} to difference between {cooldown::%uncolored line 2 of lore of player's tool%::%player%} and now
        if {_waited} < {_cooldown}:
            message "&cVous devez attendre avant de réutiliser ce sort: &6%uncolored line 2 of lore of player's tool%"
            stop
        
        # - Sort soin
        if uncolored line 2 of lore of player's tool is "Sort de SOIN":
            heal player by 4 hearts
            message "&aVous avez été heal" to the player
        
        # - Sort degat
        if uncolored line 2 of lore of player's tool is "Degat":
            loop all players in radius 10 around the player:
                if loop-player is targeted entity:
                    damage targeted entity by 6 hearts
                    message "&aLa cible a été touché ! (Degat)" to the player
                    stop
            message "&cVous avez loupé votre cible ! (Degat)" to the player
            
        # - Sort vitesse
        if uncolored line 2 of lore of player's tool is "Vitesse":
            apply speed 2 to player for 30 seconds
            message "&aVous avez reçu un boost de vitesse" to the player
            
        # - Sort lenteur
        if uncolored line 2 of lore of player's tool is "Lenteur":
            loop all players in radius 10 around the player:
                if loop-player is targeted entity:
                    apply slowness 1 to targeted entity for 5 seconds
                    message "&aLa cible a été touché ! (Lenteur)" to the player
                    stop
            message "&cVous avez loupé votre cible ! (Lenteur)" to the player
            
        # - Sort coeur bonus
        if uncolored line 2 of lore of player's tool is "Coeur bonus":
            apply absorption 10 to player for 90 seconds
            message "&aVous avez reçu un boost de vie" to the player
            
        # - Sort prison
        if uncolored line 2 of lore of player's tool is "Prison":
            loop all players in radius 10 around the player:
                if loop-player is targeted entity:
                    set {_p} to targeted player's location
                    set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p}, z-coord of {_p} + 1
                    set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p}, z-coord of {_p} - 1
                    loop blocks within {_pos1} to {_pos2}:
                        if block at loop-block's location is air:
                            add loop-block's location to {_location::*}
                            set block at loop-block's location to stone slab
                    set {_pos1} to location at x-coord of {_p} + 1, y-coord of {_p} +2, z-coord of {_p} + 1
                    set {_pos2} to location at x-coord of {_p} - 1, y-coord of {_p} +2, z-coord of {_p} - 1
                    loop blocks within {_pos1} to {_pos2}:
                        if block at loop-block's location is air:
                            add loop-block's location to {_location::*}
                            set block at loop-block's location to stone slab
                    set block at {_p} to air
                    message "&aLa cible a été touché ! (Prison)" to the player
                    set {_decompte} to 0
                    while {_decompte} < 5:
                        add 1 to {_decompte}
                        wait 1 second
                    loop {_location::*}:
                        set block at {_location::%loop-index%} to air
                    stop
            message "&cVous avez loupé votre cible ! (Prison)" to the player
        set {cooldown::%uncolored line 2 of lore of player's tool%::%player%} to now

# - Changement de sort        
on leftclick with blaze rod:
    if name of player's tool is "&5Baguette":
        set {_sort} to "{@nameSorts}"
        set {_sort::*} to {_sort} split at ", "
        loop {_sort::*}:
            if uncolored loop-value is uncolored line 2 of lore of player's tool:
                set {_nb} to loop-index parsed as number +1
                if loop-index parsed as number = 6:
                    set {_nb} to 1
                set line 2 of lore of player's tool to "&1%{_sort::%{_nb}%}%"
                message "&6Le sort %{_sort::%{_nb}%}% &6est actif" to the player
                stop

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.