This commit is contained in:
@ -168,6 +168,12 @@ exports.run = async (client, message, args) => {
|
|||||||
estimatedPrice = Math.round(
|
estimatedPrice = Math.round(
|
||||||
weightedInterpolatePrice(subtable, gameValue)
|
weightedInterpolatePrice(subtable, gameValue)
|
||||||
);
|
);
|
||||||
|
if (idx == 0 && closestInTable.diff > 100) {
|
||||||
|
estimatedPrice = 0;
|
||||||
|
}
|
||||||
|
if (estimatedPrice > 100000) {
|
||||||
|
estimatedPrice = 100000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (entryFound) {
|
if (entryFound) {
|
||||||
@ -179,16 +185,19 @@ exports.run = async (client, message, args) => {
|
|||||||
message.channel.send(
|
message.channel.send(
|
||||||
`Displaying data price table for \`${returnKeyWord}\`.\n\`\`\`\nGame Value\tPrice\n${res}\`\`\``
|
`Displaying data price table for \`${returnKeyWord}\`.\n\`\`\`\nGame Value\tPrice\n${res}\`\`\``
|
||||||
);
|
);
|
||||||
} else
|
} else {
|
||||||
|
let stringprice;
|
||||||
|
if (estimatedPrice > 499) {
|
||||||
|
stringprice = `**__${estimatedPrice}__** (atleast 1 cheater, worth auctioning)`;
|
||||||
|
} else if (estimatedPrice == 0) {
|
||||||
|
stringprice = "**0** (<:TavKeep:1179145911180480563>)";
|
||||||
|
} else {
|
||||||
|
stringprice = `**${estimatedPrice}**`;
|
||||||
|
}
|
||||||
message.channel.send(
|
message.channel.send(
|
||||||
`Hmm... I estimate your **${gameValue} ${returnKeyWord}** to be worth approximately ${
|
`Hmm... I estimate your **${gameValue} ${returnKeyWord}** to be worth approximately ${stringprice} cv.\n*Estimation is provided through looking at past trades/price checks/sheets in DDRNG.*\n*Closest price in table: **${closestInTable.val}** cv, diff: **${closestInTable.diff}***.`
|
||||||
estimatedPrice > 499
|
|
||||||
? `**__${estimatedPrice}__** (atleast 1 cheater, worth auctioning)`
|
|
||||||
: `**${estimatedPrice}**`
|
|
||||||
} cv.\n*Estimation is provided through looking at past trades/price checks/sheets in DDRNG.*\n*Closest price in table: **${
|
|
||||||
closestInTable.val
|
|
||||||
}** cv, diff: **${closestInTable.diff}***.`
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
message.channel.send(
|
message.channel.send(
|
||||||
"Your query couldn't be matched with anything, please refine your query or reffer to `<<help estimate` or use `<<estimate` to see all available price tables for more information."
|
"Your query couldn't be matched with anything, please refine your query or reffer to `<<help estimate` or use `<<estimate` to see all available price tables for more information."
|
||||||
|
Reference in New Issue
Block a user