kekc161 1 Report post Posted February 4, 2017 Здравствуйте, хотелось бы узнать, как сделать чтоб после свадьбы забрало более 4х и т.п лвл феи. Например у меня когда я спариваю заберает всего лишь 4 лвл, не могу найти где мне это изменить? Quote Share this post Link to post Share on other sites
WVWMK 121 Report post Posted February 4, 2017 DelBagItem(role,ID,vaule) Quote Делай добро и бросай его в воду Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted February 5, 2017 16 часов назад, NMS3RR сказал: DelBagItem(role,ID,vaule) Это удалит предметы с указанным ID из инвентаря. @kekc161, ты можешь сюда скопировать скрипт свадьбы? 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
mangojkee 47 Report post Posted February 5, 2017 (edited) On 04.02.2017 at 3:36 PM, kekc161 said: Здравствуйте, хотелось бы узнать, как сделать чтоб после свадьбы забрало более 4х и т.п лвл феи. Например у меня когда я спариваю заберает всего лишь 4 лвл, не могу найти где мне это изменить? Для разборки функции спарки фей для начала разобьем ее на части Получаем данные про первую фею local Num_JLone = GetItemForgeParam ( Item_JLone , 1 ) Разбиваем на части по параметрам local Part1_JLone = GetNum_Part1 ( Num_JLone ) local Part2_JLone = GetNum_Part2 ( Num_JLone ) local Part3_JLone = GetNum_Part3 ( Num_JLone ) local Part4_JLone = GetNum_Part4 ( Num_JLone ) local Part5_JLone = GetNum_Part5 ( Num_JLone ) local Part6_JLone = GetNum_Part6 ( Num_JLone ) local Part7_JLone= GetNum_Part7 ( Num_JLone ) Аналогично 2я фея local Num_JLother = GetItemForgeParam ( Item_JLother , 1 ) local Part1_JLother = GetNum_Part1 ( Num_JLother ) local Part2_JLother = GetNum_Part2 ( Num_JLother ) local Part3_JLother = GetNum_Part3 ( Num_JLother ) local Part4_JLother = GetNum_Part4 ( Num_JLother ) local Part5_JLother = GetNum_Part5 ( Num_JLother ) local Part6_JLother = GetNum_Part6 ( Num_JLother ) local Part7_JLother= GetNum_Part7 ( Num_JLother ) получаем параметры новой феи по формуле (новый параметр а = (параметр а первой феи+параметр а второй феи) *0.125 local new_str = math.floor ((str_JLone+str_JLother)*0.125 ) local new_con = math.floor ((con_JLone+con_JLother)*0.125 ) local new_agi = math.floor ((agi_JLone+agi_JLother)*0.125 ) local new_dex = math.floor ((dex_JLone+dex_JLother)*0.125 ) local new_sta = math.floor ((sta_JLone+sta_JLother)*0.125 ) получаем уровень новой феи путем складываения полученых параметров новой феи local new_lv = new_str + new_con + new_agi + new_dex + new_sta далее мы получаем енергию(жизни) на сколько я понимаю новой феи local new_MAXENERGY = 240 * ( new_lv + 1 ) if new_MAXENERGY > 6480 then new_MAXENERGY = 6480 end local new_MAXURE = 5000 + 1000*new_lv if new_MAXURE > 32000 then new_MAXURE = 32000 end далее забираем необходимые предметы для спарки и рандомим необходимую фею if Item_EMstone_ID ==3925 then --если камень Адский фрукт тайны local j1 = TakeItem( role, 0,1253, 10 ) local j2 = TakeItem( role, 0,3442, 10 ) --забираем 1253 и 3442 по 10 шт if j1==0 or j2==0 then SystemNotice ( role ,"Deletion of pet fairy reborn tools failed") return end local rad = math.random ( 1, 100 ) local r1 = 0 local r2 = 0 if Item_JLone_ID ==680 or Item_JLother_ID ==680 then --проверяем наших морд if Item_JLone_ID==Item_JLother_ID then --если морды 2 , тогда выполняем следуюющее r1,r2 =MakeItem ( role , 681 , 1 , 4 ) elseif lv_JLone>=20 and lv_JLone<25 and lv_JLother >=20 and lv_JLother<25 and rad>=88 then --12% Chance of Mordo JR r1,r2 =MakeItem ( role , 681 , 1 , 4 ) elseif lv_JLone>=25 and lv_JLone<35 and lv_JLother >=25 and lv_JLother<35 and rad>=50 then --50% Chance of Mordo JR r1,r2 =MakeItem ( role , 681 , 1 , 4 ) elseif lv_JLone>=35 and lv_JLother >=35 and rad>=10 then --90% Chance of Mordo JR r1,r2 =MakeItem ( role , 681 , 1 , 4 ) --Mordo JR else r1,r2 =MakeItem ( role , 237 , 1 , 4 ) --Fairy of Evil end else r1,r2 =MakeItem ( role , 237 , 1 , 4 ) --Fairy of Evil end узнаем какой предмет мы получили local Item_newJL = GetChaItem ( role , 2 , r2 ) узнаем все его параметры local Num_newJL = GetItemForgeParam ( Item_newJL , 1 ) и разбиваем по частям как и раньше local Part1_newJL = GetNum_Part1 ( Num_newJL ) local Part2_newJL = GetNum_Part2 ( Num_newJL ) local Part3_newJL = GetNum_Part3 ( Num_newJL ) local Part4_newJL = GetNum_Part4 ( Num_newJL ) local Part5_newJL = GetNum_Part5 ( Num_newJL ) local Part6_newJL = GetNum_Part6 ( Num_newJL ) local Part7_newJL = GetNum_Part7 ( Num_newJL ) далле происходят проверки связанные с шансом выдачи владения фей if lv_JLone>=20 and lv_JLother >=20 then Part2_newJL = 12 Part3_newJL = 1 end if lv_JLone>=25 and lv_JLother >=25 then Part2_newJL = 12 Part3_newJL = 2 end if lv_JLone>=35 and lv_JLother >=35 then Part2_newJL = 12 Part3_newJL = 3 end узнаем какое владение феей выдать local rad1 = math.random ( 1, 100 ) if Part3_newJL==3 then GiveItem ( role , 0 , 609 , 1 , 4 ) --Expert Fairy Possession end if Part3_newJL==2 then if rad1 <=95 then GiveItem ( role , 0 , 608 , 1 , 4 ) --Standard Fairy Possession elseif rad1 > 95 and rad1 <=100 then GiveItem ( role , 0 , 609 , 1 , 4 ) --Expert Fairy Possession end end if Part3_newJL==1 then if rad1 <=90 then GiveItem ( role , 0 , 239 , 1 , 4 ) --Novice Fairy Possession elseif rad1 > 90 and rad1 <=98 then GiveItem ( role , 0 , 608 , 1 , 4 ) --Standard Fairy Possession elseif rad1 > 98 and rad1 <=100 then GiveItem ( role , 0 , 609 , 1 , 4 ) --Expert Fairy Possession end end переносим изменения на нашу фею Num_newJL = SetNum_Part1 ( Num_newJL , 1 ) Num_newJL = SetNum_Part2 ( Num_newJL , Part2_newJL ) Num_newJL = SetNum_Part3 ( Num_newJL , Part3_newJL ) Num_newJL = SetNum_Part4 ( Num_newJL , Part4_newJL ) Num_newJL = SetNum_Part5 ( Num_newJL , Part5_newJL ) Num_newJL = SetNum_Part6 ( Num_newJL , Part6_newJL ) Num_newJL = SetNum_Part7 ( Num_newJL , Part7_newJL ) SetItemForgeParam ( Item_newJL , 1 , Num_newJL ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_STR , new_str ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_DEX , new_dex ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_STA , new_sta ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_AGI , new_agi ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_CON , new_con ) SetItemAttr ( Item_newJL , ITEMATTR_MAXENERGY , new_MAXENERGY ) SetItemAttr ( Item_newJL , ITEMATTR_MAXURE , new_MAXURE ) следующее сбарасывает уровень наших фей Elf_Attr_cs ( role , Item_JLone , Item_JLother ) Это не вся функция, а лишь основные "куски", может быть что то упустил и не так понял, но думаю должно быть полезно. Соответсвенно ищем функцию Elf_Attr_cs в functions.lua, а именно строки max_JLone_temp = max_JLone_temp - 4 max_JLother_temp = max_JLother_temp - 4 На первый взгляд эта четверка и похожа на значение уровней которое будет отниматься, проверить нет возможности, дерзайте! Edited February 5, 2017 by mangojkee 2 Quote Share this post Link to post Share on other sites
e1mer 102 Report post Posted February 5, 2017 (edited) Файл forge.lua, функция jlborn_item() Просто из каждой функции для фрукта удаляем этот кусок кода Num_newJL = SetNum_Part1 ( Num_newJL , 1 ) Num_newJL = SetNum_Part2 ( Num_newJL , Part2_newJL ) Num_newJL = SetNum_Part3 ( Num_newJL , Part3_newJL ) Num_newJL = SetNum_Part4 ( Num_newJL , Part4_newJL ) Num_newJL = SetNum_Part5 ( Num_newJL , Part5_newJL ) Num_newJL = SetNum_Part6 ( Num_newJL , Part6_newJL ) Num_newJL = SetNum_Part7 ( Num_newJL , Part7_newJL ) SetItemForgeParam ( Item_newJL , 1 , Num_newJL ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_STR , new_str ) SetItemAttr( Item_newJL , ITEMATTR_VAL_DEX , new_dex ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_STA , new_sta ) SetItemAttr( Item_newJL , ITEMATTR_VAL_AGI , new_agi ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_CON , new_con ) SetItemAttr ( Item_newJL , ITEMATTR_MAXENERGY , new_MAXENERGY ) SetItemAttr ( Item_newJL , ITEMATTR_MAXURE , new_MAXURE ) Фея так же будет спариваться, выдаваться, но необходимые атрибуты присваиваться уже не будут. Edited February 5, 2017 by e1mer Quote Share this post Link to post Share on other sites
mangojkee 47 Report post Posted February 5, 2017 9 minutes ago, e1mer said: Файл forge.lua, функция jlborn_item() Просто из каждой функции для фрукта удаляем этот кусок кода Num_newJL = SetNum_Part1 ( Num_newJL , 1 ) Num_newJL = SetNum_Part2 ( Num_newJL , Part2_newJL ) Num_newJL = SetNum_Part3 ( Num_newJL , Part3_newJL ) Num_newJL = SetNum_Part4 ( Num_newJL , Part4_newJL ) Num_newJL = SetNum_Part5 ( Num_newJL , Part5_newJL ) Num_newJL = SetNum_Part6 ( Num_newJL , Part6_newJL ) Num_newJL = SetNum_Part7 ( Num_newJL , Part7_newJL ) SetItemForgeParam ( Item_newJL , 1 , Num_newJL ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_STR , new_str ) SetItemAttr( Item_newJL , ITEMATTR_VAL_DEX , new_dex ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_STA , new_sta ) SetItemAttr( Item_newJL , ITEMATTR_VAL_AGI , new_agi ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_CON , new_con ) SetItemAttr ( Item_newJL , ITEMATTR_MAXENERGY , new_MAXENERGY ) SetItemAttr ( Item_newJL , ITEMATTR_MAXURE , new_MAXURE ) Фея так же будет спариваться, выдаваться, но необходимые атрибуты присваиваться уже не будут. автору необходимо что бы забирало более 4х лвл при спарке Quote Share this post Link to post Share on other sites
WVWMK 121 Report post Posted February 5, 2017 (edited) 5 часов назад, V3ct0r сказал: Это удалит предметы с указанным ID из инвентаря. @kekc161, ты можешь сюда скопировать скрипт свадьбы? Что то я не то прочитал и не то написал Я когда написал, подумал, что он хочет чтоб фею удалило из рюкзака. Edited February 5, 2017 by NMS3RR Quote Делай добро и бросай его в воду Share this post Link to post Share on other sites
kekc161 1 Report post Posted February 6, 2017 18 часов назад, mangojkee сказал: Для разборки функции спарки фей для начала разобьем ее на части Получаем данные про первую фею local Num_JLone = GetItemForgeParam ( Item_JLone , 1 ) Разбиваем на части по параметрам local Part1_JLone = GetNum_Part1 ( Num_JLone ) local Part2_JLone = GetNum_Part2 ( Num_JLone ) local Part3_JLone = GetNum_Part3 ( Num_JLone ) local Part4_JLone = GetNum_Part4 ( Num_JLone ) local Part5_JLone = GetNum_Part5 ( Num_JLone ) local Part6_JLone = GetNum_Part6 ( Num_JLone ) local Part7_JLone= GetNum_Part7 ( Num_JLone ) Аналогично 2я фея local Num_JLother = GetItemForgeParam ( Item_JLother , 1 ) local Part1_JLother = GetNum_Part1 ( Num_JLother ) local Part2_JLother = GetNum_Part2 ( Num_JLother ) local Part3_JLother = GetNum_Part3 ( Num_JLother ) local Part4_JLother = GetNum_Part4 ( Num_JLother ) local Part5_JLother = GetNum_Part5 ( Num_JLother ) local Part6_JLother = GetNum_Part6 ( Num_JLother ) local Part7_JLother= GetNum_Part7 ( Num_JLother ) получаем параметры новой феи по формуле (новый параметр а = (параметр а первой феи+параметр а второй феи) *0.125 local new_str = math.floor ((str_JLone+str_JLother)*0.125 ) local new_con = math.floor ((con_JLone+con_JLother)*0.125 ) local new_agi = math.floor ((agi_JLone+agi_JLother)*0.125 ) local new_dex = math.floor ((dex_JLone+dex_JLother)*0.125 ) local new_sta = math.floor ((sta_JLone+sta_JLother)*0.125 ) получаем уровень новой феи путем складываения полученых параметров новой феи local new_lv = new_str + new_con + new_agi + new_dex + new_sta далее мы получаем енергию(жизни) на сколько я понимаю новой феи local new_MAXENERGY = 240 * ( new_lv + 1 ) if new_MAXENERGY > 6480 then new_MAXENERGY = 6480 end local new_MAXURE = 5000 + 1000*new_lv if new_MAXURE > 32000 then new_MAXURE = 32000 end далее забираем необходимые предметы для спарки и рандомим необходимую фею if Item_EMstone_ID ==3925 then --если камень Адский фрукт тайны local j1 = TakeItem( role, 0,1253, 10 ) local j2 = TakeItem( role, 0,3442, 10 ) --забираем 1253 и 3442 по 10 шт if j1==0 or j2==0 then SystemNotice ( role ,"Deletion of pet fairy reborn tools failed") return end local rad = math.random ( 1, 100 ) local r1 = 0 local r2 = 0 if Item_JLone_ID ==680 or Item_JLother_ID ==680 then --проверяем наших морд if Item_JLone_ID==Item_JLother_ID then --если морды 2 , тогда выполняем следуюющее r1,r2 =MakeItem ( role , 681 , 1 , 4 ) elseif lv_JLone>=20 and lv_JLone<25 and lv_JLother >=20 and lv_JLother<25 and rad>=88 then --12% Chance of Mordo JR r1,r2 =MakeItem ( role , 681 , 1 , 4 ) elseif lv_JLone>=25 and lv_JLone<35 and lv_JLother >=25 and lv_JLother<35 and rad>=50 then --50% Chance of Mordo JR r1,r2 =MakeItem ( role , 681 , 1 , 4 ) elseif lv_JLone>=35 and lv_JLother >=35 and rad>=10 then --90% Chance of Mordo JR r1,r2 =MakeItem ( role , 681 , 1 , 4 ) --Mordo JR else r1,r2 =MakeItem ( role , 237 , 1 , 4 ) --Fairy of Evil end else r1,r2 =MakeItem ( role , 237 , 1 , 4 ) --Fairy of Evil end узнаем какой предмет мы получили local Item_newJL = GetChaItem ( role , 2 , r2 ) узнаем все его параметры local Num_newJL = GetItemForgeParam ( Item_newJL , 1 ) и разбиваем по частям как и раньше local Part1_newJL = GetNum_Part1 ( Num_newJL ) local Part2_newJL = GetNum_Part2 ( Num_newJL ) local Part3_newJL = GetNum_Part3 ( Num_newJL ) local Part4_newJL = GetNum_Part4 ( Num_newJL ) local Part5_newJL = GetNum_Part5 ( Num_newJL ) local Part6_newJL = GetNum_Part6 ( Num_newJL ) local Part7_newJL = GetNum_Part7 ( Num_newJL ) далле происходят проверки связанные с шансом выдачи владения фей if lv_JLone>=20 and lv_JLother >=20 then Part2_newJL = 12 Part3_newJL = 1 end if lv_JLone>=25 and lv_JLother >=25 then Part2_newJL = 12 Part3_newJL = 2 end if lv_JLone>=35 and lv_JLother >=35 then Part2_newJL = 12 Part3_newJL = 3 end узнаем какое владение феей выдать local rad1 = math.random ( 1, 100 ) if Part3_newJL==3 then GiveItem ( role , 0 , 609 , 1 , 4 ) --Expert Fairy Possession end if Part3_newJL==2 then if rad1 <=95 then GiveItem ( role , 0 , 608 , 1 , 4 ) --Standard Fairy Possession elseif rad1 > 95 and rad1 <=100 then GiveItem ( role , 0 , 609 , 1 , 4 ) --Expert Fairy Possession end end if Part3_newJL==1 then if rad1 <=90 then GiveItem ( role , 0 , 239 , 1 , 4 ) --Novice Fairy Possession elseif rad1 > 90 and rad1 <=98 then GiveItem ( role , 0 , 608 , 1 , 4 ) --Standard Fairy Possession elseif rad1 > 98 and rad1 <=100 then GiveItem ( role , 0 , 609 , 1 , 4 ) --Expert Fairy Possession end end переносим изменения на нашу фею Num_newJL = SetNum_Part1 ( Num_newJL , 1 ) Num_newJL = SetNum_Part2 ( Num_newJL , Part2_newJL ) Num_newJL = SetNum_Part3 ( Num_newJL , Part3_newJL ) Num_newJL = SetNum_Part4 ( Num_newJL , Part4_newJL ) Num_newJL = SetNum_Part5 ( Num_newJL , Part5_newJL ) Num_newJL = SetNum_Part6 ( Num_newJL , Part6_newJL ) Num_newJL = SetNum_Part7 ( Num_newJL , Part7_newJL ) SetItemForgeParam ( Item_newJL , 1 , Num_newJL ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_STR , new_str ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_DEX , new_dex ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_STA , new_sta ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_AGI , new_agi ) SetItemAttr ( Item_newJL , ITEMATTR_VAL_CON , new_con ) SetItemAttr ( Item_newJL , ITEMATTR_MAXENERGY , new_MAXENERGY ) SetItemAttr ( Item_newJL , ITEMATTR_MAXURE , new_MAXURE ) следующее сбарасывает уровень наших фей Elf_Attr_cs ( role , Item_JLone , Item_JLother ) Это не вся функция, а лишь основные "куски", может быть что то упустил и не так понял, но думаю должно быть полезно. Соответсвенно ищем функцию Elf_Attr_cs в functions.lua, а именно строки max_JLone_temp = max_JLone_temp - 4 max_JLother_temp = max_JLother_temp - 4 На первый взгляд эта четверка и похожа на значение уровней которое будет отниматься, проверить нет возможности, дерзайте! Вот я так и думал, что за отбор лвл функция находится не в forge, спасибо щас все попробую. Quote Share this post Link to post Share on other sites