V3ct0r 2,117 Report post Posted March 20, 2016 Server rates In this guide I will tell you how to change server rates. To change rates open file variable.lua (Server\resource\script\calculate\) and find variables: EXP_RAID = 1 -- Experience rate MF_RAID = 1 -- Drop rate RESOURCE_RAID_ADJUST = 1 -- Resource drop rate TEAMEXP_RAID = 1 -- Party experience rate ELEEXP_GETRAD = 1 -- Fairy growth rate In that case all rates are equal to x 1 How to add rate for Ships: 1) Add in variable.lua (see above) new variable SHIP_RAID. It will store rate for ship experience: SHIP_RAID = 1 -- Ship experience rate Ship rate is equal to x 1 in that case 2) Open file exp_and_level.lua (Server\resource\script\calculate\) and find function GetExp_PKM(dead, atk). Look below for local ship_expadd = math.floor( math.min(7, (dead_lv / 10 + 2) ) ) and replace it with local ship_expadd = math.floor( math.min(7, (dead_lv / 10 + 2) ) * SHIP_RAID) Then save changes. Now you can specify rate for ship experience. How to make auto rates: You could make rates update automatically depending on your conditions. For example depending on a day time or week day. Let's make so that rates would increase by x 2 every weekends. 1) Experience and ship experience (EXP_RAID and SHIP_RAID). Open file exp_and_level.lua (Server\resource\script\calculate\) and find function GetExp_PKM(dead, atk). At the beginning of the function add the following code: function GetExp_PKM(dead, atk) local day_of_week = GetNowWeek() if day_of_week == 6 or day_of_week == 0 then -- At weekends rates are equal to x 2 EXP_RAID = 2 SHIP_RAID = 2 else -- At weekdays rates are equal to x 1 EXP_RAID = 1 SHIP_RAID = 1 end -- original code ..... end 2) Team experience (TEAMEXP_RAID). In the file exp_and_level.lua (see above) find function ShareTeamExp(dead, team_atker, dead_exp, The_Killer). At the beginning of the function add the following code: function ShareTeamExp(dead, team_atker, dead_exp, The_Killer) local day_of_week = GetNowWeek() if day_of_week == 6 or day_of_week == 0 then -- At weekends rates are equal to x 2 TEAMEXP_RAID = 2 else -- At weekdays rates are equal to x 1 TEAMEXP_RAID = 1 end -- original code ..... end 3) Drop rate (MF_RAID). Open file skilleffect.lua (Server\resource\script\calculate\) and find function Check_Baoliao(ATKER, DEFER, ... ). At the beginning of the function add the following code: function Check_Baoliao(ATKER, DEFER, ... ) local day_of_week = GetNowWeek() if day_of_week == 6 or day_of_week == 0 then -- At weekends rates are equal to x 2 MF_RAID = 2 else -- At weekdays rates are equal to x 1 MF_RAID = 1 end -- original code ..... end 4) Resource drop rate (RESOURCE_RAID_ADJUST). In the file skilleffect.lua find function Check_SpawnResource(ATKER, DEFER, lv_skill, diaoliao_count, ...). At the beginning of the function add the following code: function Check_SpawnResource(ATKER, DEFER, lv_skill, diaoliao_count, ...) local day_of_week = GetNowWeek() if day_of_week == 6 or day_of_week == 0 then -- At weekends rates are equal to x 2 RESOURCE_RAID_ADJUST = 2 else -- At weekdays rates are equal to x 1 RESOURCE_RAID_ADJUST = 1 end -- original code ..... end 5) Fairy growth rate (ELEEXP_GETRAD). Open file functions.lua (Server\resource\script\calculate\) and find function Give_ElfEXP(role, Item, Type, Num). At the beginning of the function add the following code: function Give_ElfEXP(role, Item, Type, Num) local day_of_week = GetNowWeek() if day_of_week == 6 or day_of_week == 0 then -- At weekends rates are equal to x 2 ELEEXP_GETRAD = 2 else -- At weekdays rates are equal to x 1 ELEEXP_GETRAD = 1 end -- original code ..... end That's all! If you have any questions you can ask them here. 6 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
Lucky 65 Report post Posted March 20, 2016 SHIP_EXP = 1 -- Ship experience rate open file exp_and_level.lua (Server\resource\script\calculate\) and find if ChaIsBoat (k[item_host] ) == 1 then look for local ship_expadd = math.floor ( math.min ( 7 , ( dead_lv / 10 + 2 ) ) ) and replace it local ship_expadd = math.floor ( math.min ( 7 , ( dead_lv / 10 + 2 ) ) * SHIP_EXP) Quote Share this post Link to post Share on other sites
theone 3 Report post Posted March 20, 2016 i needed this!! thx Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted March 20, 2016 Thank you, @Lucky! I've updated the thread. 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
MonkeyCode 453 Report post Posted March 21, 2016 (edited) Continuation... Perhaps you want to define EXP by map. Such map like Forsaken City, Dark swamp, and Demonic World should not grant EXP. MapEXP = {} -- DEFINE EXP BY MAPNAME MapEXP["garner"] = 3 MapEXP["darkswamp"] = 0 MapEXP["abandonedcity"] = 0 MapEXP["abandonedcity2"] = 0 MapEXP["abandonedcity3"] = 0 MapEXP["puzzleworld"] = 0 MapEXP["puzzleworld2"] = 0 MapEXP["garner2"] = 0 ShareTeamExp: local chamap = GetChaMapName(t[i]) if MapEXP[chamap] ~= nil then EXP_RAID_STATE = EXP_RAID_STATE * MapEXP[chamap] end Forge Rates: ForgeRate = {} ForgeRate[1] = 1 ForgeRate[2] = 1 ForgeRate[3] = 1 ForgeRate[4] = 1 ForgeRate[5] = 0.7 ForgeRate[6] = 0.5 ForgeRate[7] = 0.3 ForgeRate[8] = 0.2 ForgeRate[9] = 0.1 begin_forge_item(...): for i,v in pairs(ForgeRate) do if Baoshi_NeedLv == i then Check_A = v CheckFaild = Percentage_Random(Check_A) end end that is what was in old files, in O-Notation(O(n) at most) it is not too optimized, therefore a better approach: CheckFaild = Percantage_Random(ForgeRage[Baoshi_NeedLv]) O(1)... (not tested) Socket Rate: SocketRate = {} SocketRate[0] = 1 SocketRate[1] = 1 SocketRate[2] = 1 SocketRate[3] = 0.5 Check_CG_damo: function Check_CG_damo( Item_damo , Sklv ) local a = 0 local Hole_Num = Check_HasHole ( Item_damo ) if SocketRate[Hole_Num] ~= nil then a = SocketRate[Hole_Num] end local b = Percentage_Random(a) return b end Edited March 21, 2016 by xtc 2 Quote Share this post Link to post Share on other sites
Foxseiz 138 Report post Posted March 21, 2016 This is very useful @xtc! It's awesome. 1 Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted March 21, 2016 Thank you, @xtc! I will append your addition to the guide 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
Jones 36 Report post Posted April 22, 2016 @xtc For things such as SocketRate = {} Where do we put it? Variable.lua? Quote Share this post Link to post Share on other sites
Foxseiz 138 Report post Posted April 23, 2016 @Jones just on top of your forge.lua Quote Share this post Link to post Share on other sites
offzinho 0 Report post Posted October 29, 2017 (edited) No have Forge Rates in my forge.lua.Serverfiles Forging, It would be that? Quote local Check_A local CheckFaild if Baoshi_NeedLv < 4 then Check_A = 1 CheckFaild = Percentage_Random ( Check_A ) elseif Baoshi_NeedLv == 4 then Check_A = 0.9 CheckFaild = Percentage_Random ( Check_A ) elseif Baoshi_NeedLv == 5 then Check_A = 0.7 CheckFaild = Percentage_Random ( Check_A ) elseif Baoshi_NeedLv == 6 then Check_A = 0.6 CheckFaild = Percentage_Random ( Check_A ) elseif Baoshi_NeedLv == 7 then Check_A = 0.5 CheckFaild = Percentage_Random ( Check_A ) elseif Baoshi_NeedLv == 8 then Check_A = 0.4 CheckFaild = Percentage_Random ( Check_A ) elseif Baoshi_NeedLv == 9 then Check_A = 0.3 CheckFaild = Percentage_Random ( Check_A ) end Edited October 29, 2017 by offzinho Quote Share this post Link to post Share on other sites
Yomazu 20 Report post Posted October 29, 2017 25 minutes ago, offzinho said: No have Forge Rates in my forge.lua.Serverfiles Forging, It would be that? OFF: Vi que você é BR então é só você editar o Check_A. 1 = 100% 0.9 = 90% etc. Quote Share this post Link to post Share on other sites
offzinho 0 Report post Posted October 29, 2017 1 hour ago, Yomazu said: OFF: Vi que você é BR então é só você editar o Check_A. 1 = 100% 0.9 = 90% etc. Então e ali mesmo, muito obrigado. estava na duvida por estar diferente do que postado a cima. Eu lembro um pouco de como funciona os códigos, mexi com servidores a uns 5 anos atras, ai resolvi montar um para jogar com os amigos. Porem ta complicado ajeitei quase tudo porem o jogo fica dando crash duma hora pra outra, estou achando que e do cliente 1.36 que baixei. -- Then and there, thank you very much. I was in doubt because it was different from the code above. I do not remember the right codes, I had a server 5 years ago, now I decided to set one up to play with friends. Quote Share this post Link to post Share on other sites
Yomazu 20 Report post Posted October 29, 2017 hehe Quote Share this post Link to post Share on other sites
Kovu 10 Report post Posted October 30, 2017 On 21/3/2016 at 2:37 AM, KONG said: Continuation... Perhaps you want to define EXP by map. Such map like Forsaken City, Dark swamp, and Demonic World should not grant EXP. MapEXP = {} -- DEFINE EXP BY MAPNAME MapEXP["garner"] = 3 MapEXP["darkswamp"] = 0 MapEXP["abandonedcity"] = 0 MapEXP["abandonedcity2"] = 0 MapEXP["abandonedcity3"] = 0 MapEXP["puzzleworld"] = 0 MapEXP["puzzleworld2"] = 0 MapEXP["garner2"] = 0 ShareTeamExp: local chamap = GetChaMapName(t[i]) if MapEXP[chamap] ~= nil then EXP_RAID_STATE = EXP_RAID_STATE * MapEXP[chamap] end @KONG hey where i put this code bro Quote FORO EN ESPAÑOL :) ---------------------------------------------------------------------------- Share this post Link to post Share on other sites
DangThao 81 Report post Posted October 30, 2017 7 hours ago, nectrouler said: @KONG hey where i put this code bro First one u can put into variable.lua at the end and the second one inside exp_and_level.lua find: exp_up = exp_up * EXP_RAID_STATE and paste it below 1 Quote Share this post Link to post Share on other sites
Brothers 24 Report post Posted December 18, 2017 @DangThao Ive changed it but still get like 0.18% each mob Ive put this on end of variable.lua: MapEXP = {} -- DEFINE EXP BY MAPNAME MapEXP["garner"] = 5 MapEXP["darkswamp"] = 0 MapEXP["abandonedcity"] = 0 MapEXP["abandonedcity2"] = 0 MapEXP["abandonedcity3"] = 0 MapEXP["puzzleworld"] = 0 MapEXP["puzzleworld2"] = 0 MapEXP["garner2"] = 0 And ive put this: exp_up = exp_up * EXP_RAID_STATE local chamap = GetChaMapName(t) if MapEXP[chamap] ~= nil then EXP_RAID_STATE = EXP_RAID_STATE * MapEXP[chamap] end if Lv ( TurnToCha(t) ) >= 80 then exp_up = math.floor ( exp_up / 50 ) end Hope u can see a fault, because i dont get it.. :3 Quote Share this post Link to post Share on other sites