Paste #34100: CSR

Date: 2016/06/06 03:03:38 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


'CustomerService':
  type: assignment
  interact scripts:
  - 10 CSR
CSR:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - Narrate "<gold><npc.name> says <white> Hey there <player.name>. Did you need some help?"
            chat trigger:
                1:
                    trigger: /yes/
                    script:
                    - Narrate "<gold><npc.name> says <white> Ok, what did you need help with? Promotions, demotions, or gamemodes?"
                2:
                    trigger: /no/
                    script:
                    - Narrate "<gold><npc.name> says <white> Ok, have fun!"
                3:
                    trigger: I need a /demotion/
                    script:
                    - Narrate "<gold><npc.name> says <white> No problem. Go ahead and confirm this step by saying 'demote' or 'no' to cancel."
                    - zap step:2
                4:
                    trigger: I need a /promotion/
                    script:
                    - Narrate "<gold><npc.name> says <white> Sure thing. Please confirm your selection by saying 'promote' or 'no' to cancel."
                    - zap step:2
                5:
                    trigger: I want to change my /gamemode/
                    script:
                    - Narrate "<gold><npc.name> says <white> Alright, which mode would you like? Creative or Survival?"
                    - zap step:2
                6:
                    trigger: I want /creative/
                    script:
                    - Narrate "<gold><npc.name> chuckles <white> Things a little too hard out there for you huh? No matter, confirm your choice by saying 'creative' or 'no' to cancel."
                    - zap step:2
                7:
                    trigger: I want /survival/
                    script:
                    - Narrate "<gold><npc.name> exclaims <white> Well, that's more like it! Don't be <gold>that <white> guy. Confirm by saying 'survival' or 'no' to cancel."
                    - zap step:2
        2:
            click trigger:
                script:
                - Narrate "<gold><npc.name> says <white> Hey there <player.name>. May I assist you with anything?"
                - zap step:1
            chat trigger:
                demote:
                    trigger: /demote/
                    script:
                    - if <player.group.contains[Landlord]> {                    
                        - execute asserver 'pex user <player.name> group set Resident'
                        - execute asserver 'pex reload'
                        - narrate "<gold><npc.name> says <white>Congrats <player.name>, you've been demoted to a Resident!"
                    } else {
                        - Narrate "<gold><npc.name> says <white>I'm sorry, you are not of appropriate rank to use this feature. Please speak with management."
                        - zap step:1
                        }