Sosyal açıldı! Bir göz at → Hemen gir →

= (version 1534) = Source Code

brockley

KY Üye
KAYIT
9 Ağu 2023
Mesajlar
44
Tepki puanı
51
# Knight Online Game Server Source v1534
## Overview
This is a complete Knight Online game server source code (version 1534) written in C++. It includes the Game Server, AI Server, Login Server, and all supporting systems for running a fully functional Knight Online private server.
## Source Structure
```
1_GameSource1534/
├── AIServer/ # AI Server (NPC behavior, monster AI)
├── GameServer/ # Main Game Server (player handling, game logic)
├── LogInServer/ # Login/Authentication Server
├── shared/ # Shared libraries and definitions
├── scripting/ # Lua scripting system
└── N3BASE/ # Base networking and utilities
```
## Key Components
### GameServer (Main Server)
- **User.cpp/h** - Player character handling (220KB, largest file)
- **MagicInstance.cpp/h** - Skill and magic system
- **KingSystem.cpp/h** - King election, taxation, and events
- **KnightsManager.cpp/h** - Clan/Knights system
- **Map.cpp/h** - Zone and map management
- **Npc.cpp/h** - NPC behavior and interaction
- **DBAgent.cpp/h** - Database communication layer
- **LuaEngine.cpp/h** - Lua scripting for quests and events
### AIServer
- Handles NPC AI, monster behavior, and pathfinding
- Communicates with Game Server via socket
### LogInServer
- User authentication
- Account validation
- Server selection
## Game Zones
### Main Zones
- **ZONE_KARUS (1)** - Karus starting zone
- **ZONE_ELMORAD (2)** - El Morad starting zone
- **ZONE_MORADON (21)** - Main hunting zone
- **ZONE_DELOS (30)** - Castle Siege War zone
- **ZONE_BIFROST (31)** - Bifrost event zone
- **ZONE_DESPERATION_ABYSS (32)** - Desperation Abyss dungeon
- **ZONE_HELL_ABYSS (33)** - Hell Abyss dungeon
- **ZONE_DRAGON_CAVE (34)** - Dragon Cave dungeon
- **ZONE_ARENA (48)** - Free-for-all arena
### PvP Zones
- **ZONE_RONARK_LAND (71)** - Ronark Land (open PvP)
- **ZONE_ARDREAM (72)** - Ardream (low-level PvP)
- **ZONE_RONARK_LAND_BASE (73)** - Ronark Land Base
### Event Zones
- **ZONE_BORDER_DEFENSE_WAR (84)** - Border Defense War
- **ZONE_CHAOS_DUNGEON (85)** - Chaos Dungeon
- **ZONE_JURAID_MOUNTAIN (87)** - Juraid Mountain
- **ZONE_FORGOTTEN_TEMPLE (55)** - Forgotten Temple
- **ZONE_LOST_TEMPLE (56)** - Lost Temple
### Battle Zones
- **ZONE_BATTLE (61)** - Napies Gorge
- **ZONE_BATTLE2 (62)** - Alseids Prairie
- **ZONE_BATTLE3 (63)** - Nieds Triangle
- **ZONE_BATTLE4 (64)** - Nereid's Island
- **ZONE_BATTLE5 (65)** - Zipang
- **ZONE_BATTLE6 (66)** - Oreads
- **ZONE_SNOW_BATTLE (69)** - Snow Battle
### Arena Zones
- **ZONE_ORC_ARENA (51)** - Orc Arena
- **ZONE_BLOOD_DON_ARENA (52)** - Blood Don Arena
- **ZONE_GOBLIN_ARENA (53)** - Goblin Arena
- **ZONE_CAITHAROS_ARENA (54)** - Caitharos Arena
### Monster Stone Zones
- **ZONE_STONE1 (81)** - Monster Stone 1
- **ZONE_STONE2 (82)** - Monster Stone 2
- **ZONE_STONE3 (83)** - Monster Stone 3
## Game Events
### Temple Events
- **TEMPLE_EVENT_BORDER_DEFENCE_WAR (4)** - Border Defense War event
- **TEMPLE_EVENT_MONSTER_STONE (14)** - Monster Stone event
- **TEMPLE_EVENT_CHAOS (24)** - Chaos Dungeon event
- **TEMPLE_EVENT_JURAD_MOUNTAIN (100)** - Juraid Mountain event
### King System Events
- **KING_EVENT_NOAH** - Coin/Noah bonus event (increases coin drop rate)
- **KING_EVENT_EXP** - Experience bonus event (increases XP gain)
- **KING_EVENT_PRIZE** - Prize distribution event (awards coins from treasury)
- **KING_EVENT_FUGITIVE** - Fugitive hunt event
- **KING_EVENT_WEATHER** - Weather control event
- **KING_EVENT_NOTICE** - Global notice/announcement event
### King Election System
- **KING_ELECTION** - King election process
- **KING_IMPEACHMENT** - King impeachment system
- **KING_TAX** - Taxation system
- **KING_NATION_INTRO** - Nation introduction
- **KING_ELECTION_SCHEDULE** - Election scheduling
- **KING_ELECTION_NOMINATE** - Candidate nomination
- **KING_ELECTION_NOTICE_BOARD** - Election notices
- **KING_ELECTION_POLL** - Voting system
- **KING_ELECTION_RESIGN** - Candidate resignation
## GM/Operator Commands
### Working Operator Commands
- **OPERATOR_ARREST (1)** - Arrest/jail a player
- **OPERATOR_BAN (2)** - Ban a character
- **OPERATOR_MUTE (3)** - Mute a player's chat
- **OPERATOR_UNMUTE (4)** - Unmute a player
- **OPERATOR_CUTOFF (5)** - Disconnect a player
- **OPERATOR_BAN_ACCOUNT (6)** - Ban an entire account
- **OPERATOR_SUMMON (7)** - Summon a player to your location
- **OPERATOR_DISABLE_ATTACK (8)** - Disable a player's ability to attack
- **OPERATOR_ENABLE_ATTACK (9)** - Enable a player's ability to attack
### Chat Types
- **GENERAL_CHAT (1)** - General zone chat
- **PRIVATE_CHAT (2)** - Private message
- **PARTY_CHAT (3)** - Party chat
- **FORCE_CHAT (4)** - Commander chat
- **SHOUT_CHAT (5)** - Shout (zone-wide)
- **KNIGHTS_CHAT (6)** - Clan chat
- **PUBLIC_CHAT (7)** - Public chat
- **WAR_SYSTEM_CHAT (8)** - War system announcements
- **PERMANENT_CHAT (9)** - Permanent chat
- **END_PERMANENT_CHAT (10)** - End permanent chat
- **MONUMENT_NOTICE (11)** - Monument notices
- **GM_CHAT (12)** - GM chat
- **COMMAND_CHAT (13)** - Command chat
- **MERCHANT_CHAT (14)** - Merchant chat
- **ALLIANCE_CHAT (15)** - Alliance chat
- **ANNOUNCEMENT_CHAT (17)** - Server announcements
- **SEEKING_PARTY_CHAT (19)** - Party seeking chat
- **GM_INFO_CHAT (21)** - GM info window
- **COMMAND_PM_CHAT (22)** - Commander PM
- **CLAN_NOTICE (24)** - Clan notices
- **KROWAZ_NOTICE (25)** - Krowaz notices
- **DEATH_NOTICE (26)** - Death announcements
- **CHAOS_STONE_ENEMY_NOTICE (27)** - Chaos stone enemy notices
- **CHAOS_STONE_NOTICE (28)** - Chaos stone notices
- **ANNOUNCEMENT_WHITE_CHAT (29)** - White announcement chat
- **CHATROM_CHAT (33)** - Chat room chat
- **NOAH_KNIGHTS_CHAT (34)** - Noah Knights chat
- **ALLIANCE_NOTICE (35)** - Alliance notices
Network Packets (WIZ_)
### Core Packets
- **WIZ_LOGIN (0x01)** - Account login
- **WIZ_NEW_CHAR (0x02)** - Create character
- **WIZ_DEL_CHAR (0x03)** - Delete character
- **WIZ_SEL_CHAR (0x04)** - Select character
- **WIZ_SEL_NATION (0x05)** - Select nation
- **WIZ_MOVE (0x06)** - Movement
- **WIZ_USER_INOUT (0x07)** - User enter/leave zone
- **WIZ_ATTACK (0x08)** - Attack action
- **WIZ_ROTATE (0x09)** - Character rotation
- **WIZ_NPC_INOUT (0x0A)** - NPC enter/leave zone
- **WIZ_NPC_MOVE (0x0B)** - NPC movement
### Game State Packets
- **WIZ_HP_CHANGE (0x17)** - HP update
- **WIZ_MSP_CHANGE (0x18)** - MP/SP update
- **WIZ_EXP_CHANGE (0x1A)** - Experience update
- **WIZ_LEVEL_CHANGE (0x1B)** - Level/stat update
- **WIZ_LOYALTY_CHANGE (0x2A)** - National points update
- **WIZ_POINT_CHANGE (0x28)** - Stat point allocation
- **WIZ_STATE_CHANGE (0x29)** - Sit/stand state
- **WIZ_DEAD (0x11)** - Death notification
- **WIZ_REGENE (0x12)** - Regeneration
### Item & Trade Packets
- **WIZ_ITEM_MOVE (0x1F)** - Item movement in inventory
- **WIZ_ITEM_DROP (0x23)** - Drop item on ground
- **WIZ_ITEM_GET (0x26)** - Pick up item
- **WIZ_ITEM_TRADE (0x21)** - Item trade
- **WIZ_ITEM_REPAIR (0x3B)** - Item repair
- **WIZ_ITEM_UPGRADE (0x5B)** - Item upgrade
- **WIZ_ITEM_REMOVE (0x3F)** - Remove item
- **WIZ_DURATION (0x38)** - Item durability
- **WIZ_WAREHOUSE (0x45)** - Warehouse access
- **WIZ_MERCHANT (0x68)** - Merchant mode
- **WIZ_SHOPPING_MALL (0x6A)** - Shopping mall
### Social Packets
- **WIZ_CHAT (0x10)** - Chat messages
- **WIZ_PARTY (0x2F)** - Party system
- **WIZ_FRIEND_PROCESS (0x49)** - Friend system
- **WIZ_KNIGHTS_PROCESS (0x3C)** - Clan system
- **WIZ_EXCHANGE (0x30)** - Item exchange
- **WIZ_KISS (0x66)** - Kiss/emote
### Event & Quest Packets
- **WIZ_NPC_EVENT (0x20)** - NPC interaction
- **WIZ_OBJECT_EVENT (0x33)** - Object interaction
- **WIZ_CLIENT_EVENT (0x52)** - Client event
- **WIZ_MAP_EVENT (0x53)** - Map event
- **WIZ_QUEST (0x64)** - Quest system
- **WIZ_EVENT (0x5F)** - General event
### System Packets
- **WIZ_LOGOUT (0x0F)** - Logout request
- **WIZ_ZONE_CHANGE (0x27)** - Zone change
- **WIZ_WARP (0x1E)** - Teleport
- **WIZ_WARP_LIST (0x4B)** - Warp list
- **WIZ_TIME (0x13)** - Game time
- **WIZ_WEATHER (0x14)** - Weather
- **WIZ_NOTICE (0x2E)** - Server notice
- **WIZ_VERSION_CHECK (0x2B)** - Version verification
- **WIZ_COMPRESS_PACKET (0x42)** - Compressed data
### Special Packets
- **WIZ_KING (0x78)** - King system
- **WIZ_SIEGE (0x6D)** - Castle siege
- **WIZ_MATCHMAKING (0x92)** - Matchmaking system
- **WIZ_GENIE (0x97)** - Genie system
- **WIZ_ACHIEVE (0x99)** - Achievements
- **WIZ_PREMIUM (0x71)** - Premium service
- **WIZ_RENTAL (0x73)** - Item rental
- **WIZ_PET (0x76)** - Pet system
- **WIZ_BIFROST (0x7B)** - Bifrost event
- **WIZ_PVP (0x88)** - PvP system
- **WIZ_VIPWAREHOUSE (0x8B)** - VIP warehouse
## Database System
### Database Tables
- **USER_DATA** - User account and character data
- **KNIGHTS** - Clan/Knights information
- **KNIGHTS_USER** - Clan membership
- **KING_SYSTEM** - King election and treasury
- **ITEM_TABLE** - Item definitions
- **MAGIC_TABLE** - Skill/magic definitions
- **ZONE_INFO** - Zone configuration
- **START_POSITION** - Starting positions
- **EVENT** - Event scheduling
- **MONSTER_CHALLENGE** - Dungeon challenge data
### Database Agent (DBAgent)
- Handles all database communication
- Stored procedure calls
- User data persistence
- Real-time data synchronization
## Magic & Skill System
### Skill Types
- **Attack Skills** - Direct damage skills
- **Buff Skills** - Stat enhancement buffs
- **Debuff Skills** - Stat reduction
- **Transformation Skills** - Character transformation
- **Healing Skills** - HP/MP restoration
- **Party Buffs** - Area of effect buffs
### Special Buffs
- **BUFF_TYPE_KAUL_TRANSFORMATION** - Transforms to Kaul (pig), prevents /town and attack, increases defense
- **Siege Weapon Buffs** - Special buffs for siege transformations (MORAL_SIEGE_WEAPON)
- **Scroll Buffs** - Stat scrolls (HP, MP, AC, AP, etc.)
## Lua Scripting System
### Script Pool
- Multi-threaded Lua script execution
- Pool of 4 script instances for concurrent execution
- Round-robin script selection
- Located in `./Quests/` directory
### Script Usage
- Quest system
- Event triggers
- NPC dialogues
- Custom game logic
## Clan/Knights System
### Clan Features
- Clan creation and management
- Clan ranks (Leader, Vice Leader, Officer, Member, Trial)
- Clan notice system
- Clan points and ranking
- Alliance system (up to 2 clans)
- Clan cape customization
### Clan Commands
- Clan creation
- Clan invitation
- Clan promotion/demotion
- Clan expulsion
- Clan disbandment
- Alliance formation
## King System
### King Elections
- Weekly nomination period
- Voting system
- Election results
- Senator selection
### King Powers
- Tax rate adjustment (0-100%)
- Weather control
- Event activation (EXP, Noah bonuses)
- Prize distribution from treasury
- Global notices
- Territory tariffs
### Treasury System
- National treasury management
- Tax collection
- Prize distribution
- Treasury synchronization
## PvP System
### PvP Zones
- Open PvP in Ronark Land, Ardream
- Battle zones with scheduled wars
- Arena zones for duels
- Castle Siege War in Delos
### PvP Features
- Rival system
- Anger gauge (5 deaths to fill)
- Helmet indicators for anger level
- Death notices with coordinates
- Revenge/avenge system
## Event System
### Scheduled Events
- Border Defense War (30 minutes)
- Chaos Dungeon (20 minutes)
- Juraid Mountain (40 minutes)
Forgotten Temple
- Lost Temple
- Monster Stone events
### Event Rewards
- National points (NP)
- Experience points
- Coins/Noah
- Special items
- Ranking rewards
## Recent Improvements (v1534)
### Bug Fixes
- Fixed Lua compilation errors (LUAI_BITSINT, LUA_IEEEENDIAN)
- Implemented siege-weapon buff support
- Added NPC skill verification for arrow skills
- Implemented transformation duration saving
- Added stat reset/recalculation on transformation end
- Applied transformation stat bonuses (HP/MP/AC)
- Optimized party gold distribution
- Optimized clan status updates (region to clan members only)
- Implemented Delos/CSW spawn logic
- Refactored Lua engine for concurrent script execution
### New Features
- King event database persistence
- Merchant error codes for invalid positions
- Zone-specific kick messages
- Packet count placeholder fixes
### Performance Optimizations
- Single-loop party member collection
- Clan-specific message routing
- Database update optimization for King events
Build Requirements
### Compiler
- Microsoft Visual Studio (C++)
- C++11 or later
### Dependencies
- Windows SDK
- ODBC (for database connectivity)
- Lua 5.1+ (scripting)
### Database
- Microsoft SQL Server
- Required stored procedures
## Configuration Files
### Server Configuration
- Database connection settings
- Server port configuration
- Zone settings
- Event schedules
- King system settings
### Client Compatibility
- Knight Online v1534 client
- Packet structure compatibility
- Resource file requirements
## Security Features
### Anti-Cheat
- Speed hack detection (WIZ_SPEEDHACK_CHECK)
- HackShield integration (WIZ_HACKSHIELD_GUARD)
- Program verification (WIZ_PROGRAMCHECK)
- Attack validation
- Movement validation
### GM Protection
- Operator authentication
- GM chat channels
- GM invisibility
- GM summoning abilities
## Known Limitations
### ALL Items
- Quest zone ID logic implementation (file encoding issues)
- UDP communication for multi-server synchronization (requires infrastructure)
- Letter system caching optimization (requires cache implementation)
- Base class refactoring for region methods (architectural change)
### Database Requirements
- Transformation fields in USER_DATA table
- UPDATE_USER_DATA stored procedure updates
- King event persistence tables
## Credits
This is a Knight Online private server source code (v1534) based on the official game server implementation. It includes all core systems for running a complete Knight Online game server.
## License
This source code is provided for educational purposes. Knight Online is a trademark of its respective owners.
---
**Note**: This README provides an overview of the game server source. For detailed implementation information, refer to the specific source files and comments within the code.

