Paste #72965: Untitled Paste

Date: 2020/07/24 22:49:50 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


father_joseph1:
    type: assignment
    actions:
        on assignment:
        - trigger name:click state:true
        - trigger name:chat state:true
    interact scripts:
    - father_joseph1_interact

father_joseph1_interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                  - if <player.has_flag[npc_engaged]>:
                      - stop
                  - flag player npc_engaged
                        # - engage
                  - if !<player.has_flag[father_joseph_quest1]>:
                    - narrate format:cchat "Holy child. Welcome to our home of worship."
                    - wait 45t
                    - narrate format:cchat "I don't believe we have met before. I am Father Joseph, the holy servant of this settlement"
                    - wait 45t
                    - narrate format:cchat "You look like a capable fellow. I have a favor to ask. Do not feel obligated to accept"
                    - wait 45t
                    - narrate format:cchat "Do you think you can be of service to me for a quick task? I will reward you"
                    - wait 45t
                    - narrate "[<&o>Type <&b><&o>Yes<&f><&o> or <&b><&o>No<&f>]"
                    - flag player npc_engaged:!
                  - else:
                    - narrate format:cchat "Have you found the papers? No? No rush, my son."
                    - flag player npc_engaged:!
                    - stop

            chat trigger:
                    1:
                        trigger: "/Yes/ I accept the quest"
                        script:
                         - if <player.has_flag[npc_engaged]>:
                           - stop
                         - if !<player.has_flag[father_joseph_quest1]>:
                           - flag player npc_engaged
                           - flag player father_joseph_quest1
                           - flag player father_joseph_notes_count:0
                           - narrate format:cchat "Wonder! Wonderful!"
                           - wait 25t
                           - flag player Father_joseph_quest1_marker:Active
                           - flag player fjq1:<&6>
                           - narrate format:cchat "I ask you but a simple favor."
                           - wait 45t
                           - narrate format:cchat "Just West of here, not even 100 meters away, there lies the ruins of an old home"
                           - wait 60t
                           - narrate format:cchat "Inside those ruins are some papers of mine. Religious texts."
                           - wait 60t
                           - narrate format:cchat "If only my body was in better shape I could search for them. So please, if you can retrieve my papers, I would be in your debt"
                           - wait 60t
                           - title "title:<gold>[‡ Find Joseph's Papers ‡]" "subtitle:<white>——————————————————————————" fade_in:1s stay:5s fade_out:2s
                           - flag player npc_engaged:!
                    2:
                        trigger: "/No/ I cannot"
                        script:
                          - if <player.has_flag[npc_engaged]>:
                            - stop
                          - if !<player.has_flag[father_joseph_quest1]>:
                            - flag player npc_engaged
                            - narrate format:cchat "Well then...If you change your mind, I will be here."
                            - flag player npc_engaged:!
        2:
            click trigger:
                script:
                    - if <player.flag[father_joseph_notes_count]> == 1 && <player.item_in_hand.book.author> == "A Concerned Neighbor" && <player.item_in_hand.book.title> == "Accusation of Heresey":
                      - if <player.has_flag[father_joseph_quest1_violation]>:

                        - take iteminhand
                        - flag player joseph_engaged:!
                        - flag player father_joseph_notes_count:!
                        - narrate format:cchat "Why thank you very much."
                        - wait 45t
                        - narrate format:cchat "The pages are in near perfect condi...<&o>tion"
                        - wait 60t
                        - narrate format:cchat "<&o>hmmm...."
                        - wait 35t
                        - narrate format:cchat "It appears that someone has handled these notes recently..."
                        - wait 45t
                        - narrate format:cchat "Regardless, these notes will undoubtedly aid in my research. Here is your reward"
                        - wait 35t
                        - give emerald quantity:5
                        - title "title:<blue>[‡ Quest Complete ‡]" "subtitle:<white>——————————————————————————" fade_in:1s stay:5s fade_out:2s
                        - flag player father_joseph_quest1_finished
                        - flag player Father_joseph_quest1_marker:Complete
                        - flag player fjq1:<&2>
                        - stop
                      - else:
                        - take iteminhand
                        - flag player joseph_engaged:!
                        - flag player father_joseph_notes_count:!
                        - narrate format:cchat "Why thank you very much."
                        - wait 45t
                        - narrate format:cchat "The pages are in near perfect condition. Excellent"
                        - wait 45t
                        - narrate format:cchat "These notes will undoubtedly aid in my research. Thank you very much. Here is your reward"
                        - wait 35t
                        - give emerald quantity:10
                        - title "title:<blue>[‡ Quest Complete ‡]" "subtitle:<white>——————————————————————————" fade_in:1s stay:5s fade_out:2s
                        - flag player father_joseph_quest1_finished
                        - flag player Father_joseph_quest1_marker:Complete
                        - flag player fjq1:<&2>
                        - stop
                    - else if <player.flag[father_joseph_notes_count]> == 1:
                        - narrate format:cchat "Do you have my notes?"
                        - flag player joseph_engaged:!
                        - stop
                    - else if <player.has_flag[father_joseph_quest1_finished]>:
                        - narrate format:cchat "Good day!"
                        - flag player joseph_engaged:!
                        - stop


father_joseph1_world:
  type: world
  events:
    on player opens inventory:
     # - if <context.inventory.location> == l@-81,56,145,world && <player.has_flag[father_joseph_quest1]>:
     # - if <context.inventory.location> == l@-81,56,145,world:
        - narrate "open chest"
        - if <player.has_flag[father_joseph_quest1]>:
          - flag player father_joseph_quest1:!
          - inventory add d:in@location[holder=l@-81,56,145,world] o:i@josephsNotes #-81,56,145,world
          - spawn spider l@-85,57,144,world 
          - narrate "open chest"

    on player clicks in inventory:
        - if <player.flag[father_joseph_notes_count]> == 0 && <context.item.book.author> == "A Concerned Neighbor" && <context.item.book.title> == "Accusation of Heresey":
          - flag player father_joseph_notes_count:++
          - zap s@father_joseph1_interact step:2
          - title "title:<red>[‡ Return to Joseph ‡]" "subtitle:<white>——————————————————————————" fade_in:1s stay:5s fade_out:2s

        ##  - narrate "has book!"
    on player right clicks npc with written_book:
      - if <player.flag[father_joseph_notes_count]> == 1 && <context.entity> == n@133:
      ##  - narrate "engage activated"
        - flag player joseph_engaged


    on player right clicks with written_book:
      - if !<player.has_flag[joseph_engaged]>:
        - if <player.flag[father_joseph_notes_count]> == 1 && <context.item.book.author> == "A Concerned Neighbor" && <context.item.book.title> == "Accusation of Heresey":
          - flag player father_joseph_quest1_violation
        ##  - narrate "violated"
      - else:
        - determine passively cancelled
      ##  - narrate "joseph engaged"


josephsNotes:
  type: book
  title: Accusation of Heresey
  author: A Concerned Neighbor
  signed: true
  text:
    - <&l>-To the Indisputable, Heretical, Blaspheme of the Redsands<&r><&nl><&nl><&l>You <&r>have brought the greatest shame to the noble and <&o>Godly<&r> <&nl>purpose that hath brought such good, well-natur'd souls to fulfill the work of our Lord <&o>(May his name
    - <&o>be forever praised). <&nl><&nl><&l> Curs'd be all <&r>that stand behind and beside you, for they work to conceil the wicked character that poisons your heart and spreads like a <&nl><&l>cancer, <&r>infecting the young and pure alike. I fear the only way to stop a disease so wretched, is to root it
    - out. For blighted crops will spread their ills to the healthy. Therefore, I <&l>demand<&r> that you remove yourself, and all those poison'd too, far, far from the many untainted hearts. Go. I care not where but that it is far. <&nl><&l>Go! <&r>Or I fear that your presence will filthy the harvest of
    - pure souls for the sake of our Lord. <&nl>Stay, and it is unforgivable. There will be <red><&l>BLOOD <&r>on your hands!
    - It is unforgivable