04/27/2011, 22:10
|
#16
|
elite*gold: 0
Join Date: Apr 2011
Posts: 73
Received Thanks: 12
|
Quote:
Originally Posted by JobvdH
The reason you need to log off is because you forgot to update the character.
This will fix the code and you wont need to log off!
(NOTE: This is tested on Re-UnitedCo Source/CoMy)
Code:
if (Splitter[0] == "/str")
{
ushort NewStr = ushort.Parse(Splitter[1]);
MyChar.Str = NewStr;
SendPacket(General.MyPackets.Vital(MyChar.UID, 16, NewStr));
}
if (Splitter[0] == "/agi")
{
ushort NewAgi = ushort.Parse(Splitter[1]);
MyChar.Agi = NewAgi;
SendPacket(General.MyPackets.Vital(MyChar.UID, 17, NewAgi));
}
if (Splitter[0] == "/vit")
{
ushort NewVit = ushort.Parse(Splitter[1]);
MyChar.Vit = NewVit;
SendPacket(General.MyPackets.Vital(MyChar.UID, 15, NewVit));
}
if (Splitter[0] == "/spi")
{
ushort NewSpi = ushort.Parse(Splitter[1]);
MyChar.Spi = NewSpi;
SendPacket(General.MyPackets.Vital(MyChar.UID, 14, NewSpi));
}
|
Why not just do?
Code:
if (Splitter[0] == "/str")
{
SendPacket(General.MyPackets.Vital(MyChar.UID, 16, ushort.Parse(Splitter[1])));
}
|
|
|