Entities

Untitled

Oct 6th, 2017
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. options:
  2. Prefix: &cFriend &8»
  3. WarnPrefix: &cFriend &8»
  4. command /f [<text>] [<player>]:
  5. aliases: /friends
  6. trigger:
  7. if arg 1 is not set:
  8. message " " to player
  9. message "&8&m---------------&cFRIEND HELP&8&m---------------" to player
  10. message "&a/friend add <Player> &r&8»&7 Add a friend" to player
  11. message "&a/friend remove <Player> &r&8»&7 Remove a friend" to player
  12. message "&a/friend list &r&8»&7 List List of your friends" to player
  13. message "&8&m---------------&8&m---------------&8&m----------" to player
  14. message " " to player
  15. if arg 1 is "invite" or "add" or "accept":
  16. if player-arg is set:
  17. if player-arg is not player:
  18. if {friend.%uuid of player%::*} contains "%player-arg%":
  19. message "{@WarnPrefix} &7You are already friends with %player-arg%!" to player
  20. stop
  21. if {friend.attente.%uuid of player%} is set:
  22. add player to {friend.%{friend.attente.%uuid of player%}%::*}
  23. add player to {friend.%uuid of player-arg%::*}
  24. add player-arg to {friend.%uuid of player%::*}
  25. message "{@Prefix} &bYou are now friends with &b%player-arg%" to player
  26. message "{@Prefix} &bYou are now friends with &b%player%" to player-arg
  27. wait 1 tick
  28. delete {friend.attente.%uuid of player%}
  29. else:
  30. set {friend.attente.%uuid of player-arg%} to player
  31. message "&8&m---------------&8&m---------------&8&m----------" to player-arg
  32. message "&a%player% &basked you as a friend" to player-arg
  33. message "&aFor accept, execute: &3/friend add &b%player%" to player-arg
  34. message "&8&m---------------&8&m---------------&8&m----------" to player-arg
  35. message "{@Prefix} &bInvitation sent &d%player-arg%" to player
  36. else:
  37. message "{@WarnPrefix} &7You can not be friends with your self!" to player
  38. else:
  39. message "{@Prefix} &7Who do you want to add as a friend?" to player
  40. if arg 1 is "remove" or "delete":
  41. if player-arg is set:
  42. if player-arg is not player:
  43. if {friend.%uuid of player%::*} contains "%player-arg%":
  44. remove player-arg from {friend.%uuid of player%::*}
  45. remove player from {friend.%uuid of player-arg%::*}
  46. message "&3You are not friends with &d%player-arg% &3!" to player
  47. message "&3You are not friends with &d%player% &3!" to player-arg
  48. else:
  49. message "&7You are not friends with this player!" to player
  50. stop
  51. if arg 1 is "list":
  52. loop {friend.%uuid of player%::*}:
  53. if loop-value is online:
  54. add loop-value to {_online::*}
  55. if loop-value is offline:
  56. add loop-value to {_offline::*}
  57. message "&aOnline: &7%{_online::*}%" to player
  58. message "&cOffline: &7%{_offline::*}%" to player
Add Comment
Please, Sign In to add comment