Paste #12399: Sitting Script

Date: 2014/12/30 15:55:55 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Sitting:
  type: assignment
  actions:
    on assignment:
    - trigger name:chat state:true
  interact scripts:
  - 100 Sitting Listener

Sitting Listener:
  type: interact
  steps:
    1:
        chat trigger:
            1:
                trigger: /sit/
                script:
                - flag player sitter:<npc>
                - flag player chatter:<player>
                - chat "Ok. Where do you want me to sit?"
                - run script:ChooseBlockListener

ChooseBlockListener:
    type: world
    events:
        on player clicks block:
        if <player.flag[chatter]> matches player {
        - sit <context.location.sub[-.5,.5,-.5]> npc:<player.flag[sitter]>
        - queue clear
        }