[SOLVED] Player's message with another message?

Discussion in 'Skript' started by Trench, Jul 13, 2018.

Thread Status:
Not open for further replies.
  1. So I have recently been making a skript to make like hypixel's server when you type <3 it will show a heart emoji. But I was wondering if there was a way to make it that it keeps the player's current message and shows the emoji thanks for the help. Heres the code:
    Code (Text):
     
    options:
        Message: true
        Replace: true


    on chat:
            if message contains ":tableflip:":
                    if {@Replace} is true:
                            cancel the event              
                    if {@Message} is true:
                            broadcast "%colored prefix of player%&c%player%&8: &c(╯°□°)╯&7︵ &7&L┻━┻"



    options:
        Message2: true
        Replace2: true


    on chat:
            if message contains "<3":
                    if {@Replace2} is true:
                            cancel the event              
                    if {@Message2} is true:
                            broadcast "%colored prefix of player%&c%player%&8: &c❤"



    options:
        Message3: true
        Replace3: true


    on chat:
            if message contains ":star:":
                    if {@Replace2} is true:
                            cancel the event              
                    if {@Message2} is true:
                            broadcast "%colored prefix of player%&c%player%&8: &6✮"



    options:
        Message4: true
        Replace4: true


    on chat:
            if message contains ":shrug:":
                    if {@Replace2} is true:
                            cancel the event              
                    if {@Message2} is true:
                            broadcast "%colored prefix of player%&c%player%&8: &e¯\_(ツ)_/¯"



    options:
        Message5: true
        Replace5: true


    on chat:
            if message contains "o/":
                    if {@Replace2} is true:
                            cancel the event              
                    if {@Message2} is true:
                            broadcast "%colored prefix of player%&c%player%&8: &d( ゚◡゚)/"
     
  2. Code (Text):
    on chat:
            if message contains "<3":
                    if {@Replace2} is true:        
                            replace all "<3" in message with "&c❤"
     
    • Like Like x 1
    • Winner Winner x 1
  3. Now I get 3 errors saying undefined option {@Message2} 3 times.
     
  4. do you have an options called Message2?
     
  5. OH wait im an idiot never mind I figured it out thanks for the help stefan.
     
  6. Wait I added the Message option back but now when I type the <3 it doesnt do anything
     
  7. show your code
     
  8. This is the code I have:
    Code (Text):
     
    options:
        Replace2: true
        Message2: true


    on chat:
            if message contains "<3":
                    if {@Replace2} is true:
                            cancel the event            
                            replace all "<3" in message with "&c❤"
     
  9. because you canceled the event. If the event has been canceled there is nothing to replace.
    So remove "cancel the event"
     
    • Like Like x 1
  10. Oh lol I am smart..
     
  11. Alright it works now thank you so much Shane and Stefan :)
     
  12. You're welcome :)
     
Thread Status:
Not open for further replies.