Paste #49819: Untitled Paste

Date: 2018/09/13 15:09:25 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


testbooki:
  type: item
  material: written_book
  display name: Testing Testing
  book: testbook
  lore:
  - "This is a test book."
  - "Click to open."

testbook:
  type: book
  title: Testing testing
  author: God
  signed: true
  text:
  - "This is the text originally in the book!"

testbookworld:
  type: world
  events:
    on player clicks testbooki in inventory:
    - inventory close
    - define held <player.item_in_hand>
    - adjust <player> item_in_hand:testbook
    - adjust <player> open_book
    - adjust <player> item_in_hand:<def[held]>
    - adjust i@testbook book:<i@testbook.book.as_list.insert[Test].at[7]>