SROCodex
ironsro

What runs here

The server behind this site next to the one the game shipped with — which of its jobs we do, which we do differently, and which we do not do at all.

verified: partialSR_GameServer.exe — embedded strings and PDB paths (the appendix)game/, lib/play/, lib/sro/ — the code this page describes

Walking around and fighting on this site is a real server answering, not an animation. This page says what that server is, and where it is and is not the one the game shipped with. The marks are the section's usual ones: Game, Ours, Missing.

Two processes, and what each does

The original ran a small farm: a gateway to take your login, an agent to run the world you are standing in, a download server, and managers above them. Here there are two.

What it is What it does
The site The pages you are reading Everything you can read without playing: items, monsters, skills, maps, the planner. It owns the accounts
The game server A separate process on its own port The world you walk in and the fights you open. It holds no pages and opens no database at all

That second line is the important one. The fight server is handed everything it needs — your character's numbers, your belt, the monster's row, the ground — in a signed slip when you connect, and looks nothing up afterwards. It is why a fight cannot quietly disagree with the page that opened it, and why nothing you do in a fight can reach your account.

The wire is the game's own · Game

What travels between your browser and the game server is real Silkroad packets, the same numbered messages the original client and server exchange, carried inside WebSocket frames. Walking, spawning, casting, being hit, drinking, statuses landing and falling off — all of it is the shard's own vocabulary, and the reader that decodes it in your browser is a port of the client's own.

That is a deliberate cost. It would have been easier to invent a small JSON protocol; then the fight and the world would have needed two different implementations, and the browser two ways of being told the same thing.

Where our server is deliberately not theirs · Ours

The original Here
Logging in A gateway process, a shard list, a queue A signed ticket from the site, which does the gateway's one useful job: check who you are and hand out a token
Encryption Blowfish, a checksum and a sequence, negotiated at the handshake None of it. The handshake asks for a plain connection — a flag the real client itself supports — and the encryption comes from the browser's own HTTPS instead
The two halves A gateway server, then a separate agent server Both answered on one connection: after the login exchange the same socket introduces itself again as the world server
Being logged in twice The shard's business One account, one character in the world. The seat is taken at the login step, because the two exchanges leave a gap a second window used to slip through

A consequence worth stating plainly: because there is no security layer, the real game client cannot connect to this. The protocol is the game's; the handshake is not. This is a server for a browser, not a private shard.

What we simply do not run · Missing

No trade, no jobs, no guilds, no parties, no shops that take your money, no mail, no fortress war, no persistence of a world between visits. The pages list all of those because the shard's tables describe them; the server implements none of them. What it implements is walking, looking, and fighting a monster.

For anyone opening the binary

Everything below is the reference this page stands on: the class names, debug strings, config switches and table names recovered from the original server's own files. It is a map of their server, kept because it is what our reading is checked against — it is not a description of ours.

Damage Calculation

Core Class

  • CFormulae (singleton) - main damage calculation class
  • Source: D:\WORK2005\Source\SilkroadOnline\Server\SR_GameServer\Formulae.cpp
  • Config option: ShowFormulaDetail (enables detailed formula logging)

Known Debug Strings

  • ResultDamage is under PhyAttackPoint's 5%% - damage validation check (damage cannot be less than 5% of physical attack)
  • [HANDLE_ATTACK-KeepUp] Name:%s,SkilID:%d,DeafultID:%d - attack handling log
  • sDamageReturnData - damage return/reflect data
  • sTargetHitResult - target hit result
  • sSingleHitResult - single hit result
  • sHitResult - overall hit result
  • sHawkAttackData - hawk attack data (pet)
  • sSiegeQuestAccumulateDamage - siege quest accumulated damage
  • AccumulateDamage - general damage accumulation

Attack States

  • MOTIONSTATE_HIT - being hit
  • MOTIONSTATE_COUNTERATTACK - counter-attacking
  • MOTIONSTATE_STUN - stunned
  • MOTIONSTATE_KNOCKDOWN - knocked down
  • MOTIONSTATE_FROZEN - frozen
  • MOTIONSTATE_SKILL_KNOCKBACK - knockback skill

Item Attributes (NATTR_*)

NATTR_DUR      - Durability
NATTR_PDSTR    - Physical Defense (STR-based)
NATTR_MDINT    - Magical Defense (INT-based)
NATTR_PD       - Physical Defense
NATTR_MD       - Magical Defense
NATTR_ER       - Evasion Rate
NATTR_PASTR    - Physical Attack (STR-based)
NATTR_MAINT    - Magical Attack (INT-based)
NATTR_HR       - Hit Rate
NATTR_PA       - Physical Attack
NATTR_MA       - Magical Attack
NATTR_CRITICAL - Critical hit chance
NATTR_BR       - Block Rate
NATTR_PAR      - Physical Attack Rating
NATTR_MAR      - Magical Attack Rating
MATTR_DEC_MAXDUR    - Decrease Max Durability
MATTR_NOT_REPARABLE - Not repairable

Magic Options on Items

reinforce +%d%%      - Reinforcement level bonus
anti-burn +%d%%      - Anti-burn protection  
critical +%d         - Critical bonus
block rate +%d       - Block rate bonus
resist stun +%d%%    - Stun resistance

Enchant/Alchemy Classes

  • CEnchant - Base enchant class
  • CEnchant_EnchantAttrStone - Attribute stone enchanting
  • CEnchant_EnchantMagicStone - Magic stone enchanting (blue stats)
  • CEnchant_EnchantAvatarItem - Avatar item enchanting
  • CEnchant_Reinforce - Plus (+) reinforcement
  • CEnchant_UpperReinforce - Advanced reinforcement
  • CEnchant_SocketMaker - Socket creation
  • CEnchant_SocketStoneInserter - Socket stone insertion
  • CEnchant_SocketStoneEraser - Socket stone removal
  • CAlchemyMagicOptionOP - Alchemy magic option operations
  • CSetMagicOptionOP - Set magic option operations
  • AlchemyMeritOp - Alchemy merit operations

Enchant Success Rate

  • Avatar Item is 100% rate success. Because _SumSuccessRatio() funcion was return 100L
  • Avatar Item is 100% rate success. Because _GetTotalSuccessRatio() funcion was return 100L

Movement System

Configuration

  • PCSpeedRatio - Player character speed multiplier

Movement States (MOTIONSTATE_*)

MOTIONSTATE_STAND           - Standing still
MOTIONSTATE_WALK            - Walking
MOTIONSTATE_RUN             - Running
MOTIONSTATE_JUMP            - Jumping
MOTIONSTATE_SIT             - Sitting
MOTIONSTATE_SWIM            - Swimming
MOTIONSTATE_RIDE            - Riding mount/transport
MOTIONSTATE_PAO             - ???
MOTIONSTATE_SKILL           - Skill casting
MOTIONSTATE_SKILL_ACTIONOFF - Skill action off
MOTIONSTATE_CHANGEMOTION    - Changing motion state
MOTIONSTATE_SKILL_PROTECTIONWALL - Protection wall skill
  • ITEM_ETC_E051123_SPEED_UP_SCROLL - Speed up scroll
  • ITEM_EVENT_RETURN_SCROLL_HIGH_SPEED - High-speed return scroll

Teleport System

  • Classes: CRefTeleport, CRefOptionalTeleport
  • Table: _REFTELEPORT, _REFOPTIONALTELEPORT
  • Gates: INS_TEMPLE_TELEPORT, INS_TEMPLE_SETH_TELEPORT
  • NPCs: NPC_INS_EXIT_TELEPORT, NPC_SIEGE_DUNGEON_TELEPORT
  • Trigger: CGameTriggerAction_CREATEOBJECT_TELEPORT, CGameTriggerAction_SWITCH_TELEPORT
  • Path finding engine: PathFindEngine
  • NavMesh: RTNavMeshTerrain, RTNavMeshDungeon, RTNavMeshObj
  • Map loader: MapLoader
  • Region manager: RegionManagerBody

HP/MP System

Debug Log

  • Stat of %s >> Level: %d, Str: %d, Int: %d, HP: %d/%d MP: %d/%d

Potion/Consumable System

Classes: IsPotion, IsHPPotion, IsMPPotion, IsElixir, IsScroll, ConsumeHpMp

Items:

ITEM_ETC_HP_POTION_01, ITEM_ETC_HP_POTION_02     - HP potions
ITEM_ETC_MP_POTION_01, ITEM_ETC_MP_POTION_02     - MP potions
ITEM_ETC_HP_SPOTION_01, ITEM_ETC_MP_SPOTION_01   - Small potions
ITEM_ETC_ALL_POTION_05, ITEM_ETC_ALL_SPOTION_01  - All (HP+MP) potions
ITEM_QSP_ALL_POTION_1_01                         - Quest potion
ITEM_MALL_SKILL_RESTORATION_POTION               - Skill restoration potion

Potion NPCs:

  • NPC_EU_POTION, NPC_CA_POTION, NPC_CH_POTION, NPC_WC_POTION, NPC_KT_POTION

Scroll Items

ITEM_ETC_E051123_HP500_SCROLL            - 500 HP scroll
ITEM_ETC_E051123_MP500_SCROLL            - 500 MP scroll
ITEM_ETC_E051123_HIT_SCROLL              - Hit rate scroll
ITEM_ETC_E051123_EVATION_SCROLL          - Evasion scroll
ITEM_ETC_E051123_SPEED_UP_SCROLL         - Speed scroll
ITEM_ETC_E051123_AGILITY_SCROLL          - Agility scroll
ITEM_EVENT_DAMAGE_ABS_20P_SCROLL         - Damage absorption 20% scroll
ITEM_EVENT_DAMAGE_INC_20P_SCROLL         - Damage increase 20% scroll
ITEM_ETC_SCROLL_RETURN_01/02             - Return scrolls
ITEM_ETC_SCROLL_RETURN_NEWBIE_01         - Newbie return scroll
ITEM_ETC_GUILD_RECALL                    - Guild recall scroll

Stat System

Character Stats (from debug log)

Stat of %s >> Level: %d, Str: %d, Int: %d, HP: %d/%d MP: %d/%d

Stat Points

  • RemainStatPoint - Remaining stat points to distribute

Parameter System

  • Class: CParamKeeper (maintains all character parameters/buffs)
  • Source: GParamKeeper.cpp
  • CParamElementCategory - Parameter categories
  • ParamValue : %d, End Time : %d - Buff remaining time tracking

Party/Guild/Group System

Group Modes

GROUPMODE_SOLO              - Solo play
GROUPMODE_SOLOPARTY         - Solo party
GROUPMODE_SOLOPARTY_SETUP   - Solo party setup
GROUPMODE_PARTY             - Party
GROUPMODE_PARTY_SETUP       - Party setup

Party

  • Party Manager is successfully created
  • ExpRatioParty - Party experience ratio
  • Party Exp Gain Ratio: system default / Party Exp Gain Ratio: %d
  • ITEM_ETC_E060526_SUMMON_PARTY_SCROLL_A - Summon party member scroll
  • PARTYMONSTER_SPAWN - Party monster spawn
  • Party restrictions: NOTEXIST_PARTY_RESTRICTION_ATTACK, NOTEXIST_PARTY_RESTRICTION_EXP

Guild

  • Guild Manager is successfully created
  • Recall Guild[%s] To REGION[%d] POS[%.2f,%.2f,%.2f]
  • Invested %d SP to guild [%s]
  • Guild chest: _GUILDCHEST table
  • Guild war system: GuildWar Guild[%d,%d] ...

Alliance

  • Anohter Alliance guild is set in that index!! AllianceID[%d] GuildID[%d]

Item System

Database Tables

_ITEMS            - Main items table
_INVENTORY        - Character inventory
_CHEST            - Storage chest
_INVCOS           - COS (pet/transport) inventory
_INVENTORYFORAVATAR - Avatar inventory
_GUILDCHEST       - Guild chest
_OPENMARKET       - Open market (auction house)
_BINDINGOPTIONWITHITEM - Binding/alchemy options on items
_RENTITEMINFO     - Rental item information
_ITEMS (REFITEMID)     - Reference item ID

Item Magic Parameters

  • Item's MagParamNum(%d) is out of range - Max magic options per item
  • MAX_MAGPARAM_PER_ITEM - Maximum magic parameters constant

Storage Operations

Stored procedures:

_STRG_ADD_EXPENDABLE    - Add expendable item
_STRG_ADD_EQUIP_NORMAL  - Add normal equipment
_STRG_ADD_ITEM_MAGIC    - Add magic option item
_STRG_ADD_ALCHEMYSTONE  - Add alchemy stone
_STRG_ADD_SPECIALTY     - Add specialty item
_STRG_ADD_PACKAGEITEM   - Add package item
_STRG_DEL_ITEM          - Delete item
_STRG_MOVE_ITEM         - Move item between slots
_STRG_MERGE_ITEM        - Merge stackable items
_STRG_SPLIT_ITEM        - Split stackable items
_STRG_SWAP_ITEM         - Swap items
_STRG_BUY_CASHITEM_EXP           - Buy cash shop EXP item
_STRG_BUY_CASHITEM_EQUIP_NORMAL  - Buy cash shop equipment
_STRG_RESTORE_SOLDITEM_*         - Restore sold items

