Market Module
The market module provides functions to interact with the game’s global economy. All things buying seeds, checking stock, and selling crops are performed here.
🛒 Purchasing
Section titled “🛒 Purchasing”Use these functions to spend your Scrap on new resources.
| Function | Input | Description |
|---|---|---|
market.buySeed(seed) | Enum.Seed | Purchases one seed of the specified type. |
market.buyGear(gear) | Enum.Gear | Purchases a specific tool or piece of equipment. |
lau-compiler.exe
varol seedType = Enum.Seed.Wheatvarol price = market.getSeedPrice(seedType)
print("Checking price for Wheat...")
if player.scrap() >= price then market.buySeed(seedType) print("Price is " + price + ". Buying 1 unit.")endOUTPUT:
Checking price for Wheat...
Price is 20. Buying 1 unit.
💰 Selling & Valuation
Section titled “💰 Selling & Valuation”Automate your profits by selling harvested crops directly from your scripts.
| Function | Input | Description |
|---|---|---|
market.sellItem(slot) | number | Sells the item in the specific inventory slot. |
market.sellAllItem() | void | Sells every sellable item in your inventory at once. |
market.whatValue(slot) | number | Returns the sale value of the item in that slot. |
market.calculateValue() | number | Returns the total potential value of your entire inventory. |
📊 Stock & Price Checking
Section titled “📊 Stock & Price Checking”Prices and stock levels in the market are dynamic. Use these functions to find the best time to buy.
Seed Market
Section titled “Seed Market”| Function | Returns | Description |
|---|---|---|
market.getSeedPrice(seed) | number | Returns the current buy price for a specific seed. |
market.getSeedStock() | list | Returns a list of all currently available seeds. |
market.getSeedStockTime() | number | Returns seconds remaining until the next seed restock. |
Gear Market
Section titled “Gear Market”| Function | Returns | Description |
|---|---|---|
market.getGearPrice(gear) | number | Returns the current price for a specific tool. |
market.getGearStock() | list | Returns a list of currently available tools. |
market.getGearStockTime() | number | Returns seconds remaining until gear restock. |
🔔 Market Events
Section titled “🔔 Market Events”Listen for global market changes to update your drone’s strategy immediately.
market.changedSeedStock
Section titled “market.changedSeedStock”Triggered when the seed shop restocks or prices shift.
market.changedSeedStock:connect(func() player.sent("The Seed Market has restocked!")end)market.changedGearStock
Section titled “market.changedGearStock”Triggered when the tool shop restocks.
market.changedGearStock:connect(func() player.sent("New Gear is available in the market.")end)💡 Advanced Economy Script: “Smart Buyer”
Section titled “💡 Advanced Economy Script: “Smart Buyer””This script waits for a restock and buys 10 Wheat seeds only if the price is below 20 Scrap.
market.changedSeedStock:connect(func() varol currentPrice = market.getSeedPrice(Enum.Seed.Wheat) * 10
if currentPrice < player.scrap() then for i = 1, 10 do market.buySeed(Enum.Seed.Wheat) end player.sent("Bought 10 Wheat seeds!") endend)