yeah realize that, but it will take a lot of time to be done, beside i need to edit all NPC and Shop which defines price sell for every item. thanks for help btw.
Code I did will only effect item with no sell price (most of the db) anything custom where you define the sell value will sell at the define value
Ie if you make a custom coin that buys for 20000 and sells for 10000 it will sell for 10000 but if you set buy as 20000 but leave sell blank it will sell for 4000.
On phone so can't leave codes easily
Based on your clue this what i've done
npc.c
if (value > 1 && (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP)) {
value = value/10;
if (value == 0) value=1; //+1 to avoid selling free item
}
if( value < 0 ) {
if (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP) value = id->value_buy;
else value = 0; // Cashshop doesn't have a "buy price" in the item_db
}
if (value == 0 && (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP)) { // NPC selling items for free!
ShowWarning("npc_parse_shop: Item %s [%hu] is being sold for FREE in file '%s', line '%d'.\n",
id->name, nameid2, filepath, strline(buffer,start-buffer));
itemdb.c
//When a particular price is not given, we should base it off the other one
//(it is important to make a distinction between 'no price' and 0z)
if ( str[4][0] )
id->value_buy = atoi(str[4])/10+1;
else
id->value_buy = (atoi(str[5]) * 2)/10+1; //+1 to avoid selling free item
if ( str[5][0] )
id->value_sell = atoi(str[5])/10;
else
id->value_sell = id->value_buy / 20;
Checked and item price in shop NPC/selling item to NPC are divided by 10.Please tell me if this src edit is wrong / dangerous.
i attached my screenie :