Paste #11567: Untitled Paste

Date: 2014/11/27 05:25:41 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


# +----------------------------------
# |   Quest: A Bad Initiation
# +----------------------------------

# Derrick NPC

Derrick_NPC:
    type: assignment
    interact scripts:
    - 10 Derrick_Script
    actions:
        on assignment:
        # These triggers enable interaction with an NPC via chatting, clicking and entering proximity
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false

Derrick_Script:
    type: interact
    steps:
        1:
            proximity Trigger:
                entry:
                    Script:
                      - lookclose <npc> state:true
#                      - if <player.flag[Insubordinate]> {
                      - if <player.flag[Insubordinate]> == null {
                        } else {
                        - wait 5
                        - narrate "<green>[Prison Guard] -> You<&co> <yellow>You’re awake."
                        - wait 3
                        - narrate "<green>[Prison Guard] -> You<&co> <yellow>I have strict orders from Aris to not release you unless you agree to take the assessment."
                        - wait 3
                        - narrate "<green>[Prison Guard] -> You<&co> <yellow>Look, it’s not much of a test. You’re getting yourself arrested over nothing, really."
                        - wait 3
                        - narrate "<green>[Prison Guard] -> You<&co> <yellow>She’ll give you a set of armor, teach you how to use a weapon, and then send you on your way."
                        - wait 3
                        - narrate "<green>[Prison Guard] -> You<&co> <yellow>It’s dangerous out there, and the city is just trying to keep its citizens safe."
                        - wait 2
                        - narrate "<green>[Prison Guard] -> You<&co> <yellow>So what do you say? Will you take the assessment?”"
                        }
            chat Trigger:
                1:
                    Trigger: "/regex:.*Yes.*|.*yes.*|.*Yeah.*|.*yeah.*|.*okay.*|.*Okay.*|.*sure.*|.*alright.*/"
                    Script:
                        - wait 1
                        - narrate "<green>[Prison Guard] -> You<&co> <yellow>Well alright then"
                        - wait 1
                        - narrate "<aqua>The Prison Guard opens the cell door."
                        - switch l@9432,48,5649,world state:on
                        - wait 2
                        - narrate "<green>[Prison Guard] -> You<&co> <yellow>Report to Aris straight away, you'll find her up the castle stairs at the Barracks."
                        - wait 3
                        - narrate "<blue>Quest Started: <gold>Redemption"
                        - narrate "<blue>Quest Objective: <gold>Report to Aris in the Barracks"
                        - execute as_server "settarget <player.name> 9445 0 5626"
                2:
                    Trigger: "/regex:.*Derrick.*|.*derrick.*|.*Derrik.*|.*derrik.*|.*derick.*|.*Derick.*|.*Drrick.*|.*Der.*/"
                    Script:
                        - narrate "<green>[Derrick] -> You<&co> <yellow>Are you going to complete the assessment?"
                3:
                    Trigger: "/regex:.+/"
                    Script:
                        - narrate "<green>[Derrick] -> You<&co> <yellow>Look, I can’t let you out, unless you agree to complete the assessment. My name is Derrick. Call me when you’re ready to leave."
# Aris NPC

Aris_Barracks_NPC:
    type: assignment
    interact scripts:
    - 10 Aris_Barracks_Script
    actions:
        on assignment:
        # These triggers enable interaction with an NPC via chatting, clicking and entering proximity
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false

Aris_Barracks_Script:
    type: interact
    steps:
        1:
            proximity Trigger:
                entry:
                    Script:
                      - if <player.flag[Quest_Gearing_Up]> == 1 {
                        - if <player.flag[Insubordinate]> {
                          - switch l@9432,48,5649,world state:off
                          - wait 1
                          - narrate "<green>[Aris] -> You<&co> <yellow>Seems you’ve finally come to your senses!"
                          - wait 2
                          - narrate "<green>[Aris] -> You<&co> <yellow>Look, I’m just going to teach you a few things that might very well save your life."
                          - wait 2
                          - narrate "<green>[Aris] -> You<&co> <yellow>These lands aren’t safe - especially at night. If the creatures aren’t bad enough, we’ve got bandits, too."
                          - wait 2
                          - narrate "<green>[Aris] -> You<&co> <yellow>The faster we get this done, the faster you can leave. So let’s start…"
                          - wait 3
                          - flag player Cathar_Reputation:+:25
                          - flag player Quest_Gearing_Up:!
                          - narrate "<gold>You gained 25 <blue>Cathar Reputation <gold>for completing the quest Redemption!"
                          - wait 2
                          - run Guard_Walk as:n@1
                          } else {
                          - flag player Cathar_Reputation:+:25
                          - flag player Quest_Gearing_Up:!
                          - narrate "<gold>You gained 25 <blue>Cathar Reputation <gold>for completing the quest Gearing Up!"
                          - wait 2
                          - run Guard_Walk as:n@1
                          }
                        }
# Guard NPC

Guard_NPC:
    type: assignment
    interact scripts:
    - 10 Guard_Walk
    actions:
        on assignment:
        # These triggers enable interaction with an NPC via chatting, clicking and entering proximity
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false

