Advertisement
Guest User

Untitled

a guest
Oct 9th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. # By: AfonsoSK (!Afonso)
  2. # Blog: http://afonsohub.blogspot.com.br/
  3. # Name: AfonsoCKits
  4. # Version: 1.0
  5. # Support: pedro_afonsoaapp <skype>
  6. # Perms: ckit.adm
  7. # Dep's: Skript
  8.  
  9. command /ckit [<text>] [<text>]:
  10. trigger:
  11. if arg 1 is "criar":
  12. if arg 2 is set:
  13. if player has permission "ckit.adm":
  14. if {ckits.%arg 2%} is true:
  15. send "&5[CKit]&c Esse kit já existe." to the player
  16. stop
  17. else:
  18. set {ckits.%arg 2%} to true
  19. set {_tempint} to 1
  20. loop 36 times:
  21. set {ckits.%arg 2%.%{_tempint}%} to 64 of 36
  22. add 1 to {_tempint}
  23. send "&5[CKit]&3 Kit: &b%arg 2% &3criado!" to the player
  24. stop
  25. else:
  26. send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
  27. stop
  28. else:
  29. send "&5[CKit]&c Comando incorreto!" to the player
  30. send "&5[CKit]&3 Use /ckit criar <nomedokit>." to the player
  31. stop
  32. if arg 1 is "deletar":
  33. if arg 2 is set:
  34. if player has permission "ckit.adm":
  35. if {ckits.%arg 2%} is not set:
  36. send "&5[CKit]&c Esse kit nao existe." to the player
  37. stop
  38. else:
  39. clear {ckits.%arg 2%}
  40. set {_tempint} to 1
  41. loop 36 times:
  42. clear {ckits.%arg 2%.%{_tempint}%}
  43. add 1 to {_tempint}
  44. send "&5[CKit]&3 Kit: &b%arg 2% &3deletado!" to the player
  45. stop
  46. else:
  47. send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
  48. stop
  49. else:
  50. send "&5[CKit]&c Comando incorreto!" to the player
  51. send "&5[CKit]&3 Use /ckit deletar <nomedokit>." to the player
  52. stop
  53.  
  54. command /ckitadd [<text>] [<integer>]:
  55. permission: ckit.adm
  56. permission message: &5[CKit]&c Você nao tem permissao para usar este comando.
  57. trigger:
  58. if arg 1 is not set:
  59. send "&5[CKit]&c Escolha o nome do kit." to the player
  60. stop
  61. if arg 2 is not set:
  62. send "&5[CKit]&c Escolha o número do slot." to the player
  63. stop
  64. if arg 2 is greater than 36:
  65. send "&5[CKit]&c Número de slot inválido." to the player
  66. stop
  67. if {ckits.%arg 1%} is not set:
  68. send "&5[CKit]&c Esse kit nao existe." to the player
  69. stop
  70. else:
  71. set {ckits.%arg 1%.%arg 2%} to player's held item
  72. send "&5[CKit]&3 Adicionado &b%player's held item%&3 no slot &b%arg 2%&3 do kit &b%arg 1%&3." to the player
  73. stop
  74.  
  75. command /ckita [<text>] [<text>]:
  76. trigger:
  77. if arg 1 is not set:
  78. send "&5[CKit]&c Selecione a armadura." to the player
  79. send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
  80. stop
  81. if arg 1 is "helmet":
  82. if arg 2 is set:
  83. if player has permission "ckit.adm":
  84. set {ckits.%arg 2%.helmet} to player's held item
  85. stop
  86. else:
  87. send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
  88. stop
  89. else:
  90. send "&5[CKit]&c Escolha o nome do kit." to the player
  91. send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
  92. stop
  93. if arg 1 is "chestplate":
  94. if arg 2 is set:
  95. if player has permission "ckit.adm":
  96. set {ckits.%arg 2%.chestplate} to player's held item
  97. stop
  98. else:
  99. send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
  100. stop
  101. else:
  102. send "&5[CKit]&c Escolha o nome do kit." to the player
  103. send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
  104. stop
  105. if arg 1 is "leggings":
  106. if arg 2 is set:
  107. if player has permission "ckit.adm":
  108. set {ckits.%arg 2%.leggings} to player's held item
  109. stop
  110. else:
  111. send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
  112. stop
  113. else:
  114. send "&5[CKit]&c Escolha o nome do kit." to the player
  115. send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
  116. stop
  117. if arg 1 is "boots":
  118. if arg 2 is set:
  119. if player has permission "ckit.adm":
  120. set {ckits.%arg 2%.boots} to player's held item
  121. stop
  122. else:
  123. send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
  124. stop
  125. else:
  126. send "&5[CKit]&c Escolha o nome do kit." to the player
  127. send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
  128. stop
  129.  
  130. on right click on sign:
  131. line 1 of block is "[Kit]"
  132. {ckits.%line 2 of block%} is true
  133. if line 4 of block is "true":
  134. player does not have permission "ckit.%line 2 of block%"
  135. send "&5[CKit]&c Você nao tem permissao para usar este kit." to the player
  136. stop
  137. if line 3 of block is not "true":
  138. clear inventory of the player
  139. set {_tempint} to 1
  140. loop 36 times:
  141. give {ckits.%line 2 of block%.%{_tempint}%} to the player
  142. add 1 to {_tempint}
  143. if {ckits.%line 2 of block%.helmet} is set:
  144. set player's helmet to {ckits.%line 2 of block%.helmet}
  145. if {ckits.%line 2 of block%.chestplate} is set:
  146. set player's chestplate to {ckits.%line 2 of block%.chestplate}
  147. if {ckits.%line 2 of block%.leggings} is set:
  148. set player's leggings to {ckits.%line 2 of block%.leggings}
  149. if {ckits.%line 2 of block%.boots} is set:
  150. set player's boots to {ckits.%line 2 of block%.boots}
  151. remove 2304 of 36 from the player
  152. send "&5[CKit]&3 Kit Selecionado! &b%line 2 of block%&3." to the player
  153.  
  154. on sign change:
  155. line 1 of block is "[kit]"
  156. player doesn't have permission "ckit.adm"
  157. send "&5[CKit]&c Você nao tem permissao para criar placas de kit." to the player
  158. cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement