I worked a bit on a C++ emulator for the game Era of Faith, but decided to just retire myself from everything related to TQ. Anyway, I wasn't really developing actively anyway.
I decided to release the C++ emulator (not enough good references in this language), but EoF is not really known, so a CO2 fork is more appropriate. I took some time to fork my project for the patch 5065 and implement few other features to be considered fine enough to be a base.
This emulator is released under a 4-clause BSD license. Meaning that you're free to do whatever you want with this source, but it must keep the original license somewhere for paternity. When using this source, you must specify that you used software developed by « Jean-Philippe Boivin » (CptSky is okay too). Leechers won't probably respect the license which only state to give credits, but eh, at least I tried
Check the LICENSE file for more information about third party modules.
Code:
COPS v7 Emulator
----------------
Copyright (C) 2012 - 2014 Jean-Philippe Boivin
https://bitbucket.org/jpboivin/cops-v7-emulator/overview
Overview
--------
COPS v7 Emulator is a fork of Faith Emulator, a C++ emulator of the MMORPG
Era of Faith. COPS v7 Emulator is a fork targeting the MMORPG Conquer Online,
at the patch 5065.
The emulator is developed in C++ with Qt4 / Qt5.
N.B. The QMySQL driver must be build to use the QSQL module properly.
Features
--------
COPS v7 Emulator is currently released as a base source. Most functionalities
are not implemented or completed. However, some features have special and
interesting implementation.
+ Support any POSIX and/or WinAPI operating system with Qt
+ Support any architecture (little endian & big endian | 32 bit & 64 bit)
+ Separate worker for logging (see zfserv.log)
+ Self destructed environment (useful for singletons)
+ MySQL5 database based on the official one
+ Security module
- Custom implementations for:
* TQ's custom cipher
* Blowfish (CFB64)
* RC5 (32/12/16)
* Diffie-Hellman exchange
+ Map module
- Parallel loading of Data Map (DMap) files
* MapManager will detect the number of physical cores and spawn an appropriate
amount of worker to load DMaps in parallel.
e.g. On two PowerPC 970MP (dual core) @ 2.5 GHz, 4 workers will be spawn and
it will takes less than 30s to load all DMap of a 5065 client.
- Compressed data when unused
* Each GameMap will detect when no player will be on the map, and than pack
the data using the LZ4 algorithm and unpack the data when required.
e.g. With a PowerPC (64 bit), at idle, the emulator will require less than
10 MB of RAM to keep all DMap of a 5065 client in memory.
- Shared data among all GameMaps
+ Script module
- Shared Lua VM for executing scripts
- Exposed accessors for the player informations
- Exposed specialized functions (e.g. text(), link())
+ Generator module
- Based on TQ's one, using the official spawns will result in the same in-game spawns
+ Character creation
+ Character loading / saving
+ Direction / Emotion / Pk Mode
+ Walking / Jumping
+ Portals
+ Points allocation
+ Talking to NPCs [Incomplete]
+ Screen system [Incomplete]
+ Item features
- Buying items from NPCs
- Selling items to NPCs
- Repairing items
- Using / eating items
- Equiping items
- Real item ID generation for monsters [Incomplete]
Documentation about the emulator can be generated with dOxygen.
To generate the documentation, please in the root folder of the source,
and call dOxygen with Doxyfile.
Supported systems
-----------------
The emulator has been tested on the following platforms:
- Windows XP Professional (SP2)
+ x86_64 [Will compile, untested otherwise]
- Mac OS X Leopard (10.5.8)
+ ppc, ppc64
- Mac OS X Mavericks (10.9.2)
+ (x86), x86_x64
- Debian Lenny (5.0)
+ ARM (armel)
The emulator has been tested with Qt 4.6.3, 4.8.4 & 5.2.1.
However, the emulator should work without any modification on any
POSIX-compliant system (Mac OS X, *NIX, GNU/Linux, etc) and on any
WinAPI system.
N.B. This emulator uses the Windows API and/or the POSIX API and/or the Qt API.
[0.2.1]
Project :
Fixed severals warning when compiling with Clang 6.0.
* NOTE: It might fix an issue with dynamic length packets.
Database :
Added the loadAllMagics() method in the database.
Added the getPlayerMagicSkills() method in the database.
Added the getPlayerWeaponSkills() method in the database.
Updated the SQL dump to include indexes.
Updated the SQL dump to include the magictype table.
Player :
Added a Magic and a WeaponSkill class for players skills.
Fixed the calculation of the physical attack.
Cryptography :
Added a CAST-5 implementation for people wanting to upgrade the source to an higher patch.
* WARNING: The implementation is not tested on Big-Endian processors.
Msg / Networking :
Added few USER_ATTRIB_ constants (including CPs).
Updated the MsgMagicInfo class to take a Magic object instead of integers.
Updated the MsgWeaponSkill class to take a WeaponSkill object instead of integers.
Updated the login sequence to load and send the magic / weapon skills.
Fixed the buying of items in CPs.
Dependencies :
Updated Lua to the version 5.2.3.
Changed miniLZO for LZ4 due to a license incompatibility. LZ4 offers similar performances.
[0.2.0]
Project :
Simplified the Qt version detection.
Added NDEBUG flag when building in release.
Fixed the names (case) on case-sensitive systems.
Fixed missing includes.
Fixed the RC5 KEY/SUB error with Clang.
Common :
Updated the SAFE_DELETE macros to work on a single line.
Updated the ASSERT macro to be executed in release too.
Added feature detection for Clang & GCC.
Added a constexpr macro (for future use).
Added AtomicIncrement support on Mac OS X (native).
Moved the CLOCK_MULTIPLIER constant to basefunc.cpp.
Fixed the generator (still generating when the map was inactive).
Fixed the logger on Windows.
Server :
Changed the Server implementation from Singleton pattern to QCoreApplication.
Changed the loading order - Scripts are now loaded before items & NPCs.
Added a method to get the server information (uname).
Database :
Added a validation of the SQL driver for the LastInsertId feature.
Added missing data to Item::Info.
Added tasks' loading for items.
Added the getPlayerItems() method in the database.
Added the saveItem() method in the database.
Added the createItem() method in the database.
Added the eraseItem() method in the database.
Added the getItemFromShop() method in the database.
Updated tasks' loading for NPCs.
Moved Lua scripts to tasks folder.
Updated the MySQL dump to include new tables / data.
Updated the MySQL dump with InnoDB engine for some tables.
Scripts :
Added Conductress scripts.
Added old KCOSS scripts as reference.
Added a Lua method to get the Mate.
Added Lua methods to add/spend money/CPs.
Added a Lua method to move the player.
Merged ItemTask & NpcTask to the Script class.
World :
Added a method to query a task.
Entities :
Removed the time parameter of timerElapsed().
When activating a NPC, set the task to the client.
Player :
Added a timer for adding energy to the player.
Added methods for adding/spending money/CPs to the player.
Added a method for adding a value to an attribute to the player.
Added a method to find an item in the inventory.
Added a method to award an item.
Added a method to add an item to the inventory.
Added a method to erase an item from the inventory.
Added a method to send the info of all items.
Added a method to save all items.
Added a method to free all items.
Added a method for determining if an item can be equipped.
Added a method to use an item (and equip).
Added a method to equip an item.
Added a method to unequip an item.
Added methods to determine what is the item and what can be done.
Item :
Added missing data to Item::Info.
Added documentation to the class.
Added a factory method to create an item and insert it in the database.
Added a factory method to create an item from a Sql query.
Added a constructor to avoid invalid values.
Added a method to save the item.
Added a method to erase the item.
Added a method to get the sell price of the item.
Added a method to get the repair cost of the item.
Added a method to set the position.
Added methods to determine what is the item.
Msg / Networking :
Fixed the structure of the MsgItem packet.
Added support for using item.
Fixed the swapping of MsgNpc packet.
Msg / Networking :
Loading items at connection (MsgConnect).
Sending items at login (ACTION_GET_ITEM_SET).
Fixed the warning of hidden virtual function in MsgLoginChallengeS.
Fixed the command parsing in MsgTalk to handle white-spaces.
Fixed and finalized the MsgUserAttrib packet.
Fixed and finalized the MsgItemInfo packet.
Added support for buying, selling & repairing items.
Added support for using & equipping items.
Added basic support for executing the next Idx of a NPC's task.
Added real handling of commands in MsgTalk.
Added constness to Msg for send/broadcast.
Added the MsgFlushExp packet.
Added the MsgFriendInfo packet.
Added the MsgMagicInfo packet.
Added the MsgWeaponSkill packet.
Updated Msg Ids.
Removed send/broadcast of buffer.
[0.1.0]
- Initial release, see README of this version.
Which is why you compile it with the correct version of QT.
i think latest version is better and I'll find better features and more stability I've googled the error and found its linker issue.
-----------
after downloading QT 4 and searching for Mingw 4.4 for hours and installing it
i get the same errors when compiling
----------
adding
COPS v6 : Source & Tools [Custom Emulator] 04/18/2021 - CO2 PServer Guides & Releases - 171 Replies So, as I'm no longer active in CO2 private server development, I'll release my lastest emulator. It is a custom source which include almost ALL features of CO2, plus custom ones. The missing or incomplete features were guild allies/enemies, Offline TG. ALL the skills and mostly ALL the items are coded and supported. Most NPCs too, but in french... So, there is a lot of TQ quests.
The source is coded in C# and will work with 5017 clients. As I used an edited client, the database must be...
COPS v3 - Reborn Edition : Source & Tools [LOTF Emulator] 10/22/2012 - CO2 PServer Guides & Releases - 29 Replies I was cleaning my hard drive and I found an old source. The source is based on LOTF. I used it during COPS v3 (August 2008 - June 2009). After, I worked on my custom source, but I was too lazy, so I reworked a bit on this one for a short private server: COPS v3 - Reborn Edition.
The base is bad. After all, it's LOTF... The parts I coded/recoded during 2008/2009 are really bad, maybe worst than the original :rolleyes: I was learning. And the parts I recoded during the few months I worked on...
COPS v3 - Source & Tools [LOTF Emulator] 09/25/2012 - CO2 PServer Guides & Releases - 4 Replies I reformatted a USB Key and found an old source dating of January 2009. The source is based on LOTF. I used it during COPS v3 (August 2008 - June 2009). It is the base of my previous release of the COPS v3 - Reborn Edition emulator. So, it's really not good... Anything to say, except that nobody should use it? Anyway, some people who have played COPS might be interested to see the source, or some special feature. The test emulator is from January 17th, 2009. So it doesn't contains the final...
[Help]How i can make [welcome ms](v5065) 06/14/2009 - CO2 Private Server - 5 Replies Hello everone,
-Can anyone tell me how i can make a welcome msg which tabel in database?
-i'll be in wait guys!
Cya