Open book on right click?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Spoorloos

New Member
Mar 31, 2019
7
0
0
Hey, I want to open a book and quill menu when i right click holding a book. But everytime i try i dont get an error but it doesn't work! im using Skellett!

Here is my code:
Code:
on join:
    if player doesn't have a book named "&aScript Book" with lore "&7Write your scripts in here!":
        give 1 book named "&aScript Book" with lore "&7Write your scripts in here!" to player

on right click holding a book and quill:
    if event-item's name is "&aScript Book":
        if event-item's lore is "&7Write your scripts in here!":
            if {book.%player%} is not set:
                set {book.%player%} to a new written book
            if {book.%player%} is a new written book:
                open book {book.%player%} to player
            else:
                message "&7[&aSCRIPT&7] &4ERROR!"
I want something like this:
2019-04-24-13-00-40.png



 

Attachments

  • 2019-04-24_13.00.40.png
    2019-04-24_13.00.40.png
    943.4 KB · Views: 1,041
Hey, I want to open a book and quill menu when i right click holding a book. But everytime i try i dont get an error but it doesn't work! im using Skellett!

Here is my code:
Code:
on join:
    if player doesn't have a book named "&aScript Book" with lore "&7Write your scripts in here!":
        give 1 book named "&aScript Book" with lore "&7Write your scripts in here!" to player

on right click holding a book and quill:
    if event-item's name is "&aScript Book":
        if event-item's lore is "&7Write your scripts in here!":
            if {book.%player%} is not set:
                set {book.%player%} to a new written book
            if {book.%player%} is a new written book:
                open book {book.%player%} to player
            else:
                message "&7[&aSCRIPT&7] &4ERROR!"
I want something like this:
2019-04-24-13-00-40.png


Right now im not in my house, but try replacing
Code:
if even-item
to
Code:
if player's tool
[doublepost=1556127510,1556127335][/doublepost]And where you put if event-item's lore is "lore" change to if lore of player's tool contains "lore"
[doublepost=1556127603][/doublepost]Same with name of book, change to if name of player's tool contains "name"
[doublepost=1556127921][/doublepost]And in event on join, you put give 1 book but in the next event you put on right click on book and quill, dont on right click on book
 
Status
Not open for further replies.