Invalid book tags

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

0hTristezzah

Member
Mar 28, 2022
15
0
1
23
options:
p: &8[&6&lMANDATI&8]


command /mandato [<text>] [<player>] [<text>]:
trigger:
if arg 1 is "stampa":
if arg 2 is set:
if arg 3 is {lista::%arg 3%}:
add 1 of mandato(player, arg-2, arg-3) to player's inventory
send message "{@p} &7Mandato stampato con successo" to player
else:
send message "{@p} &bScegli una fra queste opzioni" to sender
loop {lista::*}:
send message "&7%loop-value%" to player
else:
send message "&7Inserisci un nickname" to player
if arg 1 is "add":
if arg 2 isn't set:
if arg 3 is set:
if player has permission "mandato.admin":
set {lista::%arg 3%} to arg-3
add arg-3 to {lista::%arg 3%}
send message "{@p} &b%arg 3% &7Aggiunto alla lista" to sender
else if arg 1 isn't "stampa" or "add" or "remove" or "clear":
send "{@p} &7Comando errato, esegui /mandato stampa-add-remove-clear" to player
if arg 1 is "clear":
if arg 2 isn't set:
if arg 3 isn't set:
if player has permission "mandato.admin":
clear {lista::*}
send message "{@p} &7Lista clearata" to sender
if arg 1 is "remove":
if arg 2 isn't set:
if arg 3 is set:
if player has permission "mandato.admin":
remove arg-3 from {lista::*}
send message "&7%arg-3% rimossa dalla lista" to sender

function mandato(p: player, g: player, n: text) :: item:
set {_+} to a written book
set {mandato::id::%{_id}%::autore} to {_p}
set {mandato::id::%{_id}%::emoji_stuck_out_tongue:ersonasubita} to {_g}
set {mandato::id::%{_id}%::casa} to {_n}
add 1 to {mandato::id}
set {_id} to {mandato::id}
set {_u} to " &8[&6&lMANDATO&8]%nl%"
set {_u} to "%{_u}%&8&l----------------%nl%"
set {_u} to "%{_u}%&8Autore: &7%{_p}%%nl%"
set {_u} to "%{_u}%&8Casa di: &7%{_g}%%nl%"
set {_u} to "%{_u}%&8Tipo di casa: &7%{_n}%%nl%"
set {nowv} to now formatted as "dd/MM/yyyy"
set {_u} to text component of "%{_u}%&8Data: &7%{nowv}%%nl%"
set {_u} to "&6Mandato Procura%nl%"
set {_u} to "&a&lAPPROVATO"
set page 1 of book {_+} to {_u}
set book author of {_+} to "&6Procura"
set book title of {_+} to "&6&lMandato"
set 1st line of {_+}'s lore to "&7ID: &6%{_id}%"
return {_+}


0 error but
upload_2022-9-8_1-12-29.png


upload_2022-9-8_1-13-54.png
 
This works for me but it also got "outdated" skbee so ye

Code:
command /book:
    trigger:
        add "Page 1"",""clickEvent"":{""action"":""run_command"",""value"":""Bla""}" to {_p::*}
        add "Page 2" to {_p::*}

        loop {_p::*}:
            if {_pages} is set:
                set {_p} to "%{_pages}%,"
            else:
                set {_p} to ""
            if loop-value contains "clickEvent"":{""action"":""":
                set {_pages} to "%{_p}%'{""text"":""%loop-value%}'"
            else:
                set {_pages} to "%{_p}%'{""text"":""%loop-value%""}'"

        set {_book} to written book with nbt "{title:""FirstJoinBookLol"",author:""pierrelasse"",pages:[%{_pages}%]}"
        open book {_book} to player
 
Status
Not open for further replies.