For all the noobs out there, I created a new NPC Dialog function for adding a level. Next I will be making a remove item command. What im talking about is for instance through the txt file that you write npcs. Like CheckMoney=0=100 i implemented level=1 so basically you could use this for what ever. For instance you can make a npc take 5 dbs and add 1 level etc this is just a simple add to the code i will update as i make it more sophist acted, right now it basically reads to see if your over 130 if you are it does nothing, I will update this in a bit so that it says through the system were sorry you are 130. if you arent over 130, it will add what ever you set level= in your npc txt file to your current level.
if (CurrentLine.StartsWith("level") == true)
{
string[] ItemCmd = Command[1].Split(' ');
if (Client.Char.Level == 130)
{
break;
}
else
{
Client.Char.Level = Client.Char.Level + Convert.ToInt32(ItemCmd[0]);
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Level, StatusTypes.Level));
Client.SendData(CPacket.GeneralData(Client.Char.Ch arID, 0, 0, 0, DataType.Leveled));
Spawn.UpdateLocal(Client, CPacket.GeneralData(Client.Char.CharID, 0, 0, 0, DataType.Leveled));
}
}
Add that into the are where all the other ones are in the Npcs.cs. If you cant figure it out don't even try to make a server.
if (CurrentLine.StartsWith("level") == true)
{
string[] ItemCmd = Command[1].Split(' ');
if (Client.Char.Level == 130)
{
break;
}
else
{
Client.Char.Level = Client.Char.Level + Convert.ToInt32(ItemCmd[0]);
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Level, StatusTypes.Level));
Client.SendData(CPacket.GeneralData(Client.Char.Ch arID, 0, 0, 0, DataType.Leveled));
Spawn.UpdateLocal(Client, CPacket.GeneralData(Client.Char.CharID, 0, 0, 0, DataType.Leveled));
}
}
Add that into the are where all the other ones are in the Npcs.cs. If you cant figure it out don't even try to make a server.