Paste #19555: Bookmaster

Date: 2015/08/20 11:02:14 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


bookmaster:
  type: world
  events:
    on newhead command:
    - narrate "<&2>Das n<&auml>chste Buch welches du schreibst wird die Daten entgegennehmen."
    - narrate "<&2>1.Seite: Name  2.Seite: Player-ID  3.Seite:  Value/Texture-ID  Auhtorname: Ist egal"
    - flag player bookm:1
    on player edits book:
    - if <player.flag[bookm]> != 1 {
      - queue clear
      }
      else {
      - if <player.item_in_hand.book.page_count> != 3 {
        - narrate "<&4>Falsche Anzahl an Seiten:<player.item_in_hand.book.page_count> Du brauchst nur 3 Seiten."
        - narrate "<&4>Abbruch."
        - take iteminhand qty:1
        - give book_and_quill qty:1
        - queue clear
        }
        else {
        - define book1 <player.item_in_hand.book.get_page[1]>
        - define book2 <player.item_in_hand.book.get_page[2]>
        - define book3 <player.item_in_hand.book.get_page[3]>
        - narrate "<&2>Buch wird entfernt und Command ausgef<&uuml>hrt."
        - execute as_server "give <&at>p 397 1 3 <&lc>display<&co><&lc>Name<&co><&dq><def[book1]><&dq><&rc>,SkullOwner<&co><&lc>Id<&co><&dq><def[book2]><&dq>,Properties<&co><&lc>textures<&co><&lb><&lc>Value<&co><&dq><def[book3]><&dq><&rc><&rb><&rc><&rc><&rc>"
        - flag player bookm:0
        - take iteminhand qty:1
        }
      }