ArtzifyHD

Friends Skript V3

Aug 8th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. command /fr [<text>] [<player>]:
  2. trigger:
  3. if arg 1 is not set:
  4. send " " to player
  5. send "&c/fr add &r&8» &7Add a friend" to player
  6. send "&c/fr remove &r&8» &7Remove a friend" to player
  7. send "&c/fr list &r&8» &7List List of your friends" to player
  8. send " " to player
  9. if arg 1 is "invite" or "add" or "accept":
  10. if player-arg is set:
  11. if player-arg is not player:
  12. if {friend.%uuid of player%::*} contains "%player-arg%":
  13. send "&cYou &7are already friends!" to player
  14. stop
  15. if {friend.attente.%uuid of player%} is set:
  16. add player to {friend.%{friend.attente.%uuid of player%}%::*}
  17. add player to {friend.%uuid of player-arg%::*}
  18. add player-arg to {friend.%uuid of player%::*}
  19. send "&cYou &7are now friends with &c%player-arg%" to player
  20. send "&cYou &7are now friends with &c%player%" to player-arg
  21. wait 1 tick
  22. delete {friend.attente.%uuid of player%}
  23. else:
  24. set {friend.attente.%uuid of player-arg%} to player
  25. send "" to player-arg
  26. send "&c%player% &7asked sent you a &cfriend request" to player-arg
  27. send "&cFor accept, execute: &7/fr add &c%player%" to player-arg
  28. send "" to player-arg
  29. send "&cFriend request &7sent to &c%player-arg%" to player
  30. else:
  31. send "&cYou &7can't send a &cFriend request &7to &cyourself!" to player
  32. else:
  33. send "&cCorrect usage: &7/fr (player)" to player
  34. if arg 1 is "remove" or "delete":
  35. if player-arg is not set:
  36. send "&cCorrect usage: &7/fr remove (player)" to player
  37. if player-arg is set:
  38. if player-arg is not player:
  39. if {friend.%uuid of player%::*} contains "%player-arg%":
  40. remove player-arg from {friend.%uuid of player%::*}
  41. remove player from {friend.%uuid of player-arg%::*}
  42. send "&cYou &7are not friends with &d%player-arg%&37" to player
  43. send "&cYou &7are no longer friends with &c%player%&7!" to player-arg
  44. else:
  45. send "&cYou are not friends with this player!" to player
  46. stop
  47. if arg 1 is "list":
  48. loop {friend.%uuid of player%::*}:
  49. if loop-value is online:
  50. send "&cFriends Online: &7[&d%loop-value%&7]" to player
  51. if loop-value is offline:
  52. send "&cFriends Offline: &7[&5%loop-value%&7]" to player
Advertisement
Add Comment
Please, Sign In to add comment