Skript Invalid Book Tag

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

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

blaze534

Member
Dec 13, 2022
1
0
1
23
i dont know why this skript when you made a book e give Invalid Book Tag i use skbee the native language is italian. Here my code.

#DIPENDENZE:
#Skript 2.6.2
#SkBee (Se usate una versione minecraft sotto la 1.17 scaricate SkBee 1.10.2:
#https://www.spigotmc.org/resources/skbee-skript-addon.75839/download?version=380506

#COMANDI
#/passaporto | passaporto.use | accesso al comando principale
#/passaporto crea <player> <città> | passaporto.create | crea un passaporto per un giocatore.
#/passaporto blocca <player> | passaporto.remove | blocca un passaporto
#/passaporto controlla <player> | passaporto.check | controlla un passaporto
#/passaporto debug | passaporto.debug | resetta le variabili dello skript, elimina tutti i passaporti.

Options:
expire: 14 days
p: &7[&c&lCarta d&8&li identità&7]


command /cartadiidentità [<text>] [<player>] [<text>]:
permission: passaporto.use
trigger:
if arg-1 is "create" or "crea" or "dai" or "give":
if player has permission "passaporto.create":
if arg-2 is set:
if {carta::emoji_stuck_out_tongue:layer::%arg-2%} is not set:
if arg-3 is set:
add 1 of instanceCarta(player, arg-2, arg-3) to player's inventory
send message "{@p} &7Hai creato la carta di identità di &c%arg-2%&7."
else:
send message "{@p} &cSpecifica la città di provenienza del cittadino."
else:
send message formatted "{@p} &cQuesto giocatore ha già una carta di identità. <cmd:/cartadiidentità remove %arg-2%>&7[&c&lBLOCCA&7]<reset>"
else:
send message "{@p} &cSpecifica il giocatore per cui creare il carta di identità."
else:
send message "{@p} &cNon sei un segretario!"
else if arg-1 is "blocca" or "block" or "delete" or "remove":
if player has permission "passaporto.remove":
if arg-2 is set:
if {carta::emoji_stuck_out_tongue:layer::%arg-2%} is set:
removeCarta({carta::emoji_stuck_out_tongue:layer::%arg-2%})
send message "{@p} &7Hai bloccato la carta di identità di &c%arg-2%&7."
else:
send message "{@p} &cQuesto giocatore non ha una carta di identità."
else:
send message "{@p} &cSpecifica il giocatore di cui eliminare la carta di identità."
else:
send message "{@p} &cNon sei un segretario!"
else if arg-1 is "update" or "check" or "verify" or "verifica" or "controlla":
if player has permission "passaporto.check":
if arg-2 is set:
if {carta::emoji_stuck_out_tongue:layer::%arg-2%} is set:
send message formatted checkCarta({carta::emoji_stuck_out_tongue:layer::%arg-2%}) to player
else:
send message "{@p} &cQuesto giocatore non ha una carta di identità."
else:
send message "{@p} &cSpecifica il giocatore di cui controllare la carta di identità."
else:
send message "{@p} &cNon sei un segretario&c."
else if arg-1 is "debug":
if player has permission "passaporto.debug":
send message "{@p} &7Resettando le variabili..."
set {_x} to 0
loop {carta::total} times:
add 1 to {_x}
removeCarta({_x})
send message "{@p} &7Resettati &b%{carta::total}%&7 passaporti."
clear {carta::emoji_stuck_out_tongue:layer::*}
set {carta::total} to 0
else:
send message "{@p} &cNon hai il permesso &4passaporto.debug&c."

function checkCarta(id: integer) :: text:
if {carta::id::%{_id}%::scadenza} > now:
return "{@p} &7Questa carta di identità è &a&lVALIDO&7. <cmd:/cartadiidentità remove %{carta::id::%{_id}%::cittadino}%>&7[&c&lBLOCCA&7]<reset>"
else:
return "{@p} &7Questa carta di identità è &c&lSCADUTO&7. <cmd:/cartadiidentità remove %{carta::id::%{_id}%::cittadino}%>&7[&c&lBLOCCA&7]<reset>"

function removeCarta(id: integer):
clear {carta::emoji_stuck_out_tongue:layer::%{carta::id::%{_id}%::cittadino}%}
clear {carta::id::%{_id}%::cittadino}
clear {carta::id::%{_id}%::autore}
clear {carta::id::%{_id}%::issuer}
clear {carta::id::%{_id}%::scadenza}

function instanceCarta(a: player, v: player, i: string) :: item:
set {_b} to a written book
add 1 to {carta::total}
set {_id} to {carta::total}
set {carta::id::%{_id}%::cittadino} to {_v}
set {carta::id::%{_id}%::autore} to {_a}
set {carta::id::%{_id}%::issuer} to {_i}
set {carta::id::%{_id}%::scadenza} to {@expire} after now
set {carta::emoji_stuck_out_tongue:layer::%{_v}%} to {_id}
set {_t} to " {@p}%nl%"
set {_t} to "%{_t}%&8&l----------------%nl%%nl%"
set {_t} to "%{_t}% &7[&4&lVERIFICA&7]%nl%%nl%"
set {_t} to "%{_t}%&8ID: &c##%{_id}%%nl%"
set {_t} to "%{_t}%&8Cittadino: &c%{_v}%%nl%"
set {_t} to "%{_t}%&8Rilasciato da: &c%{_a}%%nl%"
set {_t} to "%{_t}%&8Città: &c%{_i}%%nl%"
set {_now} to now formatted as "dd/MM/yyyy"
set {_t} to "%{_t}%&8Data: &c%{_now}%%nl%%nl%"
set {_now} to now
add {@expire} to {_now}
set {_now} to {_now} formatted as "dd/MM/yyyy"
set {_t} to text component of "%{_t}%&7&oScadenza: %{_now}%"

set hover event of {_t} to hover event showing "&7Clicca per verificare la%nl%&7validità."
set click event of {_t} to click event to run command "/cartadiidentità verifica della carta di identità %{_v}%"
set page 1 of book {_b} to {_t}
set book author of {_b} to "%{_a}%"
set book title of {_b} to "&7Carta di identità di &4%{_v}%"
set 1st line of {_b}'s lore to "&0%{_id}%"
return {_b}

command /infocartadiidentità:
permission: passaporto.check
trigger:
send message "&6&lCOMANDI"
send message "{@p} &c/cartadiidentità crea <cittadino> <città> | crea un passaporto per un giocatore."
send message "{@p} &c/cartadiidentità controlla <cittadino> | controlla un passaporto."
send message "&6&lCOMANDI"
 
Status
Not open for further replies.