Creating a Local Private Server for Botting Education & Fun

All resolved question will be found here. It is recommended that you browse / search through this section first and see if your question has been answered before

Moderators: Moderators, Documentation Writers

Message
Author
WhiteGoblin
Noob
Noob
Posts: 8
Joined: 09 Mar 2019, 17:02
Noob?: No

Creating a Local Private Server for Botting Education & Fun

#1 Post by WhiteGoblin »

Intro:
Hello everybody! Been botting RO for decades at this point, taking breaks here or there of course but always coming back. Use to help run the KoreRO server back when that was a thing. Before the old forums got wiped I had tons of support guides / posts up. My last run was up until iRO introduced EAC and since then my whole guild has sat inactive. LOL! I gotta say it's nice to see progress still getting put into this project after all these years. I return today because I want to teach my children the magic of scripting, botting, and nerding out. Plus it never hurts to hook them while they're young to more advanced concepts and projects that can grow with them. When I think back about the most fun things I've done, games I've played, things I'd like to share with others; botting RO is pretty high up there.

I think the overall aesthetic is still appealing enough that I could get the family playing it. The key though is to let them experience the grind a little, actually attach to the game first. Then when things start getting rough, introducing OpenKore to them. That's when the education hidden as a video game begins! Hopefully the evil plot to make the youths smarter takes off and they start reading the wiki everyday on their own. It took me a long time to get a whole guild of bots working with each other, fake talking to each other, and in general playing the game well enough to avoid detection at the higher end. I really hope someday they take it to this level on their own. Though in this instance they don't need the stress or worry of admins banning them or other players griefing them because they feel cheated. I also want to encourage exploration of the concept without fear of getting caught. Sure it takes some excitement away but this is educational, risk need not apply.

I'm (so far) attempting to do this via Anacondaq's Offline Newbie Pack 2022. The whole process of setting up your own local server could not be simpler, you launch Laragon then you launch the Hercules server emulator. Done. You can pick if you want pre-renewal, renewal, or the new 4th job class hotness with everything modern. Drag and drop some files to mod the kRO client and the game opens right up. The only problem is I cannot get the bot to connect. Which is what I've spent all my free time lately attempting to do on my own before coming to you guys asking for help. Pretty embarrassing, many years ago I once felt in sync with this community and a part of it. Now I'm struggling to do this basic task, getting old. :mrgreen:

The Problem & What I've Tried:
Okay so, newest version of the bot, fires up, hits the server, throws "Packet Tokenizer: Unknown switch: 0AC4" directly after logging in. Alright, seen this before, no big deal just need to extract recvpackets so the bot can communicate properly. ...and that's where I'm having trouble. He has 2019-06-05fRagexe in the package for the Renewal experience, which I'm going to use since it's what I'm most familiar with personally. (he also noted the 4th job server wasn't completely stable yet so currently avoiding it thanks to that) The problem is out of all the tools (JCV's RO Tools, Packet Extractor, PEv3, Peek, etc) none of them will actually work properly. I'm assuming because the executable is already protected / patched. I tried using the ones that came in the kit (patched) as well the original versions for the dates listed on the executables. (which I found on Nemo's Full Client List) Nothing either way.

I've searched what I feel to be the entirety of the public discussion on this that I can find via google. The only thing I'm aware to do next is attempt to unpack the executables and frankly I'm not sure how. I found one guide claiming I needed to get a basic understanding in how to use OllyDbg, which I'm aware already is over my head. I’d need to watch some helluva tutorials as I’m not hip enough to know how to use an assembler level analyzing debugger. :geek: Moving on I've tried reaching out to Anacondaq's Discord Server for advice. I was hoping the man himself might have some input but I tried contacting him a while back about this and he was not happy to hear a request for anything to do with OpenKore. So far my questions in his chat have gone unanswered so I'm expanding my search for a helping hand to here even though the forums are a bit dated. Once this is posted I'll drop a link in the OpenKore Discord as well.

Possible Solutions:
Outside of one of you wizards coming in and providing the quick fix, there's only a couple paths I know of moving forward. First, keep at trying to figure out how to generate the required recvpackets file. Maybe somebody could point me in the right direction. Since it's an offline localhost server there's no security that I'm aware of. (what would be the point?) The other solution would be to boot an earlier version of RO with a client that’s already been developed for. As much as I’d like to have all the new content and bug fixes, it’s not required for this to work with the kids as an educational experience. Even the versions of the game I use to play pre-EAC on iRO where plenty functional and in depth enough for trying to hook / teach them. This might be the easiest possible path to success. If this is the case, then I'll have to learn how to build my own server instead of using the super easy n00b friendly prepackaged solution.

I'm really looking forward to hearing from you guys on how to move forward. I'm not scared of putting in the effort I'm just not sure how to best spend it currently. All advice is welcomed! Also, thank you in advance for your time! Side note: I really miss the KoreRO server. You'd think a whole server of dedicated botters would be boring but it had a great community and was lots of fun. I lost touch with everybody before it went offline. If anyone is still around from that era hit me up! /cheers

User avatar
4epT
Developers
Developers
Posts: 617
Joined: 30 Apr 2008, 14:17
Noob?: No
Location: Moskow (Russia)
Contact:

Re: Creating a Local Private Server for Botting Education & Fun

#2 Post by 4epT »

show your settings from servers.txt
All my posts are made by machine translator!
¤ Manual ¤ Anti BotKiller ¤ Packet Extractor v3 ¤
Image
Image

WhiteGoblin
Noob
Noob
Posts: 8
Joined: 09 Mar 2019, 17:02
Noob?: No

Re: Creating a Local Private Server for Botting Education & Fun

#3 Post by WhiteGoblin »

4epT wrote:
20 Feb 2022, 10:59
show your settings from servers.txt
Okay so I followed the Connectivity Guide, here's a picture of my WPE cap for the included exe. With this information I changed the servers.txt to match:

Code: Select all

[Localhost]
ip localhost
port 6900
private 1
master_version 0
version 55
serverType kRO_RagexeRE_2009_11_04a
serverEncoding Western
addTableFolders translated/kRO_english;kRO
You can see the serverType isn't correct and there isn't one available by that date. As per the serverType Wiki page, "If there is no file with exact compilation date, try the ones near to that date, or the latest available." When switching serverType to "kRO_RagexeRE_2020_03_04a" it changes the Packet Tokenizer Unknown Switch from "0AC4" (Account Info With Server Info) to "0AE3" (OTP Token Received). I'm not sure how to move forward with this information. There is no one time password system on the server. (atleast that I'm aware, it's not required to use the included client) Regardless I tried adding: "OTP_ip localhost" & "OTP_port 6900" but it didn't change the outcome.

I appreciate the help 4epT! I do understand it's tiresome trying to help noobs out all the time. Thank you!

WhiteGoblin
Noob
Noob
Posts: 8
Joined: 09 Mar 2019, 17:02
Noob?: No

Re: Creating a Local Private Server for Botting Education & Fun

#4 Post by WhiteGoblin »

TL;DR: Intro:
Okay finally had some time over the weekend to get back on this project. Given there's been no further input from anyone here or in Discord I've decided to try and build my own server. I went for one of the latest versions OpenKore appears to be fully supporting to hopefully avoid any recvpacket / serverType issues. (2020_04_01b) This has been a learning curve and I've sank some real hours into this. As it stands right now I've got a rAthena server up & running packet version 20200401 with packet obfuscation disabled & pincode disabled. (screenshot)

I've got a fully updated kRO client diffed and hexed to 2020-04-01b. (screenshot) This connects and is fully playable, zero problems. (screenshot) Made sure to disable all protections with Nemo when patching so that I could properly cap it with WPE. (ex: no hide packets, disabled cheat defender game guard, etc) (screenshot) Confirmed bot is loading "tables\kRO\RagexeRE_2020_04_01b\recvpackets.txt" on boot. (screenshot) Though every time I launch, I'm getting the "Cannot load server message parser for server type 'kRO'." error. (screenshot) I'm guessing I've configured something wrong at this point but I'm not sure what. I've changed my servers.txt to reflect this version as much as I'm aware how to. (screenshot) Any help nudging me in the right direction would be super appreciated. :lol:

The Process So Far:
For anyone else wanting to do this or just following along, here's what I've been up too. First you'll need to download the following:

1.) MS Visual Studio (link) (compiling)
2.) rAthena (link) (server emulation)
3.) Laragon Portable (link) (databases)
4.) kRO Client (link) (full client)
5.) RO Patcher Lite (link) (updating client)
6.) RO OpenSetup (link) (client settings)
7.) ROenglishRE (link) (translation)
8.) 2020-04-01bRagexe (link) (clean version matched client)
9.) Nemo (link) (patching client)
10.) OpenKore (link) (automation client)
11.) Winsock Packet Editor (link) (client sniffing) (password: openkore)

Then you'll need to do the following:

1.) Install Microsoft Visual Studio 2022 Community Edition. It's roughly 9-10gb in size for the whole package so be prepared.
2.) Extract rAthena.
2.a) Open: "\rathena-master\conf\char_athena.conf", change "pincode_enabled" to "no".
2.b) Open: "\rathena-master\conf\login_athena.conf", change "new_account" to "yes".
2.c) Open: "\rathena-master\src\config\packets.hpp", comment out all of the packet obfuscation section.
2.d) Open: "\rathena-master\src\custom\defines_pre.hpp", add "#define PACKETVER 20200401".
2.e) Open: "\rathena-master\", create a new "compile.bat" file that contains:

Code: Select all

@echo off
"C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe"
pause
Note: your install location might be different. Adjust accordingly.

2.f) Execute compile.bat. Wait for it to finish. Check to make sure it's error free at end.
3.) Extract Laragon Portable.
3.a) Open Laragon. Click Menu. Expand MySQL. Click "Start MySQL".
3.b) Click Database. Click "Open" in the new window. Click "manage user authentication and privileges" in the top bar. (screenshot)
3.c) Click "Add". Change username to "ragnarok". Change password to "ragnarok". Check "Global Privileges" box. Click "Save". Click "Close".
3.d) Right click "Laragon" on the top of the left column. Expand "Create new". Click "Database". Enter name "ragnarok". Click OK.
3.e) Click "ragnarok" in the left column. Go to "File" in the top left. Expand and click "Run SQL File". Direct to "\rathena-master\sql-files\main.sql". Click "Open". (let finish)
3.f) Repeat the last step but with "\rathena-master\sql-files\logs.sql" this time. Click "Open". (let finish)
3.g) Click "refresh" in the top bar. (screenshot)
4.) Extract kRO Client.
4.a) Extract RO Patcher Lite into "\kRO_FullClient_20210406\client".
4.b) Execute "rsu-kro-rag-lite-x64.exe" and wait for it to finish updating the client.
4.c) Extract ROenglishRE.
4.d) Copy the "data" & "System" folders as well the "GuildTip.txt" & "tipoftheday.txt" files from ROenglishRE into "\kRO_FullClient_20210406\client".
4.e) Extract Nemo.
4.f) Open Nemo. Look for "Input Exe File" at the bottom. Click "Browse". Direct towards "2020-04-01bRagexe.exe".
4.g) Look for "Output Patched" at the bottom. Click "Browse". Direct towards "\kRO_FullClient_20210406\client\2020-04-01bRagexe_patched.exe".
4.h) Create a new "profile.txt" file (any location) that contains:

Code: Select all

3 Chat Flood Remove Limit
9 Disable 1rag1 type parameters (Recommended)
14 Disable Hallucination Wavy Screen (Recommended)
16 Disable Swear Filter
20 Extend Chat Box
21 Extend Chat Room Box
22 Extend PM Box
23 Enable /who command (Recommended)
24 Fix Camera Angles (Recommended)
32 Increase Zoom Out Max
34 Enable /showname (Recommended)
35 Read Data Folder First
36 Read msgstringtable.txt (Recommended)
38 Remove Gravity Ads (Recommended)
39 Remove Gravity Logo (Recommended)
41 Disable Nagle Algorithm (Recommended)
44 Translate Client (Recommended)
46 Use Normal Guild Brackets (Recommended)
47 Use Ragnarok Icon
48 Use Plain Text Descriptions (Recommended)
49 Enable Multiple GRFs (Recommended)
50 Skip License Screen
53 Use Ascii on All LangTypes (Recommended)
64 @ Bug Fix (Recommended)
65 Load Custom lua file instead of iteminfo*.lub (Recommended)
73 Remove Hourly Announce (Recommended)
74 Increase Screenshot Quality
88 Allow space in guild name
90 Enable DNS Support (Recommended)
213 Disable Help Message on Login (Recommended)
215 Increase Map Quality
216 Hide Cash Shop
230 Always load Korea ExternalSettings lua file (Recommended)
231 Remove hardcoded address/port (Recommended)
232 Restore old login packet (Recommended)
244 Disable Cheat Defender Game Guard (Recommended)
248 Remove wrong chars from cash shop
270 Change AchievementList*.lub path
272 Change Towninfo*.lub path
274 Change Tipbox*.lub path
275 Change CheckAttendance*.lub path
276 Change OngoingQuestInfoList*.lub path
277 Change RecommendedQuestInfoList*.lub path
278 Change PrivateAirplane*.lub path
279 Fix item description bug
280 Change guild exp limit
284 Copy patched Cheat Defender Game Guard
289 Fix Homunculus attack AI
313 Change MapInfo*.lub path
322 Case-Insensitive Storage Search
326 Disable OTP Login Packet (Recommended)
328 Enable 44.1 kHz Audio Sampling Frequency
334 Remove Hardcoded HTTP IP
338 Additional client validation (Recommended)
348 Send client flags to server (Recommended)
351 Translate arrows buttons text from korean to english
362 Fixes the Korean Job name issue with LangType (Recommended)
404 Use borderless mode in full screen (Recommended)
416 Fix Tetra Vortex
427 Check is servertype in xml file was set to correct value (Recommended)
4.i) Click the "Load Client" button at the bottom. Click the "Load Profile" button to the right of it. Select & open the "profile.txt" file just created.
4.j) As each change path prompt appears, make sure to edit them following ROEnglishRE's structure. EXAMPLE: "System/iteminfo_true.lub" becomes "System/itemInfo_EN.lua", "system\achievement_list.lub" becomes "system\achievement_list_EN.lub", etc. (you should have 60 enabled patches when finished)
4.k) Click "Apply Selected". Close Nemo.
4.l) Extract RO OpenSetup into "kRO_FullClient_20210406\client".
4.m) Execute "opensetup.exe". Change the Client to match your wants/needs. (resolution, etc)
5.) Go to "\rathena-master", execute "runserver.bat".
5.a) As it begins to load three separate Windows Firewall prompts will pop up. Allow access for each of them. (these are the three parts of the rAthena emulator loading)
5.b) After it finishes (this could take a bit depending on your computer) go to "\kRO_FullClient_20210406\client" and execute "2020-04-01bRagexe_patched.exe".
5.c) At the login screen type "yourname_M" or "yourname_F" (male or female) to make a new account on the server. You need to enter a password as well. (123456, is used in my screenshots above)
5.d) Make a new character. Login. Relax! Take a break! Listen to PMJ! Play RO! w00t congrats major milestone has been achieved you're up and running. Now close the client so we can move on.
6.) Extract Winsock Packet Editor (WPE). Allow the executable if Windows Defender or your anti-virus software flags it.
6.a) Using "WPE PRO - modified.exe" follow the Openkore Wiki Connectivity Guide to obtain master version & version number. (screenshot)
6.b) Extract OpenKore.
6.c) Go to "\openkore-master\tables" then open "servers.txt". Find "[Localhost]" server towards the bottom.
6.d) Change "addTableFolders translated/kRO_english;kRO" to "addTableFolders kRO/RagexeRE_2020_04_01b;translated/kRO_english;kRO"
6.e) Change serverType kRO_RagexeRE_2009_11_04a" to "serverType kRO_RagexeRE_2020-04-01b"
6.f) Change "version 20" to "version 128"
6.g) Change "master_version 1" to "master_version 0". Save file.
6.h) Go to "\openkore-master" and execute "wxstart.exe".
6.i) Select "localhost" in the server listing that pops up. (wait while it processes maps)
6.j) Enter Username & Password for account created previously in step 5.c. DO NOT include the _M or _F, that's only for new account registration.
6.k) Cry at your desk as "Cannot load server message parser for server type 'kRO'." pops up and ruins your big moment. (screenshot)
6.l) Return to OpenKore forums, confess to being a noob, ask for help. (hi)

Moving Forward:
...and that's where I'm at right now. I'm sure there's something I'm forgetting to do here. Though after an entire weekend spent on this I'm a bit tired and hoping somebody can point me in the right direction. I want to believe that outside of setting up the server with better security (like changing all the default user/pass) I'm pretty close to golden on this. I mean the game plays great with the patched client & is running the correct packet version. I shouldn't need to generate a recvpackets file because there's already one included with Openkore for this version. I just need to figure out how to get the bot connecting to it. Any advice is more then welcome! Thanks for your time.

WhiteGoblin
Noob
Noob
Posts: 8
Joined: 09 Mar 2019, 17:02
Noob?: No

Re: Creating a Local Private Server for Botting Education & Fun

#5 Post by WhiteGoblin »

Update:
Making progress! You wouldn't believe what my problem was before, clearly as stated I was pretty tired because I made a super n00b mistake. Look at step 6.e and you'll notice I have dashes instead of underscores. :oops: Yeah you fix that and all a sudden we're moving right along. First because I hadn't defined a charBlockSize, it threw this error. No biggie, I tossed in 155 & 175 just to test it and w00t we're in with both! They kinda fumble on the received characters from character server, seems to do that a bunch before actually logging in.

Though once it does it immediately starts attacking mobs, I even gained a level. Sadly it's completely broke when I walk into Izlude, can't calculate routes for most of the map. Doesn't place warp portals in the correct areas. When you bring up the map it thinks you're in the middle of the water. Here's screenshot 1 & screenshot 2 of the progress. Clearly I've still got something wrong here, going to have to figure out how to find the correct charBlockSize. Though I wanted to come back and update the thread so others could follow along. I'd appreciate it if anyone who's in-depth on this could suggest how to move forward from here. /cheers

WhiteGoblin
Noob
Noob
Posts: 8
Joined: 09 Mar 2019, 17:02
Noob?: No

Re: Creating a Local Private Server for Botting Education & Fun

#6 Post by WhiteGoblin »

Alright guys we've sealed the deal on this one!! Victory is mine! :ugeek: :lol:

So yeah pretty simple fix here at the end. For the next guy coming in trying to figure this out, all you gotta do is go to "\openkore-master\fields". You'll notice they have a bunch of folders in there labelled by episode number. (Screenshot) You're going to want to take all the files out of each of those episodic folders and override the ones currently in your fields folder. This way the bot can understand the map layouts of the newer content. I've never had to do this before so surprise that's new to me. Here's a screenshot of everything loaded up while successfully navigating Izlude!

Couple notes: While both 175 and 155 for charBlockSize let you login, you're going to want to use 155. In my short testing I noticed using 175 would result in errors. Example: check my last screenshot, you'll notice it's reporting a base level of 28265. LOL!! If you're following my post trying to set this up yourself then I also fudged up the kRO client a bit in my instructions. There is a couple more things you need to change / do to get a cleaner client with proper translation. Nothing major, if you're at all paying attention you'll probably notice them. There is a lot of server optimization and security I'm currently missing as well. What can I say this is the quick and dirty guide to success. :mrgreen:

Now that I know this is completely doable I'm going to go back and work on polishing up the experience. Like making an x-kore compatible client, adding in proper credentials for the server / databases, using more of Laragon, etc. Once I've tested things more thoroughly and added some shine I'll start introducing the little ones to the game. It's been quite the educational journey for me so I already consider this project a win. If the kids get into it and start learning openkore then it'll make it even better. Not much to say other then that. I just really hope other people out there find this public struggle of mine useful. I'll try and double back on the guide aspect of this thread at some point in the future and fully update / correct it.

/cheers everybody!

jgodyb
Noob
Noob
Posts: 1
Joined: 17 Jul 2017, 01:29
Noob?: No

Re: Creating a Local Private Server for Botting Education & Fun

#7 Post by jgodyb »

holy shit dude congrats. thats alot of work. will try some of your solution in our server here in the Philippines. GGH. Kudos!

WhiteGoblin
Noob
Noob
Posts: 8
Joined: 09 Mar 2019, 17:02
Noob?: No

Re: Creating a Local Private Server for Botting Education & Fun

#8 Post by WhiteGoblin »

This thread is now out of date and contains erroneous information. Please check the full updated guide: https://forums.openkore.com/viewtopic.php?f=9&t=333763. :ugeek:

Tchaly
Noob
Noob
Posts: 2
Joined: 27 Aug 2009, 10:04
Noob?: Yes

Re: Creating a Local Private Server for Botting Education & Fun

#9 Post by Tchaly »

Well done guys !!

Tchaly

Locked