Aller au contenu

Skript - Un chat


Messages recommandés

Posté(e)

Bonjour,

 

je suis Lurdog !

 

Je me permet de poster ce message car j'ai bessoin d'un skript

 

D'avoir un chat global /chat on -> Pour activer le chat global

/chat off -> Pour désactiver le chat global

 

Sachant que je voudrai un chat par mondes

 

Cordialement Merci

 

 

Mon email : [email protected]

Skype : didi6268

Posté(e)
on chat:
   if {chatglobal.%player%} is false:
       cancel event
       send "&cErreur : Vous avez désactivé le Chat Global !"

command /chatglobal:
   permission: ta.permission
   permission message: &cErreur : Vous n'avez pas la permission !"
   trigger:
       if {chatglobal.%player%} is not set:
           set {chatglobal.%player%} to true
           send "&aChat Global activé !"
       else:
           if {chatglobal.%player%} is true:
               set {chatglobal.%player%} to false
               send "&cChat Global désactivé !"
           else:
               set {chatglobal.%player%} to true
               send "&aChat Global activé !"

Posté(e)
Si tu veux un tchat global, ça veut dire qu'il y aurait un tchat pas global ?

Il a dit que quand tu fais /chat on et que tu mets un message, tout le monde dans tout les mondes vont le voir et /chat off ça met ton message aux personnes dans ton monde seulement.

Posté(e)

Désolé j'étais sur tél :

 

(Non testé) :

 

Options:

   # ! {USERNAME} = Pseudo du joueur
   # ! {MESSAGE} = Message du joueur
   # ! {WORLD} = Monde du joueur

   Chat_Format_Global: &8/&e!&8\ &f<Global> &a{USERNAME} &8>> &f{MESSAGE}
   # Le format du Chat Global !

   Chat_Format_Monde: &8/&e!&8\ &f<{WORLD}> &a{USERNAME} &e>> &f{MESSAGE}
   # Le format du Chat par Monde !

command /chat [<text>]:
   trigger:
       if arg 1 is not set:
           send "&cErreur : Merci de préciser entre ON&4/&cOFF !"
       else:
           if arg 1 is not "on" or "off":
               send "&cErreur : Merci de préciser entre ON&4/&cOFF !"
           else:
               if arg 1 is "on":
                   if {chat.stats.%player%} is "global":
                       send "&cErreur : Le Chat Global est déjà activé !"
                   else:
                       set {chat.stats.%player%} to "global"
                       send "&aVous avez activé le Chat Global !"
               if arg 1 is "off":
                   if {chat.stats.%player%} is "monde":
                       send "&cErreur : Le Chat par Monde est déjà activé !"
                   else:
                       set {chat.stats.%player%} to "monde"
                       send "&aVous avez activé le Chat par Monde !"

on chat:
   if {chat.stats.%player%} is "global":
       cancel event
       set {_cfg} to "{@Chat_Format_Global}"
       wait 1 tick
       replace all "{USERNAME}" with "%player%" in {_cfg}
       replace all "{MESSAGE}" with "%message%" in {_cfg}
       wait 1 tick
       broadcast "%{_cfg}%"
   if {chat.stats.%player%} is "monde":
       cancel event
       set {_cfm} to "{@Chat_Format_Monde}"
       wait 1 tick
       replace all "{USERNAME}" with "%player%" in {_cfm}
       replace all "{MESSAGE}" with "%message%" in {_cfm}
       replace all "{WORLD}" with "%world of player%" in {_cfm}
       wait 1 tick
       broadcast "%{_cfm}%" in world of player

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