How do you create a random sales event for a shop without making already purchased items go on sale again?

EDIT: Thread make-over! The original post lacked critical details. I later provided those details in this thread, but not everyone reads that far, so I am making my updated details the original post. The original, original post is stuffed into the spoiler tag at the bottom.

Spoiler: Full HUD controller Common Event
fullhud.png
Okay, I think I might have created some confusion. So in the spoiler tag is the controller to display the HUD. I truncated it since each of the "if: PlayerRID = x" are effectively the same, but displaying different pictures for the different weapons.
Also, please ignore the "SALES" section. This was just to test the display of the sales sticker. Obviously that's not how I am going to do it since that's kind of what the whole point of this thread is about :LZSlol:

I also think I created confusion due to the way I have named variables.
Since this is a single small map (the interior of the shop) I didn't see any reason to add more clutter to this very lengthy parallel event to actually check the player's region ID by constantly updating their X/Y info. I really, really don't like having a lot of clutter in the events if it's possible to avoid because the tiny little event window box makes it a real pain to edit, not to mention spending an extra frame or two to check and update variables to set player RID would slow down the responsiveness of the HUD. If the goal of having the HUD appear automatically without player input is to speed things up and reduce friction, then it would be antithetical to that design to have the HUD be slow to appear.

ShopHUD.gif


Therefore, the RegionID's have been faked by using Player Touch events that just manually set the "PlayerRID" variable to the specified value:
Spoiler: Player Touch Event Controling PlayerRID
PlayerTouch.png

