ah_command: type: command name: ah debug: false description: Buy and Sell player items! usage: /ah sell (price) tab completions: 1: sell script: - if > 0: - choose : - case sell: - define item - define quantity <[item].quantity> - if <[item]> == : - narrate "Please hold an item to sell" - stop - define lore <[item].lore.if_null[]> - define item <[item].with_flag[auction_item].with_flag[seller:]> - define item <[item].with_flag[price:<[price]>]> - define rank - if <[rank]> == default: - define duration 6h - else if <[rank]> == syfon: - define duration 18h - else: - define duration 24h #Should I add a tax system? :thinking: - define item <[item].with_flag[expire_after].duration[<[duration]>]> - define seller <[item].flag[seller]> - define price <[item].flag[price]> - define time <[item].flag_expiration[expire_after].from_now.formatted> - define info "<&nl><&a>Price: <&e><&l><[price]><&nl><&a>Seller: <&e><&l><[seller].name><&nl><&a>Time Left: <&e><&l><[time]>" - adjust def:item "lore:<[lore]> <[info]>" - flag server ah.items:->:<[item]> - take iteminhand quantity:<[quantity]> ah_handler: type: world debug: false events: on player clicks item_flagged:auction_item in auction_player_lists: - define item - define time <[item].flag_expiration[expire_after]> - narrate <[time].format[dd/MM/yyyy : HH:mm:SS]>