Motd Getter [Skript API] 1.0

motd, skript, api skript, motd other server, bungeecord skript

  1. BlueCraft_
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    Hello guys!

    An addon for skript who catches the motd other minecraft server in versions 1.7 and 1.8

    Add 1 expression:

    %ip% motd

    "%ip%" is a string text in format

    Code (Text):
    IP:PORT

    Example


    set {_ip} to "us.mineplex.com:25565"
    broadcast "%{_ip} motd%"

    or

    command /motd <text>:
    trigger:
    send "%%arg 1% motd%"

    Other example:
    Code (Text):

    on sign change:
        if line 1 is "skywars":
            if line 2 is "vip":
                set line 1 of block at location of target block to "&6██████████"
                set line 2 of block at location of target block to "Compre VIP para"
                set line 3 of block at location of target block to "abrir essa sala"
                set line 4 of block at location of target block to "&6██████████"
            else:
                if player has permission "skywarsbrasil.criarplaca":
                    set {placa::%location of target block%} to location of target block
                    set {placa::%location of target block%::numero} to line 2
                    set {placa::%location of target block%::IP} to line 3

                send "&6&l[&fSkyWars &2Bra&esil&6&l]&r &6Placa&f criada!"

    command /ip2 <text>:
        trigger:
            set {_ip} to "192.95.31.74:%arg 1%"
            set {_motd} to {_ip} motd
            send "%{_motd}%"
           
    every 30 ticks:
        loop {placa::*}:
            set {_lugar} to loop-value
            set {_ip} to "192.95.31.74:%{placa::%{_lugar}%::IP}%"
            set {_motd} to {_ip} motd
            set {_motd2::*} to {_motd} split at "-"
            if {_motd} is "offline":
                set {_offline} to true
            if {_motd2::2} is "offline":
                set {_offline} to true
            if {_offline} is true:
                delete {_offline}
                if {placa::%{_lugar}%::status} is "5":
                    set line 1 of block at {_lugar} to "&c██████████"
                    set line 2 of block at {_lugar} to "&lMANUTENCAO"
                    set line 3 of block at {_lugar} to "SkyWars %{placa::%{_lugar}%::numero}%"
                    set line 4 of block at {_lugar} to "&c██████████"
                else:
                    set {placa::%{_lugar}%::status} to "4"
                if {placa::%{_lugar}%::status} is "4":
                    set line 1 of block at {_lugar} to "&4██████████"
                    set line 2 of block at {_lugar} to "Reiniciando"
                    set line 3 of block at {_lugar} to "SkyWars %{placa::%{_lugar}%::numero}%"
                    set line 4 of block at {_lugar} to "&4██████████"
                    if {placa::%{_lugar}%::manutencaotime} is not set:
                        set {placa::%{_lugar}%::manutencaotime} to now
                    set {_difference} to difference between now and {placa::%{_lugar}%::manutencaotime}
                    if {_difference} is more than 30 seconds:
                        set {placa::%{_lugar}%::status} to "5"
                        delete {placa::%{_lugar}%::manutencaotime}
            else:
                delete {placa::%{_lugar}%::manutencaotime}
                set {placa::%{_lugar}%::status} to {_motd2::2}
                if {placa::%{_lugar}%::status} is "0" or "1" or "2":
                    set line 2 of block at {_lugar} to "SkyWars %{placa::%{_lugar}%::numero}%"
                    set line 3 of block at {_lugar} to "%{_motd2::3}%"
                    set line 4 of block at {_lugar} to "%{_motd2::1}%"
                if {placa::%{_lugar}%::status} is "0":
                    set line 1 of block at {_lugar} to "&a&l[Aberto]"
                if {placa::%{_lugar}%::status} is "1":
                    set line 1 of block at {_lugar} to "&5&l[Em Jogo]"
                if {placa::%{_lugar}%::status} is "2":
                    set line 1 of block at {_lugar} to "&4&l[Lotado]"
                if {placa::%{_lugar}%::status} is "4":
                    set line 1 of block at {_lugar} to "&4██████████"
                    set line 2 of block at {_lugar} to "Reiniciando"
                    set line 3 of block at {_lugar} to "SkyWars %{placa::%{_lugar}%::numero}%"
                    set line 4 of block at {_lugar} to "&4██████████"
                    if {placa::%{_lugar}%::manutencaotime} is not set:
                        set {placa::%{_lugar}%::manutencaotime} to now
                    set {_difference} to difference between now and {placa::%{_lugar}%::manutencaotime}
                    if {_difference} is more than 30 seconds:
                        set {placa::%{_lugar}%::status} to "5"
                        delete {placa::%{_lugar}%::manutencaotime}
                if {placa::%{_lugar}%::status} is "5":
                    set line 1 of block at {_lugar} to "&c██████████"
                    set line 2 of block at {_lugar} to "&lMANUTENCAO"
                    set line 3 of block at {_lugar} to "SkyWars %{placa::%{_lugar}%::numero}%"
                    set line 4 of block at {_lugar} to "&c██████████"

           
               
    on rightclick on sign:
        loop {placa::*}:
            set {_lugar} to loop-value
            if {_lugar} is location of clicked block:
                if {placa::%{_lugar}%::status} is "0" or "1":
                    set {_esperado} to difference between {esperou.%player%} and now
                    if {_esperado} is less than 1 second:
                        stop
                    else:
                        bungeecord connect player to "sw-%{placa::%{_lugar}%::numero}%"
                        set {esperou.%player%} to now
                   
    on break a sign:
        if {placa::%location of target block%} is location of target block:
            delete {placa::%location of target block%}
            delete {placa::%location of target block%::*}
       
    on sign edit:
        player has permission "skywarsbrasil.admin"
        set line 1 of event-block to "%colored line 1 of event-block%"
        set line 2 of event-block to "%colored line 2 of event-block%"
        set line 3 of event-block to "%colored line 3 of event-block%"
        set line 4 of event-block to "%colored line 4 of event-block%"
        stop

    command /testar:
        trigger:
            set {_temp} to "192.95.31.74:25674"
            send "%{_temp} motd%"
       
    command /tirartd:
        trigger:
            delete {placa::*}
     

Recent Reviews

  1. kratess
    kratess
    1/5,
    Version: 1.0
    not work ....................................................................
    1. BlueCraft_
      Author's Response
      not work on 1.11 and 1.12
  2. GomasYT
    GomasYT
    5/5,
    Version: 1.0
    Gostei :) Irei Usar