Paste #16267: Untitled Paste

Date: 2015/06/04 15:32:38 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"Quest Template":
    type: assignment
    interact scripts:
        - 100 QuestTemplate
    actions:
        on death by player:
            - narrate "not cool, man. Not cool."
"QuestTemplate":
    type: Interact
    Steps:
      1:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^chat "<red>What! You serve our mortal enemy, the Fidelis Militis!"
                     - ^queue clear
                   }
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:Example Quest|Do the example bingimathob|No location"
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "Fine. Then starve."
      2:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition <player.inventory.contains[i@Wand]>
                - ^if %objectiveCondition% {
                     - ^run CompleteObjective "def:Bug Stomping|<player.location>"
                     - ^give bread qty:40
                     - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   }
                #If the script is already complete, add a third step that tells the user that there are no more quests.
      3:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - chat "Thanks for your help earlier."