Aller au contenu
  • 0

Verification de mon skript


Question

Posté(e)

Bonjour comme dit dans le titre si ca vous dérange pas j'aimerais que vous jetiez un oeil à mon skript et résoudre les erreurs ou l'optimiser :) merci beaucoup

 


options:
 tabHeader: "&5Bienvenue sur &d%server name% %nl% %nl%&6&m----------------------%nl%"
 tabFooter: "%nl%&6&m----------------------&r%nl%%nl%&dSite &7> &5<site>  &4&m--&r  &DTS &7> &5<ts>"
 refreshLog: "&dRaffraichissement des tabLists terminé avec succès."
 refreshNotif: "&dRaffraichissement des tabLists terminé avec succès."

On Skript Start:
 execute console command "/tablist reload"

on join:
 execute console command "/tablist reload"
on join:
   if player has permission "tab.admin":
       wait 1 ticks
       set the player's tablist name to "&2A ◆ &a%player%"
   if player has permission "tab.habitant":
       wait 1 ticks
       set the player's tablist name to "&3H ◆ &f%player%"
   if player has permission "tab.paysan":
       wait 1 ticks
       set the player's tablist name to "&eP ◆ &f%player%"
   if player has permission "tab.berger":
       wait 1 ticks
       set the player's tablist name to "&9B ◆ &f%player%"
   if player has permission "tab.villageois":
       wait 1 ticks
       set the player's tablist name to "&aV ◆ &f%player%"
   if player has permission "tab.ecuyer":
       wait 1 ticks
       set the player's tablist name to "&6E ◆ &f%player%"
   if player has permission "tab.chevalier":
       wait 1 ticks
       set the player's tablist name to "&2C ◆ &f%player%"
   if player has permission "tab.conquerant":
       wait 1 ticks
       set the player's tablist name to "&1C ◆ &f%player%"
   if player has permission "tab.legendaire":
       wait 1 ticks
       set the player's tablist name to "&5L ◆ &f%player%"
   if player has permission "tab.roi":
       wait 1 ticks
       set the player's tablist name to "&dR ◆ &f%player%"
   if player has permission "tab.maitre":
       wait 1 ticks
       set the player's tablist name to "&8M ◆ &f%player%"
   if player has permission "tab.divin":
       wait 1 ticks
       set the player's tablist name to "&cD ◆ &f%player%"
   if player has permission "tab.supreme":
       wait 1 ticks
       set the player's tablist name to "&4S ◆ &f%player%"
   if player has permission "tab.fondateur":
       wait 1 ticks
       set the player's tablist name to "&4F ◆ &c%player%"
   if player has permission "tab.modo":
       wait 1 ticks
       set the player's tablist name to "&6M ◆ &e%player%"
   if player has permission "tab.buildeur":
       wait 1 ticks
       set the player's tablist name to "&fB ◆ &b%player%"
   if player has permission "tab.buildeuse":
       wait 1 ticks
       set the player's tablist name to "&fB ◆ &d%player%"
On Quit:
 execute console command "/tablist reload"

command /tablist reload:
 description: Raffraichis la tablist (n'inclus pas les prefix de grades).
 permission: tablist.sk
 executable by: console and players
 trigger:
   loop all players:
     set tab header to {@tabHeader} and footer to {@tabFooter} for loop-player
     wait 1 tick
   log {@refreshLog}
   if command sender is not console:
     message {@refreshNotif} to the command sender
command /afk:
   trigger:
       set the player's tablist name to "&bAFK &7%player%"
       if {afk.%player%} is not set:
           set {afk.%player%} to true
           broadcast "&9☯ &5%player% &9✦&d est AFK"
       else:
           delete {afk.%player%}
           broadcast "&9☯ &5%player%&9 ✦ &dest plus AFK"
           if player has permission "tab.habitant":
               set the player's tablist name to "&3H ◆ &f%player%"
           if player has permission "tab.modo":
               set the player's tablist name to "&6M ◆ &e%player%"
           if player has permission "tab.paysan":
               set the player's tablist name to "&eP ◆ &f%player%"
           if player has permission "tab.berger":
               set the player's tablist name to "&9B ◆ &f%player%"
           if player has permission "tab.villageois":
               set the player's tablist name to "&aV ◆ &f%player%"
           if player has permission "tab.ecuyer":
               set the player's tablist name to "&6E ◆ &f%player%"
           if player has permission "tab.chevalier":
               set the player's tablist name to "&2C ◆ &f%player%"
           if player has permission "tab.conquerant":
               set the player's tablist name to "&1C ◆ &f%player%"
           if player has permission "tab.legendaire":
               set the player's tablist name to "&5L ◆ &f%player%"
           if player has permission "tab.roi":
               set the player's tablist name to "&dR ◆ &f%player%"
           if player has permission "tab.maitre":
               set the player's tablist name to "&8M ◆ &f%player%"
           if player has permission "tab.divin":
               set the player's tablist name to "&cD ◆ &f%player%"
           if player has permission "tab.supreme":
               set the player's tablist name to "&4S ◆ &f%player%"
           if player has permission "tab.fondateur":
               set the player's tablist name to "&4F ◆ &c%player%"
           if player has permission "tab.buildeur":
               set the player's tablist name to "&fB ◆ &b%player%"
           if player has permission "tab.buildeuse":
               set the player's tablist name to "&fB ◆ &d%player%"
           if player has permission "tab.admin":
               set the player's tablist name to "&2A ◆ &a%player%"
on any movement:
   delete {afk.%player%}
   wait 1 seconds
   if player has permission "tab.admin":
       set the player's tablist name to "&2A ◆ &a%player%"
   if player has permission "tab.habitant":
       set the player's tablist name to "&3H ◆ &f%player%"
   if player has permission "tab.modo":
       set the player's tablist name to "&6M ◆ &e%player%"
   if player has permission "tab.paysan":
       set the player's tablist name to "&eP ◆ &f%player%"
   if player has permission "tab.berger":
       set the player's tablist name to "&9B ◆ &f%player%"
   if player has permission "tab.villageois":
       set the player's tablist name to "&aV ◆ &f%player%"
   if player has permission "tab.ecuyer":
       set the player's tablist name to "&6E ◆ &f%player%"
   if player has permission "tab.chevalier":
       set the player's tablist name to "&2C ◆ &f%player%"
   if player has permission "tab.conquerant":
       set the player's tablist name to "&1C ◆ &f%player%"
   if player has permission "tab.legendaire":
       set the player's tablist name to "&5L ◆ &f%player%"
   if player has permission "tab.roi":
       set the player's tablist name to "&dR ◆ &f%player%"
   if player has permission "tab.maitre":
       set the player's tablist name to "&8M ◆ &f%player%"
   if player has permission "tab.divin":
       set the player's tablist name to "&cD ◆ &f%player%"
   if player has permission "tab.supreme":
       set the player's tablist name to "&4S ◆ &f%player%"
   if player has permission "tab.fondateur":
       set the player's tablist name to "&4F ◆ &c%player%"
   if player has permission "tab.buildeur":
       set the player's tablist name to "&fB ◆ &b%player%"
   if player has permission "tab.buildeuse":
       set the player's tablist name to "&fB ◆ &d%player%"

15 réponses à cette question

Messages recommandés

  • 0
Posté(e)
Salut !

Quelles sont les erreurs ?

Je n'ai pas d'erreur ^^ je demande juste des avis :)

Rajoute un stop a la fin de chaque "set tablist"

Sinon ça part en cacahuète pour les op

 

Et sinon pourquoi tu crée le grade buildeur et buildeuse car ils ont le même préfix...uh

merci ! C'est vrai que les op était multicolore xD car faut penser aux demoiselles

  • 0
Posté(e)

En gros à la fin au on any movement , ca enleve le fait que le joueur soit afk donc j'aimerais mettre un broadcast "%player% n'est plus AFK" mais ducoup vu que c'est dans le on any movement des que je bouge ca le spam.

Salut,

Évite les double poste, merci.

Oops pardon

  • 0
Posté(e)

Bon deja n'utilise pas le on any move et passe par un while ;)

 

Genre quand tu fais la commande /afk

 

Set {_a} to location of player
While {_a} isn't location of player:
   Wait 1 tick
   Broadcast "%player% n est plus afk"
   Stop
Else:
   Wait 1 second 

  • J'aime 1
  • 0
Posté(e)
Set {_a} to location of player
While {_a} is location of player:
   Wait 1 tick
else:
   broadcast "&c%player% n'est plus afk !"
   stop

Ceci remplacerais donc mon on any moove?

  • 0
Posté(e)

De base oui,tu peux mettre ça en premier effect de ta commande

Après le else c'est quand le joueur n'est plus afk,et avant le while c'est tes effects de tablist quand tu le changes en afk etc.

  • 0
Posté(e)
Et toc l'abricot !

Umbaska de toute façon engendre énormément de bug que ce soit sur les loops ou autres alors franchement ne le mettez jamais !

Désolé de te demander ca mais tu pourrais directement le mettre dans mon code que j'ai cité? car j'suis un peu débutant en skript xD

×
×
  • 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.