If you want a good CO related C++ reference, you should just take a look at the Eudemons client/server source code, it's publicly available. Don't think it's allowed to be posted here because of copyrights though
If you want a good CO related C++ reference, you should just take a look at the Eudemons client/server source code, it's publicly available. Don't think it's allowed to be posted here because of copyrights though
If you want a good CO related C++ reference, you should just take a look at the Eudemons client/server source code, it's publicly available. Don't think it's allowed to be posted here because of copyrights though
Worth noting that its a good CO source, but the code is awful.
If you want a good CO related C++ reference, you should just take a look at the Eudemons client/server source code, it's publicly available. Don't think it's allowed to be posted here because of copyrights though
that's what im actually doing still trying to fully understand hybrids, some stuff isn't clear and im so tempted to ask but still trying more on my own XD
I've nerver really looked at Hybrid converted source, but bone's one isn't a good reference.
Thank *** somebody else agrees with me.
If I ever get round to actually furthering my c++ source I may just release it here/make it open source, I don't have the finances or resources to run a server myself.
Mhm, I wouldn't say 1000-3000% It's far from being exceptional. TQ's code is fine, and the code is only good as reference.
Have you actually downloaded and looked at most of the releases here on epvp? Most, 9/10 at least, of the private servers are ridiculously poorly designed and written. I'm not judging though, designing and coding a private server isn't really a one or two man job.
The code is still 1000-3000% better than 99.99999999999998% of anything ever released here on epvp
Are you kidding? Its good in the sense that its the closest thing to the legit conquer source code available, but have you actually ever tried going through it? Its a pretty awful example of C++, beaten only by Bone's source, and that's saying something.
/**
* ****** Faith Emulator - Closed Source ******
* Copyright (C) 2012 - 2013 CptSky
*
* Please read the WARNING, DISCLAIMER and PATENTS
* sections in the LICENSE file.
*/
#ifndef _FAITH_EMULATOR_ENTITY_H
#define _FAITH_EMULATOR_ENTITY_H
#include "common.h"
/**
* Base class of all entity on a map.
*/
class Entity
{
public:
/** First valid UID for a NPC. */
static const int32_t SCENEID_FIRST = 1;
/** First valid UID for a system NPC. */
static const int32_t SYSNPCID_FIRST = 1;
/** Last valid UID for a system NPC. */
static const int32_t SYSNPCID_LAST = 99999;
/** First valid UID for a user/dynamic NPC. */
static const int32_t DYNANPCID_FIRST = 100001;
/** Last valid UID for a user/dynamic NPC. */
static const int32_t DYNANPCID_LAST = 199999;
/** Last valid UID for a NPC. */
static const int32_t SCENEID_LAST = 299999;
/** First valid UID for an advanced NPC. */
static const int32_t NPCSERVERID_FIRST = 400001;
/** First valid UID for a monster. */
static const int32_t MONSTERID_FIRST = 400001;
/** Last valid UID for a monster. */
static const int32_t MONSTERID_LAST = 499999;
/** First valid UID for a pet. */
static const int32_t PETID_FIRST = 500001;
/** Last valid UID for a pet. */
static const int32_t PETID_LAST = 599999;
/** Last valid UID for an advanced NPC. */
static const int32_t NPCSERVERID_LAST = 699999;
/** First valid UID for a called pet. */
static const int32_t CALLPETID_FIRST = 700001;
/** Last valid UID for a called pet. */
static const int32_t CALLPETID_LAST = 799999;
// unused for the moment ?
static const int32_t TRAPID_FIRST = 900001;
static const int32_t MAGICTRAPID_FIRST = 900001;
static const int32_t MAGICTRAPID_LAST = 989999;
static const int32_t SYSTRAPID_FIRST = 990001;
static const int32_t SYSTRAPID_LAST = 999999;
static const int32_t TRAPID_LAST = 999999;
/** First valid UID for a player. */
static const int32_t PLAYERID_FIRST = 1000000;
/** Last valid UID for a player. */
static const int32_t PLAYERID_LAST = 1999999999;
public:
/** Number of cells per block. */
static const int32_t CELLS_PER_BLOCK = 18;
/** Number of cells per view. */
static const int32_t CELLS_PER_VIEW = 18;
public:
/** Determine wheter or not the entity linked to the UID is a NPC. */
static bool isNpc(int32_t aUID) { return aUID >= SCENEID_FIRST && aUID <= SCENEID_LAST; }
/** Determine wheter or not the entity linked to the UID is a system NPC. */
static bool isSysNpc(int32_t aUID) { return aUID >= SYSNPCID_FIRST && aUID <= SYSNPCID_LAST; }
/** Determine wheter or not the entity linked to the UID is a user/dynamic NPC. */
static bool isDynNpc(int32_t aUID) { return aUID >= DYNANPCID_FIRST && aUID <= DYNANPCID_LAST; }
/** Determine wheter or not the entity linked to the UID is a monster. */
static bool isMonster(int32_t aUID) { return aUID >= MONSTERID_FIRST && aUID <= MONSTERID_LAST; }
/** Determine wheter or not the entity linked to the UID is a pet. */
static bool isPet(int32_t aUID) { return aUID >= PETID_FIRST && aUID <= PETID_LAST; }
/** Determine wheter or not the entity linked to the UID is a called pet. */
static bool isCallPet(int32_t aUID) { return aUID >= CALLPETID_FIRST && aUID <= CALLPETID_LAST; }
/** Determine wheter or not the entity linked to the UID is a player. */
static bool isPlayer(int32_t aUID) { return aUID >= PLAYERID_FIRST && aUID <= PLAYERID_LAST; }
public:
/** Determine wheter or not the entity is a NPC. */
bool isNpc() { return isNpc(mUID); }
/** Determine wheter or not the entity is a system NPC. */
bool isSysNpc() { return isSysNpc(mUID); }
/** Determine wheter or not the entity is a user/dynamic NPC. */
bool isDynNpc() { return isDynNpc(mUID); }
/** Determine wheter or not the entity is a monster. */
bool isMonster() { return isMonster(mUID); }
/** Determine wheter or not the entity is a pet. */
bool isPet() { return isPet(mUID); }
/** Determine wheter or not the entity is a called pet. */
bool isCallPet() { return isCallPet(mUID); }
/** Determine wheter or not the entity is a player. */
bool isPlayer() { return isPlayer(mUID); }
public:
/* destructor */
virtual ~Entity();
public:
/** Get the entity's UID. */
int32_t getUID() { return mUID; }
/** Get the entity's name. */
const char* getName() { return (mName.empty() ? nullptr : mName.c_str()); }
/** Get the entity's look/face. */
int32_t getLook() { return mLook; }
/** Get the entity's map UID. */
int16_t getMapId() { return mMapId; }
/** Get the entity's X coord. */
uint16_t getPosX() { return mPosX; }
/** Get the entity's Y coord. */
uint16_t getPosY() { return mPosY; }
/** Get the cardinal direction of the entity. */
uint8_t getDirection() { return mDirection; }
/** Set the map UID of the entity. */
void setMapId(int16_t aMapId) { mMapId = aMapId; }
/** Set the position on the map of the entity. */
void setPosition(uint16_t aPosX, uint16_t aPosY) { mPosX = aPosX; mPosY = aPosY; }
/** Set the cardinal direction of the entity. */
void setDirection(uint8_t aDirection) { mDirection = aDirection; }
protected:
/* constructor */
Entity(int32_t aUID);
protected:
const int32_t mUID; //!< Entity UID
std::string mName; //!< Entity name
int32_t mLook; //!< Entity look/face
int16_t mMapId; //!< Entity map UID
uint16_t mPosX; //!< Entity X coord.
uint16_t mPosY; //!< Entity Y coord.
uint8_t mDirection; //!< Entity cardinal direction
};
#endif // _FAITH_EMULATOR_ENTITY_H
/**
* ****** Faith Emulator - Closed Source ******
* Copyright (C) 2012 - 2013 CptSky
*
* Please read the WARNING, DISCLAIMER and PATENTS
* sections in the LICENSE file.
*/
#ifndef _FAITH_EMULATOR_ADVANCED_ENTITY_H
#define _FAITH_EMULATOR_ADVANCED_ENTITY_H
#include "common.h"
#include "entity.h"
/**
* Base class of all advanced entity on a map.
* An advanced entity can be in a battle.
*/
class AdvancedEntity : public Entity
{
public:
/* destructor */
virtual ~AdvancedEntity();
public:
/** Get the entity's level. */
uint8_t getLevel() { return mLevel; }
/** Get the entity's current hit points. */
uint16_t getCurHP() { return mCurHP; }
/** Get the entity's max hit points. */
uint16_t getMaxHP() { return mMaxHP; }
protected:
/* constructor */
AdvancedEntity(int32_t aUID);
protected:
uint8_t mLevel; //!< Entity level
uint16_t mCurHP; //!< Entity current HP
uint16_t mMaxHP; //!< Entity max HP
int32_t mMinAtk;
int32_t mMaxAtk;
int32_t mDefense;
uint8_t mDexterity;
uint8_t mDodge;
};
#endif // _FAITH_EMULATOR_ADVANCED_ENTITY_H
well umm sorry for interrupting you guys but umm what should i be doing right now when you all insist that the 3 c++ sources out there sucks ?
edit : thanks cptsky i like the way you written those classes, the encapsulation and protected modifiers
edit : was just wondering what you folks mean by it's not good source ? is it the socket/networking or just the whole design ? how far could they be from each others at the sockets , isn't all of them using winsoc or there is some better custom sockets ? please just gimme more details
+12 Item Composition 04/10/2011 - CO2 Private Server - 17 Replies Hi there!
My problem is that I can compose my items till +9 with stones like +1 +2 +3 +4 +5 and +6 , BUT , I can't use +7 / +8 stones.
So it doesn't work to +12 any item , it works only from +1 to +9.
What should I add/modify to get it work till +12 with all kind of stones?
Thanks.
P.S: I can only generate +12 items by command ( /item 14563 12 7 255 13 13 )
If you are a flamer don't comment.
[rel] composition fix for 5165 12/09/2009 - CO2 PServer Guides & Releases - 7 Replies #request close/delete
moved to my multi-rel thread.
Composition Chart to +12 any one? 11/28/2007 - Conquer Online 2 - 4 Replies Just like to know if anyone has a "Composition Chart" to +12 items thanks :)
Composition Calculator 09/30/2006 - CO2 Exploits, Hacks & Tools - 14 Replies Ok, so im a newbie using cotobo for a long time with only a couple of posts. Everybody would want to see if this is clean and all so please somebody scan it.
Why did i make this? Well, i liked the one posted on TQ board but one of the feature never got finished (subtracting what you current have). You can check here
http://shellz2.future-hosting.net/~sony/c ompose.php
This program is written VB and this is my second VB program besides (Hello World) so it's quite ugly and very plain.
...