before all... thanks to all helped me whith it... speacialy samehven.... many private mensages to him.... but here we go....
at Nano.cs find : public static OpenSSL.DH ServerKey;
bellow it add:
Code:
public static System.Timers.Timer GlobalTimer = new System.Timers.Timer();
you will see something like this:
Code:
public static void StartServer() { GenerateKey(); Struct.LoadItems("items.txt"); Struct.LoadItemPluses("itemadd.ini"); Struct.LoadMaps(); Struct.LoadMonsters(); Struct.LoadNpcs(); Struct.LoadPortals(); Struct.LoadServerskills(); Struct.LoadTNpcs();
Code:
GlobalTimer.Interval = 1000; GlobalTimer.Elapsed += delegate { foreach (KeyValuePair<int, ClientSocket> Clients in Nano.ClientPool) { ClientSocket CSocket = Clients.Value; CSocket.Client.XpSkillCounter += 1000; if (CSocket.Client.XpSkillCounter == 340000) { CSocket.Client.XpSkillCounter = 0; CSocket.Client.XpTime = true; CSocket.Send(CoEmu_v2_GameServer.Packets.ConquerPacket.Status(CSocket, 2, 16, Struct.StatusTypes.StatusEffect)); } } }; GlobalTimer.Start();
you will see something like this:
Code:
Status += 0x4000; if(CSocket.Client.Flashing) Status += 0x1; if(CSocket.Client.Stigged) Status += 0x200; if(CSocket.Client.SuperMan) Status += 0x262144; if(CSocket.Client.Cyclone) Status += 0x8388608; if (CSocket.Client.Poisoned) Status += 0x2;
Code:
if (CSocket.Client.XpTime) Status += 0x10;
like you asked samehven
in Character.cs put the definitions:
Code:
public int XpSkillCounter = 0; public bool XpTime = false;
you will find a region called #region Checks add before or after it
Code:
if (MagicID == 1110 || MagicID == 1025 || MagicID == 6010) { XpSkill(CSocket, MagicID); }
Code:
public static void XpSkill(ClientSocket CSocket, int SkillId) { CSocket.Client.XpTime = false; CSocket.Client.XpSkillCounter = 0; CSocket.Send(ConquerPacket.Status(CSocket, 2, 0, Struct.StatusTypes.StatusEffect)); switch (SkillId) { case 1025://SuperMan { CSocket.Client.SuperMan = true; CSocket.Send(ConquerPacket.Status(CSocket, 2, 262144, Struct.StatusTypes.StatusEffect)); break; } case 1110://Cyclone { CSocket.Client.Cyclone = true; CSocket.Send(ConquerPacket.Status(CSocket, 2, 8388608, Struct.StatusTypes.StatusEffect)); break; } case 6010://Vortex Ninja { break; } } }
and if you wan't a code to start the xpskill whith the PM/GM here is....
at Chat.cs seach for case "cyclone"... and below it add:
Code:
case "superman": { if (CSocket.Client.isGM || CSocket.Client.isPM) { CSocket.Client.SuperMan = true; CSocket.Send(ConquerPacket.Status(CSocket, 2, 262144, Struct.StatusTypes.StatusEffect)); } break; } case "xp": { if (CSocket.Client.isGM || CSocket.Client.isPM) { CSocket.Client.XpTime = true; CSocket.Send(CoEmu_v2_GameServer.Packets.ConquerPacket.Status(CSocket, 2, 16, Struct.StatusTypes.StatusEffect)); } break; }
A- add 2 variables at Character.cs named for example
Code:
public short XpToEnd=0; public short XpStarted=0;
Code:
CSocket.Client.XpToEnd=40; CSocket.Client.XpStarted=1;
Code:
if (CSocket.Client.XpStarted>0) { CSocket.Client.XpStarted+=1; if (CSocket.Client.XpStarted>=CSocket.Client.XpToEnd) { CSocket.Client.XpStarted=0;CSocket.Client.XpTime = false; CSocket.Client.Cyclone = false; //Add here all other XpSkills u have and need to be ended } }
if someone find something more to put here.... post it i will change!!
CYA!