Code:
function ahOpen(p: player, page: number):
open chest inventory with 6 rows named "&7Auction House - Listing" to {_p}
set {_s} to 0
loop sorted {ah::price::*}:
set {_index} to {_page} * 45
add {_s} to {_index}
if {ah::items::%{_index}%} is set:
set slot {_s} of {_p}'s current inventory to {ah::items::%{_index}%} with lore "&fPrice: &a$%regex({ah::price::%{_index}%})%" and "&fSeller: &a%{ah::owner::%{_index}%}% "
add 1 to {_s}
if ({_s}) >= 45:
exit loop