Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /fr [<text>] [<player>]:
- trigger:
- if arg 1 is not set:
- send " " to player
- send "&c/fr add &r&8» &7Add a friend" to player
- send "&c/fr remove &r&8» &7Remove a friend" to player
- send "&c/fr list &r&8» &7List List of your friends" to player
- send " " to player
- if arg 1 is "invite" or "add" or "accept":
- if player-arg is set:
- if player-arg is not player:
- if {friend.%uuid of player%::*} contains "%player-arg%":
- send "&cYou &7are already friends!" to player
- stop
- if {friend.attente.%uuid of player%} is set:
- add player to {friend.%{friend.attente.%uuid of player%}%::*}
- add player to {friend.%uuid of player-arg%::*}
- add player-arg to {friend.%uuid of player%::*}
- send "&cYou &7are now friends with &c%player-arg%" to player
- send "&cYou &7are now friends with &c%player%" to player-arg
- wait 1 tick
- delete {friend.attente.%uuid of player%}
- else:
- set {friend.attente.%uuid of player-arg%} to player
- send "" to player-arg
- send "&c%player% &7asked sent you a &cfriend request" to player-arg
- send "&cFor accept, execute: &7/fr add &c%player%" to player-arg
- send "" to player-arg
- send "&cFriend request &7sent to &c%player-arg%" to player
- else:
- send "&cYou &7can't send a &cFriend request &7to &cyourself!" to player
- else:
- send "&cCorrect usage: &7/fr (player)" to player
- if arg 1 is "remove" or "delete":
- if player-arg is not set:
- send "&cCorrect usage: &7/fr remove (player)" to player
- if player-arg is set:
- if player-arg is not player:
- if {friend.%uuid of player%::*} contains "%player-arg%":
- remove player-arg from {friend.%uuid of player%::*}
- remove player from {friend.%uuid of player-arg%::*}
- send "&cYou &7are not friends with &d%player-arg%&37" to player
- send "&cYou &7are no longer friends with &c%player%&7!" to player-arg
- else:
- send "&cYou are not friends with this player!" to player
- stop
- if arg 1 is "list":
- loop {friend.%uuid of player%::*}:
- if loop-value is online:
- send "&cFriends Online: &7[&d%loop-value%&7]" to player
- if loop-value is offline:
- send "&cFriends Offline: &7[&5%loop-value%&7]" to player
Advertisement
Add Comment
Please, Sign In to add comment