Paste #15598: witchquest

Date: 2015/05/06 15:28:18 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"Knight David":
  type: assignment
  interact scripts:
  - 10 Witchhunt

"Witchhunt":
  type: interact

  steps:
    1:
      proximity trigger:
        - chat "<aqua>Come closer..."

      click trigger:
        script:
        - chat "<blue>The witch... is near.."
        - wait 2
        - chat "<BLUE>Don't go that way, the witch is too powerful... I feel my end... is near..."
        - narrate "<red>You hear a rumble of thunder."
        - weather thunder
        - wait 1
        - chat "<BLUE>It's in the clearing up there! RUN!"
        - wait 1
        - chat "<aqua>Do you wish to continue?"
        - ^narrate "<red>Say<&co>"
        - ^narrate "<white>[<blue>Yes<blue> <gray>or<red> No<white>]"
      chat trigger:
        'Start Questline':
          Trigger: /Yes/, I will continue.
          script:
          - create player Witch
          - ^flag <player> Killthewitch
          - narrate "<red>Defeat the Witch"
          - ^zap step:2
        'Deny Questline':
          Trigger: /No/, I can't!
          script:
            - execute as_player "spawn"
            - title stay:3s 'subtitle:<&4>Quest Failed'
          'What did you say':
            trigger: /REGEX:\w+/
            script:
            - chat "<white><player.name><yellow>, I don<&sq>t what <&sq><white><context.message><yellow><&sq> means."
            - ^narrate "<red>Say<&co>"
            - ^narrate "  <white>[<blue>Yes<blue> <gray>or<red> No<white>]"
    2:
      click trigger:
        script:
        - chat "<aqua>What are you doing?! The witch is still living!!"
    3:
      click trigger:
        script:
        - give money qty:3000
        - narrate "<aqua>You have picked up <yellow>$3000<aqua> from defeating the witch."
        - wait 1
        - narrate "<aqua>The witch has been defeated..."
        - wait 1
        - narrate "<aqua>The earth beneath you feels like a cloud, suddenly a surge of energy overwhelms you."
        - wait 3
        - narrate "<aqua>You hear the whisper of ghosts of the royal children the witch had eaten calling you to somewhere..."
        - teleport <player> l@140.5,81,288.48841,world
        - ^flag player Killthewitch:!
        - animate '<n@Knight David>' animation:sleep
        - ^zap step:4
    4:
      click trigger:
        script:
        - narrate "<red><npc.name> Is unconscious"

Quest_Killthewitch_World: 
  type: world 
  events: 
    on <n@witch> killed: 
    - if !<player.has_flag[Killthewitch]> queue clear 
    - run locally delay:1t Count 


  Count: 
    - ^flag player Killthewitch:++ 
    - ^if <player.flag[Killthewitch].as_int> == 1 { 
      - zap step:3 "script:witchhunt" 
      - queue clear 
      } 



#