Oops. Change the third line up in my code to:
Code:
$gameVariables.setValue(364, shopValues[Math.randomInt(shopValues.length)]);
$gameVariables.setValue(364, shopValues[Math.randomInt(shopValues.length)]);
Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-create-a-random-sales-event-for-a-shop-without-making-already-purchased-items-go-on-sale-again.157792/