HelpPhoenix Server Sell Command

Posts 15 of 5 · Page 1 of 1
Phoenix Server Sell Command
Hey Guys im trying to involve my phoenix source and could need some help Because the command /sell isnt working

If u you're trying to sell something it ask you / yes /no? if u type in that it will tell u Unknown command!

This is da real troll and i rly need to fix it Please Halp me xD
Find the few lines of code in WorldCommands.cs or whatever it is and send a screenshot of it.

Just CTRL + F and search for the command.
@BARm
here is the code from WorldCommands.cs
internal class SellCommand : ICommand
{
public string Command
{
get { return "sell"; }
}

public int RequiredRank
{
get { return 0; }
}

public void Execute(Player player, string[] args)
{
try
{
player.Decision = 0;
player.price = new Prices();
var slotList = new List<int>();
var slotList2 = new List<int>();
for (var i = 0; i < args.Length; i++)
if (!slotList.Contains(Convert.ToInt32(args[i])))
slotList.Add(Convert.ToInt32(args[i]));
if (slotList.Count < 1)
throw new Exception();
foreach (var i in slotList)
if (!(i < 0) && !(i > 8))
{
var realslot = i + 3;
if (player.Inventory[realslot] != null)
{
slotList2.Add(realslot);
}
}
player.price.SellSlots = slotList2;
if (!player.price.HasPrices(player))
{
player.SendInfo("No prices for specified items!");
}
else
{
var msgSlots = new List<int>();
foreach (var i in player.price.SellSlots)
try
{
msgSlots.Add(i - 3);
}
catch
{
}
player.SendInfo("Slots being sold: [" + string.Join(", ", msgSlots) + "]");
player.SendInfo("You gain " + player.price.GetPrices(player) +
" fame from these items. Sell them?\nType /-yes or /no");
player.Decision = 2;
}
}
catch
{
player.SendHelp("Usage: /sell <slot #1> <slot #2> etc.");
}
}
}

(the /-yes is cause of the cat smiley the - is not there)
bumpidiebump
Posts 15 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?