EmptyRooms_ Posted February 17, 2022 Share Posted February 17, 2022 I want to make a skript that when you do /efriend add <player> the player thats added will get a message which is "<player> wants to be your friend" and you can do /efriendaccept or /efrienddeny once you do /efriendaccept it will send to both players "<player> has accepted your friend request" and you cannot hurt them by punching them using bows and you can do /efriendremove <player> to remove your friend and it send to both players again "You've been removed as a friend" and /efrienddeny just sends the both players "<player> has rejected your friend quest" while the other player who's the sender gets a message "you denied <player> friend request and also theres a list for your friend in /efriendlist where it shows your friends Link to comment Share on other sites More sharing options...
nicoalla Posted February 24, 2022 Share Posted February 24, 2022 (edited) i will try my best here Edited February 24, 2022 by nicoalla Link to comment Share on other sites More sharing options...
nicoalla Posted February 24, 2022 Share Posted February 24, 2022 (edited) i have made a prototype of it. it needs some messages but the main concept does work. I added a resetlist command because it was easier for the programming progress. When i got it all done, that will be removed #A Script for a efriend system: #Add a efriend command /efriend <text> <player>: trigger: if arg 1 does not contain "add": send "&8&m " send "&4Write §3/efriend help §4 to see all command options" send "&8&m " stop else: send "&9You send a friendrequest to %arg 2%!" send "<tooltip:Accepp:/efriendaccept Deny:/efrienddeny>&4%player%&9 send you a friend request!" to arg 2 set {currentefriend} to "%arg 2%" stop #Accept a friend request command /efriendaccept: trigger: set {accept} to true add {currentefriend} to {efriendlist::*} send "&3%player% accepted your friendrequest!" to {currentefriend} #Deny a friendrequest command /efrienddeny: trigger: set {deny} to true send "&3%player% denied your friendrequest!" to {currentefriend} #Get a help menu command /efriendhelp: trigger: send "&eHelp menu:" send "&8&m " send "&3- &b/efriend help &7| Get to the help menu." send "&3- &b/efriend add <player> &7| Send a friendrequest to someone." send "&3- &b/efriendaccept &7| Accept a friend request." send "&3- &b/efrienddeny &7| Deny a friendrequest." send "&3- &b/efriendlist &7| See a list of all your efriends" send "&3- &b/efiriendremove <player> &7| Remove a efriend of your efriendlist" send "&8&m " #Get to know if the request is dinied or accepted every second: loop all players: if {accept} is true: send "%{currentefriend}% accepted your friend request !" to loop-player send "You accepted the friend request!" to {currentefriend} set {accept} to false stop if {deny} is true: send "&4%{currentefriend}% &3denied your friendrequest!" to loop-player send "You denied the friend request!" to {currentefriend} set {currentefriend} to "" set {deny} to false stop #See your efriend list command /efriendlist: trigger: send "&8&m " send "&6&lYour friend list" send "%{efriendlist::*}%" send "&8&m " #Remove a efriend command /efriendremove <player>: trigger: remove arg 1 from {efriendlist::*} send "&3You removed %arg 1% from your efriendlist!" send "&3You were removed by %player%!" to arg 1 #Not making damage to friends on damaging: if {efriendlist::*} contains victim's tab list name: send "It's a friend!" to attacker cancel event stop Edited February 24, 2022 by nicoalla Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now