Download:
[REPLY AND THANKS]
[/REPLYANDTHANKS]
 

Ekli dosyalar

  • Screenshot 2026-05-28 151919.png
    Screenshot 2026-05-28 151919.png
    240.8 KB · Görüntüleme: 54
Son düzenleme:

gebzespor

KY Kıdemli Üye
KAYIT
24 Şub 2023
Mesajlar
133
Tepki puanı
70
# Knight Online Game Server Source v1534
## Overview
This is a complete Knight Online game server source code (version 1534) written in C++. It includes the Game Server, AI Server, Login Server, and all supporting systems for running a fully functional Knight Online private server.
## Source Structure
```
1_GameSource1534/
├── AIServer/ # AI Server (NPC behavior, monster AI)
├── GameServer/ # Main Game Server (player handling, game logic)
├── LogInServer/ # Login/Authentication Server
├── shared/ # Shared libraries and definitions
├── scripting/ # Lua scripting system
└── N3BASE/ # Base networking and utilities
```
## Key Components
### GameServer (Main Server)
- **User.cpp/h** - Player character handling (220KB, largest file)
- **MagicInstance.cpp/h** - Skill and magic system
- **KingSystem.cpp/h** - King election, taxation, and events
- **KnightsManager.cpp/h** - Clan/Knights system
- **Map.cpp/h** - Zone and map management
- **Npc.cpp/h** - NPC behavior and interaction
- **DBAgent.cpp/h** - Database communication layer
- **LuaEngine.cpp/h** - Lua scripting for quests and events
### AIServer
- Handles NPC AI, monster behavior, and pathfinding
- Communicates with Game Server via socket
### LogInServer
- User authentication
- Account validation
- Server selection
## Game Zones
### Main Zones
- **ZONE_KARUS (1)** - Karus starting zone
- **ZONE_ELMORAD (2)** - El Morad starting zone
- **ZONE_MORADON (21)** - Main hunting zone
- **ZONE_DELOS (30)** - Castle Siege War zone
- **ZONE_BIFROST (31)** - Bifrost event zone
- **ZONE_DESPERATION_ABYSS (32)** - Desperation Abyss dungeon
- **ZONE_HELL_ABYSS (33)** - Hell Abyss dungeon
- **ZONE_DRAGON_CAVE (34)** - Dragon Cave dungeon
- **ZONE_ARENA (48)** - Free-for-all arena
### PvP Zones
- **ZONE_RONARK_LAND (71)** - Ronark Land (open PvP)
- **ZONE_ARDREAM (72)** - Ardream (low-level PvP)
- **ZONE_RONARK_LAND_BASE (73)** - Ronark Land Base
### Event Zones
- **ZONE_BORDER_DEFENSE_WAR (84)** - Border Defense War
- **ZONE_CHAOS_DUNGEON (85)** - Chaos Dungeon
- **ZONE_JURAID_MOUNTAIN (87)** - Juraid Mountain
- **ZONE_FORGOTTEN_TEMPLE (55)** - Forgotten Temple
- **ZONE_LOST_TEMPLE (56)** - Lost Temple
### Battle Zones
- **ZONE_BATTLE (61)** - Napies Gorge
- **ZONE_BATTLE2 (62)** - Alseids Prairie
- **ZONE_BATTLE3 (63)** - Nieds Triangle
- **ZONE_BATTLE4 (64)** - Nereid's Island
- **ZONE_BATTLE5 (65)** - Zipang
- **ZONE_BATTLE6 (66)** - Oreads
- **ZONE_SNOW_BATTLE (69)** - Snow Battle
### Arena Zones
- **ZONE_ORC_ARENA (51)** - Orc Arena
- **ZONE_BLOOD_DON_ARENA (52)** - Blood Don Arena
- **ZONE_GOBLIN_ARENA (53)** - Goblin Arena
- **ZONE_CAITHAROS_ARENA (54)** - Caitharos Arena
### Monster Stone Zones
- **ZONE_STONE1 (81)** - Monster Stone 1
- **ZONE_STONE2 (82)** - Monster Stone 2
- **ZONE_STONE3 (83)** - Monster Stone 3
## Game Events
### Temple Events
- **TEMPLE_EVENT_BORDER_DEFENCE_WAR (4)** - Border Defense War event
- **TEMPLE_EVENT_MONSTER_STONE (14)** - Monster Stone event
- **TEMPLE_EVENT_CHAOS (24)** - Chaos Dungeon event
- **TEMPLE_EVENT_JURAD_MOUNTAIN (100)** - Juraid Mountain event
### King System Events
- **KING_EVENT_NOAH** - Coin/Noah bonus event (increases coin drop rate)
- **KING_EVENT_EXP** - Experience bonus event (increases XP gain)
- **KING_EVENT_PRIZE** - Prize distribution event (awards coins from treasury)
- **KING_EVENT_FUGITIVE** - Fugitive hunt event
- **KING_EVENT_WEATHER** - Weather control event
- **KING_EVENT_NOTICE** - Global notice/announcement event
### King Election System
- **KING_ELECTION** - King election process
- **KING_IMPEACHMENT** - King impeachment system
- **KING_TAX** - Taxation system
- **KING_NATION_INTRO** - Nation introduction
- **KING_ELECTION_SCHEDULE** - Election scheduling
- **KING_ELECTION_NOMINATE** - Candidate nomination
- **KING_ELECTION_NOTICE_BOARD** - Election notices
- **KING_ELECTION_POLL** - Voting system
- **KING_ELECTION_RESIGN** - Candidate resignation
## GM/Operator Commands
### Working Operator Commands
- **OPERATOR_ARREST (1)** - Arrest/jail a player
- **OPERATOR_BAN (2)** - Ban a character
- **OPERATOR_MUTE (3)** - Mute a player's chat
- **OPERATOR_UNMUTE (4)** - Unmute a player
- **OPERATOR_CUTOFF (5)** - Disconnect a player
- **OPERATOR_BAN_ACCOUNT (6)** - Ban an entire account
- **OPERATOR_SUMMON (7)** - Summon a player to your location
- **OPERATOR_DISABLE_ATTACK (8)** - Disable a player's ability to attack
- **OPERATOR_ENABLE_ATTACK (9)** - Enable a player's ability to attack
### Chat Types
- **GENERAL_CHAT (1)** - General zone chat
- **PRIVATE_CHAT (2)** - Private message
- **PARTY_CHAT (3)** - Party chat
- **FORCE_CHAT (4)** - Commander chat
- **SHOUT_CHAT (5)** - Shout (zone-wide)
- **KNIGHTS_CHAT (6)** - Clan chat
- **PUBLIC_CHAT (7)** - Public chat
- **WAR_SYSTEM_CHAT (8)** - War system announcements
- **PERMANENT_CHAT (9)** - Permanent chat
- **END_PERMANENT_CHAT (10)** - End permanent chat
- **MONUMENT_NOTICE (11)** - Monument notices
- **GM_CHAT (12)** - GM chat
- **COMMAND_CHAT (13)** - Command chat
- **MERCHANT_CHAT (14)** - Merchant chat
- **ALLIANCE_CHAT (15)** - Alliance chat
- **ANNOUNCEMENT_CHAT (17)** - Server announcements
- **SEEKING_PARTY_CHAT (19)** - Party seeking chat
- **GM_INFO_CHAT (21)** - GM info window
- **COMMAND_PM_CHAT (22)** - Commander PM
- **CLAN_NOTICE (24)** - Clan notices
- **KROWAZ_NOTICE (25)** - Krowaz notices
- **DEATH_NOTICE (26)** - Death announcements
- **CHAOS_STONE_ENEMY_NOTICE (27)** - Chaos stone enemy notices
- **CHAOS_STONE_NOTICE (28)** - Chaos stone notices
- **ANNOUNCEMENT_WHITE_CHAT (29)** - White announcement chat
- **CHATROM_CHAT (33)** - Chat room chat
- **NOAH_KNIGHTS_CHAT (34)** - Noah Knights chat
- **ALLIANCE_NOTICE (35)** - Alliance notices
Network Packets (WIZ_)
### Core Packets
- **WIZ_LOGIN (0x01)** - Account login
- **WIZ_NEW_CHAR (0x02)** - Create character
- **WIZ_DEL_CHAR (0x03)** - Delete character
- **WIZ_SEL_CHAR (0x04)** - Select character
- **WIZ_SEL_NATION (0x05)** - Select nation
- **WIZ_MOVE (0x06)** - Movement
- **WIZ_USER_INOUT (0x07)** - User enter/leave zone
- **WIZ_ATTACK (0x08)** - Attack action
- **WIZ_ROTATE (0x09)** - Character rotation
- **WIZ_NPC_INOUT (0x0A)** - NPC enter/leave zone
- **WIZ_NPC_MOVE (0x0B)** - NPC movement
### Game State Packets
- **WIZ_HP_CHANGE (0x17)** - HP update
- **WIZ_MSP_CHANGE (0x18)** - MP/SP update
- **WIZ_EXP_CHANGE (0x1A)** - Experience update
- **WIZ_LEVEL_CHANGE (0x1B)** - Level/stat update
- **WIZ_LOYALTY_CHANGE (0x2A)** - National points update
- **WIZ_POINT_CHANGE (0x28)** - Stat point allocation
- **WIZ_STATE_CHANGE (0x29)** - Sit/stand state
- **WIZ_DEAD (0x11)** - Death notification
- **WIZ_REGENE (0x12)** - Regeneration
### Item & Trade Packets
- **WIZ_ITEM_MOVE (0x1F)** - Item movement in inventory
- **WIZ_ITEM_DROP (0x23)** - Drop item on ground
- **WIZ_ITEM_GET (0x26)** - Pick up item
- **WIZ_ITEM_TRADE (0x21)** - Item trade
- **WIZ_ITEM_REPAIR (0x3B)** - Item repair
- **WIZ_ITEM_UPGRADE (0x5B)** - Item upgrade
- **WIZ_ITEM_REMOVE (0x3F)** - Remove item
- **WIZ_DURATION (0x38)** - Item durability
- **WIZ_WAREHOUSE (0x45)** - Warehouse access
- **WIZ_MERCHANT (0x68)** - Merchant mode
- **WIZ_SHOPPING_MALL (0x6A)** - Shopping mall
### Social Packets
- **WIZ_CHAT (0x10)** - Chat messages
- **WIZ_PARTY (0x2F)** - Party system
- **WIZ_FRIEND_PROCESS (0x49)** - Friend system
- **WIZ_KNIGHTS_PROCESS (0x3C)** - Clan system
- **WIZ_EXCHANGE (0x30)** - Item exchange
- **WIZ_KISS (0x66)** - Kiss/emote
### Event & Quest Packets
- **WIZ_NPC_EVENT (0x20)** - NPC interaction
- **WIZ_OBJECT_EVENT (0x33)** - Object interaction
- **WIZ_CLIENT_EVENT (0x52)** - Client event
- **WIZ_MAP_EVENT (0x53)** - Map event
- **WIZ_QUEST (0x64)** - Quest system
- **WIZ_EVENT (0x5F)** - General event
### System Packets
- **WIZ_LOGOUT (0x0F)** - Logout request
- **WIZ_ZONE_CHANGE (0x27)** - Zone change
- **WIZ_WARP (0x1E)** - Teleport
- **WIZ_WARP_LIST (0x4B)** - Warp list
- **WIZ_TIME (0x13)** - Game time
- **WIZ_WEATHER (0x14)** - Weather
- **WIZ_NOTICE (0x2E)** - Server notice
- **WIZ_VERSION_CHECK (0x2B)** - Version verification
- **WIZ_COMPRESS_PACKET (0x42)** - Compressed data
### Special Packets
- **WIZ_KING (0x78)** - King system
- **WIZ_SIEGE (0x6D)** - Castle siege
- **WIZ_MATCHMAKING (0x92)** - Matchmaking system
- **WIZ_GENIE (0x97)** - Genie system
- **WIZ_ACHIEVE (0x99)** - Achievements
- **WIZ_PREMIUM (0x71)** - Premium service
- **WIZ_RENTAL (0x73)** - Item rental
- **WIZ_PET (0x76)** - Pet system
- **WIZ_BIFROST (0x7B)** - Bifrost event
- **WIZ_PVP (0x88)** - PvP system
- **WIZ_VIPWAREHOUSE (0x8B)** - VIP warehouse
## Database System
### Database Tables
- **USER_DATA** - User account and character data
- **KNIGHTS** - Clan/Knights information
- **KNIGHTS_USER** - Clan membership
- **KING_SYSTEM** - King election and treasury
- **ITEM_TABLE** - Item definitions
- **MAGIC_TABLE** - Skill/magic definitions
- **ZONE_INFO** - Zone configuration
- **START_POSITION** - Starting positions
- **EVENT** - Event scheduling
- **MONSTER_CHALLENGE** - Dungeon challenge data
### Database Agent (DBAgent)
- Handles all database communication
- Stored procedure calls
- User data persistence
- Real-time data synchronization
## Magic & Skill System
### Skill Types
- **Attack Skills** - Direct damage skills
- **Buff Skills** - Stat enhancement buffs
- **Debuff Skills** - Stat reduction
- **Transformation Skills** - Character transformation
- **Healing Skills** - HP/MP restoration
- **Party Buffs** - Area of effect buffs
### Special Buffs
- **BUFF_TYPE_KAUL_TRANSFORMATION** - Transforms to Kaul (pig), prevents /town and attack, increases defense
- **Siege Weapon Buffs** - Special buffs for siege transformations (MORAL_SIEGE_WEAPON)
- **Scroll Buffs** - Stat scrolls (HP, MP, AC, AP, etc.)
## Lua Scripting System
### Script Pool
- Multi-threaded Lua script execution
- Pool of 4 script instances for concurrent execution
- Round-robin script selection
- Located in `./Quests/` directory
### Script Usage
- Quest system
- Event triggers
- NPC dialogues
- Custom game logic
## Clan/Knights System
### Clan Features
- Clan creation and management
- Clan ranks (Leader, Vice Leader, Officer, Member, Trial)
- Clan notice system
- Clan points and ranking
- Alliance system (up to 2 clans)
- Clan cape customization
### Clan Commands
- Clan creation
- Clan invitation
- Clan promotion/demotion
- Clan expulsion
- Clan disbandment
- Alliance formation
## King System
### King Elections
- Weekly nomination period
- Voting system
- Election results
- Senator selection
### King Powers
- Tax rate adjustment (0-100%)
- Weather control
- Event activation (EXP, Noah bonuses)
- Prize distribution from treasury
- Global notices
- Territory tariffs
### Treasury System
- National treasury management
- Tax collection
- Prize distribution
- Treasury synchronization
## PvP System
### PvP Zones
- Open PvP in Ronark Land, Ardream
- Battle zones with scheduled wars
- Arena zones for duels
- Castle Siege War in Delos
### PvP Features
- Rival system
- Anger gauge (5 deaths to fill)
- Helmet indicators for anger level
- Death notices with coordinates
- Revenge/avenge system
## Event System
### Scheduled Events
- Border Defense War (30 minutes)
- Chaos Dungeon (20 minutes)
- Juraid Mountain (40 minutes)
Forgotten Temple
- Lost Temple
- Monster Stone events
### Event Rewards
- National points (NP)
- Experience points
- Coins/Noah
- Special items
- Ranking rewards
## Recent Improvements (v1534)
### Bug Fixes
- Fixed Lua compilation errors (LUAI_BITSINT, LUA_IEEEENDIAN)
- Implemented siege-weapon buff support
- Added NPC skill verification for arrow skills
- Implemented transformation duration saving
- Added stat reset/recalculation on transformation end
- Applied transformation stat bonuses (HP/MP/AC)
- Optimized party gold distribution
- Optimized clan status updates (region to clan members only)
- Implemented Delos/CSW spawn logic
- Refactored Lua engine for concurrent script execution
### New Features
- King event database persistence
- Merchant error codes for invalid positions
- Zone-specific kick messages
- Packet count placeholder fixes
### Performance Optimizations
- Single-loop party member collection
- Clan-specific message routing
- Database update optimization for King events
Build Requirements
### Compiler
- Microsoft Visual Studio (C++)
- C++11 or later
### Dependencies
- Windows SDK
- ODBC (for database connectivity)
- Lua 5.1+ (scripting)
### Database
- Microsoft SQL Server
- Required stored procedures
## Configuration Files
### Server Configuration
- Database connection settings
- Server port configuration
- Zone settings
- Event schedules
- King system settings
### Client Compatibility
- Knight Online v1534 client
- Packet structure compatibility
- Resource file requirements
## Security Features
### Anti-Cheat
- Speed hack detection (WIZ_SPEEDHACK_CHECK)
- HackShield integration (WIZ_HACKSHIELD_GUARD)
- Program verification (WIZ_PROGRAMCHECK)
- Attack validation
- Movement validation
### GM Protection
- Operator authentication
- GM chat channels
- GM invisibility
- GM summoning abilities
## Known Limitations
### TODO Items
- Quest zone ID logic implementation (file encoding issues)
- UDP communication for multi-server synchronization (requires infrastructure)
- Letter system caching optimization (requires cache implementation)
- Base class refactoring for region methods (architectural change)
### Database Requirements
- Transformation fields in USER_DATA table
- UPDATE_USER_DATA stored procedure updates
- King event persistence tables
## Credits
This is a Knight Online private server source code (v1534) based on the official game server implementation. It includes all core systems for running a complete Knight Online game server.
## License
This source code is provided for educational purposes. Knight Online is a trademark of its respective owners.
---
**Note**: This README provides an overview of the game server source. For detailed implementation information, refer to the specific source files and comments within the code.

Download:

Unfortunately, you cannot access this item because it violates our Terms of Service.
You can find more information about this in the Google Drive Help Center.
 
Anasayfa Kayıt ol Giriş yap
Üst Alt