Guard_Walk:
    type: task
    Script:
      - ^spawn <npc> <npc.anchor[start]>
      - lookclose <npc> state:true
      - walk <npc.anchor[end]> auto_range
      - wait 2
      - narrate "<green>[Guard] -> Aris<&co> <yellow>Captain! We’ve got a hostage situation!"
      - wait 2
      - narrate "<green>[Guard] -> Aris<&co> <yellow>A witch has captured a young woman and has escaped to a shack in the forest!"
      - wait 2
      - narrate "<green>[Guard] -> Aris<&co> <yellow>We must act at once!"
      - wait 3
      - narrate "<green>[Aris] -> Guard<&co> <yellow>Send a squad to scout the situation, I’ll be there shortly."
      - wait 3
      - narrate "<green>[Aris] -> You<&co> <yellow>Rookie! Come with me and I’ll count this as your official assessment. Report to the Guardhouse for a quick briefing, then come find me in the forest!"
      - wait 3
      - narrate format:Quest "A Bad Initiation"
      - narrate format:QuestObj "Report back to the Guardhouse near the south gate"
      - execute as_server "settarget <player.name> 9351 0 5866"
      - flag player Quest_A_Bad_Initiation:0

# Initiate NPC

A_Bad_Initiation_Initiate_NPC:
    type: assignment
    interact scripts:
    - 10 A_Bad_Initiation_Initiate_Script
    actions:
        on assignment:
        # These triggers enable interaction with an NPC via chatting, clicking and entering proximity
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false

A_Bad_Initiation_Initiate_Script:
    type: interact
    steps:
        1:
            proximity Trigger:
                entry:
                    Script:
                      - if <player.flag[Quest_A_Bad_Initiation]> == 1 {
                        - narrate "<blue>New Quest Objective <gold>Gather your Weapons, and your Courage."
                        - wait 2
                        - if <player.flag[Insubordinate]> {
                          - narrate "<green>[Initiate] -> You<&co> <yellow>Aris, I rushed supplies to the rendezvous, as requested."
                          - wait 2
                          - narrate "<green>[Initiate] -> You<&co> <yellow>You there, I’m guessing you’re here to complete your assessment..."
                          - wait 2
                          - narrate "<green>[Initiate] -> You<&co> <yellow>Well then, you’ll need a weapon and some armor. Do you prefer sword, or bow?"
                          } else {
                          - narrate "<green>[Initiate] -> You<&co> <yellow>Aris, I rushed supplies to the rendezvous, as requested."
                          - wait 2
                          - narrate "<green>[Initiate] -> You<&co> <yellow>You there, I’m guessing you’re here to complete your assessment..."
                          - wait 2
                          - narrate "<green>[Initiate] -> You<&co> <yellow>Well then, you’ll need a weapon. Do you prefer sword, or bow?"
                          }
                        }
            chat Trigger:
                1:
                    Trigger: "/regex:.*Bow.*|.*bow.*|.*Archer.*/"
                    Script:
                      - zap step:GotStuff
                      - flag player Quest_A_Bad_Initiation:2
                      - narrate "<green>[Initiate] -> You<&co> <yellow>Alright then - here you go. And some arrows, too."
                      - wait 2
                      - give i@bow qty:1
                      - give i@arrow qty:20
                      - narrate "<green>[Initiate] -> You<&co> <yellow>Be sharp, and stay back. Don’t forget to square your elbows."
                      - wait 2
                      - narrate "<green>[Initiate] -> You<&co> <yellow>Hold your breath, aim, then release for the best shot. Good luck in there."
                      - if <player.flag[Insubordinate]> {
                        - give i@chainmail_helmet qty:1
                        - give i@chainmail_chestplate qty:1
                        - give i@chainmail_leggings qty:1
                        - give i@chainmail_boots qty:1
                        - wait 2
                        - narrate "<Dark_Green>You've received a <gold>set of Chainmail Armor <Dark_Green>from the Initiate!"
                        - wait 1
                        }
                      - narrate "<Dark_Green>You've received a <gold>bow <Dark_Green>from the Initiate"
                      - wait 2
                      - narrate "<Dark_Green>You've received a <gold>20 arrows<Dark_Green> from the Initiate"
                      - wait 2
                      - narrate format:NewQuestObj "Defeat the Witch and save the Hostage!"
                      - execute as_server "settarget <player.name> 9279 0 6046"
                      - wait 2
                      - narrate "<green>[Aris] -> You<&co> <yellow>I need you to enter here."
                      - wait 1
                      - narrate "<green>[Aris] -> You<&co> <yellow>Now that I think about it, there’s a small cave near the beach."
                      - wait 2
                      - narrate "<green>[Aris] -> You<&co> <yellow>If that’s an exit, there may be a boat waiting for her to escape with our hostage."
                      - wait 2
                      - narrate "<green>[Aris] -> You<&co> <yellow>Go in without me, I’ll cut her off, and we’ll meet in the middle. Be careful."
                2:
                    Trigger: "/regex:.*Sword.*|.*sword.*|.*Blade.*/"
                    Script:
                      - zap step:GotStuff
                      - flag player Quest_A_Bad_Initiation:2
                      - narrate "<green>[Initiate] -> You<&co> <yellow>Alright then - here you go."
                      - give i@iron_sword qty:1
                      - wait 2
                      - narrate "<green>[Initiate] -> You<&co> <yellow>Keep on the defensive, don’t get too close."
                      - wait 2
                      - narrate "<green>[Initiate] -> You<&co> <yellow>Remember to keep your posture and square your hips."
                      - wait 2
                      - narrate "<green>[Initiate] -> You<&co> <yellow>Good luck in there."
                      - if <player.flag[Insubordinate]> {
                        - give i@chainmail_helmet qty:1
                        - give i@chainmail_chestplate qty:1
                        - give i@chainmail_leggings qty:1
                        - give i@chainmail_boots qty:1
                        - wait 2
                        - narrate "<Dark_Green>You've received a <gold>set of Chainmail Armor <Dark_Green>from the Initiate!"
                        - wait 1
                        }
                      - narrate "<Dark_Green>You've received <gold>Iron Sword <Dark_Green>from the Initiate"
                      - wait 2
                      - narrate "<blue>New Quest Objective<&co> <gold>Defeat the Witch and save the Hostage!"
                      - wait 2
                      - narrate "<green>[Aris] -> You<&co> <yellow>I need you to enter here."
                      - wait 1
                      - narrate "<green>[Aris] -> You<&co> <yellow>Now that I think about it, there’s a small cave near the beach."
                      - wait 2
                      - narrate "<green>[Aris] -> You<&co> <yellow>If that’s an exit, there may be a boat waiting for her to escape with our hostage."
                      - wait 2
                      - narrate "<green>[Aris] -> You<&co> <yellow>Go in without me, I’ll cut her off, and we’ll meet in the middle. Be careful."
            Click Trigger:
                Script:
                  - narrate "<green>[Initiate] -> You<&co> <yellow>. Do you prefer sword, or bow?"
        GotStuff:
            Click Trigger:
                Script:
                  - narrate "<green>[Initiate] -> You<&co> <yellow>Well go on then, just enter the shack and jump down."
