1. 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 comminuty!

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

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Book Teleport

Discussion in 'Requests' started by mokal, Mar 6, 2018.

  1. mokal

    mokal Member

    Joined:
    Jul 20, 2017
    Messages:
    7
    Likes Received:
    0
    Category: RPG

    Suggested name: BookTpSK

    What I want:
    i am looking for a script which spawns a book with a colored name and lore which can be editable that teleports you to said location, it being spawn or a warp, and when used it disappears from the players inventory.

    Preferably using a default spawn set on the world or if there can be a way to set a warp or spawn, if you catch my drift :emoji_stuck_out_tongue:

    SpawnBook:
    "Teleports you to"
    "Spawn!"
    "Removed on use!"


    Ideas for commands:
    /booktp

    Ideas for permissions:
    booktp.teleport
    When I'd like it by: A reasonable time
     
  2. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Do you mean that when you when you right/left click the book, you will be teleported to spawn?
     
  3. mokal

    mokal Member

    Joined:
    Jul 20, 2017
    Messages:
    7
    Likes Received:
    0
    yes, and the book disappears from your inventory
     
  4. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Code (Skript):
    1. options:
    2.     book-name: &2Name
    3.     book-lore: &2Lore
    4.  
    5. command /booktp:
    6.     permission: booktp.telepor
    7.     trigger:
    8.         give player book named "{@book-name}" with lore "{@book-lore}"
    9.        
    10. on right click:
    11.     tool of player is book named "{@book-name}" with lore "{@book-lore}"
    12.     teleport player to spawn of world of player
    (didn't test it btw)
     
  5. mokal

    mokal Member

    Joined:
    Jul 20, 2017
    Messages:
    7
    Likes Received:
    0

    [10:03:27 ERROR]: [Skript] undefined option {@&2Spawn Book} (Booktp.sk, line 8: give player book named "{@&2Spawn Book}" with lore "{@&2This Book will teleport you to spawn}"')
    [10:03:27 ERROR]: [Skript] undefined option {@&2This Book will teleport you to spawn} (Booktp.sk, line 8: give player book named "{@&2Spawn Book}" with lore "{@&2This Book will teleport you to spawn}"')
    [10:03:27 ERROR]: [Skript] 'book named "{@&2Spawn Book}" with lore "{@&2This Book will teleport you to spawn}"' can't be added to a player because the former is neither an item type, an inventory nor an experience point (Booktp.sk, line 8: give player book named "{@&2Spawn Book}" with lore "{@&2This Book will teleport you to spawn}"')
    [10:03:27 ERROR]: [Skript] undefined option {@&2Spawn Book} (Booktp.sk, line 11: tool of player is book named "{@&2Spawn Book}" with lore "{@&2This Book will teleport you to spawn}"')
    [10:03:27 ERROR]: [Skript] undefined option {@&2This Book will teleport you to spawn} (Booktp.sk, line 11: tool of player is book named "{@&2Spawn Book}" with lore "{@&2This Book will teleport you to spawn}"')
    [10:03:27 ERROR]: [Skript] Can't compare a slot with 'book named "{@&2Spawn Book}" with lore "{@&2This Book will teleport you to spawn}"' (Booktp.sk, line 11: tool of player is book named "{@&2Spawn Book}" with lore "{@&2This Book will teleport you to spawn}"')

    This is the error im getting when trying this
     
  6. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Copy-paste the whole script in and try before editting. You have to set the names of the book and its lore under options
     
  7. mokal

    mokal Member

    Joined:
    Jul 20, 2017
    Messages:
    7
    Likes Received:
    0
    So i tryed that just now, and i am still getting the same error, was this written with certain addons? ps im very new to the whole skripting thing so i dont know much about this. Thanks!
     
  8. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Okay, can you try the code without editing ANYTHING, and send if you got any errors
     
  9. mokal

    mokal Member

    Joined:
    Jul 20, 2017
    Messages:
    7
    Likes Received:
    0
    [10:37:29 ERROR]: [Skript] 'book named "&2Name" with lore "&2Lore"' can't be added to a player because the former is neither an item type, an inventory nor an experience point (Booktp.sk, line 8: give player book named "{@book-name}" with lore "{@book-lore}"')
    [10:37:29 ERROR]: [Skript] Can't compare a slot with 'book named "&2Name" with lore "&2Lore"' (Booktp.sk, line 11: tool of player is book named "{@book-name}" with lore "{@book-lore}"')
     
  10. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Type /ver Skript and tell me the result please
     
  11. mokal

    mokal Member

    Joined:
    Jul 20, 2017
    Messages:
    7
    Likes Received:
    0
    2.2-dev34
     
  12. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    And server version?
     
  13. mokal

    mokal Member

    Joined:
    Jul 20, 2017
    Messages:
    7
    Likes Received:
    0
    [10:37:19 INFO]: Starting minecraft server version 1.12.2
     
  14. it_twit

    it_twit Active Member

    Joined:
    Jan 26, 2017
    Messages:
    37
    Likes Received:
    3
    Medals:
    Code (Skript):
    1. with lore "lore"
    requires SkQuery to work
     
Loading...