L2Off / PTS

Link and create L2Off accounts

Match portal account verification to the pack's authentication daemon

Account verification lets a player prove that a game account belongs to them. It is required for account linking. Account creation is optional. Both must use the exact password transform and blocking rules used by your auth daemon.

Configure the account database

Accounts normally live in the database named by hAuthD.ini under [MSSQL], often lin2db. Configure [database.account] when that is separate from the world database.

The generated verification query joins user_auth and user_account with an INNER JOIN, matching the daemon. An account present in only one table must not be accepted. pay_stat = 0 is blocked, not unpaid.

Choose the password format

Read these values from the hAuthD.ini used by the running login service:

hAuthD.inipasswordFormatCompared column
MD5Simple = 0, SHA1 = 0l2offuser_auth.password
MD5Simple = 1md5simpleuser_auth.password
SHA1 = 1sha1user_auth.password
unrecognized behaviorunknownnone

unknown disables account verification and creation instead of guessing. If both MD5Simple and SHA1 are enabled, the daemon uses MD5Simple.

Set the ANSI codepage

The retail transform produces bytes that the Windows auth host widens into an nvarchar column. Set [account].codepage to the ANSI codepage of the machine running hAuthD—not the connector host and not SQL Server's collation.

Run on the hAuthD host
(Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage').ACP

Common values are 1252 for Western European hosts, 1251 for Cyrillic hosts, and 1250 for Central European hosts.

Do not guess the codepage

A mismatch rejects most or all correct passwords and can create accounts that look valid in SQL but cannot log in. Use passwordFormat = "unknown" when the daemon behavior is not understood.

hAuthD MD5Password

When [Ext] MD5Password is not 0, copy its key into [account].md5Key. The connector then checks user_auth.md5password when populated and falls back to password otherwise, matching hAuthD. Retail AuthD ignores this column, and changing the key makes existing digests unusable.

Create accounts

A retail game account requires one row in user_auth and one in user_account. The connector runs the two generated inserts in one transaction. Keep pay_stat = 1, and never supply uid because it is an identity column.

Verify

  1. Run Connector check with the name of a known test account.
  2. Link it using the correct password.
  3. If creation is enabled, create another account through the portal.
  4. Log into the game through character selection with that new account.

Connector check can prove that the query runs. Only a real game login proves that password format, codepage, and account inserts agree with the daemon.

On this page