Aller au contenu

Messages recommandés

Posté(e)

---==RandomWarp==---

RandomWarp permet la création, suppression et modification de points de téléportation auxquels vous pourrez ensuite vous rendre avec une simple commande. Bien sur, le point choisi est aléatoire!

 

Configuration:

Tous les messages sont éditables dans la catégorie "options". Toutefois, je vous demanderai de bien vouloir laisser apparaître le nom du script.

 

Commandes & Permissions:

permission
skript.randomwarp
:

/randomwarp random

Vous téléporte à un point aléatoire.

permission
skript.randomwarp.admin
:

/randomwarp set <nomDuWarp>

Définit un point de téléportation à votre position. Si le point existe déjà, il sera déplacé à votre position.

/randomwarp delete <nomDuWarp>

Supprime un point de téléportation.

/randomwarp warpto <nomDuWarp>

Vous téléporte au point spécifié.

/randomwarp list

Donne la liste des points de téléportation existants.

Droits:

Vous êtes autorisés à utiliser et modifier ce script comme bon vous semble, mais s'il vous plait, ne le republiez pas, donnez plutôt le lien vers ce sujet. De plus, je vous demanderai de bien vouloir me laisser le crédit de la création de ce script.

 

[spoiler=RandomWarp]

#                          SKRIPT - RandomWarp                          #
#                                                                       #
# Description: Script permettant de définir des points de téléportation #
#              puis de se rendre aléatoirement à l''un d''eux.          #
# Auteur: The__V                                                        #
# Dépendances: Skript                                                   #
# Note: Bien que tous les messages soient configurables, merci de       #
#       bien vouloir laisser apparaitre le nom du script.               #

options:
   errNoPermission: "&cVous n'avez pas la permission d'utiliser cette commande."
   errSyntaxSet: "&cSyntaxe: /randomwarp set <nomDuWarp>"
   warpSet: "&7[&6RandomWarp&7] &aPoint de téléportation défini."
   errSyntaxDelete: "&cSyntaxe: /randomwarp delete <nomDuWarp>"
   deleteDone: "&7[&6RandomWarp&7] &aPoint de téléportation supprimé."
   errWarpNotFound: "&7[&6RandomWarp&7] &cCe point de téléportation n'existe pas."
   errSyntaxWarpto: "&cSyntaxe: /randomwarp warpto <nomDuWarp>"
   teleportFailure: "&7[&6RandomWarp&7] &cAucun point de téléportation n'a été trouvé."
   teleportSuccess: "&7[&6RandomWarp&7] &aVous avez été téléporté à un point aléatoire!"
   helpTitle: "&6---== &l&aRandomWarp - Aide&6&r&6 ==---"
   helpLine1: "&6/randomwarp set &f<&cnomDuWarp&f>: Définit un point de téléportation."
   helpLine2: "&6/randomwarp warpto &f<&cnomDuWarp&f>: Vous téléporte à un point défini."
   helpLine3: "&6/randomwarp list &f: Affiche tous les points de téléportation existants."
   helpLine4: "&6/randomwarp delete &f<&cnomDuWarp&f>: Supprime un point de téléportation."
   helpLine5: "&6/randomwarp random &f: Vous téléporte à un point aléatoire."

command /randomwarp [<text>] [<text>]:
   description: Commande de base pour RandomWarp.
   aliases: /rw, /randomw, /rwarp
   permission: skript.randomwarp
   permission message: "&cVous n'avez pas la permission d'utiliser RandomWarp."
   usage: /randomwarp
   executable by: players
   trigger:
# SET
       if arg 1 is "set":
           if executor does not have permission "skript.randomwarp.admin":
               message {@errNoPermission} to executor
               stop
           else if arg 2 is not set:
               message {@errSyntaxSet} to executor
               stop
           else:
               if {randomwarp.%arg 2%} is not set:
                   set {_newAmount} to {warpAmount} parsed as number + 1
                   set {warpAmount} to {_newAmount}
                   set {_newSize} to size of {warpList::*}
                   add 1 to {_newSize}
                   set {warpList::%{_newSize}%} to arg 2
               set {randomwarp.%arg 2%} to location of executor
               message {@warpSet} to executor
               stop
# DELETE
       else if arg 1 is "delete":
           if executor does not have permission "skript.randomwarp.admin":
               message {@errNoPermission} to executor
               stop
           else if arg 2 is not set:
               message {@errSyntaxDelete} to executor
               stop
           else:
               loop {warpList::*}:
                   loop-value = arg 2:
                       delete {warpList::%loop-index%}
                       message {@deleteDone} to executor
                       stop
               message {@errWarpNotFound} to executor
               stop
# WARPTO
       else if arg 1 is "warpto":
           if executor does not have permission "skript.randomwarp.admin":
               message {@errNoPermission} to executor
               stop
           else if arg 2 is not set:
               message {@errSyntaxWarpto} to executor
               stop
           else:
               loop {warpList::*}:
                   loop-value = arg 2:
                       set {_location} to {randomwarp.%arg 2%}
                       teleport executor to {_location}
                       stop
               message {@errWarpNotFound} to executor
               stop
# LIST
       else if arg 1 is "list":
           message "RandomWarps: %{warpList::*}%" to executor
           stop
# RANDOM
       else if arg 1 is "random":
           if {warpList::*} is not set:
               message {@teleportFailure} to executor
           set {_warp} to random element of {warpList::*}
           teleport executor to {randomwarp.%{_warp}%}
           message {@teleportSuccess} to executor
           stop
# HELP
       else:
           message {@helpTitle} to executor
           message {@helpLine1} to executor
           message {@helpLine2} to executor
           message {@helpLine3} to executor
           message {@helpLine4} to executor
           message {@helpLine5} to executor
#END OF FILE

 

Note: Je donne le code car il m'est impossible d'envoyer le fichier. Inutile de vous plaindre.

  • J'aime 4
×
×
  • 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.