Paste #6860: sentry

Date: 2014/07/13 14:27:14 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Sentry:
  type: assignment
  interact scripts:
  - 100 Sentry
  actions:
    on assignment:
    - trigger name:click toggle:true
Sentry:
  type: interact
  steps: 
    1:
      click trigger:
        script:
        - if <npc.owner> = <player> {
          - chat "go to your city and walk until i teleport to you then say 'point one' for one part of the wall.  Then say 'point two' for the other side of the wall. then walk to the starting place and say 'origin' and i will start to make a circuit"
          - execute as_server "sentry <npc.id> guard <player.name>"
          }
          else {
          - chat "Good day to you sir."
          }
      chat trigger:
        'point1':
          trigger: "this is your /point1/"
          script:
          - narrate "point one registered."
          - execute as_server "sentry <npc.id> guard"
        'point2':
          trigger: "this is your /point2/"
          script:
          - narrate "point two registered."
          - execute as_server "sentry <npc.id> guard"
        'origin':
          trigger: "this is your /origin/"
          script:
          - narrate "The sentry begins to patrol."
          - execute as_server "sentry <npc.id> guard"
          - zap step:2
    2:
      click trigger:
        script:
        - if <npc.owner> = <player> {
          - chat "Hello my lord which task would you like me to do?"
          - chat "Would you like me to continue or "
          - zap 'step:ChooseTask'
          }
          else {
          - chat "Hello mate how are you or be your bodyguard?"
          - zap step:1
          }
    'ChooseTask':
      chat trigger:
        'miner':
          trigger: "I want you to be a /continue/."
          script:
          - zap 'step:continue'
        'farmer':
          trigger: "I want you to be a /bodyguard/."
          script:
          - zap 'step:bodyguard'
    'continue':
      click trigger:
        script:
        - chat "Hello my lord welcome to my humble household. How may i serve you?"
    'bodyguard':
      click trigger:
        script:
        - chat "meow"