Paste #12156: Untitled Paste

Date: 2014/12/18 10:39:30 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


ChatCommands:
    type: world
    debug: true
    events:
        on player chats:
            - if <li@!forum.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "Nase forum -> http://www.athencraft.sk/forum" format:MbotFormat
            } else if <li@!linky.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "Uzitocne linky: Web -> http://www.athencraft.sk" format:MbotFormat
                - announce "Forum -> http://www.athencraft.sk/forum" format:MbotFormat
            } else if <li@!cas.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "Datum<&co> <util.date.time.day>.<util.date.time.month>" format:MbotFormat
                - announce "Cas<&co> <util.date.time.hour>:<util.date.time.minute>" format:MbotFormat
            } else if <li@!dynmapa.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "Dynmapa servera -> ???" format:MbotFormat
            } else if <li@!speak.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "IP TeamSpeaku -> athencraft.sk alebo 77.247.226.58" format:MbotFormat
                - announce "Link na stiahnutie -> http://www.teamspeak.com/?page=downloads" format:MbotFormat
            } else if <li@!kreky.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "Kreky -> Majitel, jeho youtube<&co> https://www.youtube.com/user/krekynko" format:MbotFormat
            } else if <li@!pvparena.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "PvP arena -> /pa free" format:MbotFormat
            } else if <li@!lag.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "<red>Upozornenie<&co><white> Prebehne lag na par sekund, pravdepodobne kvoli <player.name>" format:MbotFormat
                - ^execute as_server "save-all"
            } else if <li@!restart.as_list.contains[<context.message>]> {
                - wait 0.5
                - foreach <player.list.online> {
                    - ^define restarttriminuty 'O 3 minuty prebehne restart servera!'
                    - ^execute as_op "title %value% title {text:'Upozornenie',color:'red',italic:'true'}" silent
                    - ^execute as_op "title %value% subtitle {text:'%restarttriminuty%',color:'green'}" silent
                }
                - wait 60
                - foreach <player.list.online> {
                    - ^define restartdveminuty 'O 2 minuty prebehne restart servera!'
                    - ^execute as_op "title %value% title {text:'Upozornenie',color:'red'}" silent
                    - ^execute as_op "title %value% subtitle {text:'%restartdveminuty%',color:'green'}" silent
                }
                - wait 60
                - foreach <player.list.online> {
                    - ^define restartjednaminuta 'O 1 minutu prebehne restart servera!'
                    - ^execute as_op "title %value% title {text:'Upozornenie',color:'red'}" silent
                    - ^execute as_op "title %value% subtitle {text:'%restartjednaminuta%',color:'green'}" silent
                }
                - wait 60
                - foreach <player.list.online> {
                    - ^define restartteraz 'Prebehne restart!'
                    - ^execute as_op "title %value% title {text:'Upozornenie',color:'red'}" silent
                    - ^execute as_op "title %value% subtitle {text:'%restartteraz%',color:'green'}" silent
                }
                - wait 10
                - ^execute as_server "kickall Do 3 minut sme online!"
                - ^execute as_server "stop"
            } else if <li@!prirucka.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "Prirucka od Maweja -> https://docs.google.com/document/d/1p-_WWLm87Ydan0fpsJrOgXJMUeM0y9b3WSqJ22c01mI" format:MbotFormat
            } else if <li@!vc.as_list.contains[<context.message>]> {
                - repeat 150 {
                    - announce ""
                }
            } else if <li@!tomo.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "TomoMomoKapor -> Bulder, jeho kanal: https://www.youtube.com/channel/UCdVTyZi65pVj6yEwFouS4ow" format:MbotFormat
            } else if <li@!mrbrediik.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "MrBrediik -> Chleba, jeho kanal: https://www.youtube.com/channel/UCYVfzhfMlAyrtEQk0BxA8kw" format:MbotFormat
            } else if <li@!fb.as_list.contains[<context.message>]> {
                - wait 0.5
                - foreach <player.list.online> {
                    - execute as_op "tellraw %value% {'text':'','extra':[{'text':'[M-Bot] ','color':'red'},{'text':'Nasa fb stranka '},
                    {'text':'>> Klikni sem <<','bold':'true','clickEvent':{'action':'open_url','value':'https://www.facebook.com/pages/Athencraft/1459957350890424'}}]}"
                }
            } else if <li@!vypnutchat.as_list.contains[<context.message>]> {
                - wait 1
                - flag global VypnutyChat
                - foreach <player.list.online> {
                    - ^define vypnutychat '<player.name> vypol chat!'
                    - ^execute as_op "title %value% title {text:'Upozornenie',color:'red'}" silent
                    - ^execute as_op "title %value% subtitle {text:'%vypnutychat%',color:'green'}" silent
                }
            } else if <li@!zapnutchat.as_list.contains[<context.message>]> {
                - wait 1
                - flag global VypnutyChat:!
                - narrate "<red>Upozornenie<&co><white> <player.name> zapol chat"
            } else if <context.message.contains[!bug]> {
                - wait 0.5
                - define bug '<red><player.name><&co><white> <context.message>'
                - flag global bugy:->:<def[bug]>
                - announce "<green>Bug nahlaseny!"
            } else if <li@!bookbox.as_list.contains[<context.message>]> {
                - wait 0.5
                - announce "BookBox je technicke jadro Athen Craftu" format:MbotFormat
                - wait 0.3
                - announce "Spadaju pod neho questovy system, eventy a chat + dalsie ine v priprave" format:MbotFormat
                - wait 0.3
                - announce "Vyvija ho Mawej vyhradne pre AC" format:MbotFormat
            }
# else if <context.message.contains[lol]> narrate "Lol" - detekuje slovo v !celej! sprave, narozdiel od if <context.message> = lol {...} co detekuje len dane slovo, pokial je jedine v sprave
# Taktiez sa moze pouzit prikaz DETERMINE <cotext.message.replace[iDiot].with[MensiDiot]> (pokial sa nemylim a pokial mi to mcmonkey napisal spravne)

MbotFormat:
    type: format
    debug: true
    format: '<red>[M-Bot]<white> <text>'