Paste #18775: halp

Date: 2015/07/28 09:30:21 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"Raider_Narglan":
  type: assignment
  actions:
    on assignment:
    - trigger name:chat toggle:true
    - trigger name:click toggle:true
  interact scripts:
  - 1 Raid_Narg1
"Raid_Narg1":
  type: interact
  steps:
    1:
      click trigger:
        script:
#stage 1 not yet accepted or completed
        - ^if <player.has_flag[Disrupt_Supply1_Accepted].not> && <player.has_flag[Disrupt_Supply1_Completed].not> {
          - ^chat "<green>Ahh just who I was looking for! We've just spotted the rebel miners down in the mine! I need you to get down there and take them out before they can resupply their metals!"
          - narrate "<green>Say <gold>'Yes'<green> to accept the quest - <gold>Distrupting Supply Lines<green>."
        }
#stage 1 accepted but does not have items and has not completed
        - ^if <player.inventory.contains[i@Pillaged_Metals].qty[10].not>  && <player.has_flag[Disrupt_Supply1_Completed].not> && <player.has_flag[Disrupt_Supply1_Accepted]> {
          - ^narrate "<red>You need 10 <white>Pillaged Metals<red> from the <white>Rebel Miners<red>."
        }
#stage 1 accepted and has items but has not completed - completes
        - ^if <player.inventory.contains[i@Pillaged_Metals].qty[10]>  && <player.has_flag[Disrupt_Supply1_Completed].not> && <player.has_flag[Disrupt_Supply1_Accepted]> {
          - ^take i@Pillaged_Metals qty:10
          - ^flag <player> Disrupt_Supply1_Completed duration:21600
          - ^flag Disrupt_Supply1_Accepted:!
          - ^chat "<green>Ahaha! They didn't stand a chance!"
          - ^narrate "<green>Quest Completed - <gold>Disrupting Supply Lines<green> You have been awarded 20 <gold>Adventure Tokens<green> and 1 <dark_gray>Heart of Darkness<green>."
          - ^give i@Heart_Of_Darkness qty:1
          - ^give i@Adventure_Token qty:20
          - ^playsound <player.location> sound:NOTE_PIANO pitch:1
          - playsound <player.location> sound:NOTE_PLING pitch:2
          - ^playsound <player.location> sound:NOTE_PIANO pitch:3
          - playsound <player.location> sound:NOTE_PLING pitch:4
          - ^playsound <player.location> sound:NOTE_PIANO pitch:5
          - playsound <player.location> sound:NOTE_PLING pitch:6
          - ^playsound <player.location> sound:NOTE_PIANO pitch:7
          - playsound <player.location> sound:NOTE_PLING pitch:8
          - ^narrate "<green>You can complete this quest again in 6 hours."
          - ^flag <player> Quests_Completed:+:1
          - narrate "<dark_red>Quest Unlocked: <gold>Disrupting Supply Lines - 2"
        }
#stage 2 not yet accepted but stage 1 completed
        - ^if <player.has_flag[Disrupt_Supply1_Completed]> && <player.has_flag[Disrupt_Supply2_Accepted].not> {
          - ^chat "<green>I've got some more dirty work for ya. That railway just north of the mine transports the enemies food & water. I need you to go to the railway and take out the <white>Rail Conductors<green>."
          - narrate "<green>Say <gold>'Yes'<green> to accept the quest - <gold>Distrupting Supply Lines - 2<green>."
        }
#stage 2 accepted but no kills
        - ^if <player.has_flag[Disrupt_Supply2_Accepted]> && <player.has_flag[RailConductorsDead].not> && <player.has_flag[Disrupt_Supply2_Completed].not> {
          - ^narrate "<red>You have killed <player.flag[ConductorKills]>/5 Rail Conductors."
        }
#stage 2 accepted and has kills and not completed - complete
        - ^if <player.has_flag[Disrupt_Supply2_Accepted]> && <player.has_flag[RailConductorsDead]> && <player.has_flag[Disrupt_Supply2_Completed].not> {
          - ^flag <player> Conductorkills:!
          - ^flag <player> RailConductorsDead:!
          - ^flag <player> Disrupt_Supply2_Completed duration:21600
          - ^flag Disrupt_Supply2_Accepted:!
          - ^chat "<green>Ahaha! They didn't stand a chance!"
          - ^narrate "<green>Quest Completed - <gold>Disrupting Supply Lines - 2<green> You have been awarded 25 <gold>Adventure Tokens<green> and 1 <dark_gray>Heart of Darkness<green>."
          - ^give i@Heart_Of_Darkness qty:1
          - ^give i@Adventure_Token qty:25
          - ^playsound <player.location> sound:NOTE_PIANO pitch:1
          - playsound <player.location> sound:NOTE_PLING pitch:2
          - ^playsound <player.location> sound:NOTE_PIANO pitch:3
          - playsound <player.location> sound:NOTE_PLING pitch:4
          - ^playsound <player.location> sound:NOTE_PIANO pitch:5
          - playsound <player.location> sound:NOTE_PLING pitch:6
          - ^playsound <player.location> sound:NOTE_PIANO pitch:7
          - playsound <player.location> sound:NOTE_PLING pitch:8
          - ^narrate "<green>You can complete this quest again in 6 hours."
          - ^flag <player> Quests_Completed:+:1
        }
# both stages compelted
        - ^if <player.has_flag[Disrupt_Supply2_Completed]> && <player.has_flag[Disrupt_Supply1_Completed]> {
          - narrate "<red>You can complete these quests every 6 hours. Come back later."
        }
      chat trigger:
        'Distrupting_Supplies1_Accept':
          trigger: /Yes/ sir!
          script:
#stage 1 acceptor
          - ^if <player.has_flag[Disrupt_Supply1_Accepted].not> && <player.has_flag[Disrupt_Supply1_Completed].not> {
            - ^flag <player> Disrupt_Supply1_Accepted
            - ^chat "<green>Well what are ya waitin for! Get down there and bring me back thier goodies!"
            - ^playsound <player.location> sound:LEVEL_UP
            - ^narrate "<green>Quest Accepted - <gold>Distrupting Supply Lines<green>."
          }
#stage 2 acceptor
          else if <player.has_flag[Disrupt_Supply1_Completed]> && <player.has_flag[Disrupt_Supply2_Accepted].not> && <player.has_flag[Disrupt_Supply2_Completed].not>{
            - ^flag <player> Disrupt_Supply2_Accepted
            - ^chat "<green>Alrighty then, I'll be waiting on ya to get back after you've killed <red>5 <green>of em!"
            - ^playsound <player.location> sound:LEVEL_UP
            - ^narrate "<green>Quest Accepted - <gold>Distrupting Supply Lines - 2<green>."
            - ^listen kill type:npc target:Rail_Conductor qty:5 script:Rail_Conductors_Dead
            - ^flag <player> ConductorKills:0
          }
          else {
            - narrate "<red>You can complete these quests every 6 hours. Come back later."
          }
"Rail_Conductors_Dead":
  type: task
  script:
  - ^flag <player> RailConductorsDead
  - flag <player> ConductorKills:!
  - ^narrate "<green>5 Rail Conductors Killed. Return to Narglan."
  - ^playsound <player.location> sound:LEVEL_UP
"Pillaged_Metals":
  type: item
  material: 101
  display name: <white>Pillaged Metals
  lore:
  - <gray>Quest Item