Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Options:
- # Mensagem sem permissão:
- noperm: &cRequer permissão!
- # Permissão para utilizar o comando:
- perm: createnpc.admin
- command /mynpc [<text>] [<text>] [<text>]:
- permission: {@perm}
- permission message: {@noperm}
- trigger:
- if arg 1 is set:
- if arg 1 is "criar" or "new" or "create":
- if arg 2 is set:
- if arg 3 is set:
- spawn a villager at player's location
- set name of spawned villager to "%colored arg 2% &7[Click]"
- set {npc.location::%spawned villager%} to location of player
- set {npc.command::%spawned villager%} to arg 3
- apply slowness 255 to spawned villager for 999 days
- set {_criou} to "%name of spawned villager%"
- replace all "&7[Click]" with "" in {_criou}
- send "&9[MYNPC]&r Você criou o NPC: &a%{_criou}%"
- send "&9[MYNPC]&r Comando a executar: &a%arg 3%"
- while {npc.command::%spawned villager%} is set:
- teleport spawned villager to {npc.location::%spawned villager%}
- wait 1 seconds
- else:
- send "&cEspecifique um comando para o NPC."
- else:
- send "&cEspecifique o nome do NPC."
- if arg 1 is "del" or "deletar" or "delete":
- loop all entities in radius 2 around player:
- if loop-entity is a villager:
- clear loop-entity
- delete {npc.location::*}
- delete {npc.command::*}
- set {_name} to "%name of loop-entity%"
- replace all "&7[Click]" with "" in {_name}
- send "&9[MYNPC]&r Você deletou o NPC: &a%{_name}%"
- stop
- send "&9[MYNPC] &aFique dentro do NPC para deleta-lo."
- else:
- send "&c/createnpc <criar/deletar> <nome-do-npc> <comando>"
- on damage:
- if {npc.command::%victim%} is set:
- cancel event
- teleport victim to {npc.location::%victim%}
- make attacker execute command "%{npc.command::%victim%}%"
- on rightclick on villager:
- if {npc.command::%villager%} is set:
- cancel event
- teleport villager to {npc.location::%villager%}
- make player execute command "%{npc.command::%villager%}%"
Advertisement
Add Comment
Please, Sign In to add comment