#Automatic Pricing System For Shops

8 messages · Page 1 of 1 (latest)

subtle adder
#

⫶ In this tutorial, I will walk you through creating an efficient automatic pricing system for shops.

This system allows users to interact with displayed furnis in three ways:

🟡🔵 : Set a price for furnis without one
⚪ : Remove existing prices
🔴 : Simply view the price of a furni if it has already been set

#

...

⫶ VARIABLES NEEDED:
Furni Variable: “furni_price”
This is the main variable that will store the price data for each furni.

Furni Variable: “click_count”
This variable acts as a counter, tracking the number of clicks made within a specific timespan.

Context Variable: “price_set”
This is the variable used to dictate the price of the current selected furni.

User Variable: “price_setter”
This is the variable to recognize the user who will set or edit the prices of each furni.

...

#

...

🟡 = Stack for selecting the furni by clicking on it
🔵 = Stack for manipulating the price of the furni by inputting a value through chat
⚪ = Stack for removing the price of the furni by double-clicking it
🔴 = Stack for viewing the price of the furni by clicking on it

...

#

...

🟡 ⫶

This stack allows users to select a furni to set its price in the next stack (🔵) while ensuring only authorized users can do so.

When a user clicks on a furni:

  • The system checks if the furni already has a price and only proceeds if it doesn’t.
  • Assigns a furni_price variable to the clicked furni and a price_setter variable to the triggerer.
  • A visual indicator highlights the selected furni, and a confirmation message is shown.

WIRED Trigger: User Clicks Furni
[ Allows users to click on any furni selected by the selector ]

WIRED Selector: Furni In Area
[ Select the area in which the furni for sale are displayed ]

WIRED Selector: Furni By Type
[ (OPTIONAL) Have it on invert and filter and select the furni under the furni for sale (if there are any) ]

WIRED Negative Condition: Doesn’t Have Variable
[ This is so that the stack won’t trigger if the furni clicked already has a price ]

WIRED Condition: Triggering User Is On Furni
[ This condition can be changed to whatever fits best for your setup. For this demonstration, it was used to ensure that only users who meet this requirement can trigger this stack ]

WIRED Effect: Give Variable
[ Assigns the furni_price furni variable to the clicked furni so the 🔵 stack knows which furni was selected ]

WIRED Effect: Give Variable
[ Assigns the price_setter user variable to the triggering user so the 🔵 stack knows which user will be manipulating the price ]

WIRED Effect: Set Furni Altitude
[ Just a visual indicator, allows the triggering user to see which furni was selected” ]

WIRED Effect: Show Message
[ Insert a message that would notify the triggering user that the clicked furni is subject for price change ]

WIRED Add-on: Execution Limit
[ Limits the amount of execution to 1 per 0.5 seconds to avoid triggering it twice through double-click.]

...

#

🔵 ⫶

This stack allows users to set a price for the selected furni using a keyword-based input system:

  • The triggerer types a value and the system captures the number they enter.
  • Verifies that the user has permission to set a price and that the selected furni doesn’t already have one.
  • Entered price is assigned to the furni_price variable of the selected furni.
  • price_setter variable is removed from the user to prevent unintended duplicate triggers.
  • A visual indicator highlights the selected furni, and a confirmation message that the price has been successfully set is shown.

WIRED Trigger: User Says Keyword
[ *“#(price)”*captures the triggering user’s number input through the variable capturer ]

WIRED Selector: Furni with Variable
[ Selects the furni with furni_price furni variable without an actual price. This variable was assigned to the furni clicked in the 🟡 stack ]

WIRED Condition: Has Variable
[ Ensures that only users with the price_setter user variable—assigned to the triggerer in the 🟡 stack—can trigger this stack ]

WIRED Effect: Change Variable Value
[ This assigns the value of the price_set context variable to the furni_price furni variable value of the selected furni in the 🟡 stack ]

WIRED Effect: Remove Variable
[ Removes the furni_setter user variable from the triggerer so that the stack wont trigger twice unless the conditions are met again ]

WIRED Effect: Set Furni Altitude
[ Another visual indicator to confirm that the change was successful ]

WIRED Text Add-on: Variable Capturer
[ Captures the triggering user’s number input through the WIRED Trigger: User Says Keyword and assigns it to the price_set context variable ]

...

#

...

⚪ ⫶

This stack allows users to remove the price from a furni while displaying its previous value:

  • When a user clicks on a furni, the system checks if it has a click_count variable (set in the 🔴 stack).
  • Displays the furni’'s current price before it is removed.
  • furni_price variable is removed, allowing the furni to be priced again.
  • A condition ensures that only authorized users can trigger this action.

WIRED Trigger: User Clicks Furni
[ Allows users to click on any furni selected by the selector ]

WIRED Selector: Furni With Variable
[ Selects the furni with click_count furni variable assigned to the furni clicked in the 🔴 stack ]

WIRED Condition: Triggering User Is On Furni
[ This condition can be changed to whatever fits best for your setup. For this demonstration, it was used to ensure that only users who meet the requirements can trigger this stack ]

WIRED Effect: Show Message
[ $(price) displays the price of the clicked furni based on their furni_price furni variable value through the variable placeholder. This is to notify the triggerer what the previous price of the furni is before it is removed ]

WIRED EFFECT: Remove Variable
[ Removes the furni_price furni variable to the clicked furni, allowing its price to be changed again. ]

WIRED Add-on: Execute In Order
[ Ensures that WIRED effects are triggered in order from bottom to top ]

WIRED Text Add-on: Variable placeholder
[ $(price) displays the price of the clicked furni based on their furni_price furni variable value through the WIRED Effect: Show Message. ]

...

#

🔴 ⫶

This stack allows users to view the price of a furni if it has already been set:

  • When a user clicks on a furni, the system ensures it has a furni_price variable before proceeding.
  • click_count variable is assigned to furni for potential price removal in the ⚪ stack.
  • click_count variable is automatically removed after 0.5 seconds to enable double-click-based interactions
  • A visual indicator highlights the clicked furni, and a message that displays its price is shown.

WIRED Trigger: User Clicks Furni
[ Allows users to click on any furni selected by the selector ]

WIRED Selector: Remote Selection
[ Simply selects the selected furni in the 🟡 stack (which are furnis from a specific area, not including the display stand) ]

WIRED Condition: Has Variable
[ Ensures that the clicked furni has a furni_price variable before triggering the stack, preventing the message from displaying a price for furni without one set ]

WIRED Effect: Show Message
[ $(price) displays the price of the clicked furni based on its furni_price furni variable value through the variable placeholder. ]

WIRED Effect: Set Furni Altitude x2
[ Another visual indicator to display which furni the price is for ]

WIRED Effect: Give Variable
[ Assigns the click_count furni variable to the clicked furni so that the ⚪ stack knows which furni will be subject for price removal ]

WIRED Effect: Remove Variable
[ Removes the click_count furni variable from the clicked furni within .5 seconds, so that if clicked again within that timeframe, ⚪ stack will trigger. ]

WIRED Add-on: Execution Limit
[ Limits the amount of execution to 1 per 0.5 seconds to avoid triggering it twice through double-click.]

WIRED Text Add-on: Variable placeholder
[ $(price) displays the price of the clicked furni based on their furni_price furni variable value through the WIRED Effect: Show Message.

...