Trading

Script Trading 1.0.0

  • 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!

LimeGlass

VIP
Supporter ++
Regular Diner
Addon Developer
Jan 24, 2017
628
441
73
25
location of "LimeGlass" parsed as player
LimeGlass submitted a new resource:

Trading - A basic and highly configurable trading system.

Trading
This script is designed to make trading simple and easy for the user without the worry of someone stealing your items on trading. This system secures that your players have a safe trade and no scamming.

Commands
* /Trade (PlayerName) - Requests a trade with the designated player
* /Trade Accept - Accepts the current trade request
* /Trade Deny- Declines the current trade request

Permissions
Only one permission to actually allow trading...

Read more about this resource...
 
I think it looks A-OK, but the cancel should be in the middle where the gray is, I think it looks.. uhm.. weird.
 
shift + right click trade:

Code:
on right click on entity:
    if entity is a player:
        player is sneaking
        if {trading::temp::player::%event-player%::request} isn't set:
            if {trading::temp::player::%event-entity%::request} isn't set:
                execute event-player command "/trade %event-entity%"
            else:
                if {trading::temp::player::%event-entity%::request} is set:
                    execute event-player command "/trade accept"
                else:
                    execute event-entity command "/trade accept"
        else:
            if {trading::temp::player::%event-entity%::request} isn't set:
                execute event-entity command "/trade accept"
            else:
                execute event-player command "/trade accept"