Ex:
/str 45
/vit 45
/spi 45
/agi 45
/str 45
/vit 45
/spi 45
/agi 45
Code:
if (Cmd[0] == "/str")
{
if (GC.MyChar.StatPoints >= ushort.Parse(Cmd[1]))
{
GC.MyChar.Str += ushort.Parse(Cmd[1]);
GC.MyChar.StatPoints -= ushort.Parse(Cmd[1]);
}
else
{
GC.MyChar.MyClient.LocalMessage(2005, "You don't have enough StatPoints!");
}
}
if (Cmd[0] == "/vit")
{
if (GC.MyChar.StatPoints >= ushort.Parse(Cmd[1]))
{
GC.MyChar.Vit += ushort.Parse(Cmd[1]);
GC.MyChar.StatPoints -= ushort.Parse(Cmd[1]);
}
else
{
GC.MyChar.MyClient.LocalMessage(2005, "You don't have enough StatPoints!");
}
}
if (Cmd[0] == "/spi")
{
if (GC.MyChar.StatPoints >= ushort.Parse(Cmd[1]))
{
GC.MyChar.Spi += ushort.Parse(Cmd[1]);
GC.MyChar.StatPoints -= ushort.Parse(Cmd[1]);
}
else
{
GC.MyChar.MyClient.LocalMessage(2005, "You don't have enough StatPoints!");
}
}
if (Cmd[0] == "/agi")
{
if (GC.MyChar.StatPoints >= ushort.Parse(Cmd[1]))
{
GC.MyChar.Agi += ushort.Parse(Cmd[1]);
GC.MyChar.StatPoints -= ushort.Parse(Cmd[1]);
}
else
{
GC.MyChar.MyClient.LocalMessage(2005, "You don't have enough StatPoints!");
}
}