Guest User

Untitled

a guest
Nov 14th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. Options:
  2. # Mensagem sem permissão:
  3. noperm: &cRequer permissão!
  4. # Permissão para utilizar o comando:
  5. perm: createnpc.admin
  6.  
  7. command /mynpc [<text>] [<text>] [<text>]:
  8. permission: {@perm}
  9. permission message: {@noperm}
  10. trigger:
  11. if arg 1 is set:
  12. if arg 1 is "criar" or "new" or "create":
  13. if arg 2 is set:
  14. if arg 3 is set:
  15. spawn a villager at player's location
  16. set name of spawned villager to "%colored arg 2% &7[Click]"
  17. set {npc.location::%spawned villager%} to location of player
  18. set {npc.command::%spawned villager%} to arg 3
  19. apply slowness 255 to spawned villager for 999 days
  20. set {_criou} to "%name of spawned villager%"
  21. replace all "&7[Click]" with "" in {_criou}
  22. send "&9[MYNPC]&r Você criou o NPC: &a%{_criou}%"
  23. send "&9[MYNPC]&r Comando a executar: &a%arg 3%"
  24. while {npc.command::%spawned villager%} is set:
  25. teleport spawned villager to {npc.location::%spawned villager%}
  26. wait 1 seconds
  27. else:
  28. send "&cEspecifique um comando para o NPC."
  29. else:
  30. send "&cEspecifique o nome do NPC."
  31. if arg 1 is "del" or "deletar" or "delete":
  32. loop all entities in radius 2 around player:
  33. if loop-entity is a villager:
  34. clear loop-entity
  35. delete {npc.location::*}
  36. delete {npc.command::*}
  37. set {_name} to "%name of loop-entity%"
  38. replace all "&7[Click]" with "" in {_name}
  39. send "&9[MYNPC]&r Você deletou o NPC: &a%{_name}%"
  40. stop
  41. send "&9[MYNPC] &aFique dentro do NPC para deleta-lo."
  42. else:
  43. send "&c/createnpc <criar/deletar> <nome-do-npc> <comando>"
  44.  
  45. on damage:
  46. if {npc.command::%victim%} is set:
  47. cancel event
  48. teleport victim to {npc.location::%victim%}
  49. make attacker execute command "%{npc.command::%victim%}%"
  50.  
  51. on rightclick on villager:
  52. if {npc.command::%villager%} is set:
  53. cancel event
  54. teleport villager to {npc.location::%villager%}
  55. make player execute command "%{npc.command::%villager%}%"
Advertisement
Add Comment
Please, Sign In to add comment