I've been asking this question since ages, is there any player who knows how to code auction house?
@deefer dk how to code it so he always says "It's too lengthy, I don't want to waste my time coding it" Lmao.
array and a function that simplifies it by 45s, limit the overflow to 405 items listed, which shall allow 9 seperate auction page. So items 1-45 in a page will be list items, which you can store in an array "%listed_items%". Using the same element, or item name ids, you can set it up so that each array has the same value. So, an exmple would be Item 1 in gui 2, or item 46 of the array (you need overflow arrays to account for the 2048 data limit), this will mean that Element 46 of the Sellers array, prices array, ACTUAL ITEM VAR array, original item data array, etc will be pulled. I have done this code before, but I no longer have it. I used this code.
>>>> LOOP:
So, for refresh you can run a loop that constantly pulls this data from the arrays then sets the item, or updates it. Checking if {bought::%element%} is true.
______
So the code would be more like:
YAML:
command /ah [<text>] [<text>] [<text>]:
trigger:
if arg-1 is "list":
function(@gui)[@10]
else if arg-1 is "sell":
if player holding air:
send "&cYou can't sell nothing ;)"
else:
if arg-2 i not set:
send "&cYou did not specify a price"
else:
set {_price} to arg-2 parsed as number
if {_price} is more than 0:
add "%arg-2%" to "{prices::*}"
add "player's tool" to {list::*}
remove player's tool from inventory
# Just an idea of what it would look like to list items to AH
else:
send "Invalid price, must be over 0"