V3ct0r 2,117 Report post Posted January 18, 2022 [Mod] Contracts system This system is a "Monster Hunt" type quest, the purpose of which is to defeat a certain amount of specific monsters. A player is given a special item - “Contract”, which indicates which monster and how many the player have to defeat. As monsters are defeated, the player's current progress is updated in the "Contract". After defeating the required number of monsters, the "Contract" is considered completed, and the player can receive a reward by using the "Contract" item. The system consists of a pkodev.mod.loader modification for the game client (Game.exe) and a Lua script for the game server (GameServer.exe). Modification of the client is necessary to visualize the specified characteristics of the item in the hint field for the "Contract" when the player hover the mouse cursor over it's item. The target monster ID, the number of monsters already defeated, and the number of monsters needed to complete the "Contract" are stored in the following item stats: ITEMATTR_VAL_STR, ITEMATTR_VAL_DEX, and ITEMATTR_VAL_AGI, respectively. The purpose of the mod is to display these item characteristics in a form understandable to the player. For example, if ITEMATTR_VAL_STR = 103, ITEMATTR_VAL_DEX = 5, and ITEMATTR_VAL_AGI = 10, then the player will see the following information when hovering the mouse over "Contract": Hunt: 'Forest Spirit' x 10 Progress: 5 / 10 The Lua script for the game server is the core of the Contracts system, which contains the System settings and the logic of its operation. For example, when defeating next monster, the script will search the character's inventory for a suitable active "Contract", and if such the item is found, the System will update its state. An important setting of the script is the function that is necessary for issuing a reward after the player successfully completes the "Contract". Some features of the System: 1. "Contract" can be picked up, thrown away, transferred to another player, put in a bank or sold; 2. If a player has multiple "Contracts" in his inventory to hunt the same monster, then when defeating this monster, the "Contract" is selected randomly; 3. To receive a reward after completing a "Contract", the player should use an item of the "Contract", for example by double-clicking on it. The player will see a corresponding message in the system chat if the "Contract" has not yet been completed; 4. The content and amount of the reward are determined by the administrator in a special function of the System script; 5. ID and item type for "Contract" must be unique and set by the administrator in the System settings. The default item type is 99, the default item ID is undefined. Information about the modification Name: pkodev.mod.contract; Version: 1.1; Author: V3ct0r; Type: for the game client (Game.exe); Supported executable files (.exe): GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4 and GAME_13X_5. Installing the Contracts system Game server 1. Add a "Contract" item to the GameServer\resource\ItemInfo.txt file. To do this, select any suitable ID (XXXX) and item type (99 by default): XXXX Contract n0184 10130005 0 0 0 0 0 00 99 0 0 0 0 0 1 1 1 1 1 1 0 -1 0 -1 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 10,10 0,0 0 0 0 0 0 0 0 0 0 ItemUse_PKOdevContract 0 0 0 0 0 0 After completion you will receive a reward! 2. Place Lua script pkodev.contract.lua in GameServer\resource\script\calculate\mods directory (create mods folder if necessary). 3. Open the pkodev.contract.lua file and configure it as follows: 3.1 Write the "Contract" item ID from ItemInfo.txt (XXXX) to the item_id variable: item_id = XXXX, 3.2 In the CompletionCallback() function, write a code that will give players a reward after completing "Contracts". By default, the function gives a player 1,000 gold coins, a random item (Refining Gem x 1, or Gem of Rage x 2, or Cake x 60, or Fairy of Luck x 1) and launches fireworks: CompletionCallback = function(role, item) -- Give 1,000 gold AddMoney (role, 0, 1000) -- Set of items local arr = { {id = 885, count = 1 }, -- Refining Gem x 1 {id = 863, count = 2 }, -- Gem of Rage x 2 {id = 1849, count = 60}, -- Cake x 60 {id = 231, count = 1 } -- Fairy of Luck x 1 } -- Give a random item local idx = math.random(1, table.getn(arr)) GiveItem(role, 0, arr[idx].id , arr[idx].count, 4) -- Launch fireworks PlayEffect(role, 361) end 3.3 Open the file GameServer\resource\script\calculate\SkillEffect.lua and at the very beginning write the line: dofile(GetResPath("script\\calculate\\mods\\pkodev.contract.lua")) 4. The Contracts system has been successfully installed on your server. Congratulations! Also take a look at @Angelix's Contract System script implementation. It is more flexible and advanced than the one suggested above. Description of the script and installation instructions can be found in the corresponding topic: Game client 1. Add a "Contract" item to the Client\scripts\table\ItemInfo.txt file (see above "Installing the Contracts system" > "Game server" > point 1). Compile ItemInfo.txt. 2. Add to the file Client\scripts\table\StringSet.txt the following strings that a player will see when hovering the mouse over the "Contract": [1000] "(Completed)" [1001] "(Active)" [1002] "Hunt: '{0}' x {1}" [1003] "Progress: {0} / {1}" Note 1: If IDs of strings 1000 - 1003 are already taken, then write any free IDs instead.Note 2: After adding these strings to the StringSet.txt file, delete the StringSet.bin file if it exists, otherwise the changes will not be applied.Note 3: In string 1002, marker {0} is the name of the monster, and {1} is the number of monsters to defeat. In string 1003 marker {0} indicates the number of monsters already defeated, marker {1} is similar to string 1002. 3. Install mod loading system pkodev.mod.loader if it hasn't already been installed. 4. Place the mod DLL file pkodev.mod.contract.client.13x_{ID}.dll for your version of Game.exe and the mod settings file pkodev.mod.contract.json in the mods\pkodev.mod.contract folder of the game client. 5. Open the mod's settings file pkodev.mod.contract.json and write the following parameters into it according to your choice: 1. itemType - type of the item "Contract" specified in the ItemInfo.txt file. The default value is 99. 2. colorCompleted - the color of the "(Completed)" label in the hint for the "Contract" item in the format 0xAARRGGBB. The default value is 0xFF00FF00 (Green). 3. colorActive - the color of the "(Completed)" label in the hint for the "Contract" item in the format 0xAARRGGBB. The default value is 0xFFFFA500 (Orange). 4. STRING_001 - string ID for the "(Completed)" label from the StringSet.txt file. The default value is 1000. 5. STRING_002 - string ID for the "(Active)" label from the StringSet.txt file. The default value is 1001. 6. STRING_003 - string ID for the "Hunt: '{0}' x {1}" label from the StringSet.txt file. The default value is 1002. 7. STRING_004 - string ID for the "Progress: {0} / {1}" label from the StringSet.txt file. The default value is 1003. Note: This file can be left unchanged if you used the default values in the ItemInfo.txt and StringSet.txt files. 6. The contracts system setup for the game client is now complete! Creating "Contracts" and issuing them to the players "Contracts" are created using the contract.create() function, which takes as its arguments the handle of a character to which the contract is to be issued, the ID of a monster a player will need to defeat, and a number of monsters that the player have to defeat. As a result, the function returns a tuple of three elements: success flag, new item descriptor, and item slot number in the character's inventory. Syntax: local <Result LUA_TRUE|LUA_FALSE>, <Item descriptor>, <Item slot> = contract.create(<Character descriptor>, <Monster ID>, <Number of monsters>) Example: local ret, item, pos = contract.create(role, 103, 7) As the result, a "Contract" will be created to defeat the seven Forest Spirits, which will appear in the inventory of the role character. In case of an error, the function will return the value LUA_FALSE to the ret variable and write a log message to the pkodev.contract.txt file. Note: Creation of "Contracts" can be organized, for example, through a special NPC or other item. Useful links 1) Modification binary files for the client (.dll); 2) The file with the modification settings for the client (pkodev.mod.contract.json); 3) Repository on GitHub with the source code of the modification for Visual Studio 2022 Community (C++); 4) Lua script of the Contracts system for the game server; 5) ItemInfo.txt with an example of the "Contract" item; 6) Strings for the file StringSet.txt; 7) Mod loading system pkodev.mod.loader. If you encounter any problem, bug or have any questions, then feel free to write in this thread. 3 1 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Tera 26 Report post Posted January 20, 2022 Hello, sorry, the contract creation part is not clear to me where I should put this function? inside pkodev.contract.lua? -- 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) For your attention thanks Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted January 20, 2022 Hello @Tera! You can create a new item and use this function in the item use event in the file ItemEffect.lua: function ItemUse_Tera(role, Item) local ret, item, pos = contract.create(role, 103, 7) end Or you can issue new contracts using special NPC: TriggerAction(1, MakeContract) functions.lua: function MakeContract(role) local ret, item, pos = contract.create(role, 103, 7) return ret end MissionSdk.lua, function ActionsProc(): . . . elseif actions[i].func == MakeContract then local ret = MakeContract(character) if ret ~= LUA_TRUE then return LUA_FALSE end . . . 2 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Tera 26 Report post Posted January 20, 2022 1 minute ago, V3ct0r said: Hola @Tera! Puede crear un nuevo elemento y usar esta función en el evento de uso del elemento en el archivo ItemEffect.lua : O puede emitir nuevos contratos usando un NPC especial: funciones.lua : MissionSdk.lua , función ActionsProc() : . . . . . . thank you Quote Share this post Link to post Share on other sites
Tera 26 Report post Posted January 20, 2022 I put it in handle chat for more agility when creating a contract: cmd.list['cont1'] = function(role, param) cha_name = GetChaDefaultName(role) if cha_name ~= "GM NAME" then BickerNotice(role, 'This command only for GM') return 1 else MakeContract(role) end end function MakeContract(role) local ret, item, pos contract.create(role, 103, 7) return ret end 1 Quote Share this post Link to post Share on other sites
RafaelaMartins 4 Report post Posted January 26, 2022 Hey V3ct0r you can make a mod for bracelets/belt/handguard and swing? Quote Share this post Link to post Share on other sites
squaller 21 Report post Posted January 26, 2022 item lock , should be good Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted February 18, 2022 On 1/26/2022 at 7:15 AM, RafaelaMartins said: Hey V3ct0r you can make a mod for bracelets/belt/handguard and swing? Hello! At the moment I am not going to develop such mods, but in the future everything is possible. On 1/26/2022 at 10:33 AM, squaller said: item lock , should be good Hello! Explain in more details please. Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
squaller 21 Report post Posted February 18, 2022 2 minutes ago, V3ct0r said: Hello! At the moment I am not going to develop such mods, but in the future everything is possible. Hello! Explain in more details please. well the lock system like top2 . to prevent shared accounts being robbed or scammed Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted February 18, 2022 4 minutes ago, squaller said: well the lock system like top2 . to prevent shared accounts being robbed or scammed I have not heard about this system. Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
eatsangels 2 Report post Posted September 13, 2022 On 1/20/2022 at 2:05 AM, Tera said: thank you Como pudiste lograr el contrato? Quote Share this post Link to post Share on other sites
d3ux 23 Report post Posted September 13, 2022 (edited) On 2/18/2022 at 2:07 PM, V3ct0r said: I have not heard about this system. https://pirateking.online/guide/item-locking-stone.7976/ Edited September 13, 2022 by d3ux 1 Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 14, 2022 (edited) Can't make the mods work. This is my 2 iteminfo 7338 Contract n0184 10130005 0 0 0 0 0 0 99 0 0 0 0 0 0 0 0 1 1 0 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 0,0 0,0 0 0 0 0 0 0 0 0 0 ItemUse_PKOdevContract 0 0 0 0,0 0 0 After completion you will receive a reward! 0 7339 Contract-1 n0184 10130005 0 0 0 0 0 0 99 0 0 0 0 0 0 0 0 1 1 0 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 0,0 0,0 0 0 0 0 0 0 0 0 0 ItemUse_1Contract 0 0 0 0,0 0 0 After completion you will receive a reward! 0 The iteminfo ID I input into the pkodev.contract.lua is 7338 and the other ID with the function below for contract is in 7339. function ItemUse_1Contract( role, Item) local ret, item, pos = contract.create(role, 76, 10 ) end What happen is when I click the item ID with 7339, I get the Item in 7338. When I click 7338, I get random item but mostly fairy of luck which listed in the reward. No contract is made on both iteminfo. What I did wrong here? @V3ct0r Edited September 16, 2022 by kyleflow mentioning v3ctor Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 18, 2022 Anyone ? I still fail to make this work. No Contract is made. Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted September 18, 2022 4 hours ago, kyleflow said: Anyone ? I still fail to make this work. No Contract is made. Show your first 30 lines from the file SkillEffect.lua. Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 19, 2022 (edited) On 9/19/2022 at 3:16 AM, V3ct0r said: Show your first 30 lines from the file SkillEffect.lua. -------------------------------------------------------------------------- -- -- -- -- -- skilleffect.lua -- -- -- -- -- -------------------------------------------------------------------------- print( "Loading Calculate Files:" ) print( "------------------------------------" ) print( "Loading SkillEffect.lua" ) dofile(GetResPath("script\\calculate\\exp_and_level.lua")) dofile(GetResPath("script\\calculate\\JobType.lua")) dofile(GetResPath("script\\calculate\\AttrType.lua")) dofile(GetResPath("script\\calculate\\Init_Attr.lua")) dofile(GetResPath("script\\calculate\\ItemAttrType.lua")) dofile(GetResPath("script\\calculate\\functions.lua")) dofile(GetResPath("script\\calculate\\AttrCalculate.lua")) dofile(GetResPath("script\\calculate\\ItemEffect.lua")) dofile(GetResPath("script\\calculate\\variable.lua")) dofile(GetResPath("script\\calculate\\Look.lua")) dofile(GetResPath("script\\calculate\\forge.lua")) dofile(GetResPath("script\\calculate\\ItemGetMission.lua")) dofile(GetResPath("script\\calculate\\mods\\pkodev.contract.lua")) -- mods item contract CheckDmgChaNameTest = {} CheckDmgChaNameTest [0] = "Re℡↘紊╃懒" CheckDmgChaNameTest [1] = "Carsise" CheckDmgChaNameTest [2] = "I am rubbish" CheckDmgChaNameTest [3] = "CG mao mao" CheckDmgChaNameTest [4] = "Chief mate against" BOSSXYSJ = {} BOSSXYSJ[979] = 1 BOSSXYSJ[980] = 12 BOSSXYSJ[981] = 6 BOSSXYSJ[982] = 4 BOSSXYSJ[983] = 12 BOSSXYSJ[984] = 16 BOSSXYSJ[985] = 16 BOSSXYSJ[986] = 12 BOSSXYSJ[987] = 4 BOSSXYSJ[988] = 4 BOSSSJSJ = {} BOSSSJSJ[979] = 8 BOSSSJSJ[980] = 1 BOSSSJSJ[981] = 6 BOSSSJSJ[982] = 4 BOSSSJSJ[983] = 12 BOSSSJSJ[984] = 16 BOSSSJSJ[985] = 16 BOSSSJSJ[986] = 12 BOSSSJSJ[987] = 4 BOSSSJSJ[988] = 4 BOSSTJSJ = {} BOSSTJSJ[979] = 8 BOSSTJSJ[980] = 1 BOSSTJSJ[981] = 6 BOSSTJSJ[982] = 4 BOSSTJSJ[983] = 12 BOSSTJSJ[984] = 16 BOSSTJSJ[985] = 16 BOSSTJSJ[986] = 12 BOSSTJSJ[987] = 4 BOSSTJSJ[988] = 4 BOSSXZSJ = {} BOSSXZSJ[979] = 12 BOSSXZSJ[980] = 12 BOSSXZSJ[981] = 16 BOSSXZSJ[982] = 16 BOSSXZSJ[983] = 12 BOSSXZSJ[984] = 4 BOSSXZSJ[985] = 1 BOSSXZSJ[986] = 6 BOSSXZSJ[987] = 4 BOSSXZSJ[988] = 4 BOSSAYSJ = {} BOSSAYSJ[979] = 12 BOSSAYSJ[980] = 12 BOSSAYSJ[981] = 16 BOSSAYSJ[982] = 16 BOSSAYSJ[983] = 12 BOSSAYSJ[984] = 4 BOSSAYSJ[985] = 1 BOSSAYSJ[986] = 6 BOSSAYSJ[987] = 4 BOSSAYSJ[988] = 4 This is the code. I also try the alternate method of TriggerAction(1, MakeContract) but still unable to make it work. @V3ct0r Edited September 22, 2022 by kyleflow mentioned vector Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted September 24, 2022 Hello @kyleflow, Does your Creat_Item() function have any modifications? Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 24, 2022 (edited) On 9/24/2022 at 8:47 PM, V3ct0r said: Hello @kyleflow, Does your Creat_Item() function have any modifications? Not that I remember of editing. Here is the original code that I get from shared files. function Creat_Item(item, item_type, item_lv, item_event) --[[创建道具实例]]-- --LuaPrint("Enter function Creat_Item()".."\n") --LG("item", "Enter function Creat_Item() type = ", item_type, " lv = ", item_lv, " event = ", item_event) item_event = item_event item_type = item_type item_lv = item_lv Reset_item_add() -- 清空 item_add local i = 0 local Num = 0 if item_event==NPC_SALE then --NPC买卖 ??????????????NPC_SALE定义成宏了吗 在哪里 --LG("item", "item creation type--", "NPC Trade", "\n") Npc_Sale( item_type, item_lv , item_event) -- i = SetItemForgeParam ( item , 1 , Num ) -- if i == 0 then -- LG( "Creat_Item" , "set forging content failed" ) -- end SetItemForgeParam_Npc_Sale ( item , Num ) elseif item_event==MONSTER_BAOLIAO then --怪物暴料 --LG("item", "item creation type--", "Monster Drop List", "\n") Monster_Baoliao( item_type, item_lv , item_event) SetItemForgeParam_MonsterBaoliao ( item , Num ) elseif item_event == PLAYER_HECHENG then --玩家合成 --LG("item", "item creation type--", "Player combine", "\n") Player_Hecheng( item_type, item_lv , item_event) SetItemForgeParam_PlayerHecheng ( item , Num ) elseif item_event == PLAYER_XSBOX then --新手宝箱 --LG("item", "item creation type--", "Newbie Chest", "\n") Player_XSBox( item_type, item_lv , item_event) local Num = GetItemForgeParam ( item , 1 ) --32位信息数据 local Part1 = GetNum_Part1 ( Num ) --Get Num Part 1 到 Part 7 local Part2 = GetNum_Part2 ( Num ) local Part3 = GetNum_Part3 ( Num ) local Part4 = GetNum_Part4 ( Num ) local Part5 = GetNum_Part5 ( Num ) local Part6 = GetNum_Part6 ( Num ) local Part7 = GetNum_Part7 ( Num ) --local SkillType = 3 --要增加的 Skill 类型 --local SkillNum = 5 --要增加的Skill 编号 if item_type == 1 then Part1 = 1 Part2 = 1 Part3 = 1 end if item_type == 2 then Part1 = 1 Part2 = 2 Part3 = 1 end if item_type == 3 then Part1 = 1 Part2 = 2 Part3 = 1 end if item_type == 4 then Part1 = 1 Part2 = 3 Part3 = 1 end if item_type == 7 then Part1 = 1 Part2 = 8 Part3 = 1 end if item_type == 9 then Part1 = 1 Part2 = 8 Part3 = 1 end Num = SetNum_Part3 ( Num , Part3 ) Num = SetNum_Part2 ( Num , Part2 ) Num = SetNum_Part1 ( Num , Part1) SetItemForgeParam ( item , 1 , Num ) -- AddItemEffect(role , item , 1 ) ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- elseif item_event == PLAYER_CCFSBOXA then --磁场发生器a Player_CCFSBoxA( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXB then --磁场发生器b Player_CCFSBoxB( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXC then --磁场发生器c Player_CCFSBoxC( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXD then --磁场发生器d Player_CCFSBoxD( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXE then --磁场发生器e Player_CCFSBoxE( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXF then --磁场发生器f Player_CCFSBoxF( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXG then --磁场发生器g Player_CCFSBoxG( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXH then --磁场发生器h Player_CCFSBoxH( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXI then --磁场发生器i Player_CCFSBoxI( item_type, item_lv , item_event) elseif item_event == PLAYER_ZSITEM then --紫色装备 Player_ZSitem( item_type, item_lv , item_event) elseif item_event == PLAYER_HSSR then --黑市商人 Player_HSSR( item_type, item_lv , item_event) elseif item_event == PLAYER_HSSRA then --黑市商人 Player_HSSRA( item_type, item_lv , item_event) elseif item_event >= QUEST_AWARD_1 then --任务获取 -- LG("item_1", "item creation type--", "Quest obtained", "\n") Quest_Award( item_type, item_lv , item_event) SetItemForgeParam_QuestAward ( item , Num , item_event ) else --LG("item", "item creation reason does not exist, event = ", item_event) item_add.cnt = 0 end --LG("item","item_add.cnt = " , item_add.cnt,"\n", "item_add.attr[1][1] = ", item_add.attr[1][1], "item_add.attr[1][2] = ", item_add.attr[1][2],"\n", "item_add.attr[2][1] = ", item_add.attr[2][1], "item_add.attr[2][2] = ", item_add.attr[2][2],"\n", "item_add.attr[JOB_TYPE_SHUISHOU][1] = ", item_add.attr[3][1], "item_add.attr[JOB_TYPE_SHUISHOU][2] = ", item_add.attr[3][2],"\n", "item_add.attr[4][1] = ", item_add.attr[4][1], "item_add.attr[4][2] = ", item_add.attr[4][2],"\n", "item_add.attr[5][1] = ", item_add.attr[5][1], "item_add.attr[5][2] =", item_add.attr[5][2],"\n") --LG("item", "End Creat_Item()") --LuaPrint("Out function Creat_Item()".."\n") 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 @V3ct0r notice me senpai Edited October 2, 2022 by kyleflow mentioned v3ctor Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted October 23, 2022 any update here? Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted October 25, 2022 Hello @kyleflow, What server files are you using? Can I get them for tests? Are there any modifications to them? Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
kyleflow 35 Report post Posted November 18, 2022 On 10/26/2022 at 2:56 AM, V3ct0r said: Hello @kyleflow, What server files are you using? Can I get them for tests? Are there any modifications to them? I think I did not changed anything else. Sorry for the late reply. this is the files. https://drive.google.com/drive/folders/1jnd5c2w3kkZJtmCzQ2dxkpt3FlRIVXJZ?usp=sharing Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted December 3, 2022 Hello @kyleflow, I received your server files, thank you! I will check them in a few days. 1 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Angelix 374 Report post Posted December 4, 2022 Hey there! I made a script for anyone using this mod. 1 Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted January 14, 2023 On 12/4/2022 at 5:11 AM, Angelix said: Hey there! I made a script for anyone using this mod. Hello @Angelix, Great work! Thanks a lot! On 11/18/2022 at 5:45 PM, kyleflow said: I think I did not changed anything else. Sorry for the late reply. this is the files. https://drive.google.com/drive/folders/1jnd5c2w3kkZJtmCzQ2dxkpt3FlRIVXJZ?usp=sharing Hello @kyleflow, Sorry for the late reply. As I understand, your problem is solved with @Angelix's solution, right? 1 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
gunnapong 14 Report post Posted January 23, 2023 I'm very interested but Mods don't support game.exe I don't know number please tell me thankshttps://drive.google.com/file/d/1shTCGitJxk9gCD-8ZbDvrtwoZS4L1kNf/view?usp=share_link Quote Share this post Link to post Share on other sites