V3ct0r 2,141 Report post Posted December 14, 2021 [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. 1 3 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
K1D0 99 Report post Posted December 15, 2021 Daily prize is not working - reward is not showing and I have tested all dlls server side SQL Quote Share this post Link to post Share on other sites
V3ct0r 2,141 Report post Posted December 15, 2021 Hello @K1D0! The first reward will be given in 24 hours after the player entered the game and the reward chain was generated for the first time. In your case, you will get reward in ~14 hours from now. You can reduce this period for tests (see point 2 of section "Mod customization"). 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
mkhzaleh 136 Report post Posted December 15, 2021 guess using Cmd_EnterMap not a really good idea, you can use AfterPlayerLogin which called only once per login , also its mean if server crash/restart for any reasons players reward will reset to first day again? missing one day reset all days seems bad idea as well ? also adding Minimum Requirements to claim reward needed, even that doesn't help if still using mac/ip system in server side as both can be changed - and question how does mod works in multi gameserver? daily ticks etc? i suggest to improve it maybe few things : 1- replace Cmd_EnterMap to use AfterPlayerLogin so function will be called only once when player login the game2- save current player reward day (of rewarder claim <) so if he passed x day he will always stick to same day until total days reset to day 1 3- extra special reward for day strikes ? in my case if player login per month as 10 days in strikes gets >special strikes reward < 4- its related to point 2 so we still can save server rewarder day in case server restart/crash etc > also can add additional force reset etc this examples of what i have done before: first one with claim button : with updating player of reset days/ remain time to claim after time is up this as auto giving reward after x time without claim button , but in both server save player current day of x reward 1 1 Quote Share this post Link to post Share on other sites
V3ct0r 2,141 Report post Posted December 15, 2021 Hello @mkhzaleh and thanks for your suggestions! Quote guess using Cmd_EnterMap not a really good idea, you can use AfterPlayerLogin which called only once per login , 1) Method CCharacter::Cmd_EnterMap has parameter Char chLogin. It is 'false' when character enter the map from character selection scene (login) and 'true' when character change the map already logged in. Thus, CCharacter::Cmd_EnterMap works as CGameApp::AfterPlayerLogin and reward system routine is called once per login; 2) We need the pointer to the character object in GameServer memory. CGameApp::AfterPlayerLogin does not receive this pointer in any way. Quote also its mean if server crash/restart for any reasons players reward will reset to first day again? No, all data related with the system are saved in GameDB and updated when the character entered the game / received the reward. Quote missing one day reset all days seems bad idea as well ? The mod is open source, developers can customize this period as they see fit. Quote also adding Minimum Requirements to claim reward needed, even that doesn't help if still using mac/ip system in server side as both can be changed Players have to wait 24 hours to receive the first reward. You can add a check for the minimum character level, for example. Or don't give too valuable a reward in the early days. Quote and question how does mod works in multi gameserver? daily ticks etc? Do you mean several GameServer instances? It should work fine because GameServers share reward data through one common database. Quote i suggest to improve it maybe few things : 1- replace Cmd_EnterMap to use AfterPlayerLogin so function will be called only once when player login the game 2- save current player reward day (of rewarder claim <) so if he passed x day he will always stick to same day until total days reset to day 1 3- extra special reward for day strikes ? in my case if player login per month as 10 days in strikes gets >special strikes reward < 4- its related to point 2 so we still can save server rewarder day in case server restart/crash etc > also can add additional force reset etc 1) Do not agree (see above); 2) You can remove this code from pkodev::hook::CCharacter__Cmd_EnterMap() function and day streak won't reset: // Check that the reward time has not expired if ( delta > (2 * pkodev::reward::interval) ) { // Make new item list CreateRoleReward(This, 0, reward); // Update reward data in database UpdateRoleRewardDB(This, reward); } 3) It is possible to make; 4) Reward will be still given after server crash within 24 hours. If the server crash is more than 24 hours, the days will be reset. This point has not been worked out now. 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
mkhzaleh 136 Report post Posted December 15, 2021 14 minutes ago, V3ct0r said: Hello @mkhzaleh and thanks for your suggestions! 1) Method CCharacter::Cmd_EnterMap has parameter Char chLogin. It is 'false' when character enter the map from character selection scene (login) and 'true' when character change the map already logged in. Thus, CCharacter::Cmd_EnterMap works as CGameApp::AfterPlayerLogin and reward system routine is called once per login; 2) We need the pointer to the character object in GameServer memory. CGameApp::AfterPlayerLogin does not receive this pointer in any way. No, all data related with the system are saved in GameDB and updated when the character entered the game / received the reward. The mod is open source, developers can customize this period as they see fit. Players have to wait 24 hours to receive the first reward. You can add a check for the minimum character level, for example. Or don't give too valuable a reward in the early days. Do you mean several GameServer instances? It should work fine because GameServers share reward data through one common database. 1) Do not agree (see above); 2) You can remove this code from pkodev::hook::CCharacter__Cmd_EnterMap() function and day streak won't reset: // Check that the reward time has not expired if ( delta > (2 * pkodev::reward::interval) ) { // Make new item list CreateRoleReward(This, 0, reward); // Update reward data in database UpdateRoleRewardDB(This, reward); } 3) It is possible to make; 4) Reward will be still given after server crash within 24 hours. If the server crash is more than 24 hours, the days will be reset. This point has not been worked out now. i see, its just suggestion if someone wanted to use someday Quote 2) We need the pointer to the character object in GameServer memory. CGameApp::AfterPlayerLogin does not receive this pointer in any way. we still can get pointer through player name , as g_pGameApp->FindPlayerChaByNameLua or people use it as ``GetPlayerByName`` i just mention it because it be more handy in future codes if you turn it to lua global function ``g_CParser.DoString("After_PlayerLogin", enumSCRIPT_RETURN_NONE,`` Quote Share this post Link to post Share on other sites
V3ct0r 2,141 Report post Posted December 15, 2021 2 minutes ago, mkhzaleh said: iwe still can get pointer through player name , as g_pGameApp->FindPlayerChaByNameLua or people use it as ``GetPlayerByName`` i just mention it because it be more handy in future codes if you turn it to lua global function ``g_CParser.DoString("After_PlayerLogin", enumSCRIPT_RETURN_NONE,`` 1) We will have extra loop for player searching in this case. This is bad for performance reasons; 2) Do not forget that we are creating a mod for .exe, not working with source codes. The more functions you have to use, the more complex the mod. 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
mkhzaleh 136 Report post Posted December 15, 2021 16 minutes ago, V3ct0r said: 1) We will have extra loop for player searching in this case. This is bad for performance reasons; 2) Do not forget that we are creating a mod for .exe, not working with source codes. The more functions you have to use, the more complex the mod. yup understand guess i did mix that for "after login_ " that was in gift mod not rewarder because i remember seen someone ask about something like that Quote Additionally I was wondering if there is a clean "onlogin" function, which only starts when you logon to the GameServer. I would like to use this for the function to deliver daily gifts to players. anyway great job some ps: we still can use that or just create extra lua function from enter_map "for people who use source" or want to create dll for it" as if(chLogin == 0) g_CParser.DoString("Enter_Map_FirstTime", enumSCRIPT_RETURN_NONE, 0, enumSCRIPT_PARAM_LIGHTUSERDATA, 1, this, DOSTRING_PARAM_END); 1 Quote Share this post Link to post Share on other sites
cpworkerz 24 Report post Posted December 15, 2021 5 hours ago, mkhzaleh said: guess using Cmd_EnterMap not a really good idea, you can use AfterPlayerLogin which called only once per login , also its mean if server crash/restart for any reasons players reward will reset to first day again? missing one day reset all days seems bad idea as well ? also adding Minimum Requirements to claim reward needed, even that doesn't help if still using mac/ip system in server side as both can be changed - and question how does mod works in multi gameserver? daily ticks etc? i suggest to improve it maybe few things : 1- replace Cmd_EnterMap to use AfterPlayerLogin so function will be called only once when player login the game2- save current player reward day (of rewarder claim <) so if he passed x day he will always stick to same day until total days reset to day 1 3- extra special reward for day strikes ? in my case if player login per month as 10 days in strikes gets >special strikes reward < 4- its related to point 2 so we still can save server rewarder day in case server restart/crash etc > also can add additional force reset etc this examples of what i have done before: first one with claim button : with updating player of reset days/ remain time to claim after time is up this as auto giving reward after x time without claim button , but in both server save player current day of x reward How about src of this one or implemention of the mod reward through SRC not DLLs ? Quote Share this post Link to post Share on other sites
mkhzaleh 136 Report post Posted December 15, 2021 Quote How about src of this one or implemention of the mod reward through SRC not DLLs ? same method you can follow his comments to find main functions in source 1 Quote Share this post Link to post Share on other sites
K1D0 99 Report post Posted December 16, 2021 On 12/15/2021 at 2:00 AM, V3ct0r said: Hello @K1D0! The first reward will be given in 24 hours after the player entered the game and the reward chain was generated for the first time. In your case, you will get reward in ~14 hours from now. You can reduce this period for tests (see point 2 of section "Mod customization"). I changed the reward to give every 2 minutes and then I get an error db and also the client is closing aloneGIF LINK Quote Share this post Link to post Share on other sites
V3ct0r 2,141 Report post Posted December 17, 2021 On 12/15/2021 at 3:14 PM, mkhzaleh said: anyway great job Thank you! 17 hours ago, K1D0 said: I changed the reward to give every 2 minutes and then I get an error db and also the client is closing aloneGIF LINK 1) Show here changes you made in source code; 2) Send your Game.exe I will check it because I could be wrong with the addresses. 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
K1D0 99 Report post Posted December 18, 2021 22 hours ago, V3ct0r said: Thank you! 1) Show here changes you made in source code; 2) Send your Game.exe I will check it because I could be wrong with the addresses. static const unsigned int interval{ 2 * 60 }; //{ 24 * 60 * 60 }; // 24 hours SYSTEM if you can do that for me too Quote Share this post Link to post Share on other sites
V3ct0r 2,141 Report post Posted December 18, 2021 Hello @K1D0! Your Game.exe has modified void CItemCommand::Render(int x, int y) function. I think this is a patch for displaying the level of fairies, gems, equipment on their icons in the inventory. The mod is incompatible with it. You can remove the following code from pkodev.mod.reward.client project, file dllmain.cpp: // Set patch for function CItemCommand::Render() char patch[] = { (char)0x66, (char)0x83, (char)0xF8, (char)0x00 }; WriteProcessMemory(GetCurrentProcess(), reinterpret_cast<LPVOID>(pkodev::address::MOD_EXE_VERSION::CItemCommand__Render__Patch), reinterpret_cast<LPCVOID>(patch), sizeof(patch), nullptr); // Reset patch for function CItemCommand::Render() char patch_[] = { (char)0x66, (char)0x3D, (char)0x01, (char)0x00 }; WriteProcessMemory(GetCurrentProcess(), reinterpret_cast<LPVOID>(pkodev::address::MOD_EXE_VERSION::CItemCommand__Render__Patch), reinterpret_cast<LPCVOID>(patch_), sizeof(patch_), nullptr); Now it will work, but in slots with one item, item amount will not be displayed: Quote if you can do that for me too Create a separate topic, if you want to discuss it, please. 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
Masuka00 55 Report post Posted January 19, 2022 (edited) In case anyone is interested in the old style Download Here and change te line -- Close button -- 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 ) Edited January 20, 2022 by Masuka00 2 1 Quote ǤØĐ βŁ€ŞŞ ƤƗŘΔĆ¥ Share this post Link to post Share on other sites
dragontechi 69 Report post Posted January 19, 2022 2 hours ago, Masuka00 said: In case anyone is interested in the old style and change te line -- Close button -- Close button btnClose = UI_CreateCompent( frmReward, BUTTON_TYPE, "btnClose", 14, 14, 342, 4 ) UI_LoadButtonImage( btnClose, "texture/mods/pkodev.mod.reward/main.tga", 14, 14, 271, 174, TRUE ) UI_SetButtonModalResult( btnClose, BUTTON_CLOSE ) do you plan to share it? Quote Share this post Link to post Share on other sites
dragontechi 69 Report post Posted January 19, 2022 load the mod perform the installation but it does not show me anything @V3ct0r Quote Share this post Link to post Share on other sites
dragontechi 69 Report post Posted January 20, 2022 @Masuka00sorry now it was that I saw that it was shared but I have a problem the close button does not appear make the change of the button -- Close button btnClose = UI_CreateCompent( frmReward, BUTTON_TYPE, "btnClose", 14, 14, 342, 4 ) UI_LoadButtonImage( btnClose, "texture/mods/pkodev.mod.reward/main.tga", 14, 14, 271, 174, TRUE ) UI_SetButtonModalResult( btnClose, BUTTON_CLOSE ) On 1/19/2022 at 10:35 AM, dragontechi said: do you plan to share it? @V3ct0r sorry it was my mistake I could make it work it was the day On 1/19/2022 at 11:35 AM, dragontechi said: load the mod perform the installation but it does not show me anything @V3ct0r 1 Quote Share this post Link to post Share on other sites
dragontechi 69 Report post Posted January 20, 2022 @Masuka00 -- 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 ) sorry it was in .tga and it was png for which it may interest you Quote Share this post Link to post Share on other sites
Masuka00 55 Report post Posted January 20, 2022 16 minutes ago, dragontechi said: @Masuka00 -- 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 ) sorry it was in .tga and it was png for which it may interest you Yeah sorry for that Quote ǤØĐ βŁ€ŞŞ ƤƗŘΔĆ¥ Share this post Link to post Share on other sites
V3ct0r 2,141 Report post Posted January 20, 2022 Hello @Masuka00! It looks cool, thank you! Added your work to the first post. Hello @K1D0! I made a smart icon mod compatible with this mod: 2 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
Xoskis 2 Report post Posted March 5, 2022 Hello @V3ct0r I put everything according to the tutorial, however, the MOD does not appear as executed in the file. Quote Share this post Link to post Share on other sites
V3ct0r 2,141 Report post Posted March 6, 2022 Hello @Xoskis, What .dll did you put in the mods folder of the GameServer? For your version of GameServer.exe it should be pkodev.mod.reward.server.138.dll \GameServer\mods\pkodev.mod.reward\pkodev.mod.reward.server.138.dll 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
Xoskis 2 Report post Posted March 6, 2022 10 hours ago, V3ct0r said: Hello @Xoskis, What .dll did you put in the mods folder of the GameServer? For your version of GameServer.exe it should be pkodev.mod.reward.server.138.dll \GameServer\mods\pkodev.mod.reward\pkodev.mod.reward.server.138.dll Now is OK! but where do i open the daily reward? Quote Share this post Link to post Share on other sites
V3ct0r 2,141 Report post Posted March 7, 2022 On 12/15/2021 at 8:00 AM, V3ct0r said: The first reward will be given in 24 hours after the player entered the game and the reward chain was generated for the first time. In your case, you will get reward in ~14 hours from now. You can reduce this period for tests (see point 2 of section "Mod customization"). @Xoskis 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