Paste #3998: Untitled Paste

Date: 2014/05/02 22:53:15 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Zorgoth:
  Type: Assignment 
  Interact scripts: 
  - 10 ZorgothQuest 

ZorgothQuest:
  Type: Interact
  Steps:
    1:
      Click Trigger:
        Script:
        - chat "Welcome to my shop, Traveler!"
        - wait 2
        - chat "I would normally offer you ingredients but..."
        - wait 2
        - chat "...I'm afraid my supplies have been stolen by witches."
        - zap step:2
    2:
      Click Trigger:
        Script:
        - chat "Are you offering assistance with my witch problem?"
        - wait 2
        - chat "I'm capable of brewing a fair reward for you."
        - wait 2
        - chat "Will you help me out?"
        - zap step:3
    3:
      Chat Trigger:
        Yes:
          Trigger: /Yes/, I will help.
          Script:
          - chat "Ah, this is most excellent."
          - wait 2
          - chat "Please talk to the witches located about 150 meters to the South."
          - wait 2
          - chat "By talk I mean slaughter. Off you go now."
          - listen kill type:npc target:n@Fantasio script: KilledFantasio
          - listen kill type:npc target:n@Ossidiana script: KilledOssidiana
          - zap step:3
        No:
          Trigger: /No/, I'm not ready nor willing to risk my life.
          Script:
          - chat "Oh, what a shame."
          - wait 2
          - chat "Let me know if you happen to change your mind."
          - wait 2
          - chat "It will be worth your time. Come talk to again me when you're able to help."
          - zap step:6
    4:
      Click Trigger:
        Script:
        - chat "Please hurry, I'll sell to you when you're finished."
    5:
      Click Trigger:
        Script:
        - chat "Thanks, once again."
        - wait 2
        - chat "Here, check out my supplies!"
    6:
      Click Trigger:
        Script:
        - chat "Ah, welcome back."
        - wait 2
        - chat "Are you ready to help me yet?"
        - zap step:3

KilledFantasio:
  Type: Task
  Script:
  - flag <player> has_killed:->:Fantasio
  - if <player.flag[has_killed].contains[Ossidiana]> {
    - run s@ZorgothQuestTask def:<player>
    }

KilledOssidiana:
  Type: Task
  Script:
  - flag <player> has_killed:->:Ossidiana
  - if <player.flag[has_killed].contains[Fantasio]> {
    - run s@ZorgothQuestTask def:<player>
    }

ZorgothQuestTask:
  Type: Task
  Script:
  - if <player.flag[has_killed].contains[Ossidiana]> && <player.flag[has_killed].contains[Fantasio]> {
    - narrate "I should probably return to Zorgoth."
    - zap step:4 script:ZorgothQuest player:%1%
    }

NPCEngageScript:
  Type: Assignment
  Interact scripts:
  - 10 ProximityEngage
  Actions:
    on assignment:
    - trigger name:proximity radius:4
    on death:
    - vulnerable state:false
    - wait 120s
    - spawn <npc> <npc.flag[startLocation]>
    - attack target:cancel

ProximityEngage:
  Type: Interact
  Steps:
    1:
      Proximity Trigger:
        Entry:
          Script:
            - flag <npc> startLocation:<npc.location>
            - random {
              - chat "Intruder!"
              - chat "Die scum!"
              - chat "Have at thee!"
              - chat "Die!"
              } 
            - attack target:<player>
            - vulnerable