Paste #1467: Quest

Date: 2014/01/26 01:28:15 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


TownNPC: 
  Type: Assignment 
  Interact Scripts: 
  - 1 SendToTalk 

SendToTalk: 
  Type: Interact
  Default Constants: Fishing Quest Repeat Timeout: 24h
  Steps: 
    1: 
      Click Trigger: 
        Script: 
        - if <player.flag[talkDone]> { 
        - flag <player> Fishing:Claimed "duration:<npc.constant[Fishing Quest Repeat Timeout]>"
        - narrate "You may only do this quest every 24 hours"

          } else if <player.flag[talkDuring]> {
          - random 3          
          - chat "Hurry, go find my brother. He may be out of time." 
          - chat "Bring plenty of torches, I hear its dark down there" 
          - chat "Don't forget food. Once you enter, you cannot escape" 

          } else { 
          - chat "I need you to find my Brother in a Dungeon located near the Town of Dykuma" 
          - Wait 2s
          - chat "This Dungeon goes by the name of Crypt, and he is lost deep within it"
          - Wait 2s
          - chat "He will reward you with his findings once you've found him."
          - flag talkDuring 
          } 

DungeonNPC: 
  Type: Assignment 
  Interact Scripts: 
  - 1 ReceiveTalk 

ReceiveTalk:
  Type: Interact
  Steps:
    1:
      Click Trigger:
        Script:
        - if <player.flag[talkDone]> {
          - chat "Your torches have lit me a pretty good path. I think I can get out from here. Thanks!"
          } else if <player.flag[talkDuring]> {
          - chat "Oh thank god you've found me. My brother likely promised you my findings"
          - Wait 2s
          - chat "Well here you go. I guess it's better than dying down here, right?"
          - EXECUTE AS_OP "md give <player.name> -a 1 -t rare"
          - flag talkDuring:!
          - flag talkDone

          } else {
          - chat "You have not accepted this quest yet"
          }