Book Teleport

  • 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!

mokal

New Member
Jul 20, 2017
7
0
0
27
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
 
Do you mean that when you when you right/left click the book, you will be teleported to spawn?
 
code_language.skript:
options:
    book-name: &2Name
    book-lore: &2Lore

command /booktp:
    permission: booktp.telepor
    trigger:
        give player book named "{@book-name}" with lore "{@book-lore}"
        
on right click:
    tool of player is book named "{@book-name}" with lore "{@book-lore}"
    teleport player to spawn of world of player
(didn't test it btw)
 
code_language.skript:
options:
    book-name: &2Name
    book-lore: &2Lore

command /booktp:
    permission: booktp.telepor
    trigger:
        give player book named "{@book-name}" with lore "{@book-lore}"
       
on right click:
    tool of player is book named "{@book-name}" with lore "{@book-lore}"
    teleport player to spawn of world of player
(didn't test it btw)


[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
 
Copy-paste the whole script in and try before editting. You have to set the names of the book and its lore under options
 
Copy-paste the whole script in and try before editting. You have to set the names of the book and its lore under options

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!
 
Okay, can you try the code without editing ANYTHING, and send if you got any errors
 
Okay, can you try the code without editing ANYTHING, and send if you got any errors

[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}"')
 
Type /ver Skript and tell me the result please
 
[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}"')
code_language.skript:
with lore "lore"
requires SkQuery to work