Greylocke


Author: TheBatchelo
Created: 2014-07-11T20:16:26-0400
Edited: 2014-07-11T20:16:26-0400
Denizen Version: 0.9.4
Views: 2
Downloads: 862
Likes: 0


WGET
Description: The other half of the Librarian script (unofficial)

It however does not check if the player bought the book as the original author has intended. Because i couldn't figure it out...

"Greylocke":
  type: assignment

  default constants:

    PotionQty: 1
    WoolQty: 1
    SugarQty: 1
    BottleQty: 1

  interact scripts:
  - 10 Crafting

  actions:
    on assignment:
    # This enables interaction with NPC via clicking, chatting, proximity and damage.
    - trigger name:chat toggle:true
    - trigger name:click toggle:true
    - trigger name:proximity toggle:true
    - trigger name:damage toggle:true
    # Make the NPC so they can be killed by the player. They will respawn a few seconds later.
    - execute as_npc "npc sel <npc.id>"
    - execute as_npc "npc vulnerable"
    - execute as_npc "npc respawn 1200"
    # Make NPC look at players close by
    - lookclose state:true

"Crafting":
  type: interact

  steps:
    1:
      chat trigger:
        'Fire':
          Trigger: Could you make a /Fire/ Resistance potion from these materials?
          script:
          - if <player.inventory.contains[35:4].qty[<cons:WoolQty>]> && <player.inventory.contains[353].qty[<cons:SugarQty>]> && <player.inventory.contains[374].qty[<cons:BottleQty>]> {
             - narrate "<red> You hand <white><npc.name> <white><cons:WoolQty> Yellow Wool<red>, <white><cons:SugarQty> Sugar<red>, and <white><cons:BottleQty> Vial<red>."
             - ^take i@35:4 qty:<cons:WoolQty>
             - ^take i@353 qty:<cons:SugarQty>
             - ^take i@374 qty:<cons:BottleQty>
             - chat "<yellow>Very well..."
             - wait 4
             - ^cast blindness power:5 duration:10
             - ^cast confusion power:5 duration:3
             - ^playsound location:<npc.location> sound:portal_travel volume:4 pitch:3
             - ^playsound location:<npc.location> sound:portal_trigger volume:4 pitch:3
             - wait 6
             - chat "<yellow>Hmm..."
             - wait 2
             - chat "<yellow>Here is the potion you requested."
             - ^give i@potion:8227 qty:<cons:PotionQty>
            }
            else chat "<yellow>I require the correct ingrediants to do so."

        'Heal':
          Trigger: Could you make a /Heal/ing potion from these materials?
          script:
          - if <player.inventory.contains[35:10].qty[<cons:WoolQty>]> && <player.inventory.contains[353].qty[<cons:SugarQty>]> && <player.inventory.contains[374].qty[<cons:BottleQty>]> {
             - narrate "<red> You hand <white><npc.name> <white><cons:WoolQty> Purple Wool<red>, <white><cons:SugarQty> Sugar<red>, and <white><cons:BottleQty> Vial<red>."
             - ^take i@35:10 qty:<cons:WoolQty>
             - ^take i@353 qty:<cons:SugarQty>
             - ^take i@374 qty:<cons:BottleQty>
             - chat "<yellow>Very well..."
             - wait 4
             - ^cast blindness power:5 duration:10
             - ^cast confusion power:5 duration:3
             - ^playsound location:<npc.location> sound:portal_travel volume:4 pitch:3
             - ^playsound location:<npc.location> sound:portal_trigger volume:4 pitch:3
             - wait 6
             - chat "<yellow>Hmm..."
             - wait 2
             - chat "<yellow>Here is the potion you requested."
             - ^give i@potion:8261 qty:<cons:PotionQty>
            }
            else chat "<yellow>I require the correct ingrediants to do so."

        'Regen':
          Trigger: Could you make a /Regen/eration potion from these materials?
          script:
          - if <player.inventory.contains[35:2].qty[<cons:WoolQty>]> && <player.inventory.contains[353].qty[<cons:SugarQty>]> && <player.inventory.contains[374].qty[<cons:BottleQty>]> {
             - narrate "<red> You hand <white><npc.name> <white><cons:WoolQty> Magenta Wool<red>, <white><cons:SugarQty> Sugar<red>, and <white><cons:BottleQty> Vial<red>."
             - ^take i@35:2 qty:<cons:WoolQty>
             - ^take i@353 qty:<cons:SugarQty>
             - ^take i@374 qty:<cons:BottleQty>
             - chat "<yellow>Very well..."
             - wait 4
             - ^cast blindness power:5 duration:10
             - ^cast confusion power:5 duration:3
             - ^playsound location:<npc.location> sound:portal_travel volume:4 pitch:3
             - ^playsound location:<npc.location> sound:portal_trigger volume:4 pitch:3
             - wait 6
             - chat "<yellow>Hmm..."
             - wait 2
             - chat "<yellow>Here is the potion you requested."
             - ^give i@potion:8193 qty:<cons:PotionQty>
            }
            else chat "<yellow>I require the correct ingrediants to do so."

        'Strength':
          Trigger: Could you make a /Strength/ potion from these materials?
          script:
          - if <player.inventory.contains[35:1].qty[<cons:WoolQty>]> && <player.inventory.contains[353].qty[<cons:SugarQty>]> && <player.inventory.contains[374].qty[<cons:BottleQty>]> {
             - narrate "<red> You hand <white><npc.name> <white><cons:WoolQty> Orange Wool<red>, <white><cons:SugarQty> Sugar<red>, and <white><cons:BottleQty> Vial<red>."
             - ^take i@35:1 qty:<cons:WoolQty>
             - ^take i@353 qty:<cons:SugarQty>
             - ^take i@374 qty:<cons:BottleQty>
             - chat "<yellow>Very well..."
             - wait 4
             - ^cast blindness power:5 duration:10
             - ^cast confusion power:5 duration:3
             - ^playsound location:<npc.location> sound:portal_travel volume:4 pitch:3
             - ^playsound location:<npc.location> sound:portal_trigger volume:4 pitch:3
             - wait 6
             - chat "<yellow>Hmm..."
             - wait 2
             - chat "<yellow>Here is the potion you requested."
             - ^give i@potion:8201 qty:<cons:PotionQty>
            }
            else chat "<yellow>I require the correct ingrediants to do so."

        'Slow':
          Trigger: Could you make a /Slow/ness potion from these materials?
          script:
          - if <player.inventory.contains[35:7].qty[<cons:WoolQty>]> && <player.inventory.contains[353].qty[<cons:SugarQty>]> && <player.inventory.contains[374].qty[<cons:BottleQty>]> {
             - narrate "<red> You hand <white><npc.name> <white><cons:WoolQty> Gray Wool<red>, <white><cons:SugarQty> Sugar<red>, and <white><cons:BottleQty> Vial<red>."
             - ^take i@35:7 qty:<cons:WoolQty>
             - ^take i@353 qty:<cons:SugarQty>
             - ^take i@374 qty:<cons:BottleQty>
             - chat "<yellow>Very well..."
             - wait 4
             - ^cast blindness power:5 duration:10
             - ^cast confusion power:5 duration:3
             - ^playsound location:<npc.location> sound:portal_travel volume:4 pitch:3
             - ^playsound location:<npc.location> sound:portal_trigger volume:4 pitch:3
             - wait 6
             - chat "<yellow>Hmm..."
             - wait 2
             - chat "<yellow>Here is the potion you requested."
             - ^give i@potion:16426 qty:<cons:PotionQty>
            }
            else chat "<yellow>I require the correct ingrediants to do so."

        'Harm':
          Trigger: Could you make a /Harm/ing potion from these materials?
          script:
          - if <player.inventory.contains[35:5].qty[<cons:WoolQty>]> && <player.inventory.contains[353].qty[<cons:SugarQty>]> && <player.inventory.contains[374].qty[<cons:BottleQty>]> {
             - narrate "<red> You hand <white><npc.name> <white><cons:WoolQty> Lime Wool<red>, <white><cons:SugarQty> Sugar<red>, and <white><cons:BottleQty> Vial<red>."
             - ^take i@35:5 qty:<cons:WoolQty>
             - ^take i@353 qty:<cons:SugarQty>
             - ^take i@374 qty:<cons:BottleQty>
             - chat "<yellow>Very well..."
             - wait 4
             - ^cast blindness power:5 duration:10
             - ^cast confusion power:5 duration:3
             - ^playsound location:<npc.location> sound:portal_travel volume:4 pitch:3
             - ^playsound location:<npc.location> sound:portal_trigger volume:4 pitch:3
             - wait 6
             - chat "<yellow>Hmm..."
             - wait 2
             - chat "<yellow>Here is the potion you requested."
             - ^give i@potion:16460 qty:<cons:PotionQty>
            }
            else chat "<yellow>I require the correct ingrediants to do so."

        'Weak':
          Trigger: Could you make a /Weak/ness potion from these materials?
          script:
          - if <player.inventory.contains[35:8].qty[<cons:WoolQty>]> && <player.inventory.contains[353].qty[<cons:SugarQty>]> && <player.inventory.contains[374].qty[<cons:BottleQty>]> {
             - narrate "<red> You hand <white><npc.name> <white><cons:WoolQty> Light Gray Wool<red>, <white><cons:SugarQty> Sugar<red>, and <white><cons:BottleQty> Vial<red>."
             - ^take i@35:8 qty:<cons:WoolQty>
             - ^take i@353 qty:<cons:SugarQty>
             - ^take i@374 qty:<cons:BottleQty>
             - chat "<yellow>Very well..."
             - wait 4
             - ^cast blindness power:5 duration:10
             - ^cast confusion power:5 duration:3
             - ^playsound location:<npc.location> sound:portal_travel volume:4 pitch:3
             - ^playsound location:<npc.location> sound:portal_trigger volume:4 pitch:3
             - wait 6
             - chat "<yellow>Hmm..."
             - wait 2
             - chat "<yellow>Here is the potion you requested."
             - ^give i@potion:16424 qty:<cons:PotionQty>
            }
            else chat "<yellow>I require the correct ingrediants to do so."

        'Poison':
          Trigger: Could you make a /Poison/ potion from these materials?
          script:
          - if <player.inventory.contains[35:6].qty[<cons:WoolQty>]> && <player.inventory.contains[353].qty[<cons:SugarQty>]> && <player.inventory.contains[374].qty[<cons:BottleQty>]> {
             - narrate "<red> You hand <white><npc.name> <white><cons:WoolQty> Pink Wool<red>, <white><cons:SugarQty> Sugar<red>, and <white><cons:BottleQty> Vial<red>."
             - ^take i@35:6 qty:<cons:WoolQty>
             - ^take i@353 qty:<cons:SugarQty>
             - ^take i@374 qty:<cons:BottleQty>
             - chat "<yellow>Very well..."
             - wait 4
             - ^cast blindness power:5 duration:10
             - ^cast confusion power:5 duration:3
             - ^playsound location:<npc.location> sound:portal_travel volume:4 pitch:3
             - ^playsound location:<npc.location> sound:portal_trigger volume:4 pitch:3
             - wait 6
             - chat "<yellow>Hmm..."
             - wait 2
             - chat "<yellow>Here is the potion you requested."
             - ^give i@potion:16388 qty:<cons:PotionQty>
            }
            else chat "<yellow>I require the correct ingrediants to do so."

      click trigger:
        script:
        - chat "<yellow>Greetings, what is it that you inquier of me?"
        - narrate "<dark_gray><&lb>Hint <&co> Fire, Heal, Regen, Strength, Slow, Harm, Weak, or Poison.<&rb>"




Comments
No one has posted a comment! Post one below: