2023-03-03 15:23:46 +00:00
|
|
|
import { MinMax } from "../../common/MinMax";
|
|
|
|
import { IBaseConfig } from "./IBaseConfig";
|
|
|
|
|
|
|
|
export interface IRagfairConfig extends IBaseConfig
|
|
|
|
{
|
|
|
|
kind: "aki-ragfair"
|
2023-03-15 13:28:51 +00:00
|
|
|
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */
|
2023-03-03 15:23:46 +00:00
|
|
|
runIntervalSeconds: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Player listing settings */
|
2023-03-03 15:23:46 +00:00
|
|
|
sell: Sell
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Trader ids + should their assorts be listed on flea*/
|
2023-03-03 15:23:46 +00:00
|
|
|
traders: Record<string,boolean>
|
|
|
|
dynamic: Dynamic
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Sell
|
|
|
|
{
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Should a fee be deducted from player when liting an item for sale */
|
2023-03-03 15:23:46 +00:00
|
|
|
fees: boolean
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Settings to control chances of offer being sold */
|
2023-03-03 15:23:46 +00:00
|
|
|
chance: Chance
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Settings to control how long it takes for a player offer to sell */
|
2023-03-03 15:23:46 +00:00
|
|
|
time: Time
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Player offer reputation gain/loss settings */
|
2023-03-03 15:23:46 +00:00
|
|
|
reputation: Reputation
|
2023-03-15 13:28:51 +00:00
|
|
|
/** How many hours are simulated to figure out if player offer was sold */
|
2023-03-03 15:23:46 +00:00
|
|
|
simulatedSellHours: number
|
2023-04-06 16:23:52 +00:00
|
|
|
/**Seconds from clicking remove to remove offer from market */
|
|
|
|
expireSeconds: number
|
2023-03-03 15:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface Chance
|
|
|
|
{
|
|
|
|
base: number
|
|
|
|
overpriced: number
|
|
|
|
underpriced: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Time
|
|
|
|
{
|
|
|
|
base: number
|
|
|
|
min: number
|
|
|
|
max: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Reputation
|
|
|
|
{
|
|
|
|
gain: number
|
|
|
|
loss: number
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface Dynamic
|
|
|
|
{
|
2023-03-15 13:28:51 +00:00
|
|
|
// Should a purchased dynamic offers items be flagged as found in raid
|
2023-03-03 15:23:46 +00:00
|
|
|
purchasesAreFoundInRaid: boolean
|
|
|
|
/** Use the highest trader price for an offer if its greater than the price in templates/prices.json */
|
|
|
|
useTraderPriceForOffersIfHigher: boolean;
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Barter offer specific settings */
|
2023-03-03 15:23:46 +00:00
|
|
|
barter: Barter
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Dynamic offer price below handbook adjustment values */
|
2023-03-03 15:23:46 +00:00
|
|
|
offerAdjustment: OfferAdjustment
|
2023-03-15 13:28:51 +00:00
|
|
|
/** How many offers should expire before an offer regeneration occurs */
|
2023-03-03 15:23:46 +00:00
|
|
|
expiredOfferThreshold: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** How many offers should be listed */
|
2023-03-03 15:23:46 +00:00
|
|
|
offerItemCount: MinMax
|
2023-03-15 13:28:51 +00:00
|
|
|
/** How much should the price of an offer vary by (percent 0.8 = 80%, 1.2 = 120%) */
|
2023-03-03 15:23:46 +00:00
|
|
|
price: MinMax
|
2023-03-15 13:28:51 +00:00
|
|
|
/** How much should the price of an offer vary by (percent 0.8 = 80%, 1.2 = 120%) */
|
2023-03-03 15:23:46 +00:00
|
|
|
presetPrice: MinMax
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Should default presets to listed only or should non-standard presets found in globals.json be listed too */
|
2023-03-03 15:23:46 +00:00
|
|
|
showDefaultPresetsOnly: boolean
|
|
|
|
endTimeSeconds: MinMax
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Settings to control the durability range of item items listed on flea */
|
2023-03-03 15:23:46 +00:00
|
|
|
condition: Condition
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Size stackable items should be listed for in percent of max stack size */
|
2023-03-03 15:23:46 +00:00
|
|
|
stackablePercent: MinMax
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Items that cannot be stacked can have multiples sold in one offer, what range of values can be listed */
|
2023-03-03 15:23:46 +00:00
|
|
|
nonStackableCount: MinMax
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Range of rating offers for items being listed */
|
2023-03-03 15:23:46 +00:00
|
|
|
rating: MinMax
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Percentages to sell offers in each currency */
|
2023-03-03 15:23:46 +00:00
|
|
|
currencies: Record<string, number>
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Item tpls that should be forced to sell as a single item */
|
2023-03-03 15:23:46 +00:00
|
|
|
showAsSingleStack: string[]
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Should christmas/halloween items be removed from flea when not within the seasonal bounds */
|
2023-03-03 15:23:46 +00:00
|
|
|
removeSeasonalItemsWhenNotInEvent: boolean
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Flea blacklist settings */
|
2023-03-03 15:23:46 +00:00
|
|
|
blacklist: Blacklist
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Barter
|
|
|
|
{
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Should barter offers be generated */
|
2023-03-03 15:23:46 +00:00
|
|
|
enable: boolean
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Percentage change an offer is listed as a barter */
|
2023-03-03 15:23:46 +00:00
|
|
|
chancePercent: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Min number of required items for a barter requirement */
|
2023-03-03 15:23:46 +00:00
|
|
|
itemCountMin: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Max number of required items for a barter requirement */
|
2023-03-03 15:23:46 +00:00
|
|
|
itemCountMax: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** How much can the total price of requested items vary from the item offered */
|
2023-03-03 15:23:46 +00:00
|
|
|
priceRangeVariancePercent: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Min rouble price for an offer to be considered for turning into a barter */
|
2023-03-03 15:23:46 +00:00
|
|
|
minRoubleCostToBecomeBarter: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Item Tpls to never be turned into a barter */
|
2023-03-03 15:23:46 +00:00
|
|
|
itemTypeBlacklist: string[]
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface OfferAdjustment
|
|
|
|
{
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Shuld offer price be adjusted when below handbook price */
|
|
|
|
adjustPriceWhenBelowHandbookPrice: boolean;
|
|
|
|
/** How big a percentage difference does price need to vary from handbook to be considered for adjustment */
|
2023-03-03 15:23:46 +00:00
|
|
|
maxPriceDifferenceBelowHandbookPercent: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** How much to multiply the handbook price to get the new price */
|
2023-03-03 15:23:46 +00:00
|
|
|
handbookPriceMultipier: number
|
2023-03-15 13:28:51 +00:00
|
|
|
/** What is the minimum rouble price to consider adjusting price of item */
|
2023-03-03 15:23:46 +00:00
|
|
|
priceThreshholdRub: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Condition
|
|
|
|
{
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Percentage change durability is altered */
|
2023-03-03 15:23:46 +00:00
|
|
|
conditionChance: number
|
|
|
|
min: number
|
|
|
|
max: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Blacklist
|
|
|
|
{
|
2023-06-30 14:00:08 +01:00
|
|
|
/** Damaged ammo packs */
|
|
|
|
damagedAmmoPacks: boolean
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Custom blacklist for item Tpls */
|
2023-03-03 15:23:46 +00:00
|
|
|
custom: string[]
|
2023-03-15 13:28:51 +00:00
|
|
|
/** BSG blacklist a large number of items from flea, true = use blacklist */
|
2023-03-03 15:23:46 +00:00
|
|
|
enableBsgList: boolean
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Should quest items be blacklisted from flea */
|
2023-03-03 15:23:46 +00:00
|
|
|
enableQuestList: boolean
|
2023-03-15 13:28:51 +00:00
|
|
|
/** Should trader items that are blacklisted by bsg */
|
|
|
|
traderItems: boolean
|
2023-03-03 15:23:46 +00:00
|
|
|
}
|
|
|
|
|