Aller au contenu

Messages recommandés

Version de Minecraft : 1.12.2
Version de Skript : 2.4.1

Type du skript : Changer une variable d'une lettre à la suivante

Description du script :

Bonjour, je voudrais un skript dans lequel on execute la commande /lettre next et ça passerai la variable {lettre} (qui est défini sur a) à la lettre suivante (donc la ça serai b)

 

Exemple:

Citation

command /lettre [<text>]:
    trigger:

         if arg 1 is "next":

              set {lettre} to the next letter

              send "La lettre est passé sur %{lettre}%"

 

Bien évidemment, ce skript la ne fonctionne pas. Du moins la ligne "set {lettre} to the next letter".

Pour résumé, si la lettre défini sur {lettre} est "a", je voudrais qu'elle passe sur "b". Si cette lettre est "y" je voudrais qu'elle passe sur "z". Si cette lettre est "m", je voudrais qu'elle passe sur "n".

Partager ce message


Lien à poster
Partager sur d’autres sites

Salut,
Quelque chose que tu pourrai faire c'est de convertir la lettre en ASCII puis d'ajouter 1 et de le reconvertir en texte.
En utilisant skUtilities, tu pourrai faire :

Contenu masqué

    Réagissez ou répondez à ce message afin de consulter le contenu masqué.

A modifier avec ce que tu veux faire mais d'après la doc de skutilities, ça devrai fonctionner.

Partager ce message


Lien à poster
Partager sur d’autres sites
il y a 15 minutes, Kilterra a dit :

command /lettre:

trigger:

set {_ascii} to text {lettre} as ascii add 1 to {_ascii}

set {lettre} to ascii {_ascii} as string

send "%{_ascii}% teste"

J'ai installé SkUtilities sur mon serveur et copier coller la command mais j'obtient cette erreur :

Citation

[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! [Skript] Severe Error:
[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! Something went horribly wrong with Skript.
[11:11:39 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[11:11:39 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[11:11:39 ERROR]: #!#! Here is full list of them:
[11:11:39 ERROR]: #!#! skript-gui (https://github.com/APickledWalrus/skript-gui) SkBee (https://github.com/ShaneBeee/SkBee) skUtilities (https://tim740.github.io/) SkQuery Skellett (https://forums.skunity.com/resources/skellett.24/)
[11:11:39 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[11:11:39 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[11:11:39 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[11:11:39 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[11:11:39 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[11:11:39 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! Stack trace:
[11:11:39 ERROR]: #!#! java.lang.NullPointerException
[11:11:39 ERROR]: #!#!     at uk.tim740.skUtilities.convert.ExprFromString.get(ExprFromString.java:24)
[11:11:39 ERROR]: #!#!     at uk.tim740.skUtilities.convert.ExprFromString.get(ExprFromString.java:1)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:102)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.effects.EffChange.execute(EffChange.java:278)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:52)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:57)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:292)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:251)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:251)
[11:11:39 ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:168)
[11:11:39 ERROR]: #!#!     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[11:11:39 ERROR]: #!#!     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[11:11:39 ERROR]: #!#!     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[11:11:39 ERROR]: #!#!     at java.lang.reflect.Method.invoke(Unknown Source)
[11:11:39 ERROR]: #!#!     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
[11:11:39 ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[11:11:39 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500)
[11:11:39 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1391)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1234)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
[11:11:39 ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[11:11:39 ERROR]: #!#!     at java.util.concurrent.FutureTask.run(Unknown Source)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
[11:11:39 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
[11:11:39 ERROR]: #!#!     at java.lang.Thread.run(Unknown Source)
[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! Version Information:
[11:11:39 ERROR]: #!#!   Skript: 2.4.1 (latest)
[11:11:39 ERROR]: #!#!     Flavor: skriptlang-github
[11:11:39 ERROR]: #!#!     Date: 2019-12-22
[11:11:39 ERROR]: #!#!   Bukkit: 1.12.2-R0.1-SNAPSHOT
[11:11:39 ERROR]: #!#!   Minecraft: 1.12.2
[11:11:39 ERROR]: #!#!   Java: 1.8.0_251 (Java HotSpot(TM) 64-Bit Server VM 25.251-b08)
[11:11:39 ERROR]: #!#!   OS: Windows 10 amd64 10.0
[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! Server platform: Spigot
[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! Current node: null
[11:11:39 ERROR]: #!#! Current item: set {_ascii}(as java.lang.Object) to uk.tim740.skUtilities.convert.ExprFromString
[11:11:39 ERROR]: #!#! Current trigger: command /lettre (simple event) (ban.sk, line -1)
[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! Thread: Server thread
[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! Language: english
[11:11:39 ERROR]: #!#! Link parse mode: DISABLED
[11:11:39 ERROR]: #!#!
[11:11:39 ERROR]: #!#! End of Error.
[11:11:39 ERROR]: #!#!

Version de SkUtilities : 0.9.2

Version de skript : 2.4.1

Version de spigot : 1.12.2

Modifié par Zeynix-

Partager ce message


Lien à poster
Partager sur d’autres sites

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant

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