Paste #28420: template chat nav

Date: 2016/01/14 04:45:14 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


templateassignment:
    type: assignment
    interact scripts:
    - 1 templatetriggers
    actions:
    - trigger name:chat toggle:true
    - trigger name:click toggle:true
    - trigger name:proximity toggle:true

templatetriggers:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - flag player "cont:false"
                    - flag player "chatSel:1"
                    - run chattemplate
            chat trigger:
                1:
                    trigger: //
                    script:
                    - flag player "cont:true"
                    - run chattemplate
            click trigger:
                script:
                - flag player "cont:false"
                - run chattemplate
chattemplate:
    type: task
    script:
#Do not touch this part Here, it is for the chat selection and may not be modified to keep everything working properly!
# ==========================================================================================================================#
        - if <player.flag[cont]> == true {
            - if <player.chat_history> == Z {
                - flag player "chatSel:2"
                } else if <player.chat_history> == Y {
                - flag player "chatSel:<player.flag[_chatSel]>"
                } else {
                - flag player "_chatSel:<player.flag[chatSel]>"
                - flag player "chatSel:<player.flag[chatSel]><player.chat_history>"
                }
            }
#===========================================================================================================================#
        - if <player.flag[chatSel]> == 1 {
            - random {
                - chat "Hello!"
                - chat "Hello <player.name>!"
                - chat "Good to see you!"
                - chat "Good to see you <player.name>!"}
            - narrate "1. Who are you?"
            - narrate "2. What's happening?"
            } else if <player.flag[chatSel]> == 11 {
            - random {
                - chat "I'm a test subject. Gazguy is my owner."
                - chat "I'm Gazguy's test subject."
                - chat "I'm a test subject. Gazguy is my owner - please help me!"
                - chat "I'm Gazguy's test subject. Please help me!"}
            - narrate "1. Who is Gazguy?"
            - narrate "2. What do you do as a 'test subject'?"
            } else if <player.flag[chatSel]> == 111 {
            - chat "Gazguy, oh he's the servers Technician, he works on scripts and such for NPCs like myself! You might see him around sometime but most likely he'll be working behind the scences."
            } else if <player.flag[chatSel]> == 112 {
            - chat "My job as a test subject is to do what ever I'm made to..."
            } else if <player.flag[chatSel]> == 12 {
            - random {
                - chat "You'll have to be a little more specific."
                - chat "Well lots of things are happening, anuything specificaly you want to know about?"
                - chat "Rather broad question you have there!"
                - chat "Wanna' narrow it down a bit for me, I mean there's a ton going on!"}
            - narrate "1. Any big server news?"
            - narrate "2. Any news with fixie?"
            - narrate "2. Any news with NPCs?"
            } else if <player.flag[chatSel]> == 121 {
            - chat "No idea..."
            } else if <player.flag[chatSel]> == 122 {
            - chat "No idea..."
            } else if <player.flag[chatSel]> == 123 {
            - chat "Well yes, Gazguy recently implemented a new template format for talking AI such as me, this will hopefully shorten the development process and iron out some major bugs and glitches that occoured in the prior template!"
            } else if <player.flag[chatSel]> == 2 {
            - random {
                - chat "Bye!"
                - chat "Bye <player.name>!"
                - chat "Goodbye!"
                - chat "Goodbye <player.name>!"}
            - flag player "chatSel:1"
            } else {
            - chat "Sorry that doesn't appear to be an option"
            - flag player "chatSel:<player.flag[_chatSel]>"
            }
        - narrate "Y. Back"
        - narrate "Z. Exit"