Mikthebug
Member
So i have a vendor that buys a lot of the custom stuff i have made, and i want him to sell it back but at a set price.
He only sells the stuff that someone has already sold to him but it has the normal 1.9 increse in price from GenericSell.cs.
And i don't want to change that for everything but only for this vendor and the stuff the sells/buys from the players.
Can something be done in the vendor SB file?
My first idea was to make a code block like this from GenericSell.cs
But i'm not really sure how to get around that they are all diffrent objects armor, weapon etc.
Thankful for any help and ideas
He only sells the stuff that someone has already sold to him but it has the normal 1.9 increse in price from GenericSell.cs.
And i don't want to change that for everything but only for this vendor and the stuff the sells/buys from the players.
Can something be done in the vendor SB file?
My first idea was to make a code block like this from GenericSell.cs
C#:
if (item is BaseArmor)
{
BaseArmor armor = (BaseArmor)item;
if (armor.Quality == ItemQuality.Low)
price = (int)(price * 0.60);
else if (armor.Quality == ItemQuality.Exceptional)
price = (int)(price * 1.25);
price += 100 * (int)armor.Durability;
price += 100 * (int)armor.ProtectionLevel;
if (price < 1)
price = 1;
}
Thankful for any help and ideas