Aller au contenu
  • 0

Comment créer une variable ?


Question

Posté(e)

Je suis débutant et je souhaite savoir comment créer une variable qui banni une personne durant 12 heures après que cette personne ai dis à 5 reprises des gros mots. J'ai déjà créer un petit skript mais il ne banni pas et il n'y a pas de variable :

on chat:
   replace all "*", "*", "**", "*", "**", "*", "***", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "**", "*", "*", "*", "*", "**", "*" and "*" with "&4[%player% a dit un gros mot!&4]&f" in the message

 

Merci de votre réponse la plus rapide et bonne soirée

2 réponses à cette question

Messages recommandés

  • 0
Posté(e)
options:
   Insultes: fdp|connard|salope
   # Ici tu mets toutes les insultes qui seront censurées. Sépare-les avec le signe "|" !

chat:
   "%groups 0 of message matched to ""(\b({0@Insultes})\b)""%" is not "<none>"
   cancel event
   add 1 to {insults.%player%}
   send "&cInsultes interdites !"
   send "&cVous possédez acutellement &b%{insults.%player%}% &cinsultes !"
   send "&cAu bout de 5 insultes, vous serez banni automatiquement pendant 12 heures !"
   wait a tick
   {insults.%player%} = 5
   set {insults.%player%} to 0
   set {ban.insults.%player%} to now

join:
   difference between {ban.insults.%player%} and now is less than 12 hours:
       wait 0.5 tick
       kick player due to "&cErreur : Vous avez été banni 12 heures pour avoir insulté !"
   else:
       delete {ban.insults.%player%}

  • 0
Posté(e)

Merci beaucoup de ta réponse mais, ceci nécessite des add-on car ça ne fonctionne pas :(

J'ai rajouter les "grosmot" mais il ne se passe rien dutout :

 

[11:40:32 ERROR]: #!#! [skript] Severe Error:
[11:40:32 ERROR]: #!#!
[11:40:32 ERROR]: #!#! If you're developing an add-on for Skript this likely mea
ns that you have done something wrong.
[11:40:32 ERROR]: #!#! If you're a server admin however please go to http://dev.
bukkit.org/server-mods/skript/tickets/
[11:40:32 ERROR]: #!#! and check whether this error has already been reported.
[11:40:32 ERROR]: #!#! If not please create a new ticket with a meaningful title
, copy & paste this whole error into it,
[11:40:32 ERROR]: #!#! and describe what you did before it happened and/or what
you think caused the error.
[11:40:32 ERROR]: #!#! If you think that it's a trigger that's causing the error
please post the trigger as well.
[11:40:32 ERROR]: #!#! By following this guide fixing the error should be easy a
nd done fast.
[11:40:32 ERROR]: #!#!
[11:40:32 ERROR]: #!#! Stack trace:
[11:40:32 ERROR]: #!#! java.util.regex.PatternSyntaxException: Unclosed counted
closure near index 6
(\b({0@Insultes})\b)
     ^
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.error(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.closure(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.sequence(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.expr(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.group0(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.sequence(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.expr(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.group0(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.sequence(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.expr(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.compile(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.<init>(Unknown Source)
[11:40:32 ERROR]: #!#!     at java.util.regex.Pattern.compile(Unknown Source)
[11:40:32 ERROR]: #!#!     at com.w00tmast3r.skquery.elements.expressions.ExprRe
gexMatches.get(ExprRegexMatches.java:29)
[11:40:32 ERROR]: #!#!     at com.w00tmast3r.skquery.elements.expressions.ExprRe
gexMatches.get(ExprRegexMatches.java:15)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.getArray
(SimpleExpression.java:103)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.lang.VariableString.toString(Variab
leString.java:383)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.lang.VariableString.getAll(Variable
String.java:493)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.lang.VariableString.check(VariableS
tring.java:508)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.conditions.CondCompare.check(CondCo
mpare.java:239)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.lang.Condition.run(Condition.java:5
8)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.j
ava:63)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.j
ava:91)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:5
3)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.events.EvtChat$1.execute(EvtChat.ja
va:68)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.events.EvtChat$1$1.call(EvtChat.jav
a:87)
[11:40:32 ERROR]: #!#!     at ch.njol.skript.events.EvtChat$1$1.call(EvtChat.jav
a:1)
[11:40:32 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftFutu
re.run(CraftFuture.java:89)
[11:40:32 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftSche
duler.mainThreadHeartbeat(CraftScheduler.java:350)
[11:40:32 ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.B(Min
ecraftServer.java:723)
[11:40:32 ERROR]: #!#!     at net.minecraft.server.v1_8_R3.DedicatedServer.B(Ded
icatedServer.java:374)
[11:40:32 ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.A(Min
ecraftServer.java:654)
[11:40:32 ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.run(M
inecraftServer.java:557)
[11:40:32 ERROR]: #!#!     at java.lang.Thread.run(Unknown Source)
[11:40:32 ERROR]: #!#!
[11:40:32 ERROR]: #!#! Version Information:
[11:40:32 ERROR]: #!#!   Skript: 2.2-SNAPSHOT
[11:40:32 ERROR]: #!#!   Bukkit: 1.8.8-R0.1-SNAPSHOT
[11:40:32 ERROR]: #!#!   Minecraft: 1.8.8
[11:40:32 ERROR]: #!#!   Java: 1.8.0_111 (Java HotSpot(TM) Client VM 25.111-b14)

[11:40:32 ERROR]: #!#!   OS: Windows 8.1 x86 6.3
[11:40:32 ERROR]: #!#!
[11:40:32 ERROR]: #!#! Running CraftBukkit: false
[11:40:32 ERROR]: #!#!
[11:40:32 ERROR]: #!#! Current node: null
[11:40:32 ERROR]: #!#! Current item: "%regex%" is not equal to "<none>" (compara
tor: ch.njol.skript.classes.data.DefaultComparators$13@93c09d)
[11:40:32 ERROR]: #!#!
[11:40:32 ERROR]: #!#! Thread: Server thread
[11:40:32 ERROR]: #!#!
[11:40:32 ERROR]: #!#! End of Error.
[11:40:32 ERROR]: #!#!
[11:40:32 INFO]: <Axok> salope

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