Guest1221

Untitled

Dec 30th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. command /friends [<text>] [<player>]:
  2. aliases: friend
  3. executable by: player
  4. trigger:
  5. if text arg 1 is not set:
  6. if player arg 1 is not set:
  7. send "&6/friends add (name) &aSend a request to become friends with someone!"
  8. send "&6/friends accept (name) &aAccept a friend request!"
  9. send "&6/friends deny (name) &aDeny a friend request!"
  10. send "&6/friends list &aList your current friends!"
  11. send "&6/friends requests &aSee the people requesting to be friends with you!"
  12. send "&6/friends remove (name) &aRemove a friend from your friends list!"
  13. send "&cCredit To &aSlimeDoesStuff&c."
  14. if text arg 1 is "add":
  15. if player arg 1 is set:
  16. if player arg 1 is not "%player%":
  17. if {%UUID of player%.requested.%UUID of player arg 1%} is not set:
  18. if {%UUID of player%.friends.%UUID of player arg 1%} is not set:
  19. set {%UUID of player%.requested.%UUID of player arg 1%} to true
  20. add player to {%UUID of player arg 1%.requests::*}
  21. send "&aYou sent a friend request to &6%player arg 1%"
  22. send "&6%player% &asent you a friend request. Accept their request with &6/friends accept %player% &aor deny it with &6/friends deny %player%" to player arg 1
  23. play raw sound "random.pop" at player with pitch 1 volume 10
  24. else:
  25. send "&6%player arg 1% &cis already in your friends list."
  26. else:
  27. send "&cYou have already send a request to &6%player arg 1%&c."
  28. else:
  29. send "&cYou can't add your self."
  30. else:
  31. send "&cUse the command like this&7: &6/friends add (name)"
  32. if text arg 1 is "accept":
  33. if player arg 1 is set:
  34. if player arg 1 is not "%player%":
  35. if {%UUID of player%.friends.%UUID of player arg 1%} is not set:
  36. if {%UUID of player arg 1%.requested.%UUID of player%} is set:
  37. set {%UUID of player arg 1%.friends.%UUID of player%} to true
  38. set {%UUID of player%.friends.%UUID of player arg 1%} to true
  39. add player arg 1 to {%UUID of player%.friends::*}
  40. add player to {%UUID of player arg 1%.friends::*}
  41. remove player arg 1 from {%UUID of player%.requests::*}
  42. send "&aYou accepted the friend request sent by &6%player arg 1%&a!"
  43. send "&6%player% &aaccept your friend request!" to player arg 1
  44. play raw sound "random.pop" at player with pitch 1 volume 10
  45. else:
  46. send "&6%player arg 1% &cdidn't send you a request."
  47. else:
  48. send "&cThis person is already your friend."
  49. else:
  50. send "&cYou can't accept your self."
  51. else:
  52. send "&cUse the command like this&7: &6/friends add (name)"
  53. if text arg 1 is "deny":
  54. if player arg 1 is set:
  55. if player arg 1 is not "%player%":
  56. if {%UUID of player%.friends.%UUID of player arg 1%} is not set:
  57. if {%UUID of player arg 1%.requested.%UUID of player%} is set:
  58. delete {%UUID of player arg 1%.requested.%UUID of player%}
  59. remove player arg 1 from {%UUID of player%.requests::*}
  60. send "&cYou denied the friend request sent by &6%player arg 1%&c!"
  61. send "&6%player% &cdenied your friend request!" to player arg 1
  62. play raw sound "random.pop" at player with pitch 1 volume 10
  63. else:
  64. send "&6%player arg 1% &cdidn't send you a request."
  65. else:
  66. send "&cThis person is your friend."
  67. else:
  68. send "&cYou can't deny your self."
  69. else:
  70. send "&cUse the command like this&7: &6/friends deny (name)"
  71. if text arg 1 is "list":
  72. if player arg 1 is not set:
  73. send "&5&m------------------------------"
  74. send "&bYour friends:"
  75. loop {%UUID of player%.friends::*}:
  76. send "&a%loop-value%"
  77. send "&5&m------------------------------"
  78. else:
  79. send "&cUse the command like this&7: &6/friends list"
  80. if text arg 1 is "requests":
  81. if player arg 1 is not set:
  82. send "&5&m------------------------------"
  83. send "&bPending requests:"
  84. loop {%UUID of player%.requests::*}:
  85. send "&a%loop-value%"
  86. send "&5&m------------------------------"
  87. else:
  88. send "&cUse the command like this&7: &6/friends list"
  89. if text arg 1 is "remove":
  90. if player arg 1 is set:
  91. if player arg 1 is not "%player%":
  92. if {%UUID of player%.friends.%UUID of player arg 1%} is set:
  93. delete {%UUID of player arg 1%.friends.%UUID of player%}
  94. delete {%UUID of player%.friends.%UUID of player arg 1%}
  95. remove player arg 1 from {%UUID of player%.friends::*}
  96. remove player from {%UUID of player arg 1%.friends::*}
  97. send "&cYou removed &6%player arg 1% &cfrom your friends list!"
  98. send "&6%player% &cremoved you from his friends list!" to player arg 1
  99. play raw sound "random.pop" at player with pitch 1 volume 10
  100. else:
  101. send "&cThis person is not your friend."
  102. else:
  103. send "&cYou can't remove your self."
  104. else:
  105. send "&cUse the command like this&7: &6/friends remove (name)"
  106. on join:
  107. loop {%UUID of player%.friends::*}:
  108. send "&aYour friend %player% joined the server!" to loop-value
  109. on quit:
  110. loop {%UUID of player%.friends::*}:
  111. send "&4Your friend %player% left the server!" to loop-value
Add Comment
Please, Sign In to add comment