Advertisement
Guest User

Untitled

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