Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on disconnect:
- clear {inv.%player's uuid%::*}
- wait 1 second
- loop all items in the inventory of player:
- add loop-item to {inv.%player's uuid%::*}
- on join:
- if {%player's uuid%::PastJoin.sk} is not set:
- set {%player's uuid%::PastJoin.sk} to true
- broadcast "[DEBUG] UUID (non settata): %player's uuid%::PastJoin.sk"
- broadcast "[DEBUG] Aggiunto nuovo player."
- stop
- else if {%player's uuid%::PastJoin.sk} is set:
- broadcast "[DEBUG] UUID gia' settata. %player's uuid%::PastJoin.sk"
- loop {inv.%player's uuid%::*}:
- give loop-value to player
- broadcast "[DEBUG] Dati Items al player."
- stop
- command /oinvcheck [<player>]:
- description: Controlla l'uuid del player.
- permission: oinv.check
- trigger:
- if arg-1 is set:
- if player doesn't have permission "oinv.check":
- send "&cNon sei un mago!"
- stop
- if player have permission "oinv.check":
- message "%arg-1's uuid%::PastJoin.sk"
- stop
- command /oinv [<offline player>] [<text>]:
- description: Controlla l'inventario di un player offline.
- aliases: /offlineinv
- permission: oinv.lsa
- permission message: &cNon sei un mago!
- trigger:
- if arg-1 is not online:
- if arg-1 is set:
- if player doesn't have permission "oinv.inv":
- send "&cNon sei un mago!"
- stop
- if player has permission "oinv.inv":
- if arg-1 is not "reload":
- if arg-2 is not set:
- open chest with 6 rows named "Inventario di %arg-1%" to player
- set {_slot} to 18
- set {_fillslot} to -1
- loop {inv.%arg-1's uuid%::*}:
- if {_slot} < 54:
- format slot {_slot} of player with loop-value to be unstealable
- add 1 to {_slot}
- loop 18 times:
- add 1 to {_fillslot}
- if {_fillslot} != 0:
- if {_fillslot} != 2:
- if {_fillslot} != 4:
- if {_fillslot} != 6:
- if {_fillslot} != 8:
- format slot {_fillslot} of player with shiny gray glass pane named " " to be unstealable
- format slot 0 of player with hopper named "&b&lINFO" with lore "&7Versione 1.0" to be unstealable
- format slot 2 of player with tnt named "&aClear" with lore "&aRimuovi ogni oggetto dall'inventario di %arg-1%" to close then run [execute player command "/oinv %arg-1% clear"]
- format slot 4 of player with chest named "&aCheck" with lore "&aControlla se ha item illegali." to close then run [execute player command "/oinv %arg-1% check"]
- format slot 6 of player with barrier named "&aChiudi" with lore "&cChiudi il menù" to close
- format slot 8 of player with diamond named "&aRimuovi eventuali diamanti" with lore "&cRimuovi eventuali diamanti" to close then run [execute player command "/oinv %arg-1% diamond"]
- if arg-1 is not set:
- open chest with 1 row named "&c/%{%player's uuid%::lastcommand}% <offline player>" to player
- set {_slot} to -1
- loop 9 times:
- add 1 to {_slot}
- if {_slot} != 2:
- if {_slot} != 4:
- if {_slot} != 6:
- format slot {_slot} of player with gray glass pane named " " to be unstealable
- format slot 2 of player with shiny tnt named "&aChiudi" with lore "&cChiudi il menù!" to close
- format slot 4 of player with shiny gray glass pane named "&2Reload" with lore "&aReload %script%&a.sk" to close then run [execute player command "/oinv reload"]
- format slot 6 of player with shiny barrier named "&8Command" with lore "&7/%{%player's uuid%::lastcommand}% <offline player>" to close
- if arg-2 is "clear":
- if player doesn't have permission "oinv.clear":
- send "&cMissing permission oinv.clear"
- stop
- if player has permission "oinv.clear":
- send "&cClearing %arg-1%&c's inventory"
- clear {inv.%arg-1's uuid%::*}
- if arg-2 is "check":
- if player doesn't have permission "oinv.check":
- send "&cNon sei un mago"
- stop
- if player has permission "oinv.check":
- send "&aStiamo controllando l'inventario di %arg-1%"
- loop {inv.%arg-1's uuid%::*}:
- if "%loop-value%" contains "diamond sword", "Command block" or "stone sword":
- remove loop-value from {inv.%arg-1's uuid%::*}
- add loop-value to {_removed::*}
- if {_removed::*} is set:
- send "&cRemoved: %{_removed::*}%"
- if {_removed::*} is not set:
- send "&cNon ha item illegali."
- if arg-1 is "reload":
- if player doesn't have permission "oinv.reload":
- send "&cMissing permission oinv.reload"
- stop
- if player has permission "oinv.reload":
- send "&aReloading %script%&a.sk this might take some time!"
- player command "/sk reload %script%"
- if arg-1 is set:
- if arg-2 is "diamond":
- loop {inv.%arg-1's uuid%::*}:
- if "%loop-value%" contains "diamond", "block of diamond" or "diamond ore":
- remove loop-value from {inv.%arg-1's uuid%::*}
- add loop-value to {_removed::*}
- if {_removed::*} is set:
- send "&cRimossi: %{_removed::*}%"
- if {_removed::*} is not set:
- send "&cNon possiede diamanti.!"
- if arg-1 is online:
- send "&cIl giocatore selezionato è al momento online. Per controllare il suo inventario utilizza /invsee <player>"
- stop
- on command:
- set {%player's uuid%::lastcommand} to command
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement