Paste #37530: NPC Dialogue

Date: 2016/11/09 11:53:18 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Paladin:
    type: assignment
    debug: true
    cooldown: 5s
    actions:
      on assignment:
        - run locally start instantly 
      on click:
        - narrate "<&7>[<&b>Paladin<&7>] <&e><&l>Hello traveler! How may I assist you?"
        - narrate "<&c>1. <&7>I'd like to start a quest."
        - narrate "<&c>2. <&7>I'd like to become a <&e>Knight<&7>."
        - narrate "<&c>3. <&7>Nevermind."
        - narrate "<&a>Type 1, 2, or 3 in chat to answer."
      on chat:
        - inject locally response instantly 

    start:
      - trigger name:click state:true
      - trigger name:chat state:true radius:7
      - lookclose true range:5 realistic           

    response:
      - choose '<context.message.escaped>':
        - case '1':
          - if <player.has_permission[essentials.kits.knight]> {
            - determine passively cancelled
            - narrate "<&e>[<&b>Paladin<&e>] <&c>Sorry, but I haven<&sq>t got any quests for you at the moment. Check back later!"
            }
            else if <player.has_permission[essentials.kits.peasant]> {
            - determine passively cancelled
            - narrate "<&e>[<&b>Paladin<&e>] <&c>Sorry bud, gotta be a Knight first. We are looking for recruits though...you interested?"
            - narrate "<&c>1. <&7>Sure, sign me up!"
            - narrate "<&c>2. <&7>No, I'll walk my own path."
            - narrate "<&a>Type 1, 2, or 3 in chat to answer."
            }
            else {
            - determine passively cancelled
            - narrate "<&e>[<&b>Paladin<&e>] <&c>Sorry, you<&sq>ll have to change classes to receive quests from me."
            }

        - case '2':
          - if <player.has_permission[essentials.kits.knight]> {
            - determine passively cancelled
            - narrate "<&e>[<&b>Paladin<&e>] <&c>Uh, I<&sq>m assuming that<&sq>s a joke, right?"
            }
            else if <player.has_permission[essentials.kits.peasant]> {
            - determine passively cancelled
            - narrate "<&e>[<&b>Paladin<&e>] <&a>Ah, excellent! First we must go over some details. What would you like to hear about?"
            - narrate "<&c>1. <&7>Quests"
            - narrate "<&c>2. <&7>Kits and Perks"
            - narrate "<&c>3. <&7>Upgrades"
            - narrate "<&c>4. <&7>All set. Sign me up!!!"
            - narrate "<&c>5. <&7>Nah, nevermind..."
            - narrate "<&a>Type 1, 2, 3, 4, or 5 in chat to answer."
            - choose '<context.message.escaped>':
              - case '1':
                - determine passively cancelled
                - narrate "<&c> The king hasn<&sq>t assigned any quests to us yet, but he will soon!"
            }
            else {
            - determine passively cancelled
            - narrate "<&e>[<&b>Paladin<&e>] <&c>Sorry, you<&sq>ll have to change classes to receive quests from me."
            }
        - case '3':
          - determine passively cancelled
          - narrate "<&e>[<&b>Paladin<&e>] <&a>Fare thee well..."
        - default:
          - determine passively cancelled
          - narrate "<&c>You must type 1, 2, or 3."