• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Java [v178] Swordie Source + named v178.1 IDB

Newbie Spellweaver
Joined
May 8, 2023
Messages
5
Reaction score
9
This is a release of the public Swordie v176 source that I've updated to v178 for fun - was able to learn a lot about RE and server emulator development. There are a bunch of files moved around compared to the Swordie v176 source which I used as a base, because I thought the placement was more fitting. Big credits to the v176 authors for the stable base nonetheless.

Setup Guide for Swordie v176 should mostly work, except the Database is replaced with MariaDB. Use the addresses provided below on your authhook or redirector of choice for the NGS and CRC bypass. "WebStart <account name> ..." should also work if your authhook includes NMCO hooks.

Provided IDB has ~2k named functions + CTS. For functions not in KMST, either a very reasonable guess for the actual name or a SCREAMING_CASE name is used.

The v178 Update includes the new UI, removal of min/max crit, auction house and most of the 5th job content :

Server Files:
Unpacked EXE:
v178.1 IDB:

Edit:
Please replace the opcode for AUTH_SERVER in OutHeader.java to 49, otherwise connecting with GameLaunching will not work properly (thanks trufflechip)

Release Notes:
Code:
Opcodes should mostly be correct - OutHeader.java has been checked using IDA and InHeader.java should be trivial to fix if something is wrong. There are some naming / spelling changes compared to v176 though.
Cash Shop - cash shop sql has been cleaned up and categories are changed up, implemented missing functions like gifting, favourites, inventory expansion, beauty previews, surprise boxes, etc.
Auction House - implemented with some basic testing, but probably best to do some more extensive testing.
Quest - some tutorials are fixed, implemented Ellinel Fairy Academy questline
Skill - only got up to mechanic, but the fixes are based on v176 so all classes will need to be checked again. CTS should be mostly correct, TemporaryStatManager and MobTemporaryStat classes have been rewritten.
Bosses - haven't really touched, but there are some general mob fixes.
Misc - fixed cash trading, minigames, couple/friendship rings, no-lag inventory sort, and various random features. I've also updated the dependencies and some performance fixes (not that it was running slow on my machine).


Useful Memory Patches for v178.1
Code:
#define JMP_REL8    0xEB

// NGS bypass
patch_ret_zero(0x01E55A10);
// CRC bypass
patch_jmp(0x01ED5CE9, 0x01ED5D80);

// logo skip
patch_jmp(0x00F6DA50, 0x00F6B320);

// remove gender lock
patch_jmp(0x0096C134, 0x0096C1B2);

// chat cooldown bypass
patch_byte(0x00A329F1, JMP_REL8);
// chat repeat bypass
patch_byte(0x00A32932, JMP_REL8);

DWORD chatlogLimit = 10000;
if (chatlogLimit == 0) {
    patch_byte(0x019CCF3C, JMP_REL8);
    patch_byte(0x019CCF67, JMP_REL8);
} else {
    patch_dword(0x019CCF41, chatlogLimit);
    patch_dword(0x019CCF6C, chatlogLimit);
}
// disable profanity filter
patch_ret_zero(0x012FECE0); // CCurseProcess::ProcessString

// do not open UI windows in CWvsContext::OnEnterGame
patch_nop(0x01EAC655, 0x01EAC65A); // CUIQuestAlarm
patch_nop(0x01EAC65A, 0x01EAC65F); // CUIGrowthHelper
patch_nop(0x01EACC0D, 0x01EACC12); // CUIMileage
patch_nop(0x01EA4A60, 0x01EA4A65); // ^ but in CWvsContext::OnGameStageChanged

// no delay pickup
patch_byte(0x01EBF333, 0); // CWvsContext::SendDropPickUpRequest

// skip CWvsContext::CheckQuestCompleteByMeso call in CWvsContext::OnDropPickUpMessage
patch_jmp(0x01F27465, 0x01F27C42);

// skip IsPossibleTradingItem check in CDraggableItem::PutItem(CDraggableItem*, CCashTradingDlg*, int, int)
patch_byte(0x00B3FD7C, JMP_REL8);
 
Last edited:
Initiate Mage
Joined
Nov 16, 2023
Messages
2
Reaction score
0
Thanks for the release, I've been having an issue importing the SQL files as several of them have foreign key constraints. I'm not very experienced in SQL, would you be able to lend some assistance?

The errors I'm getting are:
#1005 - Can't create table `maplestory`.`characters` (errno: 150 "Foreign key constraint is incorrectly formed")
#1005 - Can't create table `maplestory`.`cs_favorites` (errno: 150 "Foreign key constraint is incorrectly formed")
#1005 - Can't create table `maplestory`.`itemsbuylimit` (errno: 150 "Foreign key constraint is incorrectly formed")
 
Newbie Spellweaver
Joined
May 8, 2023
Messages
5
Reaction score
9
Thanks for the release, I've been having an issue importing the SQL files as several of them have foreign key constraints. I'm not very experienced in SQL, would you be able to lend some assistance?

The errors I'm getting are:
#1005 - Can't create table `maplestory`.`characters` (errno: 150 "Foreign key constraint is incorrectly formed")
#1005 - Can't create table `maplestory`.`cs_favorites` (errno: 150 "Foreign key constraint is incorrectly formed")
#1005 - Can't create table `maplestory`.`itemsbuylimit` (errno: 150 "Foreign key constraint is incorrectly formed")
You might need to clear your database and try again:

I just ran the snippet below and then the InitTables_characters.sql script, and it worked fine for me without errors.
SQL:
drop database swordie;
create database swordie;
use swordie;
 
Newbie Spellweaver
Joined
May 8, 2023
Messages
5
Reaction score
9
May I ask what version of MariaDB you are using?
I am using MariaDB 11.3.0 currently (I was probably using a slightly older version while developing since I started in June-ish).

JDBC connector version is 3.1.4.
 
Joined
Aug 8, 2007
Messages
471
Reaction score
82
Found the problem people are running into with Foreign key constraints. Turns out some tables are being created before other tables for reference via Foreign Keys. Simply modifying set FOREIGN_KEY_CHECKS = 1; to set FOREIGN_KEY_CHECKS = 0; will solve this problem.
 
Last edited:
Newbie Spellweaver
Joined
May 2, 2020
Messages
40
Reaction score
3
I am using MariaDB 11.3.0 currently (I was probably using a slightly older version while developing since I started in June-ish).

JDBC connector version is 3.1.4.
Can you make a detailed guide to set it up? please
 
Last edited:
Newbie Spellweaver
Joined
May 8, 2023
Messages
5
Reaction score
9
Can you make a guide to set it up? please
Please follow the Swordie v176 setup guide, but instead of installing MySQL server, download and install MariaDB server from here:


You can download v178.1 client using steam depot, I think this is the correct version but please correct me if I'm wrong:


Also use the attached AuthHook if you want, this is just Poki's v176 AuthHook with the addresses for NGS/CRC bypasses and StringPool functions updated for v178.1. Don't forget to update the opcode for AUTH_SERVER in OutHeader.java to 49.
 

Attachments

You must be registered for see attachments list
Joined
Aug 8, 2007
Messages
471
Reaction score
82
Please follow the Swordie v176 setup guide, but instead of installing MySQL server, download and install MariaDB server from here:


You can download v178.1 client using steam depot, I think this is the correct version but please correct me if I'm wrong:


Also use the attached AuthHook if you want, this is just Poki's v176 AuthHook with the addresses for NGS/CRC bypasses and StringPool functions updated for v178.1. Don't forget to update the opcode for AUTH_SERVER in OutHeader.java to 49.
That depot downloader is correct :) That's the one I used.

dotnet DepotDownloader.dll -app 216150 -depot 216151 -manifest 3307347299510572626 -username insert_steam_username_here -password insert_steam_password_here

example:

dotnet DepotDownloader.dll -app 216150 -depot 216151 -manifest 3307347299510572626 -username user1234 -password password1234
 
Back
Top