add more xp skills Ids if u want then create a void for all xp skills something like this
Code:
public static void XpSkill(ClientSocket CSocket, int SkillId)
and put in it ur Ids cases
Edit
May be this was not ur question and u needed to know the Xp Status it self , if so then u will need a little more things to do Like the timer for Xp Circle and Timer for the skill itself to end
latter i over the xpskills i will code the upgrade level npc... tkx for all... if i need some help more i call you...
EDIT:
omg ... i think i'm idiot but lets go...
i have these codes.... i don't know where to add them... already try many laces..... but the unique place it can be added is in ClienSocket.cs....
take a look plz
Code:
public DateTime LastXPC;
public Timer XPActivated;
public byte XpCircle = 0;
public bool XpList = false;
public bool Cyclone = false;
public bool SuperMan = false;
public bool FatalStrike = false;
public bool ShurikenVortex = false;
i have these codes.... i don't know where to add them... already try many laces..... but the unique place it can be added is in ClienSocket.cs....
take a look plz
Code:
public DateTime LastXPC;
public Timer XPActivated;
public byte XpCircle = 0;
public bool XpList = false;
public bool Cyclone = false;
public bool SuperMan = false;
public bool FatalStrike = false;
public bool ShurikenVortex = false;
if u wanna use those Vars then u have to place them at Entities/Character.cs coz u will need them for each character u will have on the server
this will automatically work when the player clicks the Xp Skill
now the very important thing u missed is to activate ur timer and call ur voids or else u wont ever reach them ,and that would be after the player login complete
set ur interval and elapsed for the timer ,the interval may be set to 1000 but u will need to increase the XpCircle limit to 340 coz the Circle needs about 5 minuets to reaches 100%
the Elapsed should set to the AddXPC void
the XpEnd Void will be called when the XpSkills ends
If u need my code i can put it but i like ur way (asking and trying) much better to learn that way
if u have the codes... can you show me how you have done ??
because i a bit lost here : X
it's not hard.... but ... i don'tk know what i need to do anymore : /.... i already make what u say... but isn't working :X.... ( i think i will get crazy hahahahaha)
if u can show me your way i will be gratz...
obs.: tryed again and that mother F@#@!#$%@$%¨&*&*@&$*&$@*& don't wroked...
public DateTime LastXPC;
public Timer XPActivated;
public byte XpCircle = 0;
public bool XpList = false;
public bool Cyclone = false;
public bool SuperMan = false;
public bool FatalStrike = false;
public bool ShurikenVortex = false;
I only use 2 variables (XPCircle & XPStart, both are datetimes), and I have over 10+ XPSkills. There's no need to implement a bool for each xpskill, just looks horrible=P
I only use 2 variables (XPCircle & XPStart, both are datetimes), and I have over 10+ XPSkills. There's no need to implement a bool for each xpskill, just looks horrible=P
if u have the codes... can you show me how you have done ??
because i a bit lost here : X
it's not hard.... but ... i don'tk know what i need to do anymore : /.... i already make what u say... but isn't working :X.... ( i think i will get crazy hahahahaha)
if u can show me your way i will be gratz...
obs.: tryed again and that mother F@#@!#$%@$%¨&*&*@&$*&$@*& don't wroked...
my way is a bit different than urs , i use one global timer for all players
Code:
public static System.Timers.Timer GlobalTimer = new System.Timers.Timer();
GlobalTimer.Interval = 1000;
then in it's delegate i add the XpCircle checks for all players
Hey there, Could you show me where I put these codes? XD
mine at Nano.cs Void StartServer()
the timer definition at the top of the class with the other definitions ,or u can put it at the Database.cs or anywhere else wherever u want but the timer start line must be at the serverstart void coz it has to start with the server ,it's global timer u know
if u still can't decide and want the exact places i put them at tell me
/*
* Created by SharpDevelop.
* User: sams
* Date: 3/8/2009
* Time: 8:03 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections;
using System.Threading;
using System.Collections.Generic;
using System.Collections.Specialized;
using CoEmu_v2_GameServer.Connections;
using CoEmu_v2_GameServer.Structs;
using CoEmu_v2_GameServer.Entities;
using OpenSSL;
namespace CoEmu_v2_GameServer
{
/// <summary>
/// Nano, CoEmu v2's Leveling server 'nickname' is hence forth the primary location of threaded operations.
/// This class holds all data which is to be shared amongst connected players, that being said
/// it is here entirely to be a 'dataholder' as seen in CoEmu v2's initial release.
/// </summary>
public static class Nano
{
public const int VIEW_THRESHOLD = 18;
public static string PoleHolder = "None";
public static bool Continue = true;
public static Dictionary<int, ClientSocket> ClientPool = new Dictionary<int, ClientSocket>();
//public static Dictionary<string, ClientSocket> NewCharacters = new Dictionary<string, ClientSocket>();
public static Dictionary<ulong, ConnectionRequest> AuthenticatedLogins = new Dictionary<ulong, ConnectionRequest>();
public static Dictionary<int, Struct.ItemData> Items = new Dictionary<int, Struct.ItemData>();
public static Dictionary<int, Struct.ItemPlusDB> ItemPluses = new Dictionary<int, Struct.ItemPlusDB>();
public static Dictionary<int, MonsterInfo> BaseMonsters = new Dictionary<int, MonsterInfo>();
public static Dictionary<int, Monster> Monsters = new Dictionary<int, Monster>();
public static Dictionary<int, MonsterSpawn> MonsterSpawns = new Dictionary<int, MonsterSpawn>();
public static Dictionary<int, Struct.NPC> Npcs = new Dictionary<int, Struct.NPC>();
public static Dictionary<string, Struct.Portal> Portals = new Dictionary<string, Struct.Portal>();
public static Dictionary<int, Struct.ItemGround> ItemFloor = new Dictionary<int, Struct.ItemGround>();
public static Dictionary<int, Struct.DmapData> Maps = new Dictionary<int, Struct.DmapData>();
public static Dictionary<int, Struct.ServerSkill> ServerSkills = new Dictionary<int, Struct.ServerSkill>();
public static Dictionary<int, Struct.TerrainNPC> TerrainNpcs = new Dictionary<int, Struct.TerrainNPC>();
public static MasterSocket GameServer;
public static MasterSocket AuthServer;
public static System.Random Rand = new System.Random();
public static int TintR = 0;
public static int TintG = 0;
public const int EXP_MULTIPLER = 10;
public const int PROF_MULTIPLER = 10;
public const int SKILL_MULTIPLER = 10;
public static System.Timers.Timer Shutdown;
private static string P = "E7A69EBDF105F2A6BBDEAD7E798F76A209AD73FB466431E2E7352ED262F8C558F10BEFEA977DE9E21DCEE9B04D245F300ECCBBA03E72630556D011023F9E857F", G = "05";
public static OpenSSL.DH ServerKey;
public static System.Timers.Timer GlobalTimer = new System.Timers.Timer();
public static void GenerateKey()
{
Nano.ServerKey = new OpenSSL.DH(OpenSSL.BigNumber.FromHexString(P), OpenSSL.BigNumber.FromHexString(G));
Nano.ServerKey.GenerateKeys();
}
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();
GlobalTimer.Interval = 1000;
//Database.Database.PurgeGuilds();
//Please DO NOT REMOVE THIS LINE!
Console.WriteLine("This program is a branch of CoEmu.Nano, property of the CoEmu Foundation.");
//
Console.WriteLine("[GameServer-Init] Creating Game Thread..");
Nano.GameServer = new MasterSocket("GameServer");
new Thread(Nano.GameServer.AcceptNewConnections).Start();
Console.WriteLine("[GameServer-Init](Game Thread) Success.");
Console.WriteLine("[GameServer-Init] Creating Auth Thread..");
Nano.AuthServer = new MasterSocket("AuthServer");
new Thread(Nano.AuthServer.AcceptNewConnections).Start();
Console.WriteLine("[GameServer-Init](Auth Thread) Success.");
ConsoleCommands();
}
public static void ConsoleCommands()
{
Console.WriteLine("Ready for commands.");
string command = Console.ReadLine();
if(command == "#end")
{
Shutdown = new System.Timers.Timer();
Shutdown.Interval = 180000;
Shutdown.AutoReset = false;
Shutdown.Elapsed += delegate { Kill(); };
Shutdown.Start();
CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "[GameServer] Shutting down in 3 minutes.", CoEmu_v2_GameServer.Structs.Struct.ChatType.Talk), 0);
}
else
{
Console.WriteLine("Unknown command.");
ConsoleCommands();
}
}
public static void Kill()
{
CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "[GameServer] Shutting down in 5 seconds.", CoEmu_v2_GameServer.Structs.Struct.ChatType.Talk), 0);
Thread.Sleep(1000);
CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "[GameServer] Shutting down in 4 seconds.", CoEmu_v2_GameServer.Structs.Struct.ChatType.Talk), 0);
Thread.Sleep(1000);
CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "[GameServer] Shutting down in 3 seconds.", CoEmu_v2_GameServer.Structs.Struct.ChatType.Talk), 0);
Thread.Sleep(1000);
CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "[GameServer] Shutting down in 2 seconds.", CoEmu_v2_GameServer.Structs.Struct.ChatType.Talk), 0);
Thread.Sleep(1000);
CoEmu_v2_GameServer.Packets.ConquerPacket.ToServer(CoEmu_v2_GameServer.Packets.ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "[GameServer] Shutting down in 1 second.", CoEmu_v2_GameServer.Structs.Struct.ChatType.Talk), 0);
Nano.AuthServer.Close();
Nano.GameServer.Close();
System.Environment.Exit(1);
}
this is my Nano.cs!!
i put this two things there:
public static System.Timers.Timer GlobalTimer = new System.Timers.Timer();
GlobalTimer.Interval = 1000;
[Fix] 64-Bit Fix for CoEmuV2 02/14/2011 - CO2 PServer Guides & Releases - 11 Replies Ok believe ive got a fix for the 64-bit problem for CoEmuV2.
Go to "CoEmu v2\CoEmu v2 GameServer\bin\Debug" and replace the "libeay32.dll" with the .dll in this .zip file. This will fix it.
I am running Vista 64-bit and Running CoEmuV2 :)
Good Luck.
CoEmuV2 11/20/2009 - CO2 Private Server - 1 Replies Is this source only compatible with a 5095 client or are there other clients that it can be connected to?
CoEmuv2 09/11/2009 - CO2 Private Server - 20 Replies What do I have to change in my coemu source to allow people to connect with my hamachi ip. Right now I'm connecting to my server with ip in server.dat 127.0.0.1 what do I need to change in the source so that I can put my hamachi ip in server.dat so I can connect with it and other people can connect as well?
[HELP]CoemuV2 08/30/2009 - CO2 Private Server - 0 Replies poeple can connect to my ip but i cant when i sqitch it to 127.0.0.1 i can connect cuz that my personal ip thing but when i chnage it to turn my erver up i cant log in but other can
Help Me Please With CoEmuV2 06/12/2009 - CO2 Private Server - 6 Replies Please All I need some help when i try To Make The Server It`s Give me Error Look At The Error http://www10.0zz0.com/2009/06/02/19/320280174.jpg