Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # By: AfonsoSK (!Afonso)
- # Blog: http://afonsohub.blogspot.com.br/
- # Name: AfonsoCKits
- # Version: 1.0
- # Support: pedro_afonsoaapp <skype>
- # Perms: ckit.adm
- # Dep's: Skript
- command /ckit [<text>] [<text>]:
- trigger:
- if arg 1 is "criar":
- if arg 2 is set:
- if player has permission "ckit.adm":
- if {ckits.%arg 2%} is true:
- send "&5[CKit]&c Esse kit já existe." to the player
- stop
- else:
- set {ckits.%arg 2%} to true
- set {_tempint} to 1
- loop 36 times:
- set {ckits.%arg 2%.%{_tempint}%} to 64 of 36
- add 1 to {_tempint}
- send "&5[CKit]&3 Kit: &b%arg 2% &3criado!" to the player
- stop
- else:
- send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
- stop
- else:
- send "&5[CKit]&c Comando incorreto!" to the player
- send "&5[CKit]&3 Use /ckit criar <nomedokit>." to the player
- stop
- if arg 1 is "deletar":
- if arg 2 is set:
- if player has permission "ckit.adm":
- if {ckits.%arg 2%} is not set:
- send "&5[CKit]&c Esse kit nao existe." to the player
- stop
- else:
- clear {ckits.%arg 2%}
- set {_tempint} to 1
- loop 36 times:
- clear {ckits.%arg 2%.%{_tempint}%}
- add 1 to {_tempint}
- send "&5[CKit]&3 Kit: &b%arg 2% &3deletado!" to the player
- stop
- else:
- send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
- stop
- else:
- send "&5[CKit]&c Comando incorreto!" to the player
- send "&5[CKit]&3 Use /ckit deletar <nomedokit>." to the player
- stop
- command /ckitadd [<text>] [<integer>]:
- permission: ckit.adm
- permission message: &5[CKit]&c Você nao tem permissao para usar este comando.
- trigger:
- if arg 1 is not set:
- send "&5[CKit]&c Escolha o nome do kit." to the player
- stop
- if arg 2 is not set:
- send "&5[CKit]&c Escolha o número do slot." to the player
- stop
- if arg 2 is greater than 36:
- send "&5[CKit]&c Número de slot inválido." to the player
- stop
- if {ckits.%arg 1%} is not set:
- send "&5[CKit]&c Esse kit nao existe." to the player
- stop
- else:
- set {ckits.%arg 1%.%arg 2%} to player's held item
- 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
- stop
- command /ckita [<text>] [<text>]:
- trigger:
- if arg 1 is not set:
- send "&5[CKit]&c Selecione a armadura." to the player
- send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
- stop
- if arg 1 is "helmet":
- if arg 2 is set:
- if player has permission "ckit.adm":
- set {ckits.%arg 2%.helmet} to player's held item
- stop
- else:
- send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
- stop
- else:
- send "&5[CKit]&c Escolha o nome do kit." to the player
- send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
- stop
- if arg 1 is "chestplate":
- if arg 2 is set:
- if player has permission "ckit.adm":
- set {ckits.%arg 2%.chestplate} to player's held item
- stop
- else:
- send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
- stop
- else:
- send "&5[CKit]&c Escolha o nome do kit." to the player
- send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
- stop
- if arg 1 is "leggings":
- if arg 2 is set:
- if player has permission "ckit.adm":
- set {ckits.%arg 2%.leggings} to player's held item
- stop
- else:
- send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
- stop
- else:
- send "&5[CKit]&c Escolha o nome do kit." to the player
- send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
- stop
- if arg 1 is "boots":
- if arg 2 is set:
- if player has permission "ckit.adm":
- set {ckits.%arg 2%.boots} to player's held item
- stop
- else:
- send "&5[CKit]&c Você nao tem permissao para usar este comando." to the player
- stop
- else:
- send "&5[CKit]&c Escolha o nome do kit." to the player
- send "&5[CKit]&c Use /ckit <armadura> <nomedokit>." to the player
- stop
- on right click on sign:
- line 1 of block is "[Kit]"
- {ckits.%line 2 of block%} is true
- if line 4 of block is "true":
- player does not have permission "ckit.%line 2 of block%"
- send "&5[CKit]&c Você nao tem permissao para usar este kit." to the player
- stop
- if line 3 of block is not "true":
- clear inventory of the player
- set {_tempint} to 1
- loop 36 times:
- give {ckits.%line 2 of block%.%{_tempint}%} to the player
- add 1 to {_tempint}
- if {ckits.%line 2 of block%.helmet} is set:
- set player's helmet to {ckits.%line 2 of block%.helmet}
- if {ckits.%line 2 of block%.chestplate} is set:
- set player's chestplate to {ckits.%line 2 of block%.chestplate}
- if {ckits.%line 2 of block%.leggings} is set:
- set player's leggings to {ckits.%line 2 of block%.leggings}
- if {ckits.%line 2 of block%.boots} is set:
- set player's boots to {ckits.%line 2 of block%.boots}
- remove 2304 of 36 from the player
- send "&5[CKit]&3 Kit Selecionado! &b%line 2 of block%&3." to the player
- on sign change:
- line 1 of block is "[kit]"
- player doesn't have permission "ckit.adm"
- send "&5[CKit]&c Você nao tem permissao para criar placas de kit." to the player
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement