Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. options:
  2. permission: 454dw65a46dwa
  3. menotied color: &c
  4. sound: entity.player.levelup
  5.  
  6. on chat:
  7. set {_players::*} to all players
  8. set {_contains} to ifcontains({_players::*}, message, player)
  9.  
  10. if {_contains} is "true":
  11. if player != {chatmention.player.menotied::%player%}:
  12. if player doesn't have permission "{@permission}":
  13. replace "%{chatmention.player.menotied::%player%}%" with "{@menotied color}%{chatmention.player.menotied::%player%}%&7" in message
  14. play sound "{@sound}" with volume 1 and pitch 1 at {chatmention.player.menotied::%player%} for {chatmention.player.menotied::%player%}
  15. delete {chatmention.player.menotied::%player%}
  16. else:
  17. replace "%{chatmention.player.menotied::%player%}%" with "{@menotied color}%{chatmention.player.menotied::%player%}%&f" in message
  18. play sound "{@sound}" with volume 1 and pitch 1 at {chatmention.player.menotied::%player%} for {chatmention.player.menotied::%player%}
  19. delete {chatmention.player.menotied::%player%}
  20.  
  21.  
  22. function ifcontains(p: objects, c: text, currp: player) :: text:
  23. set {_cont} to "false"
  24. loop {_p::*}:
  25. if {_c} contains "%loop-value%":
  26. set {_cont} to "true"
  27. set {chatmention.player.menotied::%{_currp}%} to loop-value
  28. return {_cont}
  29. stop trigger
  30. return {_cont}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement