Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- ajudante = false
- command /ajudante [<text>]:
- trigger:
- if player has permission "ajudante.moderar":
- if arg 1 is set:
- if arg 1 is "ativar":
- if {ajudante} is false:
- set {ajudante} to true
- spawn 1 villager at location of player
- set name of spawned entity to "&eAjudante do(a) %player%"
- apply slowness 255 to last spawned entity for 999 days
- stop
- else if {ajudante} is true:
- send "&cVocê ja esta com o ajudante ativo!" to player
- stop
- if arg 1 is "desativar":
- if {ajudante} is false:
- send "&aVocê nao tem uma Ajudante ativado"
- stop
- else if {ajudante} is true:
- loop all entities:
- set {ajudante} to false
- name of loop-entity contains "&eAjudante do(a) %player%"
- kill loop-entity
- stop
- else:
- send "&aOpções disponiveis: Ativar e Desativar." to player
- else:
- send "&aUse: /ajudante <Ativar|Desativar>." to player
- else:
- send "&cSem permissoes para executar esse comando." to player
- on rightclick on villager:
- if "%clicked entity's name%" contains "&eAjudante do(a) %player%":
- cancel event
- on damage:
- if "%victim's name%" contains "&eAjudante do(a) %player%":
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment