Paste #23338: p2b

Date: 2015/12/02 16:12:14 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#Priest simple quest (maybe)
#The priest in this script will give the quest
#The "dead npc" will give the completion flag
#this NPC on completion will give a reward
#This is for The Chapel Perilous that supports various priests of different orders
#Last edit - 2 Dec 2015
#Rev 0.2b
#
# First the Erisian Priest
#chat format
cchat:
  type: format
  format: "<&b><npc.name><&f> <&co> <&a><text>"
#
#Now the assignment script
ErisianPriest:
  type: assignment
  interact scripts:
  - 10 HailEris
  actions:
    on assignment:
#Here we go ahead and turn on the triggers and set the range of the proximity trigger.
    - trigger name:click state:false
    - trigger name:chat state:true
    - trigger name:proximity state:true radius:8
#Now we equip our priest with some gear.
    - ^equip <npc> head:i@air chest:i@ErisianTunic legs:i@ErisianLeggings boots:i@ErisianBoots
#
#Item scripts
ErisianTunic:
  type: item
  material: leather_chestplate
  color: co@PURPLE
  display name: Robes of an Erisian Priest
  lore:
  - The Purple Tunic of an Erisian Priest
  enchantments:
  - PROTECTION_PROJECTILE
ErisianLeggings:
  type: item
  material: leather_leggings
  color: co@PURPLE
  display name: Leggings of an Erisian
  lore:
  - The Purple Leggings of an Erisian Priest
ErisianBoots:
  type: item
  material: leather_boots
  color: co@PURPLE
  display name: Boots of an Erisian
  lore:
  - The Purple Boots of an Erisian Priest
  enchantments:
  - PROTECTION_FALL
PrincipiaDiscordia:
  type: book
  title: Principia Discordia
  author: Malaclypse the Younger
  text:
  - Hail Eris!<n>All Hail Kallisti!<n>A proper greeting,<n>Don't forget!<p> In the begining there was chaos,<n>and the Gods strove<n>to impose order.
#
#Interaction scripts. lets use all the triggers just for fun, and a chat trigger that is 
#hidden but hinted at in the PrincipiaDiscordia
#this will be important for future tie in quests but will trigger it here also with a reward)
HailEris:
  type: interact
  steps:
    1:
      proximity trigger:
        entry:
          script:
          - chat "Hail Eris! My friend. I am <npc.name> a travelling priest"
          - chat "of the Erisian Order. I have /news/ of the world if you are interested."
          - chat "I need your /help/ if you are interested in a quest."
        exit:
          script:
          - chat "Farewell friend!"
    2:
      chat trigger:
        1:
          trigger: /News/ of the world
          script:
          - narrate "Things have gotten bad here in the world."
          - narrate "the Illuminati is sending out monks and we do"
          - narrate "not know the purpose of thier missions. If"
          - narrate "learn anything be sure and let one of the"
          - narrate "priests of the Erisian Order know."
        2:
          trigger: /All/ Hail Kallisti
          script:
          - narrate "Well a member of the Order! "
        3:
          trigger: "/Help/ you if I can"
          script:
          - narrate "Great! I appreciate that <player.name>!"
          - narrate "Just give me a click and we will begin"
          - trigger name:click state:true
          - zap step:3 script:s@HailEris player:<player>
#this step explains the quest and 
    3:
      click trigger:
        script:
        - if <player.flag[StaffQuestBegun].is[==].to[true]> && <player.flag[StaffQuestItem].is[==].to[true]> {
          - zap step:1 script:QuestComplete player:<player>
        }
          - narrate "I have recently discovered that one of the Order"
          - narrate "had been taken and killed. Among his belongings was a staff."
          - narrate "Bring it back and click me and I will reward you well."
          - narrate "What say you? /Yes/ or /No/"
    4:
      chat trigger:
        1:
          trigger: /Yes/ I accept this quest
          script:
#here we need to set some quest flags on the player to check later when the item is found and brought back.
#something like if has flag<[StaffQuestBegun].is[==].to[true]> and flag<[StaffQuestItem].is[==].to[true]> then reward
#our dead NPC will "give" them the item (and toggle the flag)when he is clicked on. maybe a nasty suprise.. can i spawn some mythic mobs?!?!?. 
          - flag <player> StaffQuestBegun:true
          - flag <player> StaffQuestItem:false
          - narrate "I am glad for your help <player.name>!"
          - narrate "Not far from here to the <Direction of body> are the remains"
          - narrate "of Brother Jim. He fought hard against his enemies."
          - narrate "And they know not the power of his Staff"
          - narrate "You will find them in a cave marked with purple wool at the entrance"
      2:
        trigger: /No/ it sounds too dangerous for me
        script:
        - narrate "<player.name> I am sorry to hear that."
        - narrate "If you change your mind please let me know."
QuestComplete:
  type: task
  script:
  - narrate "Great your have brought brother Jims staff back!"