Aller au contenu
  • 0

Problème d'actualisation d'un hologram


Question

Posté(e)

Version de Minecraft : 1.8.9
Version de Skript : 2.2-dev27

Addons utilisés: Skript, SkDragon, skript-db, SkQuery, SkriptJSON, SkMorkaz, SK-NBeeT, RandomSK, skript-yaml, SkStuff, Skent, Skellett, HolographicDisplay, HolographicExtension, HolographicDisplaysAddon, SkRayFall, Umbaska, Tuske

Type du skript : j'aimerais qu'on m'aide a faire en sorte que sa s'actualise.

Description du script :

J'aimerais que avec une commande on puisse actualiser les joueurs et les nombres de coins sur un hologramme ou il y a les 3 joueurs les plus riches du serveur, il n'y a aucune erreur mes cela ne veut pas s'actualiser

 

Si vous pourriez m'aidez sa serais super cool ! 🙂

Voici le code:

on load:
	wait 10 seconds
	make console execute command "holo top3 coinsreload" 

command /holo [<text>] [<text>]:
	trigger:
		if {rank.%player%} is not "11":	
			send "&fCommande inconnue."
		if {rank.%player%} is "11":
			if arg 1 is not set:
				send "&cErreur: &f/holo top3 coins"
			if arg 1 is "top3":
				if arg 2 is not set:
					send "&cErreur: &f/holo top3 coins"
				if arg 2 is "coinsreset":
					set {top3coins.1} to 0
					set {top3coins.1.%player%} to "&c----------"
					set {top3coins.2} to 0
					set {top3coins.2.%player%} to "&c----------"
					set {top3coins.3} to 0
					set {top3coins.3.%player%} to "&c----------"
					set {loc.top3} to {loc.top3}
					delete holo object "top3.coins"
					create holo object "&6&lTop 3 !;&7(Plus riche du serveur ""&6coins&7"");&b;&a1er: &f%{top3coins.1.%player%}% &favec &6%{top3coins.1}% &6coins;&62eme: &f%{top3coins.2.%player%}% &favec &6%{top3coins.2}% &6coins;&c3eme: &f%{top3coins.3.%player%}% &favec &6%{top3coins.3}% &6coins;&c;&7Classement actualiser tout les &f10 minutes &7!" with id "top3.coins" at {loc.top3}
					send "&8[&bHoloCoins&8] &fLe classement à été rénitialiser !"
				if arg 2 is "coinsreload":
					set {loc.top3} to {loc.top3}
					delete holo object "top3.coins"
					create holo object "&6&lTop 3 !;&7(Plus riche du serveur ""&6coins&7"");&b;&a1er: &f%{top3coins.1.%player%}% &favec &6%{top3coins.1}% &6coins;&62eme: &f%{top3coins.2.%player%}% &favec &6%{top3coins.2}% &6coins;&c3eme: &f%{top3coins.3.%player%}% &favec &6%{top3coins.3}% &6coins;&c;&7Classement actualiser tout les &f10 minutes &7!" with id "top3.coins" at {loc.top3}	
					send "&8[&bHoloCoins&8] &fLe classement viens d'être recharger !"
				if arg 2 is "setloccoins":
					# if {loc.top3} is not set:
						# set {loc.top3} to location of player
					set {loc.top3} to location of player
					delete holo object "top3.coins"
					create holo object "&6&lTop 3 !;&7(Plus riche du serveur ""&6coins&7"");&b;&a1er: &f%{top3coins.1.%player%}% &favec &6%{top3coins.1}% &6coins;&62eme: &f%{top3coins.2.%player%}% &favec &6%{top3coins.2}% &6coins;&c3eme: &f%{top3coins.3.%player%}% &favec &6%{top3coins.3}% &6coins;&c;&7Classement actualiser tout les &f10 minutes &7!" with id "top3.coins" at {loc.top3}
					send "&8[&bHoloCoins&8] &fVous venez de changer de place l'hologram ""&bCoins&f"" !"
				if arg 2 is "del":
					delete holo object "top3.coins;&c;&7Classement actualiser tout les &f10 minutes &7!"
					
command /actu [<text>]:
	trigger:
		if {rank.%player%} is not "11":	
			send "&fCommande inconnue."
		if {rank.%player%} is "11":
			send "&8[&bHoloCoins&8] &fHologram ""&bCoins&f"" actualiser !"
			set {_p} to player
			set {_puuid} to player's uuid
			set {_top3} to {coins.%{_puuid}%}
			if {_top3} != {top3coins.1} or {top3coins.2} or {top3coins.3}:
				if {_top3} > {top3coins.1}:
					if {top3coins.1.%player%} = {_p}:
						do [set {top3coins.1} to {_top3}]->[set {top3coins.1.%player%} to {_p}]
					else:
						do [set {top3coins.3} to {top3coins.2}]->[set {top3coins.3.%player%} to {top3coins.2.%player%}]->[set {top3coins.2} to {top3coins.1}]->[set {top3coins.2.%player%} to {top3coins.1.%player%}]->[set {top3coins.1} to {_top3}]->[set {top3coins.1.%player%} to {_p}]
				else if {_top3} > {top3coins.2}:
					if {top3coins.2.%player%} = {_p}:
						do [set {top3coins.2} to {_top3}]->[set {top3coins.2.%player%} to {_p}]
					else:
						do [set {top3coins.3} to {top3coins.2}]->[set {top3coins.3.%player%} to {top3coins.2.%player%}]->[set {top3coins.2} to {_top3}]->[set {top3coins.2.%player%} to {_p}]
				else if {_top3} > {top3coins.3}:
					if {top3coins.3.%player%} = {_p}:
						do [set {top3coins.3} to {_top3}]->[set {top3coins.3.%player%} to {_p}]
					else:
						do [set {top3coins.3} to {_top3}]->[set {top3coins.3.%player%} to {_p}]
			make player execute command "/holo top3 coinsreload"

 

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.