Paste #3481: Edit of P#3479 - Edit of P#3478 - Edit of P#3477 - Edit of P#3476 - Edit of P#3475 - Edit of P#3473

Date: 2014/04/14 14:37:53 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


BanditKing:
  type: assignment

  default constants:

    RewardAmount: 1000
    Quest Repeat Timeout: 86400
    Quest Reset Timeout: 86000
  interact scripts:
  - 10 BanditKingKiller

  actions:
    on assignment:
    - trigger name:chat toggle:true
    - trigger name:click toggle:true
    - trigger name:proximity toggle:true
    - trigger name:damage toggle:true
    - execute as_npc "npc sel <npc.id>"
    - execute as_npc "npc vulnerable"

BanditKingKiller:
  type: interact
  steps:
    1:
      proximity trigger:
        entry:
          script:
          - run BanditKingKillerCheckReq

      click trigger:
        script:
        - run BanditKingKillerCheckReq

      damage trigger:
        script:
          - ^random {
          - chat "<red>Oucch! <yellow>You really don't want to do that kid...!"
          - chat "<red>Aaarrggg! <yellow>Hit me again, and the guards will come.!"
          - chat "<red>Huh, I can't feel my arm...? <yellow>AH< MY ARM! WHERE IS IT?!"
          - chat "<red>Please don't hurt me! <yellow>I have never done anything bad to you!"
          - chat "<red>Heh, go jump off a bridge brat! <yellow>" }
    2:
      chat trigger:
        StartQuest:
          Trigger: /Yes/, I'll do it.
          script:
          - flag <player> ZombieKiller:Started "duration:<npc.constant[Quest Reset Timeout]>"
          - listen kill npc.BKingCharles type:Npc "script:BKingQuestCompleted"
          - Chat "<yellow>Yes, maybe now we can get the bloody Bandits to stop raiding our trade carts! Come back when he is dead, I'll reward you well."
          - narrate "<red>End The Bandit King - Quest Started"

        DenyQuest:
          trigger: /No/, I'm not interested sorry.
          script:
          - random {
            - chat "Alright then, come back if you change your mind"
            - chat "I guess the Bandits are too tough for ya"
                     }
          - ZAP step:1
        proximity trigger:
          exit:
            script:
            - ZAP step:1
            click trigger:
              script:
              - run BanditKingKillerCheckReq
        damage trigger:
          script:
          - ^random {
            - chat "<red>Oucch! <yellow>You really don't want to do that kid...!"
            - chat "<red>Aaarrggg! <yellow>Hit me again, and the guards will come.!"
            - chat "<red>Huh, I can't feel my arm...? <yellow>AH< MY ARM! WHERE IS IT?!"
            - chat "<red>Please don't hurt me! <yellow>I have never done anything bad to you!"
            - chat "<red>Heh, go jump off a bridge brat! <yellow>" }
          - zap step:1

BKkillerGeneralChat:
  type: task
  script:
  - ^random {
    - chat "<yellow>Dude, if these Bandits keep going, my business will be ruined!"
    - chat "<yellow>I lost three carts yesterday... Three! I only sent out One!"
    - chat "<yellow>Nobody is willing to take the Bandit King on..."
    - chat "<yellow> Yep, took her leg right off!"}




BanditKingKillerCheckReq:
  type: task
  script:
    - if <player.flag[BKingKiller]> == Started chat "<yellow>Hi <white><player.name><yellow>, please come back to me when you've killed <red>The Bandit King!"
    else if <player.flag[ZombieKiller]> == ClaimReward chat "<white><player.name><yellow>, come over here! Come get your <gold>reward<yellow> for killing the bandit king!"
    else if <player.flag[ZombieKiller]> == Claimed chat "<yellow>Thanks for your help <white><player.name><yellow>, please come back later to help me again."
    else run BKkillerquestdetail

BKkillerquestdetail:
  type: task
  script:
  - random {
    - chat "<yellow>Hey Buddy! Yeah, You <player.Name>! Wanna kill someone for me?"
    - chat "<yellow>Wanna Job Son? Should be simple."
    - chat "<yellow>Mind giving me a hand dude?"}
  - random {
    - chat "<yellow>Kill the Bandit King Herald and I'll pay you $1000"
    - chat "<yellow>Navigate through the Bandit Caves and kill their leader for $1000"
    - chat "<yellow>The reward for killing the Bandit King will be a total of $1000"}

  - narrate "<red>Say<&co>"
  - ^narrate "  <blue>Yes<blue> <gray>or<red> No"
  - ^zap "s@BKingKiller" step:2

BKQuestComplete:
  type: task
  script:
  - ^flag <player> BKingKiller:Claimed "duration:<npc.constannt[Quest Repeat Timeout]>"
  - chat "<yellow>Yes, You actually did it! Well, they will probably have a new king tomorrow, but until then, thanks!"
  - ^give money qty:<npc.constant[RewardAmount]>
  - ^narrate "<red><npc.name> pays you <gold><npc.constant[RewardAmount]> <red><player.money.currency>."