Paste #19665: Untitled Paste

Date: 2015/08/23 11:12:26 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


OPEN_BOOK:
  type: task
  debug: false
  script:
  - ^define item <player.item_in_hand>
  - ^take <player.item_in_hand> qty:<player.item_in_hand.qty>
  - ^give %1% slot:<player.item_in_hand.slot> unlimit_stack_size
  - ^wait 1t
  - ^adjust <player> open_book
  - ^take %1%
  - ^give %item% slot:<player.item_in_hand.slot> unlimit_stack_size
OPEN_BOOK_SECURITY:
  type: world
  debug: false
  events:
    on player drops item:
    - if <context.item.is_book> {
      - if <context.item.book.author> == DAWN {
        - determine cancelled passively
        - wait 1t
        - take <context.item> qty:10
        }
      }
    on player clicks item in inventory:
    - if <context.item.is_book> {
      - if <context.item.book.author> == DAWN {
        - determine cancelled passively
        - wait 1t
        - take <context.item> qty:10
        }
      }