Entities

Untitled

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