Paste #34386: Untitled Paste

Date: 2016/06/20 23:51:32 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


npctest:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:proximity state:true radius:3
    interact scripts:
    - 1 npctestinteract

npctestinteract:
    type: interact
    steps:
    1:
        proximity trigger:
            entry:
                script:
                - random {
                    - narrate "<&a>Leib<&co> <&b>Hi <player.name>."
                    - narrate "<&a>Leib<&co> <&b>Hello <player.name>."
                    - narrate "<&a>Leib<&co> <&b>Hey there <player.name>.
                    - narrate "<&a>Leib<&co> <&b>Hola <player.name>."
                    - narrate "<&a>Leib<&co> <&b>You got the pointless message <player.name>"
                    } 
        click trigger:
            script:
            - narrate "<&a>Leib<&co> <&b>Say "test" if you want to listen to a tutorial."
        chat trigger:
            1:
                trigger: /test/
                script:
                - narrate "<&a>Leib<&co> <&b>Click me again to start the tutorial."
                - wait 15t
                - narrate "<&a>Leib<&co> <&b>Say "exit" anytime you want to leave the tutorial"
                - zap 2
    2:
        click trigger:
            script:
            - if <p@player.is_flying> matches true {
                - execute as_op fly
                } 
            - execute as_op "speed walk 0 <player.name>"
        chat trigger:
            1:
                trigger: /exit/
                script:
                - execute as_op "speed walk 1 <player.name>"
                - narrate "<&a>Leib<&co> <&b>Hope to see you around <player.name>."