Paste #39597: Edit of P#39596 - Monkey Bot please help me

Date: 2017/02/05 14:46:35 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"Killing the skeletons":
  type: interact

  steps:
    1:
      proximity trigger:
        entry:
          script:
          # On player entering proximity range, run a script (located further down).
          - run "skeletonkiller Check Requirements"

      click trigger:
        script:
        # On clicking, run a slightly different script to check requirements before starting quest.
        - run "skeletonkiller Quest Requirement"

    2:
      chat trigger:
        'Start Questline':
          Trigger: /Yes/, I will help you
          script:
          # If the player answer 'yes', this will set the quest flag to started and also start 'listening' for the player
          # killing skeletons and once the player killed the number of skeletons specified at the top of the script, it will run
          # the 'skeletonkiller Quest Completed' script.
          - engage
          - flag <player> skeletonkiller:Started "duration:<npc.constant[Quest Reset Timeout]>"
          - listen kill "id:skeletonkiller Listener" type:entity qty:<npc.constant[skeletonsQty]> target:skeleton "script:skeletonkiller Quest Completed"
          - chat "<yellow>Great! come back to me once you've killed <red><npc.constant[skeletonsQty]><yellow> skeletons."
          - narrate "<red> Exterminate skeletons - Quest Started"
          - disengage

        'Deny Questline':
          Trigger: /No/
          script:
          # If the player says 'no', then display one of the following 3 messages and put them back at Step 1 for 'Killing
          # the skeletons' script.
          - random {
            - chat "<yellow>Don't worry, one will probably blow you up soon anyways... They're quite active at night..."
            - chat "<yellow>That's a damn shame. Come back when you change your mind."
            - chat "<yellow>Coulda used your help stranger; brother lost a leg to the damn varmits." }
          - zap step:1

      proximity trigger:
        exit:
          script:
          # If they exit the proximity trigger for the NPC, put them back at Step 1 so they get presented with the
          # relevant options when they come back later.
          - zap step:1

      click trigger:
        script:
        # This is simply to present the options again if the player accidentally clicks the NPC, rather than type a response.
        - run "skeletonkiller Quest Requirement"