Where I created some more confusion is that I said there is the ItemID. This is...technically false? So I apologize about that.
Let me break down the 4 working elements here:

  1. A common parallel event. This is an in game timer always running to count down until the next item goes on sale (that's the thing we are working on here.)
  2. A parallel event on my shop's map which is used to control how and when the HUD elements are displayed.
  3. many Individual player touch events that manually set the player's RID as previously shown/discussed.
  4. The item itself, which the player will interact with, which might be on sale or might be normal price.
There are 4 challenges here I'm looking to overcome:

  1. I don't want the same item to go on sale twice in a row (this has been accounted for in the current sales logic with the "SaleItemPreserve" variable)
  2. I don't want items the player has already purchased to go on sale. So once the player has purchased an item (regardless of whether they purchased it on sale or not) that item is no longer valid in the list of possible items to go on sale.
  3. Whatever the sales common event determines is on sale, that information needs to be passed to the map parallel event (the one that controls the HUD) to properly display the "Sale" sticker, in addition to passing that information to the item event.
  4. Done with less clutter in the event screen then how I would have evented this system (because as I stated in my OP, I know how to do all of this through eventing, but it would be a cluttered mess of conditionals and be way overly complicated than is necessary.)
For challenge number 3, my best solution was to use a "SalesItemID" variable (this variable would be set to a value to determine if that is the item that is currently on sale. So for example: set SalesItemID to 1, this 1 corresponds with the bo staff)
Then in the map parallel event (the HUD):
if SalesItemID = PlayerRID
Show picture (the "Sales" sticker)
(Then, obviously, if the SalesItemID doesn't match the PlayerRID, the "Sales" sticker won't be displayed)

Likewise, this "SalesItemID" can also be used when activating the item on the shelf.
If SalesItemID = 1
Set price to [sales price]
else
Set price to [normal price]

Spoiler: TL;DR GPT summary
In summary, the person is discussing a system involving a HUD and sales for items in a game. They explain that there are four working elements: a common parallel event for a timer, a parallel event for controlling the HUD, player touch events to set the player's RegionID, and the items themselves. They mention four challenges they want to overcome: avoiding the same item going on sale twice in a row, preventing already purchased items from going on sale, passing sale information to the HUD and item events, and reducing clutter in the event screen. For challenge number 3, they propose using a "SalesItemID" variable to determine the item currently on sale and display the "Sales" sticker accordingly. They also mention using the SalesItemID to set the price for the item on the shelf based on whether it matches the PlayerRID.




Spoiler
I think this might be done with that mysterious thing I've heard called an "array" but I'm a bit too dumb to figure it out.

Basically: I have a store that will randomly pick 1 of its items to go on sale once in awhile. The problem is if the item is "sold out" (the player already owns the item), it's pointless for said item to go on sale.
I could do a really messy event system that just runs a bunch of conditionals to solve this, but I was hoping to find a more cleaner way of doing this rather than running a bunch of messy and unnecessary conditionals.

For posterity, here is the common event that currently controls the sales mechanic in my game:
Spoiler
SALES.png


*Some notes for clarity:
Variable "SaleItemID" is NOT the same Item ID as the database. (This is because the items for sale in the shop include weapons, armor, and items, which may have overlapping ID numbers.)
SaleItemPreserve is to prevent the same item from going on sale twice in a row.
STATIC:SalesTimer is used to determine the length of the sales time. Sales time is not determined by a constant integer.

Your help is always appreciated. Thank you.
You'd just use a loop or jump to label or something - I'm a little confused by the SaleItemID is not the same as the database ID, and I'm not sure I see where you actually determine what item that is.

But when you do, you can use a script call like this in Conditional Branch - let's say variable 364 now holds the database ID and you've determined it's a weapon.
Code:
$gameParty.hasItem($dataWeapons[$gameVariables.value(364), true)
then jump back to your NewSale label to choose a random ID again.

You can also use an array of values, since I assume there's the possibility the party will eventually own all 16 sales items and you don't want to create an infinite loop.

So I think it would be easiest to store the actual item references in there, since I assume at some point you use that to manipulate your shop, and it makes it easier to check if the party owns it.

If I'm wrong, give some info about how you're doing the shop/price part and I'll modify.

Someplace at the beginning of your game or whatever,
Control Variables -> 666 -> Script -> [$dataWeapons[14], $dataArmor[14], $dataWeapons[62]]
however many things you like. I duplicated the weapon and armor ID just to demonstrate that using this method it's easy to not care about what the ID is. This is all the things that can ever go on sale. You can change/reset/whatever it as you like.

Then you have a few ways to do this. You could mix some event commands in with script calls, but I think it's more efficient just to put it into one Script box and continue with event commands after. So do a Script event command and put in:
Code:
$gameVariables.setValue(364, -1);
while ($gameVariables.value(666).length>0) {
let rand=Math.randomInt($gameVariables.value(666).length)
if ($gameParty.hasItem($gameVariables.value(666)[rand]))
    $gameVariables.value(666).splice(rand, 1);
else {
    $gameVariables.setValue(364, $gameVariables.value(666)[rand]);
    break; }
Then you do Conditional Branch -> 364 -> != -1
If that's true, inside of that conditional branch variable 364 will be storing the item that is to go on sale.
Sorry, you're right, I definitely was lacking information in the OP. My shop doesn't use the default "shop" menu, but instead is done by interacting with events by browsing the "physical" stock of products.
You can see what I am talking about here:
Spoiler
Shop1.png
The ItemID corresponds with the (fake) RegionID (I'm not actually using RegionID to determine this, but player touch events that manually change the RegionID).
Spoiler
Shop4.png

The RegionID is used to determine what item the player is currently looking at, this is to automatically bring up HUD elements for that item. (Maybe a bit overkill, but in an effort to reduce "button presses" to make more frictionless design, the HUD is displayed automatically without input. This is controlled through a parallel event that runs on the shop's map.)
Spoiler: HUD
Shop2.png

Since it's using an event to buy the item, I can pass the sale's info into a conditional on the choice menu. So basically: "If the item is on sale, set the price to X, else, set it to Y." So I just need to determine whether it is on sale or not.
Also determining which item is on sale is used to display an additional HUD element.
Spoiler
Shop3.png



I definitely appreciate your help. I'm a little bit tired tonight to understand what I am reading (the programming/computer logic stuff always takes a lot of effort for me to parse - my brain just isn't cut out for it.) but I'll read over your post (and anything you post after this) thoroughly tomorrow to try to make sense of it.
So I just need to understand how you're going from your fake-IDs-not-the-database-IDs to "this is this weapon/armor with this ID".

I can then revise the snippet I gave you before to account for that and give you whatever value you expect to end up with.
It's just determined from left to right, top to bottom. So in the screen shots above, the bo staff is 1, the katana is 2, the gem is 3. The fan is 4...
Then starting with the gold ring is 7, down to the blue coat is 11
The green cape starts at 12, and the kendama looking red ball on a stick is 16.
The planned logic for displaying the aforementioned "Sale" sticker was going to be handled by making sure the SaleID matches the RegionID.
So: If SaleID = PlayerRID
Show picture
(this logic would be placed in the current parallel event that is handling displaying the HUD elements.)
(it's also worth noting there is an exception for RID of 0, since the 0 region is used to clear the HUD elements from the screen.)

I suppose technically it doesn't have to use the fake IDs as it is only used to show the "Sale" sticker, but seemed to me in my soup-for-brains mind to make the most sense using the least amount of event clutter. If you have a better way to do this I'm open to it.

The actual *purchasing* of the equipment is simply triggered by activating the item on the shelf like any normal event. As you can see in one of the pictures, a message box is opened (this will display the price) and a choice box will be opened for the player to purchase the item or not, so the actual *price setting* part would be handled here in this event. We just need to pass the information from the SalesController common event (seen in the screen shot in my op) to interaction with the item in the shop.

I hope that makes sense.
(I'm on my phone, so I can't provide our screen shots at this time. Also, excuse whacky typos and the weird formatting of my post)
It sounds like your "in stock" check is "region ID ≠ 0"? If so, you may be able to do something like this:
JavaScript:
// Tiles to check for region IDs.
var tiles = [
  { x: 14, y: 5 }, { x: 15, y: 5 }, { x: 16, y: 5 },
  { x: 14, y: 7 }, { x: 15, y: 7 } // etc
];
// Corresponding non-zero region IDs.
var regionIds = tiles.map(function(tile) {
  return $gameMap.regionId(tile.x, tile.y);
}).filter(function(id) { return !!id; });
// Log a random non-zero region ID to the console (0 if none available).
console.log(regionIds[Math.randomInt(regionIds.length)] || 0);
If there's no shortcut like that available, then like Turan has been saying, we'll need to know how you are mapping region IDs to items. E.g. why does region 123 => Weapon 45? (I know it probably doesn't, it's just an example.)

I think you're overcomplicating things, but you could probably still get it working like that. Personally, I'd consider something like this:
  • Static regions for checking player position.
  • 1 variable per item display slot, for storing item ID.
    • Additive offsets, e.g. +0 for Items, +2000 for Weapons, +4000 for Armors.
  • The HUD can be based on the variable corresponding to the player's current region ID & facing.
Spoiler
fullhud.png
Okay, I think I might have created some confusion. So in the spoiler tag is the controller to display the HUD. I truncated it since each of the "if: PlayerRID = x" are effectively the same, but displaying different pictures for the different weapons.
Also, please ignore the "SALES" section. This was just to test the display of the sales sticker. Obviously that's not how I am going to do it since that's kind of what the whole point of this thread is about :LZSlol:

I also think I created confusion due to the way I have named variables.
Since this is a single small map (the interior of the shop) I didn't see any reason to add more clutter to this very lengthy parallel event to actually check the player's region ID by constantly updating their X/Y info. I really, really don't like having a lot of clutter in the events if it's possible to avoid because the tiny little event window box makes it a real pain to edit, not to mention spending an extra frame or two to check and update variables to set player RID would slow down the responsiveness of the HUD. If the goal of having the HUD appear automatically without player input is to speed things up and reduce friction, then it would be antithetical to that design to have the HUD be slow to appear.
ShopHUD.gif


Therefore, the RegionID's have been faked by using Player Touch events that just manually set the "PlayerRID" variable to the specified value:
Spoiler: Player Touch Event controllering PlayerRID
PlayerTouch.png

Where I created some more confusion is that I said there is the ItemID. This is...technically false? So I apologize about that.
Let me break down the 4 working elements here:
  1. A common parallel event. This is an in game timer always running to count down until the next item goes on sale (that's the thing we are working on here.)
  2. A parallel event on my shop's map which is used to control how and when the HUD elements are displayed.
  3. many Individual player touch events that manually set the player's RID as previously shown/discussed.
  4. The item itself, which the player will interact with, which might be on sale or might be normal price.
There are 4 challenges here I'm looking to overcome:
  1. I don't want the same item to go on sale twice in a row (this has been accounted for in the current sales logic with the "SaleItemPreserve" variable)
  2. I don't want items the player has already purchased to go on sale. So once the player has purchased an item (regardless of whether they purchased it on sale or not) that item is no longer valid in the list of possible items to go on sale.
  3. Whatever the sales common event determines is on sale, that information needs to be passed to the map parallel event (the one that controls the HUD) to properly display the "Sale" sticker, in addition to passing that information to the item event.
  4. Done with less clutter in the event screen then how I would have evented this system (because as I stated in my OP, I know how to do all of this through eventing, but it would be a cluttered mess of conditionals and be way overly complicated than is necessary.)
For challenge number 3, my best solution was to use a "SalesItemID" variable (this variable would be set to a value to determine if that is the item that is currently on sale. So for example: set SalesItemID to 1, this 1 corresponds with the bo staff)
Then in the map parallel event (the HUD):
if SalesItemID = PlayerRID
Show picture (the "Sales" sticker)
(Then, obviously, if the SalesItemID doesn't match the PlayerRID, the "Sales" sticker won't be displayed)

Likewise, this "SalesItemID" can also be used when activating the item on the shelf.
If SalesItemID = 1
Set price to [sales price]
else
Set price to [normal price]


I hope that cleared up all the confusion. Let me know if things still aren't clear, and I'll try to do my best to clear things up more.

Spoiler: For posterity: a GPT summary
In summary, the person is discussing a system involving a HUD and sales for items in a game. They explain that there are four working elements: a common parallel event for a timer, a parallel event for controlling the HUD, player touch events to set the player's RegionID, and the items themselves. They mention four challenges they want to overcome: avoiding the same item going on sale twice in a row, preventing already purchased items from going on sale, passing sale information to the HUD and item events, and reducing clutter in the event screen. For challenge number 3, they propose using a "SalesItemID" variable to determine the item currently on sale and display the "Sales" sticker accordingly. They also mention using the SalesItemID to set the price for the item on the shelf based on whether it matches the PlayerRID.
Hmmm, when the player stands on a tile in front of a shop item, can't you control a variable "playerstanding" = $dataWeapons[5] (if the player is standing in front of an item representing weapon ID 5), and then use a script like ATTuran wrote, which pulls an item from an array, and compare if the one you're standing in front of is the same one on sale? Might be I'm missing something though, LOL.
The actual *purchasing* of the equipment is simply triggered by activating the item on the shelf like any normal event.
So the answer to my question above is there is no correlation between your fake ID and the item they're purchasing. The item is being directly referenced in an Add Item event command.

That makes things a bit more convoluted because you'll need to create a connection in the code.

I'm going to venture an unasked-for opinion here and say this is unnecessarily unrealistic. Stores in real life don't care whether you own something when they put it on sale. I say just make it random and your chances of something that's new to you being on sale are equal every time you check. That's how stores are.

If you don't like that and you want to do it as you originally asked...you'd do something like this. This is rather convoluted, and I'm not certain it's the most effective method. Someone else might correct this code:
Code:
let shopHash= {
// fakeID: database object
1: $dataWeapons[ID of your bo staff],
2: // whatever dataweapons or dataarmors corresponds to ID 2, etc.
};
// Fill this out with the same fake IDs you populated shopHash with
let shopValues=[1, 2, 5, 17];
$gameVariables.setValue(364, -1);
while (shopValues.length>0) {
let rand=Math.randomInt(shopValues.length)
if ($gameParty.hasItem(shopHash[shopValues[rand]]))
    shopValues.splice(rand, 1);
else {
    $gameVariables.setValue(364, shopValues[rand]);
    break; }}
That should generate a fake ID corresponding to an item the party does not own and store it in variable 364. If 364 is -1, no items are on sale because the party owns them all.
I was mostly just hoping for some sort of programming logic like:
Here's a list of all the things!
I'll pick a random one!
It's 1!
What's that? The player owns 1? Well then let's remove 1 from the list and pick a different one!

Does that make sense?

I'm not sure if the code you shared does that, it's a bit difficult for me to make sense of.
...did you try filling out and using the code? Because that's exactly what it does 😛

But I missed a close brace at the end, edited just now.
Sorry I wasn't sure if that is what it did - I did not try plugging it into my project yet 😅 Since the code is a bit difficult for me to make sense of and your hesitancy in understanding what I was talking about made me feel it was more important to try clarify things further, rather than test if the code worked.

Anyways, it's late for me, so I'll give a try and see if I can figure out how it works (and where to put it) in morning when my mind is slightly more capable at making sense of this foreign language :LZSlol:
Because that's exactly what it does 😛

The logic can be a little difficult for a non-programmer to follow though 😀

Like it's something like:

let shopValues=[1, 2, 5, 17]; => AN ARRAY OF SHOP STUFF

while (shopValues.length>0) { => LOOP FOR AS LONG AS THE ARRAY STILL HAS VALUES

let rand=Math.randomInt(shopValues.length) => CREATE A RANDOM INTEGER TO PICK A VALUE FROM ARRAY

if ($gameParty.hasItem(shopHash[shopValues[rand]])) => CHECK IF YOU HAVE THE ITEM

shopValues.splice(rand, 1); => TAKE ITEM YOU HAVE OFF FROM ARRAY
else {
$gameVariables.setValue(364, shopValues[rand]); => THIS ONE CAN GO ON SALE

break; }} => END LOOP
Rather than having a loop going through each item and checking whether the party has it, why not .filter the list by what the party doesn't have?
The logic can be a little difficult for a non-programmer to follow though 😀
...he doesn't need to? That's why it was written for him. All he needs to do is fill in the two lists where I said to fill in, and I told him what the output would be.

Do people read through all of the plugins they use to follow the logic there, also? 😛 I didn't see the need to add thorough commenting since I didn't expect the OP would care whether or not he understands the code.

Rather than having a loop going through each item and checking whether the party has it, why not .filter the list by what the party doesn't have?
That's a smart point. So you could do this:
Code:
let shopHash= {
// fakeID: database object
1: $dataWeapons[ID of your bo staff],
2: // whatever $dataWeapons or $dataArmors corresponds to ID 2, etc.
};
// Fill this out with the same fake IDs you populated shopHash with
let shopValues=[1, 2, 5, 17];
shopValues=shopValues.filter(ID => !$gameParty.hasItem(shopHash[ID], true));
if (shopValues.length>0)
    $gameVariables.setValue(364, shopHash[shopValues[Math.randomInt(shopValues.length)]]);
else
    $gameVariables.setValue(364, -1);
...he doesn't need to?

Of course he doesn't *need* to, but since in 3(?) of his posts he has mentioned something about wanting to understand the logic and how it's difficult for him and how he wants to look at the logic when he's well rested, I just thought that he *wants* to 😀

But this is going a little off topic, so I'll just step to the sidelines LOL
Of course he doesn't *need* to, but since in 3(?) of his posts he has mentioned something about wanting to understand the logic and how it's difficult for him and how he wants to look at the logic when he's well rested, I just thought that he *wants* to 😀
My understanding from the other posts is that all of the existing system is done through events and @TheAM-Dol is basically unfamiliar with JavaScript. If I'm wrong and he actually knows a bit but not enough to understand what I'm providing, I'm happy to provide a more thorough explanation or he can refer to yours.

My intent is absolutely not to strongarm you to the sidelines, but I spit out a fair bit of code on the forums to answer questions, and I don't see anyone care about following it unless the poster explicitly says they're trying to learn code and asks for details 😉

So I thought I'd clarify that I didn't expect him to understand what I'd written, it was written to plug into his game and work. I meant nothing personal against your comments.
@rpgLord69 I actually appreciate you taking time to explain things. While it's not necessary that I understand what it is exactly that I am plugging into my game, it's certainly makes me feel more confident about what I am doing when I have at least a surface level understanding of what I am plugging in. So you helped quell any doubts.

@ATT_Turan I definitely appreciate your code and your patience while I have floundered about trying to express my thoughts clearly.
I plugged the code in and it doesn't seem to be working. No errors are in the log and there are no crashes. However, upon checking the list of in game variables, it seems Variable 364 has not been assigned a value, but instead assigned [object Object] (which reminded me of this video for a brief laugh)
ObjectObject.png


For testing purposes, I have just put 3 items in the list. This is the code that I inserted into my Sales common event.
JavaScript:
let shopHash= {
// fakeID: database object
1: $dataWeapons[2], 2: $dataWeapons[4], 3: $dataWeapons[6]
// whatever $dataWeapons or $dataArmors corresponds to ID 2, etc.
};
// Fill this out with the same fake IDs you populated shopHash with
let shopValues=[1, 2, 3];
shopValues=shopValues.filter(ID => !$gameParty.hasItem(shopHash[ID], true));
if (shopValues.length>0)
    $gameVariables.setValue(364, shopHash[shopValues[Math.randomInt(shopValues.length)]]);
else
    $gameVariables.setValue(364, -1);

And not that it matters, but here is the full, non-debug code:
Spoiler: non-debug code
JavaScript:
let shopHash= {
// fakeID: database object
1: $dataWeapons[2], 2: $dataWeapons[4], 3: $dataWeapons[6], 4: $dataWeapons[3], 5: $dataWeapons[5], 6: $dataWeapons[7], 7: $dataArmors[10], 8: $dataArmors[11], 9: $dataArmors[9], 10: $dataArmors[15], 11: $dataArmors[17], 12: $dataArmors[16], 13: $dataArmors[12], 14: $dataArmors[13], 15: $dataArmors[18], 16: $dataArmors[14]
// whatever $dataWeapons or $dataArmors corresponds to ID 2, etc.
};
// Fill this out with the same fake IDs you populated shopHash with
let shopValues=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16];
shopValues=shopValues.filter(ID => !$gameParty.hasItem(shopHash[ID], true));
if (shopValues.length>0)
    $gameVariables.setValue(364, shopHash[shopValues[Math.randomInt(shopValues.length)]]);
else
    $gameVariables.setValue(364, -1);
@rpgLord69 I actually appreciate you taking time to explain things. While it's not necessary that I understand what it is exactly that I am plugging into my game, it's certainly makes me feel more confident about what I am doing when I have at least a surface level understanding of what I am plugging in. So you helped quell any doubts.

@ATT_Turan I definitely appreciate your code and your patience while I have floundered about trying to express my thoughts clearly.
I plugged the code in and it doesn't seem to be working. No errors are in the log and there are no crashes. However, upon checking the list of in game variables, it seems Variable 364 has not been assigned a value, but instead assigned [object Object] (which reminded me of this video for a brief laugh)
View attachment 263374

For testing purposes, I have just put 3 items in the list. This is the code that I inserted into my Sales common event.
JavaScript:
let shopHash= {
// fakeID: database object
1: $dataWeapons[2], 2: $dataWeapons[4], 3: $dataWeapons[6]
// whatever $dataWeapons or $dataArmors corresponds to ID 2, etc.
};
// Fill this out with the same fake IDs you populated shopHash with
let shopValues=[1, 2, 3];
shopValues=shopValues.filter(ID => !$gameParty.hasItem(shopHash[ID], true));
if (shopValues.length>0)
    $gameVariables.setValue(364, shopHash[shopValues[Math.randomInt(shopValues.length)]]);
else
    $gameVariables.setValue(364, -1);

And not that it matters, but here is the full, non-debug code:
Spoiler: non-debug code
JavaScript:
let shopHash= {
// fakeID: database object
1: $dataWeapons[2], 2: $dataWeapons[4], 3: $dataWeapons[6], 4: $dataWeapons[3], 5: $dataWeapons[5], 6: $dataWeapons[7], 7: $dataArmors[10], 8: $dataArmors[11], 9: $dataArmors[9], 10: $dataArmors[15], 11: $dataArmors[17], 12: $dataArmors[16], 13: $dataArmors[12], 14: $dataArmors[13], 15: $dataArmors[18], 16: $dataArmors[14]
// whatever $dataWeapons or $dataArmors corresponds to ID 2, etc.
};
// Fill this out with the same fake IDs you populated shopHash with
let shopValues=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16];
shopValues=shopValues.filter(ID => !$gameParty.hasItem(shopHash[ID], true));
if (shopValues.length>0)
    $gameVariables.setValue(364, shopHash[shopValues[Math.randomInt(shopValues.length)]]);
else
    $gameVariables.setValue(364, -1);
The reason it shows [object Object] in the default debug window is that that window was never designed to show anything but numbers. It's because the value the variable holds *is* an object, and the debug scene can't fully display it. But there's nothing wrong with the code itself; you can still reference the object from within that variable.
I see. So then perhaps the problem is with my event.
Well in that case, I am wondering how to use the values assigned to the variable.
Here is how the HUD event is set up:
NoOutput.png

However, it never properly displays the "Sales" sticker.

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/