Jump to content

Search the Community

Showing results for tags 'GM'.



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 12 results

  1. [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.
  2. [Mod] GMNotice() function The mod adds the GMNotice() function to the GameServer.exe LUA scripts, which allows you to send messages to players in the GM chat channel (ALT + P): GMNotice("Hello PKOdev.NET! This is a GM message.") Requirements Installed mod loading system for server and client (PKOdev.NET mod loader) version 1.1 or above. Modification information Name: pkodev.mod.gmnotice; Version: 1.0; Author: V3ct0r; Type: for server (GameServer.exe and GroupServer.exe); Supported executable .exe files: GAMESERVER_136, GAMESERVER_138 and GROUPSERVER_138. Installation 1) Place the mod DLL file "pkodev.mod.gmnotice.server.<VERSION>.dll" for your version of GameServer.exe into the folder "GameServer\mods"; 2) Place the mod DLL file "pkodev.mod.gmnotice.group.<VERSION>.dll" for your version of GroupServer.exe into the folder "GroupServer\mods". Download 1) Actual mod binaries (.dll); 2) The source code of the mod for Visual Studio 2022 Community (C++). If you encounter any problem, bug or have any questions, then feel free to write in this thread.
  3. [Mod] Colored GM messages (GM notice) This mod allows you to send colored GM messages to players (see screenshot above) using the input field in the game client (ALT + P), or using the GMNotice() function. To make the text of the message colored, you should write the following code at the beginning of the message: {color:color}Message The message color is specified in RGB format as a hexadecimal number (FFRRGGBB). The following example will send the GM message "Hello PKOdev.NET" to the players in orange: {color:FFFF8000}Hello PKOdev.NET! You can also use the GMNotice() function: GMNotice("{color:FFFF8000}Hello PKOdev.NET!") Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.colorgmnotice; 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.colorgmnotice.client.13x_<ID>.dll" for your version of Game.exe into the "mods" folder of the game client. Download 1) Binary release; 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.
  4. [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.
  5. Protect your GM Commands Thanks to @c0d3x for translate from Russian Hello! Let's pretend as if your server has been hacked and the hacker received access to the GM account afterwards. In this thread I'll try to explain how you can secure GM commands and make the hack nearly pointless. Attention! You must pay the most attention to &lua and &lua_all commands(!). If you have got them enabled on your server and somehow hacker manages to get into a GM account, he could get control over every thing, including your root folder; rdp access and so on and so forth. You can read more about those commands HERE. Be as safe as you can, and after reading this thread try Not to use the same commands as I'm gonna use as an example! 1st way. No GM commands - no problems! If you either use commands rarely or don't use them at all, then complete removal makes sense. You could edit characters or give them items using third party software or manually via database. To disable GM commands you should do some edits in GameServer.exe Version | Size (KB) | Address --------+--------------+------------ 1.36 | 2 040 | 0x000DE1E8 1.38 | 2 088 | 0x000E6852 2.0 | 3 000 | 0x00161349 Open GameServer.exe in any HEX editor and goto the address from the table above. I will be working with 1.38 GameServer.exe using HxD editor. Replace 23 bytes starting from this address to 0x90. Save your edits and make sure GM commands don't work in game. 2nd way. Rename gm commands. The hacker will not be able to use GM commands if he doesn't know their names. So, you have to change every command's name. Takes time but it's worth it To change GM command name, open GameServer.exe in any HEX editor. Find GM command and then change its name. New command's name length must be the same as the older one had (keep the same size!). For instance, let's rename &make to &give. Please note that 'make' and 'give' have the same length (they both have 4 symbols). Open GameServer.exe in HEX editor and find a string "make": You will find more strings that contain "make" in it ("MakeItem", "make failed!", "GMmakeLog" and such - we do not need them!). Simply ignore them and continue searching. When you find the needed one you'll see another GM commands' names there, too: Change it to "give": Save current edits. Do the same procedure for another GM commands. UPDATE! You can use this program: GM command address list GameServer.exe version 1.36 (2 040 KB): GameServer.exe version 1.38 (2 088 KB): GameServer.exe version 2.4 (3 000 KB) 3rd way. GameServer.exe with HandleChat(), GetGmLv() and SetGmLv() functions. To use this way you have to use modified GameServer.exe which has the functions above in it. Function HandleChat(userdata role, string message) works out when a character writes messages into local chat. Since all GM commands are being written into local chat, too, you can create a script that will control their execution. Like, you can make so that GM commands work only if the character, who executes them, has a specified ID or name. In addition to this, you can make so that the character has to be in a specified guild, where only administrators and/or GMs could enter. It all depends on your fantasy! To find out if character is a GM, use function GetGmLv(userdata role). Using function SetGmLv(userdata role, number level) you can edit account's gm level to which the character is attached to. Also, using the same function you can set GM level to 0 (ordinary player) in HandleChat() function in case the character hasn't passed the verification. Let's make a simple system to control GM commands: 1) GM commands can be used only if your name is: "V3ct0r", "pkodev" or "Administrator". 2) If the character is GM and he/she hasn't passed the verification, set GM level to 0, kick the character and send the message for Administrator to the GameServer.exe console. Firstly, let's create an array inside variable.lua with characters' names that could use GM commands, we'll call it PlayerCanUseCmd: PlayerCanUseCmd = {} PlayerCanUseCmd["V3ct0r"] = 1 PlayerCanUseCmd["pkodev"] = 1 PlayerCanUseCmd["Administrator"] = 1 Then let's make a script inside HandleChat() in functions.lua: -- Local chat handler function HandleChat(role, message) -- Check whether the character is a gm or not if (GetGmLv(role) > 0) then -- Check if the character has executed the command if (string.find(message, "&") == 1) then -- Check character's name local cha_name = GetChaDefaultName(role) if (PlayerCanUseCmd[cha_name] ~= nil) then -- The character can use the command return 1 end -- The character isn't allowed to use the command -- Set GM level to 0 SetGmLv(role, 0) -- Kick it from the server KickCha(role) -- Send a message to the console print("Player [" .. cha_name .."] tried to use GM command!") -- Don't let the character execute the command return 0 end end return 1 end To kick a character we have to add a KickCha() function, add it anywhere into functions.lua: function KickCha(character) local pkt = GetPacket() WriteCmd(pkt, 1505) SendPacket(character,pkt) end Thread is open for the further discussion. You're welcome to ask questions or give ideas in the comments. Thank you and best of luck!
  6. [Программа] Программа для редактирования GM-команд (pkodev.tool.editgmcmd) Данный инструментарий предназначен для редактирования (переименовывания) GM-команд в GameServer.exe (команды &) и GroupServer.exe ( команды @@). Отличительной особенностью программы является то, что она позволяет задавать новые имена для GM-команд как короче, так и длиннее оригинальных имен. Например, команду &updateall можно заменить на &upd, а команду &move - на &letsmove. Использование Программа представляет собой консольное приложение и, соответственно, работа с ней происходит с помощью командной строки в следующем виде: pkodev.tool.editgmcmd <команда> [параметры команды] Сначала указывается путь до исполняемого .exe файла программы, далее выбирается команда, а после задаются её параметры. Для возможности работы с конкретным целевым файлом GameServer.exe или GroupServer.exe применяется файл базы данных GM-команд в формате .json. В данном файле указываются: 1) Название целевого .exe файла; 2) Метка времени его сборки (linker timestamp); 3) Символ GM-команды (например, '&' или '@@'); 4) Список строк с именами GM-команд и их адреса в целевом .exe файле. С примером .json файла базы данных GM-команд можно ознакомиться по ссылке. В данный момент инструментарий поддерживает (7) команд, которые будут рассмотрены далее. 1. Команда 'name' Отобразить текущее название GM-команды в целевом .exe файле. Параметры: --in "Путь до целевого .exe файла" --db "Путь до .json файла с базой данных GM-команд" (необязателен*) --old "Оригинальное название GM-команды" Например, команда &updateall была переименована в команду &updateall1024, тогда вызов: pkodev.tool.editgmcmd.x64.Release name --in "GameServer.exe" --old "updateall" --db "pkodev.tool.editgmcmd.json" Вернет следующий результат: The GM-command '&updateall' is defined as '&updateall1024'. 2. Команда 'rename' Изменить название GM-команды в целевом .exe файле. Параметры: --in "Путь до целевого .exe файла" --db "Путь до .json файла с базой данных GM-команд" (необязателен*) --bp "Режим резервного копирования" (необязателен**) --old "Оригинальное название GM-команды" --new "Новое название GM-команды" Пример: pkodev.tool.editgmcmd.x64.Release rename --in "GameServer.exe" --old "move" --new "letsmove" --db "pkodev.tool.editgmcmd.json" В результате GM-команда &move будет заменена на GM-команду &letstmove. 3. Команда 'reset' Сбросить все измененные названия GM-команд в целевом .exe файле на оригинальные. Параметры: --in "Путь до целевого .exe файла" --db "Путь до .json файла с базой данных GM-команд" (необязателен*) --bp "Режим резервного копирования" (необязателен**) Пример: pkodev.tool.editgmcmd.x64.Release reset --in "GameServer.exe" --db "pkodev.tool.editgmcmd.json" Внимание! В результате все ранее измененные GM-команды в целевом .exe файле приобретут старые (оригинальные) названия. 4. Команда 'enum' Вывести список всех GM-команд в целевом .exe файле в виде таблицы в консоль. Параметры: --in "Путь до целевого .exe файла" --db "Путь до .json файла с базой данных GM-команд" (необязателен*) Пример: pkodev.tool.editgmcmd.x64.Release enum --in "GameServer.exe" --db "pkodev.tool.editgmcmd.json" Примерный результат вывода см. в изображении в шапке темы. 5. Команда 'supported' Вывести список поддерживаемых целевых .exe файлов в виде таблицы в консоль. Параметры: --db "Путь до .json файла с базой данных GM-команд" (необязателен*) Пример: pkodev.tool.editgmcmd.x64.Release supported --db "pkodev.tool.editgmcmd.json" По итогам выполнения команды в консоль будет выведен список поддерживаемых .exe файлов, например: +------+------------------------------------------------+-----------------+------------------+ | # | 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. Команда 'check' Проверить, поддерживается ли целевой .exe файл программой. Параметры: --in "Путь до целевого .exe файла" --db "Путь до .json файла с базой данных GM-команд" (необязателен*) Пример: pkodev.tool.editgmcmd.x64.Release check --in "GameServer.exe" --db "pkodev.tool.editgmcmd.json" Результат: GameServer.exe 1.38 (GAMESERVER_138) (Version: 1225867911) is supported! 7. Команда 'help' Получить помощь по программе. Параметры: Отсутствуют Пример: pkodev.tool.editgmcmd.x64.Release help Результат: 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' Данный параметр отвечает за путь до .json файла базы данных GM-команд, является необязательным и может отсутствовать. Если параметр '--db' не указан, то программа автоматически ищет этот файл в той же директории, в которой находится, и с таким же названием, что и её .exe файл, но с расширением .json. Например, если .exe файл программы находится по пути: "D:\tools\pkodev.tool.editgmcmd.x64.Release.exe", то программа будет пытаться загрузить базу данных GM-команд из файла: "D:\tools\pkodev.tool.editgmcmd.x64.Release.json". ** Параметр '--bp' Некоторые команды вносят изменения в целевой .exe файл. С целью предотвращения порчи данных, программа может сделать резервную копию целевого .exe файла. Данный параметр необязателен и при его отсутствии принимается значение по умолчанию. Параметр '--bp' принимает только следующие значения: 1) --bp "name" (значение по умолчанию) - файл резервной копии будет иметь такое же название, что и целевой .exe файл, но с расширением .backup; 2) --bp "time" - файл резервной копии будет иметь такое же название, что и целевой .exe файл, но с расширением .backup, плюс в начало названия добавляется временная метка на момент создания резервной копии; 3) --bp "off" - не создавать резервную копию целевого .exe файла. Скачать 1. Исполняемый файл (.exe) программы и файл (.json) с базой данных GM-команд; 2. Репозиторий с исходным кодом программы на языке C++ (Visual Studio 2022 Community). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  7. Цветные GM-сообщения (GM notice) Данный мод позволяет отправлять игрокам цветные GM-сообщения (см. скриншот выше) с помощью поля ввода в игровом клиента (ALT + P), либо с использованием функции GMNotice(). Чтобы сделать текст сообщения цветным, в самом начале сообщения необходимо прописать следующий код: {color:Цвет}Сообщение Цвет сообщения указывается в формате RGB в виде шестнадцатеричного числа (FFRRGGBB). Следующий пример выведет игрокам GM-сообщение "Hello PKOdev.NET" оранжевого цвета: {color:FFFF8000}Hello PKOdev.NET! Так же можно использовать функцию GMNotice(): GMNotice("{color:FFFF8000}Hello PKOdev.NET!") Требования Установленный Загрузчик модов для сервера и клиента (PKOdev.NET mod loader). Информация о моде Название: pkodev.mod.colorgmnotice; Версия: 1.0; Автор: V3ct0r; Тип: для клиента (Game.exe); Поддерживаемые исполняемые .exe файлы: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4, GAME_13X_5. Установка Поместите файл DLL-библиотеки мода "pkodev.mod.colorgmnotice.client.13x_<ID>.dll" для Вашей версии Game.exe в папку "mods" игрового клиента. Скачать 1) Бинарные файлы мода (.dll); 2) Исходный код мода для Visual Studio 2019 Community (C++). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  8. [Мод] Очистка чатов Мод позволяет администраторам игрового сервера удалять все сообщения в чатах у игроков (местный, мир, торг, отряд, гильдия, ЛС, лагерь). Для этого на стороне сервера для GameServer реализована LUA-функция ClearChat(role), в которую передается дескриптор персонажа, которым управляет администратор. Таким образом, можно, к примеру, реализовать GM-команду, которая будет очищать чаты (при наличии функций HandleChat() и GetGmLv() в 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 Недостатком мода является то, что он удаляет сразу все чаты без возможности указания конкретных каналов. Т.е. вместе с общими каналами (мир, торг, местный) будут так же очищены и каналы с сообщениями в гильдию, отряд, лагерь и ЛС. Так же следует помнить, что игрок может удалить .dll библиотеку мода из клиента и чаты перестанут очищаться по команде от сервера. Требования Установленный Загрузчик модов для сервера и клиента (PKOdev.NET mod loader). Информация о моде Название: pkodev.mod.clearchat; Версия: 1.0; Автор: V3ct0r; Тип: для клиента (Game.exe); Поддерживаемые исполняемые .exe файлы: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4, GAME_13X_5. Установка Клиент: Поместите файл DLL-библиотеки мода "pkodev.mod.clearchat.client.13x_<ID>.dll" для Вашей версии Game.exe в папку "mods" игрового клиента. Сервер: 1) Создайте файл с названием "pkodev.mod.clearchat.lua" в следующей директории сервера: \GameServer\resource\script\calculate\mods 2) Запишите в него следующий код: -- 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) Подключите файл "pkodev.mod.clearchat.lua" в начале файла SkillEffect.lua (\GameServer\resource\script\calculate) : dofile(GetResPath("script\\calculate\\mods\\pkodev.mod.clearchat.lua")) 4) Реализуйте сценарий работы функции ClearChat() для очистки чатов по Вашему усмотрению. Скачать 1) Бинарные файлы мода (.dll); 2) Исходный код мода для Visual Studio 2019 Community (C++). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  9. V3ct0r

    [PHP] Online HD & GM

    With this script you can show to players who is online from HD and GM. <?php $db_host = ''; $db_user = ''; $db_pass = ''; $db_name = 'GameDB'; $hd_level = 30; if (mssql_connect($db_host, $db_user, $db_pass) == false) { die ('<b>Error: </b> Can not connect to MSSQL server!'); } if (mssql_select_db($db_name) == false) { die ('<b>Error: </b> Can not select game database!'); } $sql = 'SELECT c.cha_name, a.gm FROM character AS c LEFT JOIN account AS a ON (c.act_id = a.act_id) WHERE c.mem_addr > 0 AND a.gm > 0'; $query = mssql_query($sql); if ($query == false) { die ('<b>Error: </b> Can not get list of online HD and GM!'); } $stuff = array(); while ($cha = mssql_fetch_object($query)) { $stuff[] = $cha; } mssql_close(); ?> <html> <head> <title>Список HD и GM в игре</title> </head> <body> <h1>Список HD и GM в игре</h1> <?php $stuff_online = ''; $n = count($stuff); if ($n > 0) { for ($i = 0; $i < $n; $i++) { if ($stuff[$i]->gm > $hd_level) { $stuff_online .= '[GM] ' . $stuff[$i]->cha_name; } else { $stuff_online .= '[HD] ' . $stuff[$i]->cha_name; } if ($i != ($n - 1)) { $stuff_online .= ', '; } else { $stuff_online .= '.'; } } } else { $stuff_online = 'All HD and GM are offline.'; } print $stuff_online; ?> </body> </html>
  10. Hello, I follow up some guides from this forum, and I create my own private server ! Thank you ! Question is: How to create max stats items like swords, armor, etc. I'm kind looking for combination of gems and every thing by commands or something to have the strongest weapons and armor. Thank you in advance.
  11. С помощью данного скрипта Вы можете выводить список HD и GM онлайн на своем сайте или в лаунчере, чтобы игроки могли легко связываться с администрацией в игре. Сам список выводится через запятую в одну строку. Настройка скрипта очень простая и в комментариях не нуждается. <?php // Настройки подключения к MSSQL-серверу $db_host = ''; $db_user = ''; $db_pass = ''; $db_name = 'GameDB'; $hd_level = 30; // Уровень до которого персонаж считается HD // Подключаемся к MSSQL-серверу if (mssql_connect($db_host, $db_user, $db_pass) == false) { die ('<b>Ошибка: </b> Не удалось подключиться к серверу баз данных!'); } // Выбираем базу данных if (mssql_select_db($db_name) == false) { die ('<b>Ошибка: </b> Не удалось открыть игровую базу данных!'); } // Делаем запрос $sql = 'SELECT c.cha_name, a.gm FROM character AS c LEFT JOIN account AS a ON (c.act_id = a.act_id) WHERE c.mem_addr > 0 AND a.gm > 0'; $query = mssql_query($sql); if ($query == false) { die ('<b>Ошибка: </b> Не удалось выполнить запрос на список HD и GM в игре!'); } // Формируем список HD и GM $stuff = array(); while ($cha = mssql_fetch_object($query)) { $stuff[] = $cha; } // Закрываем соединене с базой данных mssql_close(); ?> <html> <head> <title>Список HD и GM в игре</title> </head> <body> <h1>Список HD и GM в игре</h1> <?php // Выводим список HD и GM через запятую $stuff_online = ''; $n = count($stuff); if ($n > 0) { for ($i = 0; $i < $n; $i++) { if ($stuff[$i]->gm > $hd_level) { $stuff_online .= '[GM] ' . $stuff[$i]->cha_name; } else { $stuff_online .= '[HD] ' . $stuff[$i]->cha_name; } if ($i != ($n - 1)) { $stuff_online .= ', '; } else { $stuff_online .= '.'; } } } else { $stuff_online = 'HD и GM нет в игре.'; } print $stuff_online; ?> </body> </html>
  12. Подскажите как сделать Gm акк, или ссылочку дайте где прочитать
×
×
  • Create New...