Hey, I just made some changes, so i'm posting it here.
In XmlDescriptors.cs:
Under:
Code:
public int FeedPower { get; private set; }
Add:
Code:
public int SellValue { get; private set;}
Then, under:
Code:
if ((n = elem.Element("feedPower")) != null)
FeedPower = Utils.FromString(n.Value);
else
FeedPower = 0;
Add:
Code:
if ((n = elem.Element("sellValue")) != null)
SellValue = Utils.FromString(n.Value);
else
SellValue = 0;
Then, in your XML, you basically want to add:
Code:
<sellValue>1000</sellValue>
or whatever.
Now we are done with XmlDescriptors.cs
Go to
RankedCommands.cs
Add:
Code:
class SellGoldCommand : Command
{
public SellGoldCommand() : base("sellgold", permLevel: 0, alias: "sellitem") {}
protected override bool Process(Player player, RealmTime time, string args)
{
var gamedata = player.Manager.Resources.GameData;
int slot = Convert.ToInt32(args);
var acc = player.Client.Account;
var slotnumber = player.Inventory[slot];
if (slotnumber == null || slot < 4 || player.Inventory[slot].SellValue == 0)
{
player.SendError("Error in one of the following: Empty Inventory, Price is 0, or Eqt slot.");
return false;
}
else
{
player.Credits = acc.Credits += player.Inventory[slot].SellValue;
player.SendInfo(player.Inventory[slot].SellValue.ToString());
player.Inventory[slot] = null;
return true;
}
}
}
class SellFameCommand : Command
{
public SellFameCommand() : base("sellfame", permLevel: 0, alias: "sellitemfame") {}
protected override bool Process(Player player, RealmTime time, string args)
{
var gamedata = player.Manager.Resources.GameData;
int slot = Convert.ToInt32(args);
var acc = player.Client.Account;
var slotnumber = player.Inventory[slot];
if (slotnumber == null || slot < 4 || player.Inventory[slot].SellValue == 0)
{
player.SendError("Error in one of the following: Empty Inventory, Price is 0, or Eqt slot.");
return false;
}
else
{
player.Fame = acc.TotalFame += player.Inventory[slot].SellValue;
player.SendInfo(player.Inventory[slot].SellValue.ToString());
player.Inventory[slot] = null;
return true;
}
}
}
There, now it should sell depending on your sell value, not your feed power. (Note, you might want to add the tooltip for the sell value inside the client, but you are on your own for that.
Note: This is NOT tested. Please report back if it worked.