options:
scadenza: 3 days
p: &8[&9&lMulte&8]
command /multa [<string>] [<player>] [<text>] [<text>]:
trigger:
if arg 1 is "stampa":
if arg 2 is set:
if arg 3 is set:
if arg 4 is set:
add 1 of Multa(player, arg-2,) to player's inventory
send message "{@p} &bHai ricevuto una multa" to arg 2
send message "{@p} &9Multa eseguita con successo" to sender
else:
send message "{@p} &bInserisci il motivo" to player
else:
send message "{@p} &bInserisci il prezzo" to player
else:
send message "{@p} &bInserisci un nickname" to player
else if arg 1 isn't "stampa":
send message "&bComando errato /multa stampa" to player
function Multa(a: player, c: player, o: number, e: text ) :: item:
set {_v} to a written book
set {multa::id::%{_id}%::autore} to {_a}
set {multa::id::%{_id}%::multato} to {_c}
set {multa::id::%{_id}%:rezzo} to {_o}
set {multa::id::%{_id}%::motivo} to {_e}
set {multa::id::%{_id}%::scadenza} to {@scadenza} after now
set {passaporto:layer::%{_v}%} to {_id}
add 1 to {_id}
set {_t} to " {@p}%nl%"
set {_t} to "%{_t}%&8&l----------------%nl%%nl%"
set {_t} to "%{_t}%&8ID: &c##%{_id}%%nl%"
set {_t} to "%{_t}%&8Autore: &c%{_a}%%nl%"
set {_t} to "%{_t}%&8Cittadino: &c%{_c}%%nl%"
set {_t} to "%{_t}%&8Motivo: &c%{_e}%%nl%"
set {_t} to "%{_t}%&8Prezzo: &c%{_o}%%nl%"
set {_now} to now formatted as "dd/MM/yyyy"
set {_t} to "%{_t}%&8Data: &c%{_now}%%nl%%nl%"
set {_now} to now
add {@scadenza} to {_now}
set {_now} to {_now} formatted as "dd/MM/yyyy"
set {_t} to text component of "%{_t}%&7&oScadenza: %{_now}%"
set page 1 of book {_v} to {_t}
set book author of {_v} to "&9&lGoverno"
set book title of {_v} to "&9&lMULTA"
set 1st line of {_v}'s lore to "&8ID: &0%{_id}%"
return {_v}
[doublepost=1662042574,1662042198][/doublepost]i try with Multa(player, arg-2, arg-3, arg-4) but dont work
scadenza: 3 days
p: &8[&9&lMulte&8]
command /multa [<string>] [<player>] [<text>] [<text>]:
trigger:
if arg 1 is "stampa":
if arg 2 is set:
if arg 3 is set:
if arg 4 is set:
add 1 of Multa(player, arg-2,) to player's inventory
send message "{@p} &bHai ricevuto una multa" to arg 2
send message "{@p} &9Multa eseguita con successo" to sender
else:
send message "{@p} &bInserisci il motivo" to player
else:
send message "{@p} &bInserisci il prezzo" to player
else:
send message "{@p} &bInserisci un nickname" to player
else if arg 1 isn't "stampa":
send message "&bComando errato /multa stampa" to player
function Multa(a: player, c: player, o: number, e: text ) :: item:
set {_v} to a written book
set {multa::id::%{_id}%::autore} to {_a}
set {multa::id::%{_id}%::multato} to {_c}
set {multa::id::%{_id}%:rezzo} to {_o}
set {multa::id::%{_id}%::motivo} to {_e}
set {multa::id::%{_id}%::scadenza} to {@scadenza} after now
set {passaporto:layer::%{_v}%} to {_id}
add 1 to {_id}
set {_t} to " {@p}%nl%"
set {_t} to "%{_t}%&8&l----------------%nl%%nl%"
set {_t} to "%{_t}%&8ID: &c##%{_id}%%nl%"
set {_t} to "%{_t}%&8Autore: &c%{_a}%%nl%"
set {_t} to "%{_t}%&8Cittadino: &c%{_c}%%nl%"
set {_t} to "%{_t}%&8Motivo: &c%{_e}%%nl%"
set {_t} to "%{_t}%&8Prezzo: &c%{_o}%%nl%"
set {_now} to now formatted as "dd/MM/yyyy"
set {_t} to "%{_t}%&8Data: &c%{_now}%%nl%%nl%"
set {_now} to now
add {@scadenza} to {_now}
set {_now} to {_now} formatted as "dd/MM/yyyy"
set {_t} to text component of "%{_t}%&7&oScadenza: %{_now}%"
set page 1 of book {_v} to {_t}
set book author of {_v} to "&9&lGoverno"
set book title of {_v} to "&9&lMULTA"
set 1st line of {_v}'s lore to "&8ID: &0%{_id}%"
return {_v}
[doublepost=1662042574,1662042198][/doublepost]i try with Multa(player, arg-2, arg-3, arg-4) but dont work
Last edited: