Skip to content

Chnossos/l2cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

368 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

l2cpp

Lineage 2, Chronicle 4: Scions of Destiny C++23 emulation servers.

This is my latest passion project. I've been wanting to do this since I was 15, and here I am 16 years later with enough programming skills to do this on my own.

Even though I never played C4 (began on Interlude), I'm targeting this one because the game is less big and the protocol is slightly easier. I'd love to support more protocols in the future.

The goal

Go fast (but not too fast) and break things. YAGNI. Implement game design patterns I've studied years ago. Don't be too clever but have fun implementing and testing. DO NOT USE MULTIPLE THREADS. Leverage async code instead.

What's available?

Unless explicitely specified, don't assume anything to be available. Here's what's been done so far:

Core

  • Packet creation, reading and sending;
  • Auth & Game protocols encryption/decryption;
  • Exception stack handling.

Login Server

  • Protocol c621 only;
  • Users can log in with any credentials, no data is stored on disk (yet);
  • Server list always displays 2 server (one up, one down), both lead to game server.

Game Server

  • Protocol 656 only;
  • Character creation (but not restored between runs as no data is stored on disk yet);
  • World entering (every character spawns at Talking Island);
  • Moving around;
  • Inventory list (gear items can be equipped and unequipped);
  • Mini-map;
  • Character status;
  • Target select and unselect;
  • game loop to handle over-time actions and updates (regen, auto-attacks, DoTs…);
  • Skills list (can give yourself any skill with //learn <skill_id> <skill_level> command);
  • Skill use, available effects:
    • Instant buff (e.g. Wind Walk)
    • Toggle buff (e.g. Super Haste)
    • Instant damage (e.g. Wind Strike)
    • Damage over time (e.g. Poison)
    • Instant heal (e.g. Battle Heal)
    • Heal over time (e.g. Chant of Life)
    • Resurrection (e.g. Mass Resurrection)
  • Skill target types: self, single, aoe, aura
  • Skill target nature (can be combined): self, ennemy, friendly, corpse, character, monster, npc, etc.
  • Skill casting cancellation;
  • Shortcuts: skills, items;
  • Chat (no restrictions);
  • Auto-attacking (until target is dead);
  • Status (health, mana…) modifications broadcasting;
  • In-game time;
  • Corpse removal after a few seconds;
  • System messages and confirmation modals.

What's coming next

See the Unrealeased section of CHANGELOG.md

How to build

I develop with the following environment:

  • Windows 11
  • Visual Studio Build Tools 2026
  • CMake 4.2 (required for VS 2026 generator)
  • Conan (latest as of 2026-04-12)
  • Ninja (latest as of 2026-04-12)
git clone https://github.com/Chnossos/l2cpp.git && cd l2cpp
conan install -b missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config"
cmake --preset conan-default
cmake --build build --preset conan-release # or conan-debug

How to run

Build, then start a login server, then a game server. Now log in with a game client supporting protocol 656 and voilà!

Credits

l2auth, L2jMobius and L2JLisvus.

About

Lineage II: Scions of Destiny (C4) C++23 emulator

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages