Jump to content

Search the Community

Showing results for tags 'pkodev.mod.loader'.



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
  • 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 60 results

  1. [Mod] Contract system This system is a "Monster Hunt" type quest, the purpose of which is to kill a certain number of specific monsters. The player is given a special item - "Contract", which says which monster to hunt. It also records the number of monsters and current progress. After killing the required number of monsters, the contract is considered completed, and the player receives a reward. Some specifics of the system: 1) The item type for the contract should be 99. A unique ID is also selected for the item; 2) The contract can be picked up, thrown away, transferred to another player, put in the bank or sold; 3) To receive a reward after the completion of the contract, a player should use the item of the contract by double-clicking. If the contract has not been completed, the player will see a corresponding message in the system chat; 4) The composition and amount of the reward is determined by the administrator in a special function in the script of the contract system; 5) If a player has several contracts for killing the same monster in his inventory, then when killing this monster, one or another contract is selected randomly. Installation All necessary files and scripts can be downloaded at the end of the topic. Server 1) Add an item for the contract to the ItemInfo.txt file: 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! where XXXX is any unused ID. 2) Create a file with name "pkodev.contract.lua" in the directory "GameServer\resource\script\calculate\mods"; 3) Write the following code in this file: -------------------------------------------------------------- -- The contract system script -- -- Author: V3ct0r from PKOdev.NET -- Version: 1.0 (01/12/2022) -- -- How to install the system: -- 1) Put this file to '\GameServer\resource\script\calculate\mods' folder -- 2) Put the following line at the beginning of 'SkillEffect.lua' file: -- dofile(GetResPath("script\\calculate\\mods\\pkodev.contract.lua")) -- 3) Add the contract item in the ItemInfo.txt file -- 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 Upon completion, you are entitled to a reward -- 4) Specify the item ID in 'contract.conf.item_id' table below: -- item_id = XXXX -- 5) Write the code for issuing a reward for completing a contract in the 'contract.conf.reward_cb' function -- 6) To create a new contract use the function 'contract.create': -- local <result (0 or 1)>, <item_descriptor>, <slot (from 0 to bag_size - 1)> -- = contract.create(<character_descriptor>, <monster_id>, <monster_number>) -- For example: -- local ret, item, slot = contract.create(role, 103, 7) -- 7) Done! -------------------------------------------------------------- -- Print a log print("Loading pkodev.contract.lua") -- The contract system contract = contract or {} --------------------------------------- -- Settings --------------------------------------- contract.conf = { -- Contract item ID item_id = XXXX, -- User-defined function for reward reward_cb = function(role, item) -- Give 1,000 gold AddMoney (role, 0, 1000) -- Give an random item local arr = { -- Refining Gem x 1 {id = 885, count = 1}, -- or Gem of Rage x 2 {id = 863, count = 2}, -- or Cake x 60 {id = 1849, count = 60}, -- or Fairy of Luck x 1 {id = 231, count = 1} } local r = math.random(1, table.getn(arr)) GiveItem(role, 0, arr[r].id , arr[r].count, 4) -- Launch fireworks PlayEffect(role, 361) end } --------------------------------------- -- Constants --------------------------------------- contract.const = { item_type = 99, -- Contract item type target_id = ITEMATTR_VAL_STR, -- Item attribute ID with the ID of target monster target_max = ITEMATTR_VAL_AGI, -- Item attribute ID with the total amount of monsters to hunt target_cur = ITEMATTR_VAL_DEX -- Item attribute ID with the total amount of monsters already hunted } --------------------------------------- -- Hooks --------------------------------------- -- Adding an item to inventory event contract.Creat_Item__original = Creat_Item Creat_Item = function(item, item_type, item_lv, item_event) -- Check the item type if ( item_type == contract.const['item_type'] ) then -- Reset the previous attrbiutes Reset_item_add() -- Add new attributes to the item Add_Item_Attr(contract.const['target_id'], 0) Add_Item_Attr(contract.const['target_max'], 0) Add_Item_Attr(contract.const['target_cur'], 0) return item_add.cnt, item_add.attr[1][1], item_add.attr[1][2], item_add.attr[2][1], item_add.attr[2][2], item_add.attr[3][1], item_add.attr[3][2], item_add.attr[4][1], item_add.attr[4][2], item_add.attr[5][1], item_add.attr[5][2], item_add.attr[6][1], item_add.attr[6][2], item_add.attr[7][1], item_add.attr[7][2] end -- Call the original function Creat_Item(item, item_type, item_lv, item_event) return contract.Creat_Item__original(item, item_type, item_lv, item_event) end -- Player killed monster event contract.GetExp_PKM__original = GetExp_PKM GetExp_PKM = function(monster, role) -- Call the original function GetExp_PKM(dead, atk) contract.GetExp_PKM__original(monster, role) -- Get the main character's descriptor role = TurnToCha(role) -- Number of contracts in the player's bag local ret = CheckBagItem(role, contract.conf['item_id']) -- Check that player has contracts if ( ret > 0 ) then -- Monster ID local id = GetChaTypeID(monster) -- List of contracts in the bag local arr = {} local k = 0 -- Build the list of contracts for i = 0, ( GetKbCap(role) - 1 ), 1 do -- Get the item descriptor local item = GetChaItem(role, 2, i) -- Check the item ID if ( GetItemID(item) == contract.conf['item_id'] ) then -- Get the monster ID from contract local target_id = GetItemAttr(item, contract.const['target_id']) -- Check the monster ID if ( id == target_id ) then -- Get amount of monsters to hunt local target_cur = GetItemAttr(item, contract.const['target_cur']) local target_max = GetItemAttr(item, contract.const['target_max']) -- Check that the contract is not completed if ( target_cur < target_max ) then -- Add the item to the list k = k + 1 arr[k] = { item_ = item, cur_ = target_cur, max_ = target_max } end end end end -- Check that matching contracts have been found if ( k > 0 ) then -- Randomly select a contract local r = math.random(1, k) -- Increase the number of hunted monsters arr[r].cur_ = arr[r].cur_ + 1 -- Update amount of hunted monsters SetItemAttr(arr[r].item_, contract.const['target_cur'], arr[r].cur_) -- Synchronize the bag SynChaKitbag(role, 13) -- Check that the contract is not completed if ( arr[r].cur_ < arr[r].max_ ) then -- Write a message BickerNotice( role, string.format( "Contract: Remaining '%s' to hunt: %d / %d!", GetMonsterName(id), arr[r].cur_, arr[r].max_ ) ) else -- Write a message BickerNotice( role, string.format( "Contract: All '%s' are killed! The contract is completed.", GetMonsterName(id) ) ) end end end end --------------------------------------- -- Useful functions --------------------------------------- -- Create a contract contract.create = function(role, target_id, number) -- Get the main character's descriptor role = TurnToCha(role) -- Check that the bag is not locked if ( KitbagLock(role, 0) == LUA_FALSE ) then -- Error LG("pkodev.contract", "Can't create the contract item (id:", contract.conf['item_id'], ") because the bag is locked!") return LUA_FALSE, nil, 0 end -- Check that the bag has one free slot if ( GetChaFreeBagGridNum(role) == 0 ) then -- Error LG("pkodev.contract", "Can't create the contract item (id:", contract.conf['item_id'], ") because there are no free slots in the bag!") return LUA_FALSE, nil, 0 end -- Create an item local r1, r2 = MakeItem(role, contract.conf['item_id'], 1, 4) -- Check the result if ( r1 == 0 ) then -- Error LG("pkodev.contract", "Can't create the contract item (id:", contract.conf['item_id'], ")!") return LUA_FALSE, nil, 0 end -- Get the item descriptor local item = GetChaItem(role, 2, r2) -- Set contract data local a1 = SetItemAttr(item, contract.const['target_id'], target_id) local a2 = SetItemAttr(item, contract.const['target_max'], number) local a3 = SetItemAttr(item, contract.const['target_cur'], 0) -- Check that the data is set if ( (a1 == 0) or (a2 == 0) or (a3 == 0) ) then -- Error LG("pkodev.contract", "Can't set the contract data! a1 = ", a1, ", a2 = ", a2, ", a3 = ", a3) return LUA_FALSE, item, r2 end -- Synchronize the kitbag SynChaKitbag(role, 13) -- Write a message to the player SystemNotice(role, string.format("You received a monster hunt contract [%s] x %d!", GetMonsterName(target_id), number)) -- The contract is successfully created! return LUA_TRUE, item, r2 end -- Contract item use event ItemUse_PKOdevContract = function(role, item) -- Get the main character's descriptor role = TurnToCha(role) -- Get contract data local target_id = GetItemAttr(item, contract.const['target_id']) local target_max = GetItemAttr(item, contract.const['target_max']) local target_cur = GetItemAttr(item, contract.const['target_cur']) -- Check that the contract is not completed if ( target_cur < target_max ) then -- Print a message SystemNotice( role, string.format("You have to kill [%s] x %d more to complete this contract!", GetMonsterName(target_id), (target_max - target_cur) ) ) -- Cancel the item usage UseItemFailed(role) else -- Print a message SystemNotice(role, "You have successfully completed the contract, congratulations!") -- Call user-defined reward function if ( contract.conf['reward_cb'] ~= nil ) then contract.conf['reward_cb'](role, item) end end end 5) Write the contract item ID from ItemInfo.txt into the script of the system : contract.conf = { -- Contract item ID item_id = XXXX, . . . 6) Write your code for giving a reward for completing the contract in the function reward_cb(): -- User-defined function for reward reward_cb = function(role, item) -- Give 1,000 gold AddMoney (role, 0, 1000) -- Give an random item local arr = { -- Refining Gem x 1 {id = 885, count = 1}, -- or Gem of Rage x 2 {id = 863, count = 2}, -- or Cake x 60 {id = 1849, count = 60}, -- or Fairy of Luck x 1 {id = 231, count = 1} } local r = math.random(1, table.getn(arr)) GiveItem(role, 0, arr[r].id , arr[r].count, 4) -- Launch fireworks PlayEffect(role, 361) end 7) Open the file "GameServer\resource\script\calculate\SkillEffect.lua" and at the beginning of the file write the line: dofile(GetResPath("script\\calculate\\mods\\pkodev.contract.lua")) Client 1) Install the mod loading system PKOdev.NET mod loader; 2) Place the mod DLL file "pkodev.mod.contract.client.13x_<ID>.dll" for your version of Game.exe into the "mods" folder of the game client; 3) Add the item for the contract to the ItemInfo.txt file (see point 1 of the instructions for installing the system on the server). Creation and issuance of contracts Each contract must only be created using the contract.create() function. Using the GiveItem(), MakeItem() functions, or the &make GM command and other ways to create items is not allowed. The 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 a result, a contract will be created for killing seven "Forest Spirits" as in the image from the topic header. You can give contracts to players, for example, through a special NPC or with the another item. 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] Flying effect for wings The mod allows you to add a flight effect to any wings (items with type 44). Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.wings; 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 1) In the "mods" directory of your client, create a "pkodev.mod.wings" folder; 2) Place into it the mod DLL file "pkodev.mod.wings.client.13x_<ID>.dll" for your version of Game.exe; 3) Place into it the mod settings file "pkodev.mod.wings.cfg" and write in the file a list of wings IDs (from ItemInfo.txt) with a flying effect. Each new ID is written on a new line: 935 936 937 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.
  3. Ideas for mods This topic discusses ideas for creating new mods, as well as for improving existing ones.
  4. Идеи для модов В данной теме обсуждаются идеи для создания новых модов, а так же для улучшения уже существующих.
  5. [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.
  6. [Mod] Medals (necklaces) with titles The modification allows you to create medals (necklaces) with different titles that appear in brackets before the name of the character (see screenshot). Also, these necklaces allow you to change the color of the names of the characters. The text, color of the title and color of the character's name are specified in the file ItemInfo.txt for items with type 25 (necklace). 1) The text of the title is specified in the description of the item The maximum title length is 15 symbols; 2) The color of the title is specified in the 5th field instead of model for Lance. Color has format FFRRGGBB; 3) The color of the name is specified in the 6th field instead of model for Carsise. Color has format FFRRGGBB; Some examples of medals with titles: XXXX Medal 1 (Red Admin) l0005 10130005 FFFF0000 0 0 0 0 0 25 0 0 0 0 0 1 1 1 1 1 1 32 -1 1 -1 0 0 5 -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 0,1000 10000,10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Admin XXXX Medal 2 (Green maindev) l0005 10130005 FF00FF00 0 0 0 0 0 25 0 0 0 0 0 1 1 1 1 1 1 32 -1 1 -1 0 0 5 -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 0,1000 10000,10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maindev XXXX Medal 3 (Blue PkoDEV) l0005 10130005 FF0000FF 0 0 0 0 0 25 0 0 0 0 0 1 1 1 1 1 1 32 -1 1 -1 0 0 5 -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 0,1000 10000,10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PkoDEV Example of medal with title and colored character name: XXXX Medal 2 l0005 10130005 FF00FF00 FFFF8000 0 0 0 0 25 0 0 0 0 0 1 1 1 1 1 1 32 -1 1 -1 0 0 5 -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 0,1000 10000,10000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PKOdev.NET Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.title; 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 1) In the "mods" directory of your client, create a "pkodev.mod.title" folder; 2) Place into it the mod DLL file "pkodev.mod.title.client.13x_<ID>.dll" for your version of Game.exe; 3) Add new medals (necklaces) with titles to the file ItemInfo.txt of the server and client according to the example from the topic header. Compile ItemInfo.txt for the 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.
  7. [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.
  8. [Mod] Displaying the cooldown of skills The mod shows the time on the skill icons, which remains until full recovery (see animation above). Based on @Snre3n's code posted in thread "Source Code Features/Concepts Releases": Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.cooldown; 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.cooldown.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.
  9. [Мод] Отключение сообщений об ошибках при компиляции .txt-таблиц (table_bin) Данный мод отключает многочисленный вывод ошибок в диалоговом окне (MessageBox) при отсутствии некоторых .txt-таблиц в процессе их компиляции с помощью параметра запуска клиента table_bin. Требования Установленный Загрузчик модов для сервера и клиента (PKOdev.NET mod loader). Информация о моде Название: pkodev.mod.nomsgbin; Версия: 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.nomsgbin.client.13x_<ID>.dll" для Вашей версии Game.exe в папку "mods" игрового клиента. Скачать 1) Бинарные файлы мода (.dll); 2) Исходный код мода для Visual Studio 2019 Community (C++). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  10. [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.
  11. [Мод] Подключение Game.exe к Stall Server (сервер "оффлайн" ларьков) Для реализации шифрования протокола в сервере "оффлайн" ларьков, последнему необходимо знать MD5-хэш пароля игрового аккаунта, но клиент версии 1.3x отправляет на сервер хэш пароля в зашифрованном виде. Данный мод для системы "PKODev.NET mod loader" необходим для отключения шифрования MD5-хэша пароля на стороне клиента и подключения к серверу "оффлайн" ларьков. Без данной модификации, при подключении к серверу с установленной системой "оффлайн" ларьков, пользователь будет получать ошибку "Неверный пароль!". Требования Установленный Загрузчик модов для сервера и клиента (PKOdev.NET mod loader). Информация о моде Название: pkodev.mod.stallserver; Версия: 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.stallserver.client.13x_<ID>.dll" для Вашей версии Game.exe в папку "mods" игрового клиента. Скачать 1) Бинарные файлы мода (.dll); 2) Исходный код мода для Visual Studio 2019 Community (C++). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  12. [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.
  13. [Mod] Highlight friends and enemies with color This modification highlights friendly and hostile players on the screen: the names of the characters change color, and colored circles are displayed under the characters (see screenshot above). If there are enemies near the player's character, a warning icon is displayed next to the character's avatar: Characters are considered friendly if they: 1) Are in the same party; 2) Are in the same guild; 3) Are in the same fraction. The mod only works on PvP maps that are specified in the settings. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.enemy; 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 1) In the "mods" directory of your client, create a "pkodev.mod.enemy" folder; 2) Place into it the mod DLL file "pkodev.mod.enemy.client.13x_<ID>.dll" for your version of Game.exe; 3) Place into it the mod settings file "pkodev.mod.enemy.cfg" and customize it as you wish: // pkodev.mod.enemy settings file // (c) V3ct0r from PKOdev.NET // 02/16/2022 [show] main_cha = true // Should the player character be displayed as a teammate? colored_name = true // Colorize character names? colored_circle = true // Show circles under characters? [color] enemy_color = FFFF0000 // Enemy character name color (in the hexadecimal form: FFRRGGBB) friend_color = FF00FF00 // Teammate character name color (in the hexadecimal form: FFRRGGBB) [icon] warning_show = true // Should the 'warning' icon be shown when enemies are near? warning_x = 208 // 'x' position of the icon on the screen warning_y = 16 // 'y' position of the icon on the screen [map] maps = garner,magicsea,darkblue // Maps on which the mod is enabled 4) In the "texture" directory of the game client, create a folder "mods", and in it a subfolder "pkodev.mod.enemy". Place the "warning.png" icon from the archive with the mod into this subfolder. You can replace this icon with any other with the same name, 32 x 32 pixels and in .png format. 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] 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.
  15. Bugs This topic publishes and discusses bugs that were found in certain mods based on the results of their testing and usage. 1. Change the size of the monsters - After an indefinite time, the enlarged character model returns to normal size (@Fomin). 2. Displaying the cooldown of skills - When teleporting or re-entering the game, the display of the cooldown time of skills disappears (@Fomin). 3. Displaying coordinates under the NPC - Sometimes instead of the name of the player's character, the name of a random NPC is displayed (@dragontechi). 4. 60 frames per second (60 FPS) - After installing the mod, the frame rate does not change (@dragontechi, @squaller). 5. Disabling password verification when entering into the in-game shop (IGS) - The store does not display the number of crystals on the account (@Tera). 6. Editing the limits of .txt tables - GameServer.exe has undefined behavior when changing the skillinfo.txt limit. For example, only Sleepy snails spawn at the entrance to Argent (@Greaux). 7. Displaying the level of items on their icons ("smart icons") - Client closes with mod version for Game.exe GAME_13X_1 (@small666). Updated 03/03/2022 I thank everyone for the feedback and ask you to tell about all the bugs found in this thread, or directly in topics with mods. When publishing a bug report, please write the following information: 1) The name of the mod; 2) Description of the bug; 3) Version ID of your .exe file (GAME_13X_0 ... GAME_13X_5, GAMESERVER_136, GAMESERVER_138); 4) Are there any other modifications and patches in the .exe file? 5) What other mods for PKOdev.NET mod loader are installed?
  16. [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.
  17. [Mod] Editing the limits of .txt tables With the help of this mod for the "PKODev.NET mod loader" system, you can easily edit the limits for .txt/.bin files of the client and server without the need to edit Game.exe and GameServer.exe in the HEX editor. The limits are edited in the text file pkodev.mod.tablelimit.cfg: areaset = 300 character_lvup = 120 characterinfo = 2500 forgeitem = 12 hairs = 500 int_cha_item = 32 iteminfo = 6000 lifelvup = 1000 saillvup = 1000 shipinfo = 120 shipiteminfo = 500 skilleff = 240 skillinfo = 500 characterposeinfo = 100 chaticons = 100 elfskillinfo = 100 eventsound = 30 itempre = 100 itemrefineeffectinfo = 5000 itemrefineinfo = 20000 itemtype = 100 magicgroupinfo = 10 magicsingleinfo = 100 mapinfo = 100 musicinfo = 500 notifyset = 100 objevent = 10 resourceinfo = 3000 sceneffectinfo = 14000 sceneobjinfo = 800 selectcha = 60 serverset = 100 shadeinfo = 14000 stoneinfo = 100 terraininfo = 100 It is not necessary to write to the file all limits If you need to edit only some of them: iteminfo = 12000 characterinfo = 6000 mapinfo = 500 GameServer.exe tables (13) Game.exe tables (31) Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.tablelimit; 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 1) In the "mods" directory of your server or client, create a "pkodev.mod.tablelimit" folder; 2) Place into it the mod DLL file "pkodev.mod.tablelimit.<client/server>.<x>.dll" for your version of Game.exe or GameServer.exe; 3) Place into it the mod settings file "pkodev.mod.tablelimit.cfg"; 4) Edit the "pkodev.mod.tablelimit.cfg" file at your own discretion - specify the required limit values for each .txt/.bin table file: <table_name> = <value> 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] 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.
  19. [Мод] Расширение GateServer для сервера "оффлайн" ларьков (StallServer) Данная модификация GateServer предназначена для определения IP-адресов клиентов, которые находятся за сервером "оффлайн" ларьков (StallServer). Поскольку StallServer по своей сути является прокси-сервером, через который клиент (Game) подключается к игровому серверу (GateServer), то последний не будет "видеть" реальный IP-адрес клиента, а в логах и базе данных у всех игроков будет одинаковый IP-адрес StallServer (например, 127.0.0.1 если GateServer и StallServer запущены на одной машине). Для решения этой проблемы StallServer дописывает IP-адрес клиента в логин-пакет, что требует модификации GateServer для чтения IP-адреса из пакета и его привязки к клиенту. Требования Установленный Загрузчик модов для сервера и клиента (PKOdev.NET mod loader). Информация о моде Название: pkodev.mod.stallip; Версия: 1.0; Автор: V3ct0r; Тип: для сервера (GateServer.exe); Поддерживаемые исполняемые .exe файлы: GATESERVER_138. Установка Поместите файл DLL-библиотеки мода "pkodev.mod.stallip.gate.138.dll" в папку "mods" GateServer.exe. Скачать 1) Бинарные файлы мода (.dll); 2) Исходный код мода для Visual Studio 2019 Community (C++). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  20. [Mod] 60 frames per second (60 FPS) This mod increases the graphics rendering speed of the game client from 30 to 60 frames per second. The mod has several problems: 1) When movement speed is too quick, the player's character can be thrown back; 2) When rmovement speed is too quick, the map, NPCs, monsters and players may not have time to load; 3) Animations of characters and objects are played too fast. Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.60fps; Version: 1.0; Author: V3ct0r, BotPRO; 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 1) In the "mods" directory of the game client, create a folder named "pkodev.mod.60fps"; 2) Place the DLL file of the mod "pkodev.mod.60fps.client.13x_<ID>.dll" for your version of Game.exe into the folder "mods\pkodev.mod.60fps" of the game client; 3) Place the mod DLL file "pkodev.mod.60fps.impl_<ID>.dll" for your of version Game.exe into the folder "mods\pkodev.mod.60fps\impl" 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. [Мод] Изменение размера персонажей Данный мод позволяет редактировать масштаб персонажей (см. скриншот выше). Требования Установленный Загрузчик модов для сервера и клиента (PKOdev.NET mod loader). Информация о моде Название: pkodev.mod.mobsize; Версия: 1.0; Авторы: @VItal13, V3ct0r; Тип: для клиента (Game.exe); Поддерживаемые исполняемые .exe файлы: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4 и GAME_13X_5. Установка 1) В директории "mods" Вашего клиента создайте папку "pkodev.mod.mobsize"; 2) Поместите в неё файл DLL-библиотеки мода "pkodev.mod.mobsize.client.13x_<x>.dll" для Вашей версии Game.exe. 3) Поместите в неё файл настроек мода "pkodev.mod.mobsize.cfg" и запишите в него список масштабов* персонажей в следующем формате: <ID монстра>{<Масштаб X>;<Масштаб Y>;<Масштаб Z>} Например, для "Лесного духа" ID 103: 103{2.5;2.5;2.5} * Каждый новый персонаж записывается с новой строки. Скачать 1) Бинарные файлы мода (.dll); 2) Исходный код мода для Visual Studio 2019 Community (C++). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  22. [Мод] Время сервера Мод добавляет в игру текстовую метку с часами - текущее время сервера. Время сервера берется из пакета ID: 940, который сервер отправляет клиенту при подключении, например: [01-17 10:44:47:879] Метка с часами привязывается к форме миникарты "frmMinimap" из файла GUI-скриптов "\scripts\lua\forms\minimap.clu". Требования Установленный Загрузчик модов для сервера и клиента (PKOdev.NET mod loader). Информация о моде Название: pkodev.mod.clock; Версия: 1.0; Автор: V3ct0r; Тип: для клиента (Game.exe); Поддерживаемые исполняемые .exe файлы: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4 иGAME_13X_5). Установка 1) В директории "mods" Вашего клиента создайте папку "pkodev.mod.clock"; 2) Поместите в неё файл DLL-библиотеки мода "pkodev.mod.clock.client.13x_<x>.dll" для Вашей версии Game.exe. 3) Поместите в неё файл настроек мода "pkodev.mod.clock.cfg" и запишите в него желаемый формат вывода времени сервера в соответствии с документацией на функцию strftime(). Например, формат: Время сервера: %H:%M:%S %d.%m.%y Может дать следующий вывод: Время сервера: 10:51:20 17.01.2022 4) В файл GUI-скриптов "\scripts\lua\forms\minimap.clu" добавьте код для текстовой метки "labClock", которая будет отвечать за вывод времени сервера: ------------------------------------------------------------------------------------------ -- 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) ------------------------------------------------------------------------------------------ Скачать 1) Бинарные файлы мода (.dll); 2) Исходный код мода для Visual Studio 2019 Community (C++). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  23. [Мод] Система контрактов Данная система представляет собой импровизированный квест типа "Охота на монстров", целью которого является убийство некоторого числа определенных монстров. Игроку выдается специальный предмет - "Контракт", в котором написано на какого монстра необходимо охотиться. Так же в нем записывается число монстров и текущий прогресс. После убийства необходимого числа монстров контракт считается выполненным, а игрок получает награду. Некоторые особенности системы: 1) Тип предмета для контракта должен быть 99. Для предмета также выбирается уникальный ID; 2) Контракт можно подобрать, выбросить, передать другому игроку, положить в банк или продать; 3) Для получения награды после завершения контракта, игрок должен использовать предмет контракта двойным кликом. Если контракт не был завершен, то игрок увидит соответствующее сообщение в систему; 4) Состав и количество награды определяется администратором в специальной функции в скрипте системы; 5) Если у игрока в инвентаре несколько контрактов на убийство одного и того же монстра, то при убийстве данного монстра тот или иной контракт выбирается случайным образом. Установка Все необходимые файлы и скрипты можно скачать в конце темы. Сервер 1) Добавьте в файл ItemInfo.txt предмет для контракта: 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! где XXXX - любой незанятый ID. 2) Создайте файл с названием "pkodev.contract.lua" в директории "GameServer\resource\script\calculate\mods"; 3) Поместите в данный файл следующий код: -------------------------------------------------------------- -- The contract system script -- -- Author: V3ct0r from PKOdev.NET -- Version: 1.0 (01/12/2022) -- -- How to install the system: -- 1) Put this file to '\GameServer\resource\script\calculate\mods' folder -- 2) Put the following line at the beginning of 'SkillEffect.lua' file: -- dofile(GetResPath("script\\calculate\\mods\\pkodev.contract.lua")) -- 3) Add the contract item in the ItemInfo.txt file -- 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 Upon completion, you are entitled to a reward -- 4) Specify the item ID in 'contract.conf.item_id' table below: -- item_id = XXXX -- 5) Write the code for issuing a reward for completing a contract in the 'contract.conf.reward_cb' function -- 6) To create a new contract use the function 'contract.create': -- local <result (0 or 1)>, <item_descriptor>, <slot (from 0 to bag_size - 1)> -- = contract.create(<character_descriptor>, <monster_id>, <monster_number>) -- For example: -- local ret, item, slot = contract.create(role, 103, 7) -- 7) Done! -------------------------------------------------------------- -- Print a log print("Loading pkodev.contract.lua") -- The contract system contract = contract or {} --------------------------------------- -- Settings --------------------------------------- contract.conf = { -- Contract item ID item_id = XXXX, -- User-defined function for reward reward_cb = function(role, item) -- Give 1,000 gold AddMoney (role, 0, 1000) -- Give an random item local arr = { -- Refining Gem x 1 {id = 885, count = 1}, -- or Gem of Rage x 2 {id = 863, count = 2}, -- or Cake x 60 {id = 1849, count = 60}, -- or Fairy of Luck x 1 {id = 231, count = 1} } local r = math.random(1, table.getn(arr)) GiveItem(role, 0, arr[r].id , arr[r].count, 4) -- Launch fireworks PlayEffect(role, 361) end } --------------------------------------- -- Constants --------------------------------------- contract.const = { item_type = 99, -- Contract item type target_id = ITEMATTR_VAL_STR, -- Item attribute ID with the ID of target monster target_max = ITEMATTR_VAL_AGI, -- Item attribute ID with the total amount of monsters to hunt target_cur = ITEMATTR_VAL_DEX -- Item attribute ID with the total amount of monsters already hunted } --------------------------------------- -- Hooks --------------------------------------- -- Adding an item to inventory event contract.Creat_Item__original = Creat_Item Creat_Item = function(item, item_type, item_lv, item_event) -- Check the item type if ( item_type == contract.const['item_type'] ) then -- Reset the previous attrbiutes Reset_item_add() -- Add new attributes to the item Add_Item_Attr(contract.const['target_id'], 0) Add_Item_Attr(contract.const['target_max'], 0) Add_Item_Attr(contract.const['target_cur'], 0) return item_add.cnt, item_add.attr[1][1], item_add.attr[1][2], item_add.attr[2][1], item_add.attr[2][2], item_add.attr[3][1], item_add.attr[3][2], item_add.attr[4][1], item_add.attr[4][2], item_add.attr[5][1], item_add.attr[5][2], item_add.attr[6][1], item_add.attr[6][2], item_add.attr[7][1], item_add.attr[7][2] end -- Call the original function Creat_Item(item, item_type, item_lv, item_event) return contract.Creat_Item__original(item, item_type, item_lv, item_event) end -- Player killed monster event contract.GetExp_PKM__original = GetExp_PKM GetExp_PKM = function(monster, role) -- Call the original function GetExp_PKM(dead, atk) contract.GetExp_PKM__original(monster, role) -- Get the main character's descriptor role = TurnToCha(role) -- Number of contracts in the player's bag local ret = CheckBagItem(role, contract.conf['item_id']) -- Check that player has contracts if ( ret > 0 ) then -- Monster ID local id = GetChaTypeID(monster) -- List of contracts in the bag local arr = {} local k = 0 -- Build the list of contracts for i = 0, ( GetKbCap(role) - 1 ), 1 do -- Get the item descriptor local item = GetChaItem(role, 2, i) -- Check the item ID if ( GetItemID(item) == contract.conf['item_id'] ) then -- Get the monster ID from contract local target_id = GetItemAttr(item, contract.const['target_id']) -- Check the monster ID if ( id == target_id ) then -- Get amount of monsters to hunt local target_cur = GetItemAttr(item, contract.const['target_cur']) local target_max = GetItemAttr(item, contract.const['target_max']) -- Check that the contract is not completed if ( target_cur < target_max ) then -- Add the item to the list k = k + 1 arr[k] = { item_ = item, cur_ = target_cur, max_ = target_max } end end end end -- Check that matching contracts have been found if ( k > 0 ) then -- Randomly select a contract local r = math.random(1, k) -- Increase the number of hunted monsters arr[r].cur_ = arr[r].cur_ + 1 -- Update amount of hunted monsters SetItemAttr(arr[r].item_, contract.const['target_cur'], arr[r].cur_) -- Synchronize the bag SynChaKitbag(role, 13) -- Check that the contract is not completed if ( arr[r].cur_ < arr[r].max_ ) then -- Write a message BickerNotice( role, string.format( "Contract: Remaining '%s' to hunt: %d / %d!", GetMonsterName(id), arr[r].cur_, arr[r].max_ ) ) else -- Write a message BickerNotice( role, string.format( "Contract: All '%s' are killed! The contract is completed.", GetMonsterName(id) ) ) end end end end --------------------------------------- -- Useful functions --------------------------------------- -- Create a contract contract.create = function(role, target_id, number) -- Get the main character's descriptor role = TurnToCha(role) -- Check that the bag is not locked if ( KitbagLock(role, 0) == LUA_FALSE ) then -- Error LG("pkodev.contract", "Can't create the contract item (id:", contract.conf['item_id'], ") because the bag is locked!") return LUA_FALSE, nil, 0 end -- Check that the bag has one free slot if ( GetChaFreeBagGridNum(role) == 0 ) then -- Error LG("pkodev.contract", "Can't create the contract item (id:", contract.conf['item_id'], ") because there are no free slots in the bag!") return LUA_FALSE, nil, 0 end -- Create an item local r1, r2 = MakeItem(role, contract.conf['item_id'], 1, 4) -- Check the result if ( r1 == 0 ) then -- Error LG("pkodev.contract", "Can't create the contract item (id:", contract.conf['item_id'], ")!") return LUA_FALSE, nil, 0 end -- Get the item descriptor local item = GetChaItem(role, 2, r2) -- Set contract data local a1 = SetItemAttr(item, contract.const['target_id'], target_id) local a2 = SetItemAttr(item, contract.const['target_max'], number) local a3 = SetItemAttr(item, contract.const['target_cur'], 0) -- Check that the data is set if ( (a1 == 0) or (a2 == 0) or (a3 == 0) ) then -- Error LG("pkodev.contract", "Can't set the contract data! a1 = ", a1, ", a2 = ", a2, ", a3 = ", a3) return LUA_FALSE, item, r2 end -- Synchronize the kitbag SynChaKitbag(role, 13) -- Write a message to the player SystemNotice(role, string.format("You received a monster hunt contract [%s] x %d!", GetMonsterName(target_id), number)) -- The contract is successfully created! return LUA_TRUE, item, r2 end -- Contract item use event ItemUse_PKOdevContract = function(role, item) -- Get the main character's descriptor role = TurnToCha(role) -- Get contract data local target_id = GetItemAttr(item, contract.const['target_id']) local target_max = GetItemAttr(item, contract.const['target_max']) local target_cur = GetItemAttr(item, contract.const['target_cur']) -- Check that the contract is not completed if ( target_cur < target_max ) then -- Print a message SystemNotice( role, string.format("You have to kill [%s] x %d more to complete this contract!", GetMonsterName(target_id), (target_max - target_cur) ) ) -- Cancel the item usage UseItemFailed(role) else -- Print a message SystemNotice(role, "You have successfully completed the contract, congratulations!") -- Call user-defined reward function if ( contract.conf['reward_cb'] ~= nil ) then contract.conf['reward_cb'](role, item) end end end 5) Запишите в скрипт системы ID предмета контракта из ItemInfo.txt: contract.conf = { -- Contract item ID item_id = XXXX, . . . 6) Запишите в функцию reward_cb() код для выдачи награды за выполнение контракта: -- User-defined function for reward reward_cb = function(role, item) -- Give 1,000 gold AddMoney (role, 0, 1000) -- Give an random item local arr = { -- Refining Gem x 1 {id = 885, count = 1}, -- or Gem of Rage x 2 {id = 863, count = 2}, -- or Cake x 60 {id = 1849, count = 60}, -- or Fairy of Luck x 1 {id = 231, count = 1} } local r = math.random(1, table.getn(arr)) GiveItem(role, 0, arr[r].id , arr[r].count, 4) -- Launch fireworks PlayEffect(role, 361) end 7) Откройте файл "GameServer\resource\script\calculate\SkillEffect.lua" и в самом начале запишите строку: dofile(GetResPath("script\\calculate\\mods\\pkodev.contract.lua")) Клиент 1) Установите загрузчик модов PKOdev.NET mod loader; 2) Поместите файл DLL-библиотеки мода "pkodev.mod.contract.client.13x_<ID>.dll" для Вашей версии Game.exe в папку "mods" игрового клиента; 3) Добавьте в файл ItemInfo.txt предмет для контракта (см. пункт 1 инструкции по установке системы на сервер). Создание и выдача контрактов Каждый контракт должен быть создан только с использованием функции contract.create(). Использовать функции GiveItem(), MakeItem(), либо GM-команду &make и другие способы создания предметов не допускается. Синтаксис: local <Результат LUA_TRUE|LUA_FALSE>, <Дескриптор предмета>, <Ячейка предмета> = contract.create(<Дескриптор персонажа>, <ID монстра>, <Число монстров>) Пример: local ret, item, pos = contract.create(role, 103, 7) В результате будет создан контракт на убийство семи "Лесных духов" как на изображении из шапки темы. Выдавать контракты можно, например, через специального NPC или с помощью другого предмета. Скачать 1) Бинарные файлы мода (.dll); 2) Исходный код мода для Visual Studio 2019 Community (C++). Если Вы столкнулись с какой-либо проблемой, багом или у Вас возникли вопросы, то пишите в данной теме.
  24. [Mod] Social buttons (Discord, Youtube, Twitch and etc) The mod allows you to add social buttons to the game, by clicking on which the player will be redirected to the corresponding resource on the Internet using the URL specified in the mod settings, for example, to the Discord server, to the Youtube channel, to the Facebook group. Buttons are bound to the minimap form ("frmMinimap"). Requirements Installed mod loading system for server and client (PKOdev.NET mod loader). Modification information Name: pkodev.mod.social; 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 1) In the "mods" directory of your client, create a "pkodev.mod.social" folder; 2) Place into it the mod DLL file "pkodev.mod.social.client.13x_<ID>.dll" for your version of Game.exe; 3) Place into it the mod settings file "pkodev.mod.social.cfg"; 4) In the GUI scripts of the game client, add the required social buttons to the minimap form (form "frmMinimap" from the file "minimap.clu"), for example: btnFacebook = UI_CreateCompent(frmMinimap, BUTTON_TYPE, "btnFacebook", 24, 24, 0, 180) UI_LoadButtonImage(btnFacebook, "texture/mods/pkodev.mod.social/social.png", 24, 24, 0, 0, FALSE ) btnDiscord = UI_CreateCompent(frmMinimap, BUTTON_TYPE, "btnDiscord", 24, 24, 28, 180) UI_LoadButtonImage(btnDiscord, "texture/mods/pkodev.mod.social/social.png", 24, 24, 24, 0, FALSE ) btnYoutube = UI_CreateCompent(frmMinimap, BUTTON_TYPE, "btnYoutube", 24, 24, 56, 180) UI_LoadButtonImage(btnYoutube, "texture/mods/pkodev.mod.social/social.png", 24, 24, 48, 0, FALSE ) btnTwitch = UI_CreateCompent(frmMinimap, BUTTON_TYPE, "btnTwitch", 24, 24, 84, 180) UI_LoadButtonImage(btnTwitch, "texture/mods/pkodev.mod.social/social.png", 24, 24, 72, 0, FALSE ) btnTwitter = UI_CreateCompent(frmMinimap, BUTTON_TYPE, "btnTwitter", 24, 24, 112, 180) UI_LoadButtonImage(btnTwitter, "texture/mods/pkodev.mod.social/social.png", 24, 24, 96, 0, FALSE ) 5) Add social buttons to the mod settings file "pkodev.mod.social.cfg" in the following format: <button_name> = <URL> For the buttons from the example above: btnFacebook = https://facebook.com/ btnDiscord = https://discord.com/ btnYoutube = https://www.youtube.com/ btnTwitch = https://www.twitch.tv/ btnTwitter = https://twitter.com/ 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] 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.
×
×
  • Create New...