Paste #29763: Untitled Paste

Date: 2016/02/05 17:58:03 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Emote_Chat:
  type: format
  format: "<&7><&o> <text>"
Bar_Chat:
  type: format
  format: "<&9><npc.name><&a> <text>"

Drink_Wine:
  type: item
  display name: Wine
  material: 373,16
  lore:
    - A robust wine, made from
    - berries that were hand
    - picked in neighbouring counties.

Drink_Ale:
  type: item
  display name: Ale
  material: 373,16
  lore:
    - A rich ale high in
    - alcohol content.

Drink_Water:
  type: item
  display name: Bottle of Murkey Water
  material: 373,16
  lore:
    - The cork is partially
    - desintergrated, parts
    - of it bobbing in the drink.

BarKeep Assignment:
  type: assignment
  interact scripts:
  - 0 BarKeep
  actions:
    on assignment:
    - trigger name:chat state:true
    - trigger name:proximity state:true radius:5
    - trigger name:click state:true
    on exit proximity:
    - if <s@Barkeep.step[<player>]> != Talk {
      - zap s@Barkeep Talk
      - narrate format:Emote_Chat "The Barkeep groans slowly as you leave without buying anything."
    }

BarKeep:
  type: interact
  no_money:
    - narrate format:Emote_Chat "You glance into your purse and realise you have not enough coin!"
    - wait 2s
    - narrate format:Bar_Chat "Gee... you poor thing.. Don't waste my time!!"
  steps:
    Talk*:
      click trigger:
        script:
          - narrate format:Emote_Chat "The bartender gives you a toothy grin as he cleans the innards of a simple beer-glass."
          - wait 2s
          - narrate format:Bar_Chat "What can I get for ya?"
          - wait 5t
          - narrate "<&e>Type <&r><&o>wine<&e>, <&r><&o>ale<&e>, <&r><&o>water<&e> or <&r><&o>no"
          - zap Purchase
    Purchase:
      chat trigger:
        1:
          trigger: /Wine/ seems to tickle my <&o>tasties~
          script:
            - wait 1s
            - if <player.money> >= 10 {
              - narrate format:Bar_Chat "This delicious fruity bouquet should satisfy you!"
              - wait 2s
              - narrate format:Emote_Chat "The bartender pours and places a glass of wine before you- though clearly wine is not served here often, as the stem is coddled with dust."
              - take money quantity:10
              - give i@Drink_Wine
            }
            else {
              - inject locally no_money
            }
            - zap Talk
        2:
          trigger: /Ale/ to drown my poor lonely soul!
          script:
            - wait 1s
            - if <player.money> >= 10 {
              - narrate format:Bar_Chat "Ah! Good ol' ale! Can't go wrong there! Enjoy!"
              - wait 2
              - narrate format:Emote_Chat "The bartender slides you a glass of ale, foam spilling down the side as it reaches your eagerly waiting hand hand."
              - take money quantity:10
              - give i@Drink_Ale
            }
            else {
              - inject locally no_money
            }
            - zap Talk
        3:
          trigger: /Water/ for my boring life please..
          script:
            - wait 1s
            - if <player.money> >= 10 {
              - narrate format:Bar_Chat "Pfft... You want water? Borrriinnggg!"
              - wait 1
              - narrate format:Bar_Chat "Oh.. gee fine I guess I can give you this."
              - wait 2
              - narrate format:Emote_Chat "The bartender hands you a dusty bottle of rather murkey looking water from below the counter"
              - take money qty:10
              - give i@Drink_Water
            }
            else {
              - inject locally no_money
            }
            - zap Talk
        4:
          trigger: /No/, not today!
          script:
            - wait 1s
            - narrate format:Bar_Chat "Don't waste my time then..."
            - zap Talk
        5:
          trigger: /regex:.+/
          script:
            - wait 1s
            - narrate format:Bar_Chat "Not a clue!"
            - zap Talk