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


  • Russian section
    • Новости и объявления
    • Пиратия: Документация
    • Пиратия: Релизы
    • Пиратия: Разработка
    • Пиратия: Web
    • Пиратия: Помощь
    • Программирование
    • Совместные проекты / набор команды
    • Доска объявлений
    • Offtop
  • English Section
    • News & Announcements
    • Guides
    • Releases
    • Development
    • Web
    • Questions & Help
    • Programming
    • Shared Projects / Team search
    • Paid services & Requests
    • Offtopic
  • Server Advertisements
    • Russian servers
    • English servers
  • Forsaken World / DarkAge
    • Guides
    • Releases
    • Development
    • Web
    • Questions & Help

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 4 results

  1. V3ct0r

    Protect your GM Commands

    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!
  2. С помощью данного скрипта Вы можете выводить список 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>
  3. 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>
  4. Подскажите как сделать Gm акк, или ссылочку дайте где прочитать