Item Types (TypeID fields)

The items_raw.txt file has columns: ID, CodeName128, NameStrID128, AssocFileObj128, TypeID1, TypeID2, TypeID3, TypeID4, ItemClass, ReqGender, ReqStr, ReqInt, ReqLevel1

Alchemy Items

ITEM_ETC_ARCHEMY_MAGICSTONE_LUCK_07/08/09        - Magic stones (luck grades)
ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_WEAPON_B       - Weapon reinforce recipe
ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_SHIELD_B       - Shield reinforce recipe
ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_ARMOR_B        - Armor reinforce recipe
ITEM_ETC_ARCHEMY_REINFORCE_RECIPE_ACCESSARY_B    - Accessory reinforce recipe
ITEM_ETC_ARCHEMY_RONDO_01/02                     - Rondo (lucky powder)
ITEM_ETC_ARCHEMY_ELEMENT_                        - Element stones

Alchemy Database Tables

_REFALCHEMYMERIT     - Alchemy merit table
_REFDROPCLASSSEL_ALCHEMY_ATTRSTONE
_REFDROPCLASSSEL_ALCHEMY_MAGICSTONE
_REFDROPCLASSSEL_ALCHEMY_TABLET
_REFDROPCLASSSEL_REINFORCE

Trade/Job System (Thief/Hunter/Merchant)

Job Types

  • Trader - Merchant trader
  • Hunter - Hunter (protects traders, kills thieves)
  • Thief (from NPCs: NPC_TD_THIEF_SELL, NPC_TD_THIEF_BUY)

Trijob System

  • TrijobMgr.cpp - Tri-job manager
  • _OldTrijobData, _TrijobReward
  • Trijob Reward Received: %u gold
  • Trader Contributed to hunter guild: %u gold
  • Trader Registered, TradeRisk: %d

Trade System

  • CTradeMgr - Trade manager
  • TradeMgr.cpp - Source file
  • P2P trading: trade_p2p
  • TRADE_SAFETY_NUM - Trade safety number
  • Exchange(): exchange bay corrupted!
  • It has been detected to abuse trade (char_name: %s)

Monster System

Monster Data (from items_raw tables)

Format: ID, CodeName, NameStrID, AssocFileObj, Lvl, MaxHP, MaxMP

Monster AI States (CAIState_*)

CAIState_IDLE     - Idle
CAIState_WANDER   - Wandering
CAIState_BATTLE   - In combat
CAIState_FLEE     - Fleeing
CAIState_HOMING   - Returning home
CAIState_MOVING   - Moving to target
CAIState_EMOTION  - Emoting
CAIState_HOLDON   - Holding position
CAIState_FOLLOW   - Following
CAIState_WATCHOUT - Alert/watchful
CAIState_PATROL   - Patrolling
CAIState_PENDING  - Pending/waiting
CAIState_PICKITEM - Picking up items
CAIState_AUTOCOMMAND - Auto-commanded
CAIState_DEAD     - Dead
CAIState_SPAWN    - Spawning/being created
CAISTATE_CUSTOM_SPAWN_SUMMON_SHYTAN - Custom spawn (Shytan summon)

Monster Spawning

  • SpawnMonster[%s]-RegionXZ[%d, %d] PositionXYZ[%0.2f, %0.2f, %0.2f]
  • CEDA_ObjSpawner - Object spawner
  • GiantMonster_SpawnRatio - Giant/unique monster spawn ratio
  • MOB_TQ_WHITESNAKE - Unique monster reference

Monster Aggro

  • MONSTER_AGGRO_LINK_DECREASE_RATIO - Aggro link decrease rate
  • PARTYMONSTER_SPAWN - Party monster spawn

Monster Drop Tables (database)

_REFMONSTER_ASSIGNEDITEMDROP        - Assigned item drops per monster
_REFMONSTER_ASSIGNEDITEMRNDDROP     - Random item drops per monster
_REFCUSTOMIZINGRESERVEDITEMDROPFORMONSTER - Custom reserved drops
_REFDROPITEMGROUP                   - Drop item groups
_REFDROPGOLD                        - Gold drop amount
_REFDROPOPTLVLSEL                   - Drop option level selection
_REFDROPITEMASSIGN                  - Drop item assignment

Monster Drop Class Selection

_REFDROPCLASSSEL_EQUIP      - Equipment drops
_REFDROPCLASSSEL_RAREEQUIP  - Rare equipment drops
_REFDROPCLASSSEL_RECOVER    - Recovery item drops
_REFDROPCLASSSEL_CURE       - Cure item drops
_REFDROPCLASSSEL_AMMO       - Ammo drops
_REFDROPCLASSSEL_SCROLL     - Scroll drops
_REFDROPCLASSSEL_REINFORCE  - Reinforce item drops
_REFDROPCLASSSEL_ALCHEMY_TABLET
_REFDROPCLASSSEL_ALCHEMY_MAGICSTONE
_REFDROPCLASSSEL_ALCHEMY_ATTRSTONE

Experience System

Configuration

ExpRatio         - Individual experience ratio (from server.cfg)
ExpRatioParty    - Party experience ratio (from server.cfg)

Experience Buff

  • Mentor/Mentee system
  • SR_MENTOR_ACTIVATE_EXP_BUFF_REQ/ACK - Mentor experience buff
  • ExpBuff system exists
  • CTrainingCamp::MemberGraduated Mentor's ExpBuff

Experience Events

OnChangeExpRatioEvent CHANGE_EXP_RATIO_EVENT_START (%f)
OnChangeExpRatioEvent CHANGE_EXP_RATIO_EVENT_STOP

Experience Ratio Log

  • Individual Exp Gain Ratio: system default / Individual Exp Gain Ratio: %d
  • Party Exp Gain Ratio: system default / Party Exp Gain Ratio: %d

Skill System

Skill Manager

  • AQ_SkillManager - Skill async query manager
  • exec _skill_manage %d, %d, %d, %d - Skill management stored procedure
  • Insert Skill is Invalid!! [SkillID:%d][Lvl:%d]
  • Insert Skill Info [SkillName:%s][Lvl:%d]
  • Erased Skill is Invalid!! [SkillID:%d][Lvl:%d]
  • Erased Skill Info [SkillName:%s][Lvl:%d]

Skill Data Structures

sSkillMastery          - Skill mastery data
sSkill                 - Skill data
sSkillActorData        - Skill actor data
sAfterEngageSkillActor - After-engage skill actor
sLinkSkillData         - Linked skill data (skill chains)
sSkillActor            - Skill actor
sSkillRecoveryStatus   - Skill recovery/cooldown status
sBowShotResult         - Bow shot result

Skill Types

  • Immediate / Passive skills
  • Buff / Debuff skills
  • EngagedDeadSkill - Skill that triggers on death
  • SKILL_OP_HARMONY_A_01 - Harmony skill (bard)
  • SKILL_BATTLE_ARENA_FLAG_GET_01 - Battle arena flag skill
  • SKILL_CH_FORTRESSWEAPON / SKILL_EU_FORTRESSWEAPON - Fortress weapons

Skill Conditions

  • CheckSkillPreEngageCondition() - Pre-engagement condition check
  • Skill cancellation conditions: Sleep, StoneSkill
  • ReqWeapon Error [RefSkill ID: %d] - Weapon requirement check

Base Skills (Level 1 auto-learn)

SKILL_PUNCH_01
SKILL_CH_SWORD_BASE_01
SKILL_CH_BOW_BASE_01
SKILL_CH_SPEAR_BASE_01
SKILL_EU_SWORD_BASE_01
SKILL_EU_TSWORD_BASE_01
SKILL_EU_AXE_BASE_01
SKILL_EU_CROSSBOW_BASE_01
SKILL_EU_DAGGER_BASE_01
SKILL_EU_HARP_BASE_01
SKILL_EU_WAND_WARLOCK_BASE_01
SKILL_EU_STAFF_BASE_01
SKILL_EU_WAND_CLERIC_BASE_01

Skill Reference Tables

_REFSKILL          - Skill definitions
_REFSKILLMASTERY   - Skill mastery data
TAB_REFAISKILL     - AI skill table

COS (Pets/Transport) System

COS Types

  • COS - Creations of Silkroad (pets/mounts)
  • Pet: GObjCOS_Pet.cpp
  • Transport/Horse: GObjCOS.cpp

COS States

  • Enter_Limit_Condition_Ride_Cos_Riding / Not_Riding
  • On OBJ_RIDESTATE_RIDE state ride cos is null!!!

COS Storage

  • _InvCOS table - COS inventory
  • _CharCOS table - Character's COS list
  • Pet Detail Information queries

COS Items (from event items)

ITEM_EVENT_COS_C_SCARABAEUS_SCROLL
ITEM_EVENT_COS_C_WILDPIG_SCROLL
ITEM_EVENT_COS_C_OSTRICH_SCROLL
ITEM_EVENT_COS_C_PEGASUS_SCROLL

COS Spawned NPCs

NPC_CH_HORSE, NPC_WC_HORSE, NPC_KT_HORSE, NPC_EU_HORSE, NPC_CA_HORSE

PvP System

Battle Arena

  • BattleArenaRandom / BattleArenaParty / BattleArenaGuild / BattleArenaJob
  • ArenaMatchOccupy / ArenaMatchFlag / ArenaMatchPoint
  • BattleArena : Level Info %d, LV %d
  • REF_TELEPORT_BATTLE_ARENA_A_GATE / B_GATE

Flag War (CTF)

NPC_EVENT_FLAGWAR_FLAP_FLAGPOLE_WHITE
NPC_BATTLE_ARENA_FLAGWAR_FLAP_FLAGPOLE_WHITE
NPC_BATTLE_ARENA_FLAGWAR_FLAGPOLE_WHITE

PvP Modes

  • FORCE_PVP_VOUCHER - Force PvP voucher system
  • ENTER_LIMIT_CONDITION_FRPVP_VOUCHER_PUT_ON/TAKE_OFF

Fortress/Siege System

Fortress Siege

  • SiegeFortressMgr.cpp - Siege fortress manager
  • Fortress structs: towers, gates, pulleys
  • STRUCTURE_GATE_PULLEY_HT_01 / CT_01/02/03/04 - Gate pulleys
  • Siege quests with accumulated damage tracking
  • sSiegeQuestAccumulateDamage

Fortress Database Tables

_SIEGEFORTRESSSTRUCT     - Fortress structures
_SIEGEFORTRESSOBJECT     - Fortress objects
_SIEGEFORTRESSBATTLERECORD - Battle records
_SIEGEFORTRESSSTONESTATE  - Stone state
_SIEGEFORTRESSITEMFORGE   - Item forge

Fortress Stored Procedures

_SiegeFortressFinished
_SiegeFortressTempFinished
_UpdateSiegeFortressTaxRatio
_SiegeFortressTaxCollect
_SiegeFortressHireNPC
_SiegeFortressEngageBlessBuff
_SiegeFortressEntryDungeon
_SiegeFortressRequestSiege

Configuration Values (from server.cfg)

ExpRatio:             15000    (15x exp rate)
ExpRatioParty:        17500    (17.5x party exp)
DropItemRatio:        0,1      (1x drop rate - format: "0,1" = 1)
DropGoldAmountCoef:   10000    (10x gold drop)
ExtraExpRatio:        0.1      (from ShardManager)
HourForMeterRateLevelFirst:  22
HourForMeterRateLevelSecond: 23
SET_FEE_RATE:          "0,5,5,5"    (market fees)
SELL_FEE_RATE:         "0,10,10,10" (market sell fees)

Evangelion.dll Custom Settings

Character level cap:        configurable
Pet level cap:              configurable  
Character mastery cap:      configurable
Exchange gold limit:        configurable
Stall gold limit:           configurable
Disable dumps:              YES/NO (crash dump control)
Fix rates:                  YES/NO (rate fixing)
Disable green book:         YES/NO (skill book requirement)
Disable MSG:                YES/NO
Disable Log:                YES/NO (disable log DB calls)
SpoofIP:                    YES/NO (cert packet IP spoofing)
Guild/job arena win reward count
Guild/job arena loose reward count
Random/party arena win reward count
Random/party arena loose reward count
Capture the flag reward count

Source File Structure

Key Source Files (from debug strings)

Game Server Core (SR_GameServer):

Formulae.cpp               - Damage/combat formulas
GObj.cpp                   - Game object base
GObjChar.cpp               - Character object
GObjPC.cpp                 - Player character
GObjMob.cpp               - Monster object
GObjNPCNPC.cpp            - NPC object
GObjSiegeStruct.cpp       - Siege structures
GObjCOS.cpp               - COS (pet/transport)
GObjCOS_Pet.cpp           - Pet specific
GItem.cpp                  - Item object
GItemEquip.cpp            - Equipment items
GItemExpendable.cpp       - Expendable/consumable items
GParamKeeper.cpp          - Parameter/buff manager
GStorage.cpp              - Storage (inventory)
GStorageOP.cpp            - Storage operations
SocketOptionOP.cpp        - Socket option operations

Skill & AI:

SkillGlobal.cpp           - Skill system
AITactics_ExtRoutine.cpp  - AI tactics
AIHive.cpp                - AI hive

Systems:

TradeMgr.cpp              - Trade manager
TrijobMgr.cpp             - Tri-job (thief/hunter/merchant)
FleaMarket.cpp            - Flea market / stall
SiegeFortressMgr.cpp      - Siege fortress manager
EventDaemon_Action.cpp    - Event system

Server Common (ServerCommon):

ReferenceData.cpp         - Reference data loading
RefItemDrop.cpp           - Item drop reference data
RefInstanceGenerator.cpp  - Instance generator
ShardDB.cpp               - Shard database
ShopApp.cpp               - Shop application

Reference Database Tables (complete list)

_REFREGION              - Region/world data
_REFLEVEL               - Level definitions
_REFCLIMATE             - Climate/weather
_REFCHARGEN             - Character generation
_REFOBJCOMMON           - ALL object common data (items, mobs, NPCs)
_REFOBJITEM             - Item-specific data
_REFOBJCHAR             - Character-specific data
_REFOBJSTRUCT           - Structure/building data
_REFMAGICOPT            - Magic option definitions
_REFMAGICOPTASSIGN      - Magic option assignments
_REFMAGICOPTGROUP       - Magic option groups
_REFSETITEMGROUP        - Set item groups
_REFTELEPORT            - Teleport gates
_REFTELELINK            - Teleport link data
_REFEVENTZONE           - Event zones
_REFEVENT               - Events
_REFQUEST               - Quests
_REFHWANLEVEL           - Hwan level (mastery)
_REFGAME_WORLD          - Game worlds/instances

Shop System:

_REFSHOP                - Shops
_REFSHOPGROUP           - Shop groups
_REFSHOPTAB             - Shop tabs
_REFSHOPTABGROUP        - Shop tab groups
_REFSHOPGOODS           - Shop goods/items
_REFSHOPOBJECT          - Shop objects (NPCs)
_REFSHOPITEMSTOCKPERIOD - Shop item stock periods
_REFMAPPINGSHOPGROUP    - Shop group mappings
_REFMAPPINGSHOPWITHTAB  - Shop-to-tab mappings
_REFTREATITEMOFSHOP     - Treatment items
_REFACCESSPERMISSIONOFSHOP - Shop access permissions

Package System:

_REFPACKAGEITEM
_REFSCRAPOFPACKAGEITEM
_REFREWARDPOLICYTOSELLPACKAGEITEM
_REFREWARDPOLICYTOBUYSCRAPITEM
_REFCONDITIONTOSELLPACKAGEITEM
_REFCONDITIONTOBUYSCRAPITEM
_REFREWARDPOLICYTOSELLSCRAPITEM
_REFCONDITIONTOSELLSCRAPITEM
_REFPRICEPOLICYOFITEM

Event/Instance:

_REFCHARDEFAULT_QUEST
TAB_REFHIVE
TAB_REFTACTICS
TAB_REFNEST
TAB_REFAISKILL

Server Process Architecture

Process States

MSG_PROCSTATE_NORMAL      - Normal processing
MSG_PROCSTATE_BLOCKED     - Blocked (loading/waiting)
MSG_PROCSTATE_OVERLAPPED  - Overlapped I/O

Entry Limit Conditions

ENTER_LIMIT_CONDITION_ENTRY
ENTER_LIMIT_CONDITION_PARTY
ENTER_LIMIT_CONDITION_GAME_WORLD_ASSIGNED
ENTER_LIMIT_CONDITION_JOB_CLOTHES_PUT_ON
ENTER_LIMIT_CONDITION_JOB_CLOTHES_TAKE_OFF
ENTER_LIMIT_CONDITION_LEVEL_MINIMUM_NUM
ENTER_LIMIT_CONDITION_LEVEL_MAXIMUM_NUM
ENTER_LIMIT_CONDITION_MAX_LEVEL_MINIMUM_NUM
ENTER_LIMIT_CONDITION_MAX_LEVEL_MAXIMUM_NUM
ENTER_LIMIT_CONDITION_ENTRY_MAXIMUM_NUM
ENTER_LIMIT_CONDITION_RIDE_COS_RIDING
ENTER_LIMIT_CONDITION_RIDE_COS_NOT_RIDING
ENTER_LIMIT_CONDITION_TRADE_COS_RIDING
ENTER_LIMIT_CONDITION_TRADE_COS_NOT_RIDING
ENTER_LIMIT_CONDITION_FRPVP_VOUCHER_PUT_ON
ENTER_LIMIT_CONDITION_FRPVP_VOUCHER_TAKE_OFF
ENTER_LIMIT_CONDITION_TEMPLE_ASSOCIATION
ENTER_LIMIT_CONDITION_TEMPLE_ASSOCIATION_MINIMUM_NUM
ENTER_LIMIT_CONDITION_TEMPLE_ASSOCIATION_RATE_MERCHANT_HUNTER
ENTER_LIMIT_CONDITION_TEMPLE_ASSOCIATION_RATE_THIEF

Stored Procedures (complete list from GameServer)

_ADDLOGCHAR              - Log character actions
_ADDLOGSIEGEFORTRESS     - Log siege fortress
_ADDLOGITEM              - Log item actions
_AddLogServerEvent       - Log server events
_AddLogSchedule          - Log scheduled events
_DelExpiredRentItemInStorage - Delete expired rental items
_GET_USER_GOLD           - Get user gold
_GET_GUILD_GOLD          - Get guild gold
_STRG_MOVEITEM_NEW       - Move item between storages
_AddNewCOS               - Create new COS (pet/transport)
_DeleteCharCOS           - Delete character's COS
_ChangeCOSState          - Change COS state
_COS_Naming              - Name a COS
_Guild_Master_Election_Available - Check guild master election
_CharInstanceWorldDataUpdate     - Update instance world data
_Bind_Option_Manager     - Manage binding options
_OpenMarket_Insert       - Insert market listing
_OpenMarket_Receipt      - Receipt for market
_OpenMarket_Cancle       - Cancel market listing
_OpenMarket_Purchase     - Purchase from market
_OpenMarket_Update       - Update market listing
_AddSiegeFortressObject  - Add siege object
_SiegeFortressStructInsert - Insert siege structure
_STRG_ADD_LINKED_STORAGE - Add linked storage
_UPDATE_USER_N_CHAR_GOLD - Update user and char gold
_UPDATE_GUILD_N_CHAR_GOLD - Update guild and char gold
_UPDATE_CHAR_GOLD_FOR_GUILDCHEST - Update char gold for guild chest
_Rent_Info_Manager       - Manage rental info
_QueryOldTrijobInfo      - Query old trijob info
_CanAssignThisNickName   - Check nickname availability
_AssignNickName          - Assign nickname
_STRG_ADD_PACKAGEITEM_WITH_STOCKQUANTITY - Add package item
_STRG_ADD_PACKAGEITEM    - Add package item
_skill_manage            - Skill management
_AddTrijobReward         - Add trijob reward
_DeleteOldTrijobData     - Delete old trijob data
_GetOldTrijobData        - Get old trijob data
_InsertCharTrijobSafeTradeData - Insert trijob safe trade
_DeleteCharTrijobSafeTradeData - Delete trijob safe trade
_InsertQuestinCharByName - Insert quest for character
_InsertEndQuestinCharByName - Complete quest
_ResetQuestByCharName    - Reset quest
_RemoveQuestByCharName   - Remove quest
_DeleteGPHistory         - Delete GP history
_Memo_Delete             - Delete memo
_SiegeFortressFinished   - End fortress siege
_SiegeFortressTempFinished - End temp fortress siege
_SiegeFortressTaxCollect - Collect fortress tax
_SiegeFortressHireNPC    - Hire fortress NPC
_SiegeFortressEngageBlessBuff - Engage bless buff
_SiegeFortressEntryDungeon    - Enter fortress dungeon
_SiegeFortressRequestSiege    - Request fortress siege
_ADDTIMEDJOB             - Add timed job
_ADDTIMEDJOBFORPET       - Add timed job for pet

File Formats in Project

3D Models

  • .bsr - Binary model file (reference from items/monsters tables)
  • .ddj - Skeleton/animation data
  • .bms - Mesh data (binary)
  • .bsk - Skeleton data
  • .ban - Animation data
  • .bmt - Material/texture data

Game Data Files (in pk2_extractor/)

  • .pk2 - Joymax archive format (like ZIP)
  • .nvm - Terrain/navmesh data
  • skilleffect.txt - Skill effects (binary format, encrypted?)
  • textdata_equip&skill.txt - Equipment and skill text data (binary?)
  • textdata_new.txt - Updated text data (binary?)

Map Data Files (in project root)

  • <ySec>/<xSec>.m - terrain heightmap, tiles and water (3,850 files)
  • <ySec>/<xSec>.o, .o2 - object placements, same format (3,850 and 3,707)
  • <ySec>/<xSec>.t - tile/texture map (3,951)
  • mapinfo.mfo - Map information
  • object.ifo, objectstring.ifo - Object information
  • tile2d.ifo - 2D tile information