handshake

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

kvee3t_

Member
Jan 21, 2024
1
0
1
29
Category: Roleplay

Suggested name: Handshake

Spigot/Skript Version: server 1.16.5, skript 2.8.0

What I want:

I need a command to offer a handshake to another player. If the player does not agree within 10 seconds, the offer will be automatically canceled. We also need a placeholder that displays “Citizen” if the players did not shake hands, and “Friend” if hands were shaken.

Ideas for commands:
/handshake
/handshake accept

Ideas for permissions:
skript.handshake (for using /handshake)


When I'd like it by: Doesn't matter
 
code_language.skript:
command /handshake [<player>]:
  permission: skript.handshake
  trigger:
    if arg-1 is set:
      send "&a %player% has sent you a handshake request" to arg-1
      set {handshakerequest::%arg-1%} to player
      send "&a Request sent"
      wait 10 seconds
      if {handshake::%player%::%arg-1%} is not set:
        send '&c The handshake request from %player% has timed out' to arg-1
        send "&c Request timed out"
on rightclick on player:
  if {handshakerequest::%player%} is event-player:
    send "&a Hand shoken" to player and event-player
    set {handshake::%event-player%::%player%} to "true"
This should make it so a player runs /handshake <player> it will send a message to the other player saying they have a handshake request. Opon the other player right clicking the player sending the request. It will set a varible named {handshake::emoji_stuck_out_tongue:LAYER1::emoji_stuck_out_tongue:LAYER2}.
THIS WAS NOT TESTED, Please tell me if there are any errors
 
  • Like
Reactions: iMinePixels