Solved Trading system

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Marc

Active Member
Nov 27, 2020
94
0
8
17
Hello friends, is there any possible way I can make /trade [<player>] wait for {%player%.accept} to be true?

Heres the code:
Code:
command /tradeaccept [<player>]:
    trigger:
        if {%player%.request} is true:
            set {%player%.accept} to true
            send message "%player% has accepted your request!" to arg-1
            make player execute command "/1 %arg-1%"

command /trade [<player>]:
    trigger:
        if {%player%.request} is false:
            set {%player%.request} to "true"
            send message "&6%player% &7has sent a trade request to you! do &6/tradeaccept %player% &7to begin trading!" to arg-1
        if {%player%.accept} is true:
            make player execute command "/1 [<player>]"

command /1 [<player>]:
    trigger:
        wait 30 ticks
        open chest with 6 rows named "&6Trade" to player
        format slot 0 of player with red stained glass pane named " " to be unstealable
        format slot 1 of player with gray stained glass pane named " " to be unstealable
        format slot 2 of player with player's head named "&8&l%player%" to be unstealable
        format slot 3 of player with gray stained glass pane named " " to be unstealable
        format slot 4 of player with gray stained glass pane named " " to be unstealable
        format slot 5 of player with gray stained glass pane named " " to be unstealable
        format slot 6 of player with arg-1's head named "&8&l%arg-1%" to be unstealable
        format slot 7 of player with gray stained glass pane named " " to be unstealable
        format slot 8 of player with red stained glass pane named " " to be unstealable
        format slot 9 of player with gray stained glass pane named " " to be unstealable
        format slot 17 of player with gray stained glass pane named " " to be unstealable
        format slot 18 of player with gray stained glass pane named " " to be unstealable
        format slot 26 of player with gray stained glass pane named " " to be unstealable
        format slot 27 of player with gray stained glass pane named " " to be unstealable
        format slot 35 of player with gray stained glass pane named " " to be unstealable
        format slot 36 of player with gray stained glass pane named " " to be unstealable
        format slot 44 of player with gray stained glass pane named " " to be unstealable
        format slot 45 of player with gray stained glass pane named " " to be unstealable
        format slot 46 of player with gray stained glass pane named " " to be unstealable
        format slot 47 of player with gray stained glass pane named " " to be unstealable
        format slot 48 of player with gray stained glass pane named " " to be unstealable
        format slot 49 of player with gray stained glass pane named " " to be unstealable
        format slot 50 of player with gray stained glass pane named " " to be unstealable
        format slot 51 of player with gray stained glass pane named " " to be unstealable
        format slot 52 of player with gray stained glass pane named " " to be unstealable
        format slot 53 of player with gray stained glass pane named " " to be unstealable
        format slot 13 of player with gray stained glass pane named " " to be unstealable
        format slot 22 of player with gray stained glass pane named " " to be unstealable
        format slot 31 of player with gray stained glass pane named " " to be unstealable
        format slot 40 of player with gray stained glass pane named " " to be unstealable

command /tradereset:
    trigger:
        set {%player%.request} to false
        set {%player%.accept} to false

command /tradecheck:
    trigger:
        send message "%{%player%.request}%" to player
        send message "%{%player%.accept}%" to player

thanks for the help <3
 
Please elaborate. You haven't received any help yet due to people not understanding what your problem actually is.
 
Oh its cool I gave up lol, I wanted to know if there was a possible way for a string of code to wait for a variable to be set to true before it would execute, but its cool thx homie <3
 
Status
Not open for further replies.