A_Bad_Initiation_Chest_NPC:
    type: assignment
    interact scripts:
    - 10 A_Bad_Initiation_Chest_Script
    actions:
        on assignment:
        # These triggers enable interaction with an NPC via chatting, clicking and entering proximity
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false

A_Bad_Initiation_Chest_Script:
    type: interact
    steps:
        1:
            proximity Trigger:
                entry:
                    Script:
                      - if <player.flag[Quest_A_Bad_Initiation]> == 2 {
                        - despawn n@39
                        - despawn n@40
                        - flag player Quest_A_Bad_Initiation:3
                        - narrate "<gold>Treasure Chests can contain many unique things, including mythic items!"
                        - wait 2
                        - narrate "<gold>You can find Identification Tomes in Treasure Chests or buy them from our store."
                        - wait 2
                        - narrate "<gold>Identification Tomes will identify Unidentified Mythic Gear."
                        - wait 2
                        - narrate "<gold>Treasure Chests can also contain spells, gold, money, and other valuables."
                        - execute as_server "mm mobs spawn Witch 1 world,9279,27,6046"
                        }
Dead_Witch:
    type: task
    Script:
      - run Initiate_Dead_Witch as:n@40
      - ^spawn <npc> <npc.anchor[start]>
      - wait 2
      - ~walk <npc.anchor[1]> auto_range
      - ~walk <npc.anchor[2]> auto_range
      - narrate "<green>[Aris] -> You<&co> <yellow>Well done! I apologize for putting you in that situation."
      - wait 2
      - narrate "<green>[Aris] -> You<&co> <yellow>It seems we've arrived too late."
      - wait 2
      - narrate "<green>[Aris] -> You<&co> <yellow>None of us knew the witch would have that kind of power."
      - wait 2
      - narrate "<green>[Aris] -> You<&co> <yellow>I still have some things to wrap up here."
      - wait 2
      - narrate "<green>[Aris] -> You<&co> <yellow>Return to the city and find the Royal Steward for compensation on behalf of the kingdom of Cathar."
      - wait 2
      - narrate "<green>[Aris] -> You<&co> <yellow>You've earned it!"
      - wait 1
      - narrate "<gold>You gained <blue>125 Cathar Reputation <gold>for slaying The Witch!"
      - flag player Cathar_Reputation:+:125
      - wait 2
      - narrate format:NewQuestObj "Find the Royal Steward in the castle for compensation."
      - flag player Quest_A_Bad_Initiation:4
      - execute as_server "settarget <player.name> 9457 0 5666"

Initiate_Dead_Witch:
    type: task
    Script:
      - ^spawn <npc> <npc.anchor[start]>
      - wait 3
      - ~walk <npc.anchor[1]> auto_range
      - ~walk <npc.anchor[2]> auto_range