hi hi!!
i was doing it... very easy but let's release it : D
first add this at Character.cs:
then go into Sctrucs, and open StatusType.cs and add this:
now create a new class named VipLevel.cs:
now go into packet processor and find case 1052: (login packet)
and find this:
after it add:
and now for the vip warehouse add this at NpcTalk.cs:
// EDIT FORGOT ONE THING :X
add this at GetCharacter:
and make a new field for VIP:
//
this will save your VIP Level... so just add it on Database.cs
now i've maked a simple npc to just upgrade your vip level....
//For the remote composition you've to add the Composition stove first....
//And for Remote Repair u must have the repair system... and then u can add this at packet processor in case 1009(Item/Ping Packet):
if u got any problem please post it here... (and don't flame!)
i was doing it... very easy but let's release it : D
first add this at Character.cs:
Code:
public byte VipLevel = 0;
Code:
VIPLevel = 39,
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoEmu_v2_GameServer.Entities;
using CoEmu_v2_GameServer.Connections;
using CoEmu_v2_GameServer.Structs;
using CoEmu_v2_GameServer.Packets;
using System.Timers;
namespace CoEmu_v2_GameServer.Handlers
{
public partial class Handler
{
public static byte VipLevel2(byte viplevel, ClientSocket CSocket)
{
try
{
CSocket.Send(ConquerPacket.Status(CSocket.Client.ID, 2, viplevel, Struct.StatusTypes.VIPLevel));
}
catch { }
return viplevel;
}
}
}
and find this:
Code:
CSocket.Send(ConquerPacket.CharacterInfo(CSocket));
Code:
Handler.VipLevel2(CSocket.Client.VipLevel, CSocket);
Code:
#region VIP Warehouse
case 12:
{
if (LinkBack == 0 || LinkBack == 1)
{
CSocket.Send(ConquerPacket.General(CSocket.Client.ID, 341, 0, 0, 0, 0, (Struct.DataType)0x7e));
}
break;
}
#endregion
add this at GetCharacter:
Code:
Client.VipLevel = Convert.ToByte(DR["VIP"]);
Code:
Field: VIP Lenght: 2 Type: int Default: 0
this will save your VIP Level... so just add it on Database.cs
Code:
public static void UpdateVIP(ClientSocket CSocket)
{
lock (DatabaseConnection.Connection)
{
MySqlCommand Cmd = new MySqlCommand("UPDATE `characters` SET `VIP` = " + CSocket.Client.VipLevel + " WHERE `CharID` = " + CSocket.Client.ID + "", DatabaseConnection.Connection);
Cmd.ExecuteNonQuery();
}
}
Code:
#region VIP-Upgrader
case 20345:
{
if (LinkBack == 0)
{
Text("Hello, I can upgrade your vip for 5000 cps. Do you want?", CSocket);
Link("Yes.", 1, CSocket);
Link("No thanks.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.CPs >= 5000)
{
CSocket.Client.VipLevel++;
Database.Database.UpdateVIP(CSocket);
CSocket.Send(ConquerPacket.Status(CSocket.Client.ID, 2, CSocket.Client.VipLevel, Struct.StatusTypes.VIPLevel));
Text("Congratulations! Your vip has been upgraded!", CSocket);
Link("Thanks.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else { ErrorMsg("Sorry, you don't have 5000 cps!", CSocket); }
}
break;
}
#endregion
//And for Remote Repair u must have the repair system... and then u can add this at packet processor in case 1009(Item/Ping Packet):
Code:
case 15: //Send the repair here... break;