Code:
if (Splitter[0] == "/starter")
{
MyChar.CPs += 54;
MyChar.Silvers += 10000;
}
Alright, so this is what you have right now right?
Well, since there is a Server and a Client, you have to deal with both.
With that code you are adding silvers and cps to the Server, but you must make it reflect back on the Client.
So you use packets to send information between the Server and Client.
In this case, we will need to send the
Vital packet, with the correct ID.
For CPs, the ID is
30.
So we send the packet:
Code:
SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
Now the CPs reflect on the Client.
And for Silvers, we do the same, just change the ID for silvers, which is
4.
Code:
SendPacket(General.MyPackets.Vital((long)MyChar.UID, 4, MyChar.Silvers));
So, now we have a working "Starter" command to add CPs and Silvers:
Code:
if (Splitter[0] == "/starter")
{
MyChar.CPs += 54;
SendPacket(General.MyPackets.Vital((long)MyChar.UID, 30, MyChar.CPs));
MyChar.Silvers += 10000;
SendPacket(General.MyPackets.Vital((long)MyChar.UID, 4, MyChar.Silvers));
}