[Skript] Making book, function when book Closes.

Discussion in 'Skript' started by fakepixel, Jun 21, 2018.

  1. Hi.

    I'm trying to create a Script that will show a player a book, that they can write in, but line 1 and 2 would say "Hello there, write below this to search." and then when they click "Done" button, it'd save the text to a variable. And it would say the variable in chat when the player has clicked the Done.

    Can someone help me please? I don't know how to start.
    #1 fakepixel, Jun 21, 2018
    Last edited: Jul 23, 2018
  2. Use http://minecraft.tools/en/book.php to make the book, give the book using
    Code (Text):
    execute console command "/give %player% (book data here)"
    and add a click event to the done button wich executes a command, and that sets the variable and sends it
  3. @Efnilite Hey, I don't want the book to appear in their inventory, I just want to Show the book.

    What do you mean by
    "to the done button wich executes a command, and that sets the variable and sends it"
    how could my command check what was written in the book ?
  4. Praya


    I just searching packet book on skunity, and I didn't found this feature
  5. Praya


    oh wait, I miss something.


    first you need to create variable itemstack of book and then "open book %itemstack% to %player%"
  6. Sorry for the confusion, because the only way I would know was using vanilla books
  7. Bump.

    I want to give a player a book, and whatever they write inside of it, would be placed into a variable.
    Can this be done with Skript-mirror ?
  8. It's not possible to save the text in the book, but you can save the item in a variable and then show up the variable containing the book.
    For example.
    if player's tool is a written book:
    set {agoodbook} to player's tool

    with a command or idk what you want to do, execute this effect:
    set {_player} to executor
    open book {agoodbook} to player.

    if you wanna give the book do:
    give 1 of {agoodbook} to player
    When the player opens the book he will see the text you wrote before

    THEN : for check if the player clicks "done", you can use "On edit:"

    On edit:
    message "Are you writing the bible?" to player

    (sorry for my english, i'm italian.)
    #10 BowYard, Jul 23, 2018
    Last edited: Jul 23, 2018