Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.75 KB | None | 0 0
  1. on disconnect:
  2. clear {inv.%player's uuid%::*}
  3. wait 1 second
  4. loop all items in the inventory of player:
  5. add loop-item to {inv.%player's uuid%::*}
  6.  
  7. on join:
  8. if {%player's uuid%::PastJoin.sk} is not set:
  9. set {%player's uuid%::PastJoin.sk} to true
  10. broadcast "[DEBUG] UUID (non settata): %player's uuid%::PastJoin.sk"
  11. broadcast "[DEBUG] Aggiunto nuovo player."
  12. stop
  13. else if {%player's uuid%::PastJoin.sk} is set:
  14. broadcast "[DEBUG] UUID gia' settata. %player's uuid%::PastJoin.sk"
  15. loop {inv.%player's uuid%::*}:
  16. give loop-value to player
  17. broadcast "[DEBUG] Dati Items al player."
  18. stop
  19.  
  20. command /oinvcheck [<player>]:
  21. description: Controlla l'uuid del player.
  22. permission: oinv.check
  23. trigger:
  24. if arg-1 is set:
  25. if player doesn't have permission "oinv.check":
  26. send "&cNon sei un mago!"
  27. stop
  28. if player have permission "oinv.check":
  29. message "%arg-1's uuid%::PastJoin.sk"
  30. stop
  31.  
  32.  
  33. command /oinv [<offline player>] [<text>]:
  34. description: Controlla l'inventario di un player offline.
  35. aliases: /offlineinv
  36. permission: oinv.lsa
  37. permission message: &cNon sei un mago!
  38. trigger:
  39. if arg-1 is not online:
  40. if arg-1 is set:
  41. if player doesn't have permission "oinv.inv":
  42. send "&cNon sei un mago!"
  43. stop
  44. if player has permission "oinv.inv":
  45. if arg-1 is not "reload":
  46. if arg-2 is not set:
  47. open chest with 6 rows named "Inventario di %arg-1%" to player
  48. set {_slot} to 18
  49. set {_fillslot} to -1
  50. loop {inv.%arg-1's uuid%::*}:
  51. if {_slot} < 54:
  52. format slot {_slot} of player with loop-value to be unstealable
  53. add 1 to {_slot}
  54. loop 18 times:
  55. add 1 to {_fillslot}
  56. if {_fillslot} != 0:
  57. if {_fillslot} != 2:
  58. if {_fillslot} != 4:
  59. if {_fillslot} != 6:
  60. if {_fillslot} != 8:
  61. format slot {_fillslot} of player with shiny gray glass pane named " " to be unstealable
  62. format slot 0 of player with hopper named "&b&lINFO" with lore "&7Versione 1.0" to be unstealable
  63. 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"]
  64. 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"]
  65. format slot 6 of player with barrier named "&aChiudi" with lore "&cChiudi il menù" to close
  66. 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"]
  67. if arg-1 is not set:
  68. open chest with 1 row named "&c/%{%player's uuid%::lastcommand}% <offline player>" to player
  69. set {_slot} to -1
  70. loop 9 times:
  71. add 1 to {_slot}
  72. if {_slot} != 2:
  73. if {_slot} != 4:
  74. if {_slot} != 6:
  75. format slot {_slot} of player with gray glass pane named " " to be unstealable
  76. format slot 2 of player with shiny tnt named "&aChiudi" with lore "&cChiudi il menù!" to close
  77. 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"]
  78. format slot 6 of player with shiny barrier named "&8Command" with lore "&7/%{%player's uuid%::lastcommand}% <offline player>" to close
  79. if arg-2 is "clear":
  80. if player doesn't have permission "oinv.clear":
  81. send "&cMissing permission oinv.clear"
  82. stop
  83. if player has permission "oinv.clear":
  84. send "&cClearing %arg-1%&c's inventory"
  85. clear {inv.%arg-1's uuid%::*}
  86. if arg-2 is "check":
  87. if player doesn't have permission "oinv.check":
  88. send "&cNon sei un mago"
  89. stop
  90. if player has permission "oinv.check":
  91. send "&aStiamo controllando l'inventario di %arg-1%"
  92. loop {inv.%arg-1's uuid%::*}:
  93. if "%loop-value%" contains "diamond sword", "Command block" or "stone sword":
  94. remove loop-value from {inv.%arg-1's uuid%::*}
  95. add loop-value to {_removed::*}
  96. if {_removed::*} is set:
  97. send "&cRemoved: %{_removed::*}%"
  98. if {_removed::*} is not set:
  99. send "&cNon ha item illegali."
  100. if arg-1 is "reload":
  101. if player doesn't have permission "oinv.reload":
  102. send "&cMissing permission oinv.reload"
  103. stop
  104. if player has permission "oinv.reload":
  105. send "&aReloading %script%&a.sk this might take some time!"
  106. player command "/sk reload %script%"
  107. if arg-1 is set:
  108. if arg-2 is "diamond":
  109. loop {inv.%arg-1's uuid%::*}:
  110. if "%loop-value%" contains "diamond", "block of diamond" or "diamond ore":
  111. remove loop-value from {inv.%arg-1's uuid%::*}
  112. add loop-value to {_removed::*}
  113. if {_removed::*} is set:
  114. send "&cRimossi: %{_removed::*}%"
  115. if {_removed::*} is not set:
  116. send "&cNon possiede diamanti.!"
  117. if arg-1 is online:
  118. send "&cIl giocatore selezionato è al momento online. Per controllare il suo inventario utilizza /invsee <player>"
  119. stop
  120.  
  121. on command:
  122. set {%player's uuid%::lastcommand} to command
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement