Jump to content

Search the Community

Showing results for tags 'server'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Russian Section
    • Новости и объявления
    • Пиратия: Документация
    • Пиратия: Релизы
    • Пиратия: Разработка
    • Пиратия: Web
    • Пиратия: Помощь
    • Совместные проекты / набор команды
    • Доска объявлений
    • Программирование
    • Оффтопик
    • Корзина
  • English Section
    • News & Announcements
    • Guides
    • Releases
    • Development
    • Web
    • Questions & Help
    • Shared Projects / Team search
    • Paid services & Requests
    • Programming
    • Offtopic
    • Recycle bin
  • Portuguese Section
    • Dúvidas & Ajuda
  • Spanish Section
    • Preguntas y Ayuda
  • Servers
    • Russian servers
    • English servers

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 82 results

  1. Открытие сервера состоится 08.01.2024 в 19:00 по мск времени! Игровой клиент будет доступен 06.01.2024 в 18:00 на нашем сайте в разделе загрузки Регистрация игровых аккаунтов будет доступна 08.01.2024 в 18:00 по мск времени Наш Сайт https://piratia-innovation.ru/ Наш Форум https://piratia-innovation.ru/forum/ Наш Дискорд https://discord.gg/7pSvZfyaxp Наша Группа ВК https://vk.com/piratia.innovation Описание сервера: Максимальный уровень персонажа - 1000 (Полностью переписан опыт за монстров и опыт для прокачки уровня, рейт самой прокачки зависит от многих факторов,за каждые 10 уровней дают 1 очко характеристик) Максимальный уровень феи - 1000(Рост х1000.Умная фея НЕ работает) Максимальный уровень корабля - 1000 Максимальная сила - 1000 Максимальная точность - 1000 Максимальное телосложение - 1000 Максимальная ловкость - 1000 Максимальный дух - 1000 Максимальная заточка - 120% РБ 1-5 p.s Часть контента на старте будет отключена,для того что бы игроки которые не смогли попасть на старт успели догнать остальных Города:(Внутри всех городов кроме Шайтана pvp зона) -Шайтан -Зимний Город -Зеленоград -Город Жизни Основные Локации(pvp) -Лабиринт -Логово -Хаос Шайтана -Снежные Войны -Арена -Поле Смерти -Пляж -Одинокая башня -Стужа -Долина Вулканов -Башня Зла -Лагерь Мёртвых Душ 1-3 -Покои Мертвых -Пустынные Руины -Небеса -Сад Эдель -Священые Войны -Пустынные Войны -Кладбище -Некрополис -Испытания -Испытание (1-9) -Вечное Испытание -Ад -Топь 1-3 -Залив Сокровищь -Шахты Шайтана 1-2 -Шахты Судьбы 1-2 -Шахты Зеленограда 1-2 -Пещера 1-3 -Церковь -Райский Остров -Некрополь -Чистилище -Край Авроры -Край Тьмы -Мировой Босс Шайтана -Мировой Босс Судьбы -Тюрьма -Остров Скорби -Остров Богатства -Остров Джека -Остров Стужи -Остров Купидона -Остров Хэллоуина -Остров Скорби -Остров Рыбаков -Остров Вулканов -Остров Драконов -Остров Любви -Остров Руин -Остров Пиратов -Остров Дурманов -Острова Зимы Самоцветы +3 +5 +7 +10 +15 +20 (Для продвинутых игроков) +25 +30 +35 +40 Самоцветы для плаща +1% к шансу выпадения предметов +3% к получению опыта +2% к регенерации здоровья +2% к регенерации маны +10 к скорости передвижения Нефриты(улучшены) Локи,бинги и прочие(улучшены) Экипировка 1-80(сундук новичка) 100 200 300 400 500 600 700 800 900 1000 Особенности: Баланс был изменён,и продолжает меняться,на сервере комфортно играть за любой класс,физ классы со временем не смогут превосходить маг классы У Бк и См призрачный удар после изучения срабатывает от обычного удара(не нужно вечно нажимать кнопку навыка) Маг урон по мобам увеличен(некоторые маг скилы по мобам так же имеют усиленный эффект) Скорость атаки в основном можно повысить лишь экипировкой Баланс хп\деф у мобов был подстроен под фарм как физов так и магов Полностью рабочая Филлис круз со всем шмотом и щитами(щиты можно аппарелить,так же они святятся при форже) Ланс может быть бк Ланс может быть см Филлис может быть Чемпионом Новые способности(путём прохождения ресета) Рб скилы стали "Ультой" для каждого класса,зависящей от общего развития персонажа Изменены все навыки(читайте описание у навыков) Изюминки: Перерисованные карты Новые объекты и текстуры Система улучшение сетов(нельзя перескочить или начать сразу с любого сета).При улучшении сетов форж остаётся! Система улучшения фей(1 фея + фрукт,всего 6 поколений.Чем выше поколение и уровень феи,тем больше бонуса характеристик и опыта при посехе) Фея сама прокачивается фруктами из 4 слота и кушает питание из 3 слота Эффекты от сетов(все вещи кроме оружия)по мимо ауры вы получаете бонусы в виде получения доп характеристик,усиления навыков, а так же поглощения урона в данжах,если вам персонаж занимающий топ 1-5 данжа Предметы в шахтах подбираются автоматически в сумку Экипировку можно улучшать спец свитками,добавляя ей характеристик! Система плаща,позволяющая вам качать его любыми статами,сколько вам угодно!(достать их не просто,шанс на улучшение 50%) Система улучшения Крылье и Аур(шанс улучшения 50%) Система репутации за убийство боссов и за квесты Открытая Арена внутри города Шайтан Умные комбайнеры Самоцветов Все самоцветы в расписках Нпс Маркет (рандомное количество сделок,с рандомным изначально заданным лутом и наградами,обновляется после каждой сделки) Зоны для прокачки У каждого типа монстров есть свой главарь Боссы делятся на 3 типа(ауры под ними подскажут) Свитки вызова призраков Автоматизированные данжи (без взаимодействия с нпс внутри,система сама будет выпускать монстров\боссов\давать квесты и понимать когда вы всех убили что бы продолжить) Историческая цепочка квестов Дополнительные квесты Ежедневные квесты Система Тюрьмы(для нарушителей правил сервера,а так же игроков использующих ботов для фарма(3 способа что бы выйти)) Ботоводов система автоматически сажает в тюрьму Система второго инвентаря на 48 ячеек для складирования карт с мобов и боссов Система лотерейных билетов Расходники имеют стак 20.000 Навыки через тренировку у нпс Мирные умения за квесты Система конвертации золота(если золота у персонажа превышает 1.8ккк,оно автоматически конвертируется в купюры и помещается во временный инвентарь) Битвы Гильдий за топ 1-2-3 Система Свадеб Система Лучших Друзей Система Трансформации персонажа Система Питомцев помогающих в бою Система раскопок Карт Сокровищь Система заточки предмета кристаллами без участия кузнеца(так же иметься обмен на кристалл заточки в 1 клик) Игровой Автомат Система Сундуков и Ключей Система отображения эффектов наложенных на персонажа Система отображения дропа с мобов Клиент устанавливается через наш установщик, и имеет исправную проверку файлов с возможностью докачки недостоющих файлов) Мирные умения -Рубка Дерева -Добыча Руды -Кулинария -Крафт -Рыбалка(с берега,используя удочку) -Ученичество(афк кач через книгу и студенческую карту)
  2. Was fooling around with the GM commands and created an item that is invalid (even though I got the id from my iteminfo.txt) Now when trying to log in I am getting an error and the game is closing. "item id in inventory is invalid game going to exit" I wonder if there is a way to manually delete that item from my inventory using the database manager, and if so, where (which database and which table?)
  3. [Tools] Program for editing GM commands This toolkit is intended for editing (renaming) GM commands in GameServer.exe (commands &) and GroupServer.exe (commands @@). A distinctive feature of the program is that it allows you to set new names for GM commands, both shorter and longer than the original names. For example, the &updateall command can be replaced with &upd, and the &move command with &letsmove. Usage The program is a console application and, accordingly, work with it occurs using the command line in the following form: pkodev.tool.editgmcmd <command> [command-specific parameters] First, the path to the executable .exe file of the program is specified, then the command is selected, and then its parameters are set. To be able to work with a specific target GameServer.exe or GroupServer.exe file, a GM command database file in the .json format is used. This file contains: 1) The name of the target .exe file; 2) The timestamp of its assembly (linker timestamp); 3) GM command character (for example, '&' or '@@'); 4) List of strings with GM command names and their addresses in the target .exe file. An example .json file with the GM-commands database can be found here. The toolkit currently supports (7) commands, which will be discussed next. 1. Command 'name' Display the current GM command name in the target .exe file. Parameters: --in "Path to target .exe file" --db "Path to .json file with GM commands database" (optional*) --old "Original GM command name" For example, the &updateall GM command was once renamed to the &updateall1024 GM command, then the command: pkodev.tool.editgmcmd.x64.Release name --in "GameServer.exe" --old "updateall" --db "pkodev.tool.editgmcmd.json" Will return the following result: The GM-command '&updateall' is defined as '&updateall1024'. 2. Command 'rename' Change the name of the GM command in target .exe file. Parameters: --in "Path to target .exe file" --db "Path to .json file with GM commands database" (optional*) --bp "Backup mode" (optional**) --old "Original GM command name" --new "New GM command name" Example: pkodev.tool.editgmcmd.x64.Release rename --in "GameServer.exe" --old "move" --new "letsmove" --db "pkodev.tool.editgmcmd.json" This will change the GM command &move to &letstmove. 3. Command 'reset' Reset all modified GM command names in target .exe file to the original ones. Parameters: --in "Path to target .exe file" --db "Path to .json file with GM commands database" (optional*) --bp "Backup mode" (optional**) Example: pkodev.tool.editgmcmd.x64.Release reset --in "GameServer.exe" --db "pkodev.tool.editgmcmd.json" Attention! As a result, all previously modified GM commands in the target .exe file will be replaced with the old (original) names. 4. Command 'enum' Output a list of all GM commands in target .exe file as a table to the console. Parameters: --in "Path to target .exe file" --db "Path to .json file with GM commands database" (optional*) Example: pkodev.tool.editgmcmd.x64.Release enum --in "GameServer.exe" --db "pkodev.tool.editgmcmd.json" For an approximate output result, see the image in the topic header. 5. Command 'supported' Print the list of supported target .exe files as a table to the console. Parameters: --db "Path to .json file with GM commands database" (optional*) Example: pkodev.tool.editgmcmd.x64.Release supported --db "pkodev.tool.editgmcmd.json" As a result of the command execution, a list of supported .exe files will be displayed in the console, for example: +------+------------------------------------------------+-----------------+------------------+ | # | Executable file name | Version | GM-commands | +------+------------------------------------------------+-----------------+------------------+ | 1.| GameServer.exe 1.36 (GAMESERVER_136) | 1204708785 | 53 | | 2.| GameServer.exe 1.38 (GAMESERVER_138) | 1225867911 | 53 | | 3.| GroupServer.exe 1.38 (GROUPSERVER_138) | 1224838510 | 8 | +------+------------------------------------------------+-----------------+------------------+ 6. Command 'check' Check if target .exe file is supported by the program. Parameters: --in "Path to target .exe file" --db "Path to .json file with GM commands database" (optional*) Example: pkodev.tool.editgmcmd.x64.Release check --in "GameServer.exe" --db "pkodev.tool.editgmcmd.json" Result: GameServer.exe 1.38 (GAMESERVER_138) (Version: 1225867911) is supported! 7. Command 'help' Get help with the program. Parameters: No parameters Example: pkodev.tool.editgmcmd.x64.Release help Result: Usage: pkodev.tool.editgmcmd.x64.Release <command> [parameters] There are supported commands: 1) name --in <.exe file> --old <GM-command> {--db <addresses file>} Get the original name of a given GM-command. 2) rename --in <.exe file> --old <GM-command> --new <GM-command> {--db <addresses file>} {--bp <backup mode [off|name|time]>} Rename a given GM-command. 3) reset --in <.exe file> {--db <addresses file>} {--bp <backup mode [off|name|time]>} Reset all GM-command names to the original ones. 4) enum --in <.exe file> {--db <addresses file>} Print a list of GM-commands as a table. 5) supported {--db <addresses file>} Print a list of supported .exe files as a table. 6) check --in <.exe file> {--db <addresses file>} Check if an .exe file is supported by the tool. Parameters in the curly braces {} are optional. * '--db' parameter This parameter is responsible for the path to the .json file of the GM-commands database, is optional and may be absent. If the '--db' parameter is not specified, then the program automatically searches for this file in the same directory it is in and with the same name as its .exe file, but with the .json extension. For example, if the program's .exe file is located along the path: "D:\tools\pkodev.tool.editgmcmd.x64.Release.exe", then the program will try to load the GM command database from the file: "D:\tools\pkodev .tool.editgmcmd.x64.Release.json". ** '--bp' parameter Some commands make changes to the target .exe file. In order to prevent data corruption, the program can make a backup copy of the target .exe file. This parameter is optional and, if it is not present, the default value is assumed. The '--bp' parameter only accepts the following values: 1) --bp "name" (default value) - the backup file will have the same name as the target .exe file, but with the .backup extension; 2) --bp "time" - the backup file will have the same name as the target .exe file, but with the .backup extension, plus a timestamp at the time the backup was created is added to the beginning of the name; 3) --bp "off" - do not create a backup copy of the target .exe file. Downloads 1. Actual executable files of the program (.exe) and the GM commands database file (.json).; 2. Repository with the source code of the program in C++ (Visual Studio 2022 Community). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  4. Hello and Welcome Everyone! I am Fhandror and i bring to you my latest Plug&Play Kit, a "All You Need Kit" for PKO 2.4(2.7) offline server and client, the kit contains: All Server Files 2.4(2.7) you gonna need IGS 100% working + Xer0 Shop Manager Powerful Client 2.4(2.7) ready to go Everything is pre-configured and done, you just need to follow the video tutorials to "plug" it into your PC 2 Video Guides that shows everything you need to do, step by step, including how to add items and crystals to the IGS , in case you can't watch it from YouTube Maps and Apparels ready for implementation and some other projects too, like Admirals Cape All the Tools you gonna need, even Yammi Map Editor GM Commands Guide Both SQL Server 2012 and SQL Server Management Studio 2012 All pre-configured to a offline server, ready to go, and the link is from Media Fire, so no more you have to suffer people putting links from Megaupload, so you don't need to worry about download limits. This files are NOT mine, this Kit is meant to help everyone that passes by the troubles that i did in searching this pkodev website, almost no guides step-by-step, people just posting codes and saying "this is a guide" and leaving you to figure it all out by your own, never again my friend! BECAUSE NOW YOU HAVE THIS KIT! FOR YOU! FOR FREE! Here are the links: Download Plug'n Play Kit: https://www.mediafire.com/file/hzf2euxej0zc8s1/PKO_II_-_Full_Kit_-_Client_%26_Server_2.4_%282.7%29_-_Plug_%26_Play.rar/file YouTube Videos part 1: part 2
  5. Hello, i'm trying to setup a server, using SQL Server 2014, and game version 1.36. All servers (Account, Gate and Game) start normally but the Groupserver, does not connect to Account server. It gives me this message AccountServer:127.0.0.1,1978Is Here Socket:1 and after 5-6 seconds it closes. Can anyone help?
  6. New server of tales of pirates Coming soon. Me and my team working on Classic Project medium server. For more details about my project join the discord server below: DISCORD SERVER Server Rates: SERVER RATES:Max Level: 80 Solo-exp: 2x Party-exp: 5x Drop-rate: 1x Fairy-growth: 50x Ship-exp: 5x Max Pet-Level: 42 Mazes: Demonic World Chaos Argent Forsaken City Dark Swamp . Maps: Argent City Icicle City Shaitan City Server Features: -Medium Server -Vanilla way to Level up -Balanced Server -Excellent protection (anti DDos, anti Dupe) -Ingame Currency (imps) can be obtained in all mobs -Reputation can be obtain in dw, ds, fc mobs -Jackpot Machine NPC -Reputation Exchaner NPC -Legendary tree of fortune (Edited Fortune Packet drops) -Black Market NPC -Class Job Changer NPC (Same npc where you get your class Promotion) -Fair Market NPC -Unseal NPC (Uns 45-55) -Apparel NPC (East Argent) -New Field Bosses that gives money notes -Offline Stall(can be use to level your pet while offline)
  7. [Mod] GateServer extension for "offline" stall server (StallServer) This modification of GateServer is designed to determine the IP addresses of clients that are behind the "offline" stall server (StallServer). Since StallServer is essentially a proxy server through which the client (Game) connects to the game server (GateServer), the GateServer will not "see" the real IP address of the client, and in logs and database all players will have the same StallServer IP address (for example, 127.0.0.1 if both GateServer and StallServer are running on the same machine). To solve this problem, StallServer writes the client's IP address to the login packet, which requires GateServer to be modified to read the IP address from the packet and bind it to the client. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.stallip; Version: 1.0; Author: V3ct0r; Type: for client (Game.exe); Supported executable .exe files: GATESERVER_138. Installation Place the mod DLL "pkodev.mod.stallip.gate.138.dll" into the "mods" folder in root GateServer directory. Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  8. Welcome to New Tales of Pirates (NToP)! Server was launched on 10th February 2022, fresh brand new server! NToP aims for nostalgia and what they had in Tales of Pirates 1, now you can enjoy maps, monsters, quests, all in one place. Hard/medium server, not very easy to become strong, but you can become strong. Social Media Official Website Discord Downloads Facebook Page Instagram Server Rates - Max Level: 65 - Max Pet Level: 50 - Solo-exp: 2x - Party-exp: 2.5x - Drop-rate: 1x - Fairy-growth: 1x - Ship-exp: 1x Server Features Balanced Server Farming Focused Main 3 cities(Argent, Shaitan, Icicle), FC, DS, DW In-game system to obtain necessary items Offline Stall New Apparels, wings, effects Daily Quests In-game Shop Player commands In-game Database: items, monsters Reputation Exchanger Demonic World Exchanger Guilds support system Ready plans for the development and maintenance of the game Discussion with the players of all upcoming updates Active user support & much more you can find out in the game! Classes Champion - Changes made to some skills, you can check on discord #class-changes channel Crusader - Phyllis Crus + Changes made to some skills, you can check on discord #class-changes channel Sharpshooter - Changes made to some skills, you can check on discord #class-changes channel Cleric - Changes made to some skills, you can check on discord #class-changes channel Seal Master - Changes made to some skills, you can check on discord #class-changes channel Voyager - Changes made to some skills, you can check on discord #class-changes channel Gems - Max sockets (3) - Refining gem (capped at Lv3) - Normal gems (capped at Lv3) - Broken (capped at Lv3) - Cracked (capped at Lv3) - Unique (capped at Lv2) - Black Dragon gems (capped at lv2) - There's no chipped gem! Equipments FC Death Knight - Sealed lv45 (Armor and Weps) DS Huge Mud - Sealed lv55 (Boots, Gloves, Armor and Weps) DW1 Wandering Soul - Sealed lv55 (Boots, Gloves, Armor and Weps) DW2 Snowman Warlord - Sealed lv65 (Armor and Weps) Boss Stone Equipment (will be available after unlock Lv70+) Chaos Equipment (will be available after access to Chaos Argent) Black Dragon Equipment (will be available after access to BD Lair) Mazes Chaos Argent: comming soon! Forsaken City: every 3 hours - Magical Ocean (1508,3665) Opening time (UTC): 01:00 / 04:00 / 07:00 / 10:00 / 13:00 / 16:00 / 19:00 / 22:00 Dark Swamp 1-3: every 3 hours - Magical Ocean (2035,2775) Opening time (UTC): 01:00 / 04:00 / 07:00 / 10:00 / 13:00 / 16:00 / 19:00 / 22:00 Demonic World: every 3 hours - Sacred Snow Mountain (910,1069) Opening time (UTC): 01:00 / 04:00 / 07:00 / 10:00 / 13:00 / 16:00 / 19:00 / 22:00 more comming with updates.. Quests Class Advancement Story Quest - new reward item on Lv2 ref task (Finish HQ, can be exchanged for items in Argent City 2231,2813) LB same original Rb lv1 same original Daily Quests - can get gold and IGS Crystal (used on in-game shop) Money Ways Daily Quests - you can make up to 500k gold daily with them Woodcutting - exchange NPC in Argent City 2230,2850 Mining - exchange NPC in Argent City 2115,2760 Fishing - exchange NPC in Argent City 2242,2826 NSS/OSS Mazes Selling/trading items in-game Featured Video https://youtu.be/xGQqsiKJWOw Theme only for dev. news
  9. Offline stalls system One of the gaming aspects of the game is trading between characters through special stalls, which players can open by learning a special skill. The player sell his items for a certain price, and other players can buy them. However, for such trading, the player have to be in the game, that is, be connected to the server, which makes him to leave his computer constantly turned on and keep the game client minimized. This is very inconvenient, so the system of "offline" stalls was invented, which allows players to disconnect from the server and still remain trading in the stalls. There are several ways to implement such a system, but the most common system is "offline" stalls through a proxy server: 1) The game client (Game.exe) connects to the proxy server; 2) The proxy server, in turn, opens a connection to the GateServer.exe; 3) Further, the proxy server transfers all packets between Game.exe and GateServer.exe, while analyzing them; 4) When a player opens a trade stall, the proxy server captures this (GateServer.exe sent Game.exe a successful stall opening packet); 5) If a player disconnects from the server while in a trading stall, then the proxy server closes the connection to Game.exe, but at the same time keeps the connection to GateServer.exe and starts imitating Game.exe. Thus, GateServer.exe is unaware of the fact that Game.exe is disconnected and the player's character remains to trade in the stall on the server. Game.exe | Game.exe | <---------> pkodev.stallserver.exe <---------> GateServer.exe Game.exe | This topic discusses the development of such a proxy server - PKOdev.NET Stall Server. Warning! The application is currently under development. The application has not been fully tested and is not stable. This means that errors, bugs and critical vulnerabilities may be present. Use it for testing purposes only! Features 1) Offline stalls system; 2) Limiting the number of offline stalls from one IP address; 3) Limiting the trading time in an offline stall; 4) Automatic disconnection of the account from the server when a player tries to enter his account while trading in an offline stall; 5) Notification of players in the chat that a player trades in an offline stall (in PM); 6) Prevention of SQL-injections in login and PIN create (change) packets from game client; 7) Setting for the maximum number of connections from the same IP address and the interval between connections. to-do 1) Translate comments in files Server.h and Server.cpp to English language; 2) Fix application crash when processing packets; 3) Fix application crash on startup when local port is closed; 4) Fix bridge hanging when blocking packets on enabled encryption in GateServer.cfg (thanks to @small666 for finding the bug); 5) Make thread synchronization when processing packets; 6) Close the offline stall if it is empty; 7) Modification of GateServer.exe to determine the IP addresses of clients that are behind the server of offline stalls. At this point in the logs and database, the IP addresses of all clients will be written as 127.0.0.1 (if both GateServer.exe and pkodev.stallserver.exe are running on the same machine). 8 ) Compatibility with Corsairs Online (CO) source code. Building and running 1) Clone the repository with the project to your disk (the link will be below); 2) Open the solution file pkodev.stallserver.sln in Visual Studio 2022 Community (or higher version); 3) Build the solution. The server executables will appear in the bin folder; 4) Place the configuration file pkodev.stallserver.cfg from the cfg folder in the same directory as the server executable file pkodev.stallserver.exe; 5) Customize the configuration file pkodev.stallserver.cfg (the file is well commented); 6) To connect the game client (Game.exe) to the offline stall server, you need to install the pkodev.mod.stallserver mod; 7) To connect the offline stall server to GateServer.exe, the GateServer should be without any modifications, for example, from the PKO 1.38 server files. 8 ) Run offline stall server executable pkodev.stallserver.exe. Git repository https://github.com/V3ct0r1024/pkodev.stallserver
  10. [Fix] Bug fix for TransformCha() function (character transformation) Hello friends! I think many people know about the bug associated with the TransformCha() function, when using it, the character's hat disappears. In this thread I will show you how to fix this bug. Thanks to @Де-Компанье for the solution! 1) Open GameServer.exe with the character transformation function (TransformCha()) in any HEX editor. For example, in HxD. 2) Find the sequence of bytes: 05 98 00 00 00 89 45 EC 8B 45 FC 05 32 6E 00 00 8B 5D F8 89 18 8B 45 FC 83 C0 58 8B 5D F8 89 18 6A 00 3) Replace these bytes with the following ones: 05 98 00 00 00 89 45 EC 8B 45 FC 50 05 32 6E 00 00 8B 5D F8 66 89 18 58 83 C0 58 8B 5D F8 89 18 6A 00 4) Save the changes. Now, when transforming character, the hat will not disappear.
  11. [Mod] Full area map for the region As you know, only the three main regions (Ascaron, Magic Ocean and Deep Blue) have a full area map. When the player presses the "Map" button under the minimap to open the full map of the area, the client sends a packet to the server with the appropriate request. The server reads this packet, decides if the region the player is currently in has a full map, and sends a response to the client. If the answer is "yes", then the client show a large map to the player. If "no", then the player receives the message "This area does not have a full map" in the system: "This area does not have a full map" This mod allows you to add full maps for any region: Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.fullmap; Version: 1.0; Author: V3ct0r; Type: for server (GameServer.exe); Supported executable .exe files: GAMESERVER_136, GAMESERVER_138. Installation 1) In the "mods" directory of your GameServer, create a "pkodev.mod.fullmap" folder; 2) Place into it the mod DLL file "pkodev.mod.fullmap.server.<ID>.dll" for your version of GameServer.exe; 3) Place into it the mod settings file "pkodev.mod.fullmap.cfg" and write in it a list of map names for which you want to add a full map. The name of each map is written on a new line: darkswamp garner2 puzzleworld puzzleworld2 Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  12. [Script] Promo code system This script implements a simple promo code system. Players can use promo codes to get items. Promo codes are entered into the local chat channel through a slash, for example: /agjtjSfsaAS34 The promo code can only be used once. A text file is used to store promo codes. Requirements The script requires GameServer.exe with the HandleChat() function support - local chat messages handler. Installing the script 1) Create a file named "pkodev.promo.lua" in the folder "GameServer\resource\script\calculate\mods" with the following contents: -- Print a log print("Loading pkodev.promo.lua") -- Check that HandleChat function exists if (HandleChat == nil) then -- Write a log print("pkodev.promo.lua: Warning, the HandleChat() function is not exist!") -- Do not load the script return end -- Promocodes system promo = promo or { } -- Name of the file with promocodes promo.file = "promocodes.dat" -- List with promocodes promo.list = {} -- Save data to file promo.save = function(path) -- Open the file local file, msg = io.open(path, "w") -- Check that file is open if (file == nil) then -- Write a log LG("pkodev.mod.promo", string.format("Can't save the list with promocodes to the file '%s': '%s'!", path, msg)) return false end -- Write data for key, value in promo.list do -- Write a line local ret = file:write(string.format("{%s, %d, %d}\n", value.code, value.id, value.count)) -- Check that line is written if (ret == false) then -- Write a log LG("pkodev.mod.promo", string.format("Can't write the data to the file '%s'!", path)) return false end end -- Flush the data file:flush() -- Close the file file:close() -- Write a log LG("pkodev.mod.promo", string.format("The list with promocodes has been successfully saved to the file '%s'!", path)) return true end -- Load data from file promo.load = function(path) -- Remove old promocodes for k in pairs (promo.list) do promo.list[k] = nil end -- Open the file local file, msg = io.open(path, "r") -- Check that file is open if (file == nil) then -- Write a log LG("pkodev.mod.promo", string.format("Can't load the list with promocodes from the file '%s': '%s'!", path, msg)) return false end -- Read file line by line for line in file:lines() do -- Extract data from the line local ret, _, code_, id_, count_ = string.find(line, "^{([A-Za-z0-9]+)%s*,%s*([0-9]+)%s*,%s*([0-9]+)}$") -- Check that string matches the pattern if (ret ~= nil) then -- Add data to the list table.insert( promo.list, { code = code_, id = id_, count = count_, } ) end end -- Close the file file:close() -- Write a log LG("pkodev.mod.promo", string.format("%d promocodes have been succsessfully loaded from file '%s'!", table.getn(promo.list), path)) return true end -- Handle chat function hook promo.hadle_chat__original = HandleChat HandleChat = function(role, msg) -- Check that message has the '/' symbol if ( string.sub(msg, 1, 1) == "/" ) then -- Get promocode local ret, _, code_ = string.find(msg, "^/([A-Za-z0-9]+)%s*$") -- Check that promocode is found if (ret ~= nil) then -- Search the promocode in the list for key, value in pairs(promo.list) do -- Compare promocodes if (value.code == code_) then -- Write a message BickerNotice(role, string.format("You entered the promocode '%s': %s x %d!", value.code, GetItemName(value.id), value.count) ) -- Give an item GiveItem(role, 0, value.id, value.count, 0) -- Write a log LG("pkodev.mod.promo", string.format("Player '%s' entered a promocode '%s' and received '%s' x %d!", GetChaDefaultName(role), value.code, GetItemName(value.id), value.count) ) -- Remove the promocode from the list promo.list[key] = nil -- Save the list to the file promo.save(promo.file) -- Synchronize the promocodes list local packet = GetPacket() WriteCmd(packet, 4015) WriteDword(packet, GetRoleID(role)) WriteString(packet, string.format("promo.list[%d]=nil", key)) SendPacket(role, packet) -- Do not call the original function HandleChat() return 0 end end end end -- Call the original function HandleChat() return promo.hadle_chat__original(role, msg) end promo.load(promo.file) 2) Include it in the file "SkillEffect.lua" (\GameServer\resource\script\calculate) after "functions.lua" inclusion: dofile(GetResPath("script\\calculate\\mods\\pkodev.promo.lua")) 3) In the root directory of the GameServer create a file named "promocodes.dat" and write the list of promocodes in the following format: {<Promocode>, <Item ID>, <Item number>} Example: {agjtjSfsaAS34, 1849, 45} {kgjKKKsnggklsaa, 885, 1} {0004121aAf, 1848, 10} Using the script 1) To use a promocode, player should enter it in the local chat: /agjtjSfsaAS34 The player will get Cake x 45. 2) All logs regarding promo codes usage can be found in the file: GameServer\LOG\log\pkodev.mod.promo.txt What can be improved 1) As a reward, you can also give gold, buffs and other bonuses; 2) The list of promotional codes can be stored in the database, for example, using the LuaSQL library; 3) You can make promotional codes reusable, but one player can use the promotional code only once.
  13. [Mod] Cleaning up chats The mod allows GM and HD to delete all messages in players chats (local, world, trade, party, guild, PM, camp). To do this, on the server side for GameServer, the ClearChat(role) lua function is implemented, into which the descriptor of the character controlled by the administrator is passed. Thus, it is possible, for example, to implement a GM command that will clear chats (if there are HandleChat() and GetGmLv() functions present in GameServer.exe). function HandleChat(role, msg) if (msg == "&clearchat") then if (GetGmLv(role) == 99) then ClearChat(role) else SystemNotice(role, "Not enough access!") end return 0 end return 1 end The disadvantage of the mod is that it deletes all chats at once without the ability to specify specific channels. That is, along with the general channels (world, trade, local), the channels with messages to the guild, party, camp and PM will also be cleared. It should also be remembered that the player can remove the .dll mod library from the client and chats will no longer be cleared on command from the server. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.clearchat; Version: 1.0; Author: V3ct0r; Type: for client (Game.exe); Supported executable .exe files: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4, GAME_13X_5. Installation Client: Place the mod DLL file "pkodev.mod.clearchat.client.13x_<ID>.dll" for your version of Game.exe into the "mods" folder of the game client. Server: 1) Create a file named "pkodev.mod.clearchat.lua" in the following server directory: \GameServer\resource\script\calculate\mods 2) Write the following code into it: -- Print a log print("Loading pkodev.mod.clearchat.lua") -- Clear all chats function ClearChat(role) -- Get moderator's name local name = GetChaDefaultName(TurnToCha(role)) -- Send system command Notice("{system:clearchat}") -- Send message to all players Notice(string.format("Chats have been cleared by moderator [%s]!", name)) end 3) Include the "pkodev.mod.clearchat.lua" file at the beginning of the SkillEffect.lua file (\GameServer\resource\script\calculate) : dofile(GetResPath("script\\calculate\\mods\\pkodev.mod.clearchat.lua")) 4) Use the ClearChat() function to clear chats as you wish. Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  14. [Mod] Fixing the resetting character professions when reconnecting to the server Some admins are experiencing an issue where a character that has gained a profession becomes a "Newbie " again after relogging into the game. The mod fixes this bug. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.jobfix; Version: 1.0; Author: V3ct0r; Type: for server (GameServer.exe); Supported executable .exe files: GAMESERVER_136 and GAMESERVER_138. Installation In the "mods" directory of your GameServer, create a "pkodev.mod.jobfix" folder and place into it the mod DLL file "pkodev.mod.jobfix.server.<x>_<l>.dll" for your version of GameServer.exe, where <x> is the version of GameServer.exe (136 or 138) and <l> is the professions language (eng or rus ). Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  15. [Mod] Contracts system This system is a "Monster Hunt" type quest, the purpose of which is to defeat a certain amount of specific monsters. A player is given a special item - “Contract”, which indicates which monster and how many the player have to defeat. As monsters are defeated, the player's current progress is updated in the "Contract". After defeating the required number of monsters, the "Contract" is considered completed, and the player can receive a reward by using the "Contract" item. The system consists of a pkodev.mod.loader modification for the game client (Game.exe) and a Lua script for the game server (GameServer.exe). Modification of the client is necessary to visualize the specified characteristics of the item in the hint field for the "Contract" when the player hover the mouse cursor over it's item. The target monster ID, the number of monsters already defeated, and the number of monsters needed to complete the "Contract" are stored in the following item stats: ITEMATTR_VAL_STR, ITEMATTR_VAL_DEX, and ITEMATTR_VAL_AGI, respectively. The purpose of the mod is to display these item characteristics in a form understandable to the player. For example, if ITEMATTR_VAL_STR = 103, ITEMATTR_VAL_DEX = 5, and ITEMATTR_VAL_AGI = 10, then the player will see the following information when hovering the mouse over "Contract": Hunt: 'Forest Spirit' x 10 Progress: 5 / 10 The Lua script for the game server is the core of the Contracts system, which contains the System settings and the logic of its operation. For example, when defeating next monster, the script will search the character's inventory for a suitable active "Contract", and if such the item is found, the System will update its state. An important setting of the script is the function that is necessary for issuing a reward after the player successfully completes the "Contract". Some features of the System: 1. "Contract" can be picked up, thrown away, transferred to another player, put in a bank or sold; 2. If a player has multiple "Contracts" in his inventory to hunt the same monster, then when defeating this monster, the "Contract" is selected randomly; 3. To receive a reward after completing a "Contract", the player should use an item of the "Contract", for example by double-clicking on it. The player will see a corresponding message in the system chat if the "Contract" has not yet been completed; 4. The content and amount of the reward are determined by the administrator in a special function of the System script; 5. ID and item type for "Contract" must be unique and set by the administrator in the System settings. The default item type is 99, the default item ID is undefined. Information about the modification Name: pkodev.mod.contract; Version: 1.1; Author: V3ct0r; Type: for the game client (Game.exe); Supported executable files (.exe): GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4 and GAME_13X_5. Installing the Contracts system Game server 1. Add a "Contract" item to the GameServer\resource\ItemInfo.txt file. To do this, select any suitable ID (XXXX) and item type (99 by default): XXXX Contract n0184 10130005 0 0 0 0 0 00 99 0 0 0 0 0 1 1 1 1 1 1 0 -1 0 -1 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 10,10 0,0 0 0 0 0 0 0 0 0 0 ItemUse_PKOdevContract 0 0 0 0 0 0 After completion you will receive a reward! 2. Place Lua script pkodev.contract.lua in GameServer\resource\script\calculate\mods directory (create mods folder if necessary). 3. Open the pkodev.contract.lua file and configure it as follows: 3.1 Write the "Contract" item ID from ItemInfo.txt (XXXX) to the item_id variable: item_id = XXXX, 3.2 In the CompletionCallback() function, write a code that will give players a reward after completing "Contracts". By default, the function gives a player 1,000 gold coins, a random item (Refining Gem x 1, or Gem of Rage x 2, or Cake x 60, or Fairy of Luck x 1) and launches fireworks: CompletionCallback = function(role, item) -- Give 1,000 gold AddMoney (role, 0, 1000) -- Set of items local arr = { {id = 885, count = 1 }, -- Refining Gem x 1 {id = 863, count = 2 }, -- Gem of Rage x 2 {id = 1849, count = 60}, -- Cake x 60 {id = 231, count = 1 } -- Fairy of Luck x 1 } -- Give a random item local idx = math.random(1, table.getn(arr)) GiveItem(role, 0, arr[idx].id , arr[idx].count, 4) -- Launch fireworks PlayEffect(role, 361) end 3.3 Open the file GameServer\resource\script\calculate\SkillEffect.lua and at the very beginning write the line: dofile(GetResPath("script\\calculate\\mods\\pkodev.contract.lua")) 4. The Contracts system has been successfully installed on your server. Congratulations! Also take a look at @Angelix's Contract System script implementation. It is more flexible and advanced than the one suggested above. Description of the script and installation instructions can be found in the corresponding topic: Game client 1. Add a "Contract" item to the Client\scripts\table\ItemInfo.txt file (see above "Installing the Contracts system" > "Game server" > point 1). Compile ItemInfo.txt. 2. Add to the file Client\scripts\table\StringSet.txt the following strings that a player will see when hovering the mouse over the "Contract": [1000] "(Completed)" [1001] "(Active)" [1002] "Hunt: '{0}' x {1}" [1003] "Progress: {0} / {1}" Note 1: If IDs of strings 1000 - 1003 are already taken, then write any free IDs instead. Note 2: After adding these strings to the StringSet.txt file, delete the StringSet.bin file if it exists, otherwise the changes will not be applied. Note 3: In string 1002, marker {0} is the name of the monster, and {1} is the number of monsters to defeat. In string 1003 marker {0} indicates the number of monsters already defeated, marker {1} is similar to string 1002. 3. Install mod loading system pkodev.mod.loader if it hasn't already been installed. 4. Place the mod DLL file pkodev.mod.contract.client.13x_{ID}.dll for your version of Game.exe and the mod settings file pkodev.mod.contract.json in the mods\pkodev.mod.contract folder of the game client. 5. Open the mod's settings file pkodev.mod.contract.json and write the following parameters into it according to your choice: 1. itemType - type of the item "Contract" specified in the ItemInfo.txt file. The default value is 99. 2. colorCompleted - the color of the "(Completed)" label in the hint for the "Contract" item in the format 0xAARRGGBB. The default value is 0xFF00FF00 (Green). 3. colorActive - the color of the "(Completed)" label in the hint for the "Contract" item in the format 0xAARRGGBB. The default value is 0xFFFFA500 (Orange). 4. STRING_001 - string ID for the "(Completed)" label from the StringSet.txt file. The default value is 1000. 5. STRING_002 - string ID for the "(Active)" label from the StringSet.txt file. The default value is 1001. 6. STRING_003 - string ID for the "Hunt: '{0}' x {1}" label from the StringSet.txt file. The default value is 1002. 7. STRING_004 - string ID for the "Progress: {0} / {1}" label from the StringSet.txt file. The default value is 1003. Note: This file can be left unchanged if you used the default values in the ItemInfo.txt and StringSet.txt files. 6. The contracts system setup for the game client is now complete! Creating "Contracts" and issuing them to the players "Contracts" are created using the contract.create() function, which takes as its arguments the handle of a character to which the contract is to be issued, the ID of a monster a player will need to defeat, and a number of monsters that the player have to defeat. As a result, the function returns a tuple of three elements: success flag, new item descriptor, and item slot number in the character's inventory. Syntax: local <Result LUA_TRUE|LUA_FALSE>, <Item descriptor>, <Item slot> = contract.create(<Character descriptor>, <Monster ID>, <Number of monsters>) Example: local ret, item, pos = contract.create(role, 103, 7) As the result, a "Contract" will be created to defeat the seven Forest Spirits, which will appear in the inventory of the role character. In case of an error, the function will return the value LUA_FALSE to the ret variable and write a log message to the pkodev.contract.txt file. Note: Creation of "Contracts" can be organized, for example, through a special NPC or other item. Useful links 1) Modification binary files for the client (.dll); 2) The file with the modification settings for the client (pkodev.mod.contract.json); 3) Repository on GitHub with the source code of the modification for Visual Studio 2022 Community (C++); 4) Lua script of the Contracts system for the game server; 5) ItemInfo.txt with an example of the "Contract" item; 6) Strings for the file StringSet.txt; 7) Mod loading system pkodev.mod.loader. If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  16. [Mod] Displaying servers response time ("ping") on the server selection form Next to each server on the server selection form, their response time ("ping") is displayed. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.ping Version: 1.0; Author: V3ct0r; Type: for client (Game.exe); Supported executable .exe files: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4 and GAME_13X_5. Installation Place the mod DLL file "pkodev.mod.ping.client.13x_<ID>.dll" for your version of Game.exe into the "mods" folder of the game client. If necessary, configure the GUI scripts of the server selection form "frmServer" (file "\scripts\lua\forms\login.clu"). Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  17. [Mod] Antibot Adds an anti-bot to the game that worked on the official servers of the game. The mechanism of the antibot is similar to the "captcha". During the game, at certain intervals of time, the player must enter a code that appears on the screen, consisting of 4 characters. The player has only 3 attempts. If the player makes a mistake 3 times in a row and/or does not enter the code, then his is forcibly disconnected from the server. If the answer is correct, the player can receive "rewards" - experience points, restoration of HP and SP, or an item (cake, ticket), and the counter for the number of unsuccessful attempts is reset. Antibot works under the following conditions: 1) The player's character does not have administrator and moderator rights (GM-level is 0); 2) The player's character is not in the safe zone; 3) The player's character is not in the PvP zone; 4) The player's character is on the water. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.antibot; Version: 1.0; Author: V3ct0r; Type: for server (GameServer.exe); Supported executable .exe files: GAMESERVER_136 and GAMESERVER_138. Installation 1) In the "mods" directory of your GameServer, create a "pkodev.mod.antibot" folder and place into it the mod DLL file "pkodev.mod.antibot.server.13<x>.dll" for your version of GameServer.exe; 2) In the folder "resource" of your GameServer place the folder "Pic" from the attached archive with the mod; 3) In the file "functions.lua" ("GameServer\resource\script\calculate") add the code from the corresponding file from the attached archive with the mod. Interval of antibot activation The mod is configured in such a way that by default the antibot activation interval is calculated in accordance with the original algorithm that was implemented by the game developers (see the DWORD CCharacter::GetCheatInterval(int state) method from the "Character.cpp" file of the server source code). This algorithm can be changed in the function unsigned int __fastcall pkodev::hook::CCharacter__GetCheatInterval(void* This, void* NotUsed, int state) in the source code of the mod ("dllmain.cpp" file). This function should return the time interval in milliseconds. With state = 1, the function should return at least 60 seconds (65 by default), because with the specified value of this parameter, the time allotted for the player to enter a 4-character code is calculated. Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  18. [Mod] Server time The mod adds a text label with a clock to the game - the current server time. The server time is taken from the packet ID: 940 that the server sends to the client upon connection, for example: [01-17 10:44:47:879] The clock label is bound to the minimap form "frmMinimap" from the GUI script file "\scripts\lua\forms\minimap.clu". Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.clock; Version: 1.0; Author: V3ct0r; Type: for client (Game.exe); Supported executable .exe files: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4 and GAME_13X_5. Installation 1) In the "mods" directory of your client, create a "pkodev.mod.clock" folder; 2) Place into it the mod DLL file "pkodev.mod.clock.client.13x_<ID>.dll" for your version of Game.exe; 3) Place into it the mod settings file "pkodev.mod.clock.cfg" and write to the file the desired server time output format in accordance with the documentation for the strftime() function. For example, the format: Server time: %H:%M:%S %d.%m.%y May give the following output: Server time: 10:51:20 17.01.2022 4) In the GUI script file "\scripts\lua\forms\minimap.clu" add the code for the "labClock" text label, which will be responsible for displaying the server time: ------------------------------------------------------------------------------------------ -- Clock label ------------------------------------------------------------------------------------------ labClock = UI_CreateCompent(frmMinimap, LABELEX_TYPE, "labClock", 20, 15, 20, 220) UI_SetCaption(labClock, "Clock") UI_SetTextColor(labClock, COLOR_WHITE) UI_SetLabelExFont(labClock, DEFAULT_FONT, TRUE, COLOR_BLACK) ------------------------------------------------------------------------------------------ Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  19. [Script] Quest requires 'X' hours after the start Hello! In this thread I am posting an example of script that will allow you to check the condition when the player completes the quest: 'X' time has to pass after starting the quest to complete it. Usage MisResultCondition(MissionTimeExpired, <quest_id>, <time_in_seconds_to_wait>) Installation Add the following code to the file 'vairable.lua': -- Table with the time of taking quests by characters if (quest_table_guard == nil) then quest_table_guard = true quest_table = { } end Add to the file 'functions.lua': -- Quest added event AddMission__Original = AddMission AddMission = function(role, id, param) -- Call original AddMission function local ret = AddMission__Original(role, id, param) -- Check the result if ( ret == LUA_TRUE ) then -- Add the quest to the table quest_table[id] = quest_table[id] or {} -- Remember the time when the character took the quest quest_table[id][ GetRoleID(role) ] = os.time() end -- Return original result return ret end -- Check that some time expired since character taken the quest function MissionTimeExpired(role, id, t) -- Check that quest exists in the table if ( quest_table[id] == nil ) then -- Quest not found return LUA_TRUE end -- Get character ID local cha_id = GetRoleID(role) -- Check that the character has the quest if ( quest_table[id][cha_id] == nil ) then -- Character doesn't have the quest ?! return LUA_TRUE end -- Calculte time delta local delta = ( os.time() - quest_table[id][cha_id] ) -- Check that t seconds expired since quest started if ( delta >= t ) then -- Remove character from table quest_table[id][cha_id] = nil -- Condition is completed return LUA_TRUE end -- Condition is not completed return LUA_FALSE end And finally register the new function in the file 'MissionSdk.lua' ('ConditionsTest' function): . . . elseif conditions[i].func == MissionTimeExpired then local ret = MissionTimeExpired( character, conditions[i].p1, conditions[i].p2 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest: MissionTimeExpired = false" ) return LUA_FALSE end . . . That's all! Note: 1) All data about the time of taking quests by characters will be lost when the server is restarted. You need to come up with a mechanism for saving the table 'quest_table' to a file or database if this is critical for your application; 2) NPCs that give and accept a quest with this condition must be within the same GameServer instance.
  20. Automatically connect to the server / enter the game (Client modification that allows you to automatically connect to the server) This modification allows you to specify additional parameters in the game client startup parameters for automatic connection to the server and the character's entry into the game: start system\Game.exe startgame ip:127.0.0.1 port:1973 version:136 login:V3ct0r password:123456 character:V3ct0r With this launch of the client, the player will not need to enter a username and password: the game will automatically connect to the server, and the player will enter the character selection scene. In addition, if the name of a character was specified, then the player will immediately find himself in the game for this character, bypassing the selection process. Also, the user gets the opportunity to specify the server IP address, port and version. Unlike the solution suggested by @ruubi, there is the function presented of entering with character directly into the game. The mod can be useful for conveniently launching the client and creating various auto-update programs ("launchers", "patchers") with a personal area, for example: List of available parameters: ip - server IP-address [required] port - server port version - game version from GateServer.cfg login - login of player's account [required] password - password of player's account [required] character - player's character name Parameters are written in random order in the following format: parameter:value Example: login:V3ct0r If the required ip, login and password parameters are not specified in the Game.exe startup parameters, the game will start in normal mode. If the port and version parameters are missing, the server port and game version values will be taken from Game.exe - by default. If the character parameter is not specified, then the player enters the character selection scene. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.autologin; Version: 1.0; Author: V3ct0r; Type: for client (Game.exe); Supported executable .exe files: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4, GAME_13X_5. Installation Place the mod DLL file "pkodev.mod.autologin.client.13x_<ID>.dll" for your version of Game.exe into the "mods" folder of the game client. Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  21. [Mod] System of daily rewards for entering the game This mod implements a system of daily rewards for entering the game. Players need to enter the game every day in order to receive the next reward - with each new day the reward becomes more valuable. The chain resets and starts over from the first day if a player misses a day. The chain is also reset every week. The chain of rewards is configured by the administrator in a special lua function and is generated for a week forward, after which it is saved in the server database. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.reward; Version: 1.0; Author: V3ct0r; Type: for client and server (Game.exe and GameServer.exe); Supported executable .exe files: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4, GAME_13X_5, GAMESERVER_136 and GAMESERVER_138. Installation Server: 1) In the "GameServer\mods" directory of your server, create a "pkodev.mod.reward" folder; 2) Place into the folder the mod DLL file "pkodev.mod.reward.server.13<x>.dll" for your version of GameServer.exe; 3) In the functions.lua file ("GameServer\resource\script\calculate\") write the following script: -- Daily reward system (pkodev.mod.reward) -- Transfer the list of items to the system function GetRewardArrayAdapter(role) -- Get a list of items for daily reward local arr = GetRewardArray(role) -- Transfer the list to the system return arr[1].id, arr[1].number, arr[2].id, arr[2].number, arr[3].id, arr[3].number, arr[4].id, arr[4].number, arr[5].id, arr[5].number, arr[6].id, arr[6].number, arr[7].id, arr[7].number end -- Daily reward system (pkodev.mod.reward) -- Get a list of items for daily reward function GetRewardArray(role) -- Select an item depending on character race local hairstyle_book = function(role) -- List of items -- ID: 931 Lance Trendy Hairstyle Book -- ID: 932 Carsise Trendy Hairstyle Book -- ID: 933 Phyllis Trendy Hairstyle Book -- ID: 934 Ami Trendy Hairstyle Book local items = {931, 932, 933, 934} -- Get character type ID local id = GetChaTypeID(role) -- Return item id depending on the type ID return items[id] or 0 end -- Make a list of items for daily reward local items = { -- Day 1 (Short Sword x 1 or Long Sword x 1 or Fencing Sword x 1) {id = math.random(1, 3), number = 1}, -- Day 2 (Apple x 99 or Bread x 99 or Cake x 99) {id = math.random(1847, 1849), number = 99}, -- Day 3 (Fairy Coin x 50) {id = 855, number = 50}, -- Day 4 (Random fairy ID 183 ... 193 x 1) {id = math.random(183, 193), number = 1}, -- Day 5 (Hairstyle Book x 1) {id = hairstyle_book(role), number = 1}, -- Day 6 (Fairy Ration x 10) {id = 227, number = 10}, -- Day 7 (Refining Gem x 1) {id = 885, number = 1} } -- We have to return an array of items to caller function return items end 4) In MSSQL Management Studio, execute the SQL query: USE GameDB ALTER TABLE character ADD reward VARCHAR(128) NOT NULL DEFAULT '0' WITH VALUES Client: 1) In the "mods" directory of your client create a "pkodev.mod.reward" folder; 2) Place into the folder the mod DLL file "pkodev.mod.reward.client.13x_<x>.dll" for your version of Game.exe; 3) Place the daily reward form texture files "main.png" and "buttons.tga" into the "texture\mods\pkodev.mod.reward\" directory of your client; 4) Add the code for the daily reward form into the "main.clu" script file ("scripts\lua\forms\"): ---------------------------------------------------------------------------------------------------- -- Daily login reward form ---------------------------------------------------------------------------------------------------- -- The form frmReward = UI_CreateForm( "frmReward", FALSE, 366, 158, 150, 200, TRUE, FALSE ) UI_SetFormStyle( frmReward , 0 ) UI_AddFormToTemplete( frmReward, FORM_MAIN ) UI_FormSetIsEscClose( frmReward, FALSE ) UI_SetIsDrag( frmReward, TRUE ) -- Form background frmRewardImg = UI_CreateCompent( frmReward, IMAGE_TYPE, "frmRewardImg", 366, 158, 0, 0 ) UI_LoadImage( frmRewardImg, "texture/mods/pkodev.mod.reward/main.png", NORMAL, 366, 158, 0, 0 ) -- Form title labTitle = UI_CreateCompent( frmReward, LABELEX_TYPE, "labTitle", 400, 150, 10, 7 ) UI_SetCaption( labTitle, "Daily reward!") UI_SetTextColor( labTitle, COLOR_WHITE ) -- Reward button btnGetReward = UI_CreateCompent( frmReward, BUTTON_TYPE, "btnGetReward", 67, 24, 150, 120 ) UI_LoadButtonImage( btnGetReward, "texture/mods/pkodev.mod.reward/main.png", 67, 24, 0, 158, TRUE ) -- Close button btnClose = UI_CreateCompent( frmReward, BUTTON_TYPE, "btnClose", 21, 21, 343, 2 ) UI_LoadButtonImage( btnClose, "texture/mods/pkodev.mod.reward/buttons.tga", 21, 21, 270, 0, TRUE ) UI_SetButtonModalResult( btnClose, BUTTON_CLOSE ) -- Item slots cmdItemSlot0 = UI_CreateCompent( frmReward, COMMAND_ONE_TYPE, "cmdItemSlot0", 32, 32, 20, 73 ) UI_SetIsDrag( cmdItemSlot0, FALSE ) cmdItemSlot1 = UI_CreateCompent( frmReward, COMMAND_ONE_TYPE, "cmdItemSlot1", 32, 32, 69, 73 ) UI_SetIsDrag( cmdItemSlot1, FALSE ) cmdItemSlot2 = UI_CreateCompent( frmReward, COMMAND_ONE_TYPE, "cmdItemSlot2", 32, 32, 118, 73 ) UI_SetIsDrag( cmdItemSlot2, FALSE ) cmdItemSlot3 = UI_CreateCompent( frmReward, COMMAND_ONE_TYPE, "cmdItemSlot3", 32, 32, 167, 73 ) UI_SetIsDrag( cmdItemSlot3, FALSE ) cmdItemSlot4 = UI_CreateCompent( frmReward, COMMAND_ONE_TYPE, "cmdItemSlot4", 32, 32, 216, 73 ) UI_SetIsDrag( cmdItemSlot4, FALSE ) cmdItemSlot5 = UI_CreateCompent( frmReward, COMMAND_ONE_TYPE, "cmdItemSlot5", 32, 32, 265, 73 ) UI_SetIsDrag( cmdItemSlot5, FALSE ) cmdItemSlot6 = UI_CreateCompent( frmReward, COMMAND_ONE_TYPE, "cmdItemSlot6", 32, 32, 314, 73 ) UI_SetIsDrag( cmdItemSlot6, FALSE ) ---------------------------------------------------------------------------------------------------- Mod customization 1) In the GetRewardArray(role) function, write the code that will generate the chain of rewards for the character role for the next seven days. The function must return a table of 7 elements with fields id and number, where id is the ID of the item that is issued as a reward, and number is the number of items in the reward. Each element corresponds to its own day (1st element is the first day, 2nd element is the second day, and so on). Example: function GetRewardArray(role) local items = { -- Day 1: Apple x 20 {id = 1847, number = 20}, -- Day 2: Bread x 40 {id = 1848, number = 40}, -- Day 3: Cake x 60 {id = 1849, number = 60}, -- Day 4: Fairy coin x 55 {id = 855, number = 55}, -- Day 5: Fairy ration x 15 {id = 227, number = 15}, -- Day 6: Bread x 99 {id = 1848, number = 99}, -- Day 7: Cake x 99 {id = 1849, number = 99} } return items end Item IDs and their number can be generated randomly or depending on the character's race, profession, etc 2) By default, the reward period is 24 hours. You can change this value in the mod server-side source code (pkodev.mod.reward.server project, structure.h file), then compile the project: // Reward interval in seconds static const unsigned int interval{ 24 * 60 * 60 }; // 24 hours 3) No client side configuration required. Old style GUI (Thanks to @Masuka00!) main.clu: -- Close button btnClose = UI_CreateCompent( frmReward, BUTTON_TYPE, "btnClose", 14, 14, 342, 4 ) UI_LoadButtonImage( btnClose, "texture/mods/pkodev.mod.reward/main.png", 14, 14, 271, 174, TRUE ) UI_SetButtonModalResult( btnClose, BUTTON_CLOSE ) Download Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  22. [Mod] Player rating system This mod implements a player rating system that allows players to compare their characters according to any criterion, depending on how the administrator configures the system. For example, you can define a rating as the sum of all the basic characteristics of a character (see the screenshot above) and see how much is the character stronger than another one. Or you can display the number of killed players or monsters in the rating. You can also display the amount of gold, reputation points, etc. The system is very flexible and depends on the administrator's imagination. The rating is displayed above the name of the characters and is highlighted by color. After the character leaves the game, the rating will be saved in the database, so you can display the rating of the players on your website. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.power; Version: 1.1; Author: V3ct0r; Type: for client and server (Game.exe and GameServer.exe); Supported executable .exe files: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4, GAME_13X_5, GAMESERVER_136 and GAMESERVER_138. Mod update 17/01/2022 + Fixed a bug where the amount of experience was not updated for the player's character when killing a monster (thanks to @Rewind and @Tera for the bug report); + The format for outputting the number of rating points has been moved to the pkodev.mod.power.cfg settings file on the client side: - [{:power:}] - Installation Server: 1) In the "GameServer\mods" directory of your server, create a "pkodev.mod.power" folder; 2) Place into it the mod DLL file "pkodev.mod.power.server.13<x>.dll" for your version of GameServer.exe; 3) In the functions.lua file ("GameServer\resource\script\calculate\") write the following script: -- Power system (pkodev.mod.power) -- Calculate player's character power amount function CalculatePower(role) -- Get some character attributes local str = GetChaAttr(role, ATTR_STR) local agi = GetChaAttr(role, ATTR_AGI) local con = GetChaAttr(role, ATTR_CON) local spr = GetChaAttr(role, ATTR_STA) local acc = GetChaAttr(role, ATTR_DEX) -- Power formula local formula = ( str + agi + con + spr + acc ) -- Return calculated power amount and color return formula, GetPowerColor(formula) end -- Power system (pkodev.mod.power) -- Get color of power value function GetPowerColor(power) -- Green color (0xFF00FF00) return 4278255360 end 4) In MSSQL Management Studio, execute the SQL query: USE GameDB ALTER TABLE character ADD power INT NOT NULL DEFAULT (0) Client: 1) In the "mods" directory of your client, create a "pkodev.mod.power" folder; 2) Place the mod DLL file "pkodev.mod.power.client.13x_<x>.dll" for your version of Game.exe into it. 3) Place the mod settings file "pkodev.mod.power.cfg" into it and write the desired format for displaying the number of character rating points (marker {:power:}), for example: - [{:power:}] - Mod customization 1) In the functions.lua file, in the CalculatePower(role) function, write the code that will calculate the player's character rating. The function input is the role variable - the descriptor of the current character. At the output, the function should return the rating as an integer value. In the example above, the script calculates the rating as the sum of the character's base stats; 2) In the functions.lua file, in the GetPowerColor(power) function, write the code that will determine the rating color depending on its value - power. For example, you can make a rating less than 50 highlighted in yellow, from 50 to 100 in green, above 100 in red. The color must be written in the format 0xFFRRGGBB, in decimal notation. Example: green = 0xFF00FF00, after translate into decimal number system you will get the number 4278255360, and you need to write it into the script; 3) The mod provides for storing the character's rating in the database after leaving the game. For example, for displaying on the site in various TOPs. You can disable it if you do not need this feature. To do this, skip step 4 of the "Installation - Server" section and comment out the following lines in the source code of the server side of the mod (pkodev.mod.power.server project, dllmain.cpp file, Start() and Stop() functions), then compile the project: DetourAttach(&(PVOID&)pkodev::pointer::CTableCha__SaveAllData, pkodev::hook::CTableCha__SaveAllData); and DetourDetach(&(PVOID&)pkodev::pointer::CTableCha__SaveAllData, pkodev::hook::CTableCha__SaveAllData); 4) To get the rating of a character from the database, run the SQL query: SELECT power FROM GameDB.dbo.character WHERE cha_name = '<character name>' 5) No client side configuration required. Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  23. [Mod] Fixing instant respawn of killed monsters after GameServer restart This mod for the "PKODev.NET mod loader" system fixes the problem of instant respawn of killed monsters after restarting the server. Imagine a situation: you have a boss monster on your server, for example "Black Dragon", the respawn time of which is 168 hours (a week). Your players kill it and, according to the rules of the game, next time they can kill it in a week. Then you decide to restart the server (update, maintenance, etc), but the game server is designed in such a way that all the monsters written in the scripts appear immediately after it starts. As a result, the respawn of the "Black Dragon" will occur much earlier than in 168 hours. This situation can hit the server economy or give an advantage to some players and guilds. This is the second version of this mod - 1.1. In version 1.0, there was a critical bug related to the fact that one binary file for several instances of GameServer.exe was used to store information about killed monsters. For example, GameServer "A" writes a list of killed monsters to a file, then GameServer "B" writes a different list of killed monsters to the same file. As a result, the list of killed GameServer "A" monsters is lost due to the overwriting of the data file. In the new version of the mod, all data about killed monsters are stored in separate files for each map of the game world. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.mobspawn; Version: 1.1; Author: V3ct0r; Type: for server (GameServer.exe); Supported executable .exe files: GAMESERVER_136 and GAMESERVER_138. Installation 1) In the "mods" directory of your GameServer, create a "pkodev.mod.mobspawn" folder; 2) Place into it the mod DLL file "pkodev.mod.mobspawn.server.13<x>.dll" for your version of GameServer.exe; 3) Place into it the "pkodev.mod.mobspawn.cfg" configuration file; 4) In the mod directory "pkodev.mod.mobspawn" create an empty "data" folder; 5) Write to the configuration file "pkodev.mod.mobspawn.cfg" the IDs of the monsters you want to control the respawn. Each ID is written on a new line. Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  24. [Mod] Connecting Game.exe to Stall Server ("offline" stalls server connector) To implement protocol encryption in the Stall Server, the server need to know the MD5 hash of password of the game account, but the client of versions 1.3x sends the hash to the server in encrypted form. This mod for the "PKODev.NET mod loader" system is intended to disable encryption of the MD5 hash of password on the client side and establish connection with the Stall Server. Without this modification, the user will receive the "Invalid password!" message when connecting to a server with installed "offline" stalls system. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.stallserver; Version: 1.0; Author: V3ct0r; Type: for client (Game.exe); Supported executable .exe files: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4, GAME_13X_5. Installation Place the mod DLL file "pkodev.mod.stallserver.client.13x_<ID> .dll" for your version of Game.exe into the "mods" folder of the game client. Download 1) Binary release (.dll); 2) The source code of the mod for Visual Studio 2019 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  25. Mod loading system for server and client (PKOdev.NET mod loader) The Problem Many developers and administrators of Tales of Pirates servers in our community know that the functionality of the client and server can be changed by mods (addons, plugins, patches). Some examples of mods: 1) The fix of SQL Injections in AccountServer.exe and GroupServer.exe; 2) Increasing the limits for .txt / .bin files (ItemInfo, CharacterInfo, SkillInfo, etc.); 3) Local chat message handling using the lua function HandleChat(); 4) Character transformation using the lua function TransformCha(); 5) Character effects panel; 6) Displaying the levels of HP and SP under characters and monsters. Thus, with the help of mods, you can fix critical bugs and vulnerabilities, change settings, add new functionality and features. Initially, the appearance of mods was caused by the lack of open access to the source codes of the client and the server: the developers had no choice but to edit executable .exe files, developing and applying reverse engineering skills. After the publication of the source codes, the popularity of mods still remains at a high level. This is due to a few reasons: 1) Low quality of the received source codes, lack of experience in their use. To use them, the administrator needs to have an extensive knowledge of the C++ programming language, understand the client-server architecture, and understand how the server and the client work. In addition, the source codes require a long study and research for bugs and vulnerabilities, including the testing process; 2) The existing official builds of the server and client fully satisfy the requirements of most administrators and players, in addition, their performance and reliability have been confirmed by years of use. Many programs, scripts and mods were written for them, which may be incompatible with the server and client executable files compiled from the source codes; 3) The source code researching allows you to better understand the structure of the server and client executables (GameServer.exe, Game.exe). The knowledge gained makes it possible to create mods of increased complexity. When implementing their projects, administrators and developers can go in two ways: use the old, official builds of the server and client, and change their functionality using mods, or go towards the development of source codes. As it should already be clear, this topic supports the first way. At the moment, mod development is associated with some problems: 1) Our community lacks a clear standard and culture for writing mods. Someone injects the code directly into the executable file ("patching"), others prefer to write DLL. Some mods can conflict with each other, which leads to errors and subtle bugs; 2) Installing mods involves certain difficulties: for example, how to transfer a mod from one GameServer.exe to another one? Each time you need to do editing (patching) .exe file, and for this you need to have special knowledge and skills. If the mods are made in the form of DLL libraries, then each mod must be manually added into the import table of the executable file. All this is inconvenient, time-consuming and creates the possibility of errors and bugs during the installation process; 3) There are many versions of GameServer.exe and Game.exe (the rest of the server .exe's are not taken into account), which have a different binary structure. In other words, the developed mod for GameServer.exe version 1.36 will not work with GameServer.exe version 1.38 - you need to develop the mod for a specific .exe file. As a result, there is confusion about the versions of the executable files. A shining example is the addresses of the limits for .txt/.bin tables, I think many have noticed that they are different for different .exe. Based on the above, it was decided to create a system that would solve the current state of affairs in regards to mods and simplify their usage. The Mod Loader The mod loader performs several tasks: 1) Determining the type and version of the executable file (.exe) to be modified; 2) Searching for mods, determining their version, attaching to the process of the executable file; 3) Unification of the process of creating, installing and uninstalling mods. It is a DLL library that attaches one-time to the executable file of the server or client. Mods are also DLL libraries that are placed in a specific directory and are automatically launched by the loader when the server or client executable file starts. Before running the executable file, control is transferred to the loader. The loader determines the type and version of the .exe file to which it is attached and starts the process of searching for DLL libraries in the "mods" directory from the server or client root folder. The DLLs found are dynamically attached to the server or client process after which the loader requests the library information regarding the mod name, type, version of the executable target file, name and the author of the mod. If the type and version of the .exe file with attached loader matches the type and version of the .exe file obtained from the mod's library, then the loader gives the mod a command to start. Furthermore, changes to the code of the process of the executable file, thereby carrying out the modification. Before terminating the server or client process, control is again gained to the loader, which in turn detaches all mods from the process. The current version of the mod loader can work with the official 1.3x versions of GameServer.exe (server) and Game.exe (client). The type of executable file (GameServer.exe or Game.exe) and its version is determined by the build timestamp (linker timestamp), which is written in the COFF header of each executable. Supported GameServer.exe and Game.exe ---------------------+----+----------------+-------------- Name | ID | Designation | Time stamp ---------------------+----+----------------+-------------- GameServer.exe 1.36 | 1 | GAMESERVER_136 | 1204708785 ---------------------+----+----------------+-------------- GameServer.exe 1.38 | 2 | GAMESERVER_138 | 1204708785 ---------------------+----+----------------+-------------- Game.exe | 3 | GAME_13X_0 | 1222073761 ---------------------+----+----------------+-------------- Game.exe | 4 | GAME_13X_1 | 1243412597 ---------------------+----+----------------+-------------- Game.exe | 5 | GAME_13X_2 | 1252912474 ---------------------+----+----------------+-------------- Game.exe | 6 | GAME_13X_3 | 1244511158 ---------------------+----+----------------+-------------- Game.exe | 7 | GAME_13X_4 | 1585009030 ---------------------+----+----------------+-------------- Game.exe | 8 | GAME_13X_5 | 1207214236 ---------------------+----+----------------+-------------- GateServer.exe 1.38 | 101| GATESERVER_138 | 1224838480 ---------------------+----+----------------+-------------- Installing the Mod Loader 1) In the root directory of the executable file, create a folder called "mods" *. This folder will store DLL libraries of mods; 2) Open the executable file in CFF Explorer. Go to the "Import adder" tab (1); 3) Click the "Add" button (2) and select the pkodev.mod.loader.dll file (see the attachments at the end of this post); 4) In the "Exported functions" list, select "ExportedFunction" (3); 5) Click the "Import By Name" button (4); 6) Uncheck the "Rebuild OFTs" checkbox (5); 7) Click the "Rebuild Import Table" button (6); 8 ) Save the file (7). 9) Run the executable file. You should see the following message in the console window: [pkodev.mod.loader] ----------------------------------------------- [pkodev.mod.loader] PKOdev.NET mod loader ver. 1.0 by V3ct0r [pkodev.mod.loader] ----------------------------------------------- If the executable file does not have a console window, for example, Game.exe, then run it as follows: system\Game.exe startgame > output.txt The console output will now be redirected to the text file output.txt. * Note: for Game.exe, the mods folder must be in the client's root directory, not in the "system" folder. Installing mods To install a mod, just place its DLL library in the "mods" folder. For convenience, each mod can be placed in a separate folder. An example of a folder structure for GameServer.exe: GameServer | -> Mods | -> .disabled | -> .priority | -> pkodev.mod.example1.server.138.dll | -> pkodev.mod.example2 | -> pkodev.mod.example2.server.138.dll | -> pkodev.mod.example3 | -> pkodev.mod.example3.server.138.dll After launching the executable file, you should see the new mod in the list of loaded mods: Uninstalling mods To uninstall a mod, you need to delete its DLL library from the "mods" folder. Temporary disabling of mods To disable the loading of certain mods, create a ".disabled" file in the root directory with mods ("mods" folder) and write the names of the mods that you want to temporarily disable into it from a new line. For example: // File: mods\.disabled // Write here the names of mods that do not need to be loaded pkodev.mod.fullmap pkodev.mod.tablelimit Thus, mods "pkodev.mod.fullmap" and "pkodev.mod.tablelimit" will be ignored by the loader. Mod loading priority The mod loader allows you to load certain mods in the specified order. To do this, create a ".priority" file in the root directory with mods ("mods" folder) and write down the names of mods in it in descending order of priority. Mods not listed in this file will be loaded after mods with priority, in random order. For example: // File mods\.priority // Write down mods loading priority in descending order here pkodev.mod.power pkodev.mod.tablelimit pkodev.mod.fullmap Mods will be loaded in the following order: 1. pkodev.mod.power; 2. pkodev.mod.tablelimit; 3. pkodev.mod.fullmap; 4. Next - all other mods found in the "mods" folder in random order. Creating a mod In order for a mod to be loaded by the mod loader, it must meet the following requirements: 1) The name of the DLL library of the mod should be like: pkodev.mod.<mod name>.<client or server>.<.exe designation >.dll Examples: pkodev.mod.tablelimit.client.13x_0.dll pkodev.mod.mobspawn.server.138.dll 2) DLL library of the mod should export 3 functions: __declspec(dllexport) void __cdecl GetModInformation(mod_info& info) Fill in the structure of type mod_info. This structure contains basic information about the mod: its name, version, author name, executable file ID for which the mod is intended. // Mod information structure struct mod_info { // Mod name char name[128]; // Mod version char version[64]; // Author’s name char author[64]; // Type and version of the target .exe file (see the table) unsigned int exe_version; }; __declspec(dllexport) void __cdecl Start(const char* path) Enable the mod and modify the process of the executable file. The path variable contains the path to the root directory of the mod. In this function, the mod must perform its initialization, load the necessary settings and modify the process of the executable file. __declspec(dllexport) void __cdecl Stop() Disable the mod. In this function, the mod must save its settings, roll back the process modification (optional) and free resources. 3) The type and version of the executable file specified in the DLL library of the mod (structure modinfo, field exe_version) must match the type and version of the executable file for which it is intended. If the loader has defined the type and version of the executable file as GameServer.exe 1.38 (GAMESERVER_138) with ID 2, then the mod's DLL library should write the value 2 in the exe_version field, otherwise the mod will be determined as unsuitable. Mod development example Any programming language can be used to develop the mod which supports creating DLLs. I will use the C++ as programming language and the Visual Studio 2019 Community as development environment. As an example, let's create a mod for GameServer.exe version 1.38 that will display the "Hello world!" message in its window. 1) Let's define the name of the mod, let it be: pkodev.mod.helloworld Then the name of the DLL library of the mod will be: pkodev.mod.helloworld.server.138.dll 2) Create a Dynamic-Link Library (DLL) project; 3) Add the loader.h file to the project (see the attachments at the end of this post); 4) Implement the function GetModInformation(): void GetModInformation(mod_info& info) { strcpy_s(info.name, "pkodev.mod.helloworld"); strcpy_s(info.version, "1.0"); strcpy_s(info.author, "V3ct0r"); info.exe_version = GAMESERVER_138; } 5) Implement the function Start() void Start(const char* path) { std::cout << "Hello world!" << std::endl; std::cout << "path = " << path << std::endl << std::endl; } 6) Implement the function Stop() void Stop() { } 7) Compile the project. As a result, we’ll get the file pkodev.mod.helloworld.server.138.dll; 8 ) Install and test the mod. In the GameServer.exe window, we should see the message "Hello world!" and the path to the root directory of the mod. The sample mod project can be found in the attachments. Download 1) The mod loader; 2) Source code of the mod loader (C++); 3) Interface for creating mods (file loader.h); 4) The project of the sample mod "Hello world!" for Visual Studio 2019 Community (C++); 5) Samples of client and server executables from the table (7.3 MB); 6) PKOdev .NET mod loader project template for Visual Studio 2019 Community (C++). Available mods 1) Connecting Game.exe to Stall Server ("offline" stalls server connector); 2) Fixing instant respawn of killed monsters after GameServer restart; 3) Editing the limits of .txt tables; 4) Player rating system; 5) System of daily rewards for entering the game; 6) Automatically connect to the server / enter the game (Client modification that allows you to automatically connect to the server); 7) Displaying coordinates under the NPC; 8 ) Displaying additional parameters on the form with character characteristics (frmState); 9) Displaying the cooldown of skills; 10) Displaying the player's character level next to its name; 11) Antibot; 12) Displaying the name of the item in the apparel; 13) Displaying the level of items on their icons ("smart icons"); 14) Change the size of the monsters; 15) Server time; 16) Social buttons (Discord, Youtube, Twitch and etc); 17) Medals (necklaces) with titles; 18) Displaying servers response time ("ping") on the server selection form; 19) Contract system; 20) Disabling error messages when compiling .txt tables (table_bin); 21) Colored GM messages (GM notice); 22) Fixing the resetting character professions when reconnecting to the server; 23) Cleaning up chats; 24) Disabling password verification when entering into the in-game shop (IGS); 25) 60 frames per second (60 FPS); 26) Flying effect for wings; 27) Full area map for the region; 28) Highlight friends and enemies with color. (updated on 02/18/2022) If you have any questions or have problems, then feel free to write in this thread.
×
×
  • Create New...