Paste #7474: Untitled Paste

Date: 2014/07/25 17:55:53 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


# Assignment Script used to give a NPC the script

Q1ScriptNPC1:
  type: Assignment
  actions:
    on assignment:
    - trigger name:proximity state:true cooldown:5s
    - trigger name:click state:true cooldown:2s
    - trigger name:chat state:true
    - chat "I has been assigned!"

# Interact Scripts are the interact scripts associated with the assignment script

# They use a priority system, highest priority with met requirments wins

# The priority goes highest to lowest, 50 will start before 40 if its requirements are met.. ect

  Interact Scripts:
  - 30 Q1StartScript3NPC1
  - 20 Q1StartScript2NPC1
  - 10 Q1StartScript1NPC1

Q1ScriptNPC2:
  type: Assignment
  actions:
    on assignment:
    - trigger name:proximity state:true cooldown:5s
    - trigger name:click state:true
    - trigger name:chat state:true
    - chat "I has been assigned!"

  Interact Scripts:
  - 20 Q1StartScript2NPC2
  - 10 Q1StartScript1NPC2

#--------------------------------------------------------------------#

# Start Script for NPC1, Proximity Trigger checks for FLAG Q1CD1     #

# for the quest repeat timer, if TRUE it denies progression if FALSE #

# NARRATES a help message. Click Trigger is in the same step as the  #

# Proximity trigger so no FLAG needs to be set for them to use it    #

# Click trigger does similar as Proximity Trigger, checks for Q1CD1  #

# If TRUE denies a repeat of the quest with a random NARRATE.        #

# Q1Task1 is a timer that waits for a Chat Trigger, if the trigger   #

# doesn't fire within 20sec it resets the flag. It also turns on a   #

# flag for 20 sec Q1CD1 which is needed for Q1StartScript2NPC1       #

#--------------------------------------------------------------------#

Q1StartScript1NPC1:
  type: Interact
  requirements:
    mode: none
    list:
  steps:
    1:
      Proximity Trigger:
        entry:
          script:
          - IF <player.flag[Q1CD1]> == TRUE RUN 'Q1Task6'
            ELSE NARRATE format:QuestFormat "Oh thank god your here, <&b><PLAYER.NAME><&2> I need your help!"
        exit:

      Click Trigger:
        script:
        - IF <player.flag[Q1CD1]> == TRUE RUN 'Q1Task7'
          ELSE RUN 'Q1Task1'

#--------------------------------------------------------------------#

# Used for chat trigger, requires FLAG Q1CD2 to be true to run.      #

# Triggers are Yes and NO, they have to say a trigger to move on     #

# YES accepts the quest and NO denies it.                            #

# NARRATES what needs to be said and changes Q1 FLAG accordingly     #

#--------------------------------------------------------------------#

Q1StartScript2NPC1:
  type: Interact
  requirements:
    mode: ALL
    list:
    - FLAGGED Q1CD2
  steps:
    1:
      Chat Trigger:
        1:
          Trigger: /Yes/, I will go look for her.
          Script:
          - ENGAGE NOW
          - NARRATE format:QuestFormat "Oh thank you so much, hurry she could be in danger!"
          - FLAG Q1:1
          - DISENGAGE
        2:
          Trigger: /No/, I have better things to do.
          Script:
          - NARRATE format:QuestFormat "What sort of monster are you? My little girl could be in real danger out there."
          - FLAG Q1:0

#--------------------------------------------------------------------#

# This script is really just a buffer for when the players are       #

# moving on to the next NPC, if they come back before, they get a    #

# "Go to this NPC" message. Next Step is Q1StartScriptNPC2           #

#--------------------------------------------------------------------#

Q1StartScript3NPC1:
  type: Interact
  requirements:
    mode: ALL
    list:
    - FLAGGED Q1:1
  steps:
    1:
      Click Trigger:
        script:
        - NARRATE format:QuestFormat "What are you waiting for? Time is of the essence!"

Q1Task1:
  Type: Task
  Script:
    - ENGAGE NOW
    - NARRATE format:QuestFormat "My daughter Lizzie, said she was going to go play up the hill by the dragon."
    - WAIT 1
    - NARRATE format:QuestFormat "But she has not come home for dinner, could you go check if she is alright?"
    - NARRATE "<&b><&o>[HINT]<&r> <&a>You can say <&b><&o>Yes<&r> <&a>to accept or <&b><&o>No<&r><&a> to decline"
    - FLAG Q1CD2 DURATION:20s
    - DISENGAGE

Q1Task6:
  Type: Task
  Script:
    - ENGAGE NOW
    - RANDOM {
      - NARRATE format:QuestFormat "What a beautiful day."
      - NARRATE format:QuestFormat "Hey <&b><PLAYER.NAME><&2>, how are you today?" }
    - DISENGAGE

Q1Task7:
  Type: Task
  Script:
    - ENGAGE NOW
    - RANDOM {
      - NARRATE format:QuestFormat "Hehe.. that tickles!"
      - NARRATE format:QuestFormat "Don't you have anything better to do?"
      - NARRATE format:QuestFormat "Whats with all the poking?" }
    - DISENGAGE
#--------------------------------------------------------------------#

# This is the Start Script for NPC2, same as yje NPC1 start script   #

# It checks for the proper FLAGS Q1 needs to be 1, if FLAG Q1CD1 is  #

# TRUE they already complete the quest and need to wait for timer.   #

# Q1Task2 is some NARRATEs and FLAGS Q1CD2 for 20 seconds for the    #

# Chat Trigger like before.                                          #

# Q1Task3 is just some RANDOM NARRATEs                               #

#--------------------------------------------------------------------#

Q1StartScript1NPC2:
  type: Interact
  requirements:
    mode: none
    list:
  steps:
    1:
      Proximity Trigger:
        entry:
          script:
          - IF <player.flag[Q1]> == 1 RUN 'Q1Task4'
            ELSE RUN 'Q1Task5'
        exit:

      Click Trigger:
        script:
        - IF <player.flag[Q1CD1]> == TRUE RUN 'Q1Task3'
          ELSE IF <player.flag[Q1]> == 1 RUN 'Q1Task2'
          ELSE RUN 'Q1Task3'

#--------------------------------------------------------------------#

# Same Chat Trigger as NPC1 except triggers are SORRY and NEVERMIND  #

# Requires FLAG Q1CD2 to be run, which is handled with Q1Task2,      #

# FLAGS Q1 accordingly to what trigger is fired.                     #

#--------------------------------------------------------------------#

Q1StartScript2NPC2:
  type: Interact
  requirements:
    mode: ALL
    list:
    - FLAGGED Q1CD2
  steps:
    1:
      Chat Trigger:
        1:
          Trigger: /Yes/ you are safe now.
          Script:
          - ENGAGE NOW
          - NARRATE format:QuestFormat "My hero! Here take these as a thank you, I found them up here."
          - NARRATE format:QuestReward "hands you <&b><&o>2 Iron Ingots<&r><&2>."
          - FLAG Q1CD1 DURATION:21600s
          - FLAG Q1:0
          - GIVE 265 QTY:2
          - DISENGAGE
        2:
          Trigger: /No/, just came to ask if you could stop screaming!
          Script:
          - NARRATE format:QuestFormat "Oh, sorry. I will try to keep it down..."

Q1Task2:
  Type: Task
  Script:
    - ENGAGE NOW
    - NARRATE format:QuestFormat "Have you come to save me?"
    - NARRATE "<&b><&o>[HINT]<&r> <&a>You can say <&b><&o>Yes<&r> <&a>to accept or <&b><&o>No<&r><&a> to decline"
    - FLAG Q1CD2 DURATION:20s
    - DISENGAGE

Q1Task3:
  Type: Task
  Script:
    - ENGAGE NOW
    - RANDOM {
      - NARRATE format:QuestFormat "Whats with all the poking?" 
      - NARRATE format:QuestFormat "Hehe.. that tickles!" }
    - DISENGAGE

Q1Task4:
  Type: Task
  Script:
    - ENGAGE NOW
    - RANDOM {
      - NARRATE format:QuestFormat "Help! Please somebody help me!" 
      - NARRATE format:QuestFormat "Help! I'm stuck up here!" }
    - DISENGAGE

Q1Task5:
  Type: Task
  Script:
    - ENGAGE NOW
    - RANDOM {
      - NARRATE format:QuestFormat "Wow, the view from up here is amazing!" 
      - NARRATE format:QuestFormat "I like to come up here to think." 
      - NARRATE format:QuestFormat "It's so peaceful up here." 
      - NARRATE format:QuestFormat "Sometimes I just come up here to look at the clouds and let time drift on over me." }
    - DISENGAGE