kyleflow 35 Report post Posted July 7, 2023 Extract Gem return Refining Gem? How? Read the script for it in forge.lua but unable to understand it . Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 8, 2023 Up Up and away Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 8, 2023 No one knows how ? Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 9, 2023 Last UP. Please anyone who are expert on this knows how to do it. Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted July 9, 2023 (edited) If you want extract gem whit refining gem whit native UI need edit .exe (src) ย If you have Client Src then looking for "UIPurifyForm.cpp" Edited July 9, 2023 by Ximboliex Quote Share this post Link to post Share on other sites
wolfenx 106 Report post Posted July 9, 2023 forge.lua lolย people so lazy, not to see something so easy. I think that even in the forum there should be a solution to something so old Quote Discord:Wolfen#1498 https://www.patreon.com/ReTop Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 9, 2023 2 minutes ago, wolfenx said: forge.lua lolย people so lazy, not to see something so easy. I think that even in the forum there should be a solution to something so old I've search through inside the forum as much as I can and can't seem to find it. Do you think I simply ask when I don't know ? That harsh of you. Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 9, 2023 Did I mentioned that I already read forge.lua but can't seem to understand it? read 1st before you simply reply. Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 9, 2023 14 minutes ago, Ximboliex said: If you want extract gem whit refining gem whit native UI need edit .exe (src) ย If you have Client Src then looking for "UIPurifyForm.cpp" Can't it simply redirect the gem level read for the item and return the same level of refining gem? I got some ideas but I simply unable to understand it from the script. Quote Share this post Link to post Share on other sites
wolfenx 106 Report post Posted July 9, 2023 simple, before asking, be more specific, the developers are not fortune tellers, you don't even put in which version you are hindering lol You think I don't know about top, I've been around much longer than you, and I've solved everything they've asked me to do Quote Discord:Wolfen#1498 https://www.patreon.com/ReTop Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 9, 2023 Just now, wolfenx said: simple, before asking, be more specific, the developers are not fortune tellers, you don't even put in which version you are hindering lol You think I don't know about top, I've been around much longer than you, and I've solved everything they've asked me to do Version ? okay its 1.36. now help me solved it? Since you are "senior" here. glad to get your help. and I already mentioned I've read it. So you did simply reply Quote Share this post Link to post Share on other sites
wolfenx 106 Report post Posted July 9, 2023 a tip learn how this function works SetCharaAttr you will never ask for help again that function is very important to modify the attributes of the game together with makeitem you can achieve what you want and I retire from the subject, I just went in to see how desperate people are Quote Discord:Wolfen#1498 https://www.patreon.com/ReTop Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 9, 2023 6 minutes ago, wolfenx said: a tip learn how this function works SetCharaAttr you will never ask for help again that function is very important to modify the attributes of the game together with makeitem you can achieve what you want and I retire from the subject, I just went in to see how desperate people are Nah. U just want to dis people up. Thanks for the tips. Good day Quote Share this post Link to post Share on other sites
mkhzaleh 131 Report post Posted July 9, 2023 short answer , you give after extract process finishd u can use giveitem or make item but giveitem works fine for gems too i will not write full function but u can done that inside check here if player have at least 2 slots empty one for gem ,one for ref so here u control error handling before finish the request Quote function can_getstone_item_main(Table) after everything done u give the refgem inside ย Quote function getstone_item(Table) u will haveย StoneLv ,ย after that u give it beside the extracted gem using ย Quote GiveItem(Player, 0, gemid, 1, (100 + ExtractedGemLv)) ย 1 Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 9, 2023 40 minutes ago, mkhzaleh said: short answer , you give after extract process finishd u can use giveitem or make item but giveitem works fine for gems too i will not write full function but u can done that inside check here if player have at least 2 slots empty one for gem ,one for ref so here u control error handling before finish the request after everything done u give the refgem inside ย u will haveย StoneLv ,ย after that u give it beside the extracted gem using ย ย Thanks so much bro. A very nice clean way of helping. Cheers mate Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 12, 2023 bro @mkhzaleh, the GiveItem function can't be used since its return a parameter or itemtype error. ย Based on the script, it declared r1 = 0 and r2 = 0, and used that as a parameter to called for MakeItem function. ย r1,r2 = MakeItem ( role , item_tureID , 1 , 2 ) I don't know why it is declared but never once used locally inside the if loop or any other function. r2 was used to set the new gem parameter after its finished extracting. this is the full function and there are bits and code that I can't seem to get it right. I tried multiples ways and sometimes I get the return gem lv1 and the refining gem the correct level extracted, or I get both gem lv1. So, I need a bit more explanation from you if you may. ย function getstone_item ( Table ) --Notice("Ronghe_Item") local role = 0 local ItemBag = {} --้ๅ ท่ๅ ไฝ็ฝฎ local ItemCount = {} --้ๅ ทๆฐ้ local ItemBagCount = {} --้ๅ ทๅฏน่ฑกๆฐ้ local ItemBag_Num = 0 local ItemCount_Num = 0 local ItemBagCount_Num = 0 local ItemID_Cuihuaji = 0 role , ItemBag , ItemCount , ItemBagCount , ItemBag_Num , ItemCount_Num , ItemBagCount_Num = Read_Table ( Table ) --------ๅๅบ้ๅ ทๆ้ local Item_mainitem = GetChaItem ( role , 2 , ItemBag [0] ) --ไธป่ฃ ๅค้ๅ ทๆ้ local Item_otheritem = GetChaItem ( role , 2 , ItemBag [1] ) --่พ ๅฉ่ฃ ๅค้ๅ ทๆ้ --------ๅ้ๅ ท็ฑปๅ local ItemType_mainitem = GetItemType ( Item_mainitem ) local ItemType_otheritem = GetItemType ( Item_otheritem ) --------ๅ้ๅ ทID local ItemID_mainitem = GetItemID ( Item_mainitem ) local ItemID_otheritem = GetItemID ( Item_otheritem ) --------ๅ้ๅ ท็ญ็บง local Item_mainitem_Lv = GetItemLv ( Item_mainitem ) local Item_otheritem_Lv = GetItemLv ( Item_otheritem ) -------่ฏปๅ่ฃ ๅค็ฒพ็ผไฟกๆฏ local Num = GetItemForgeParam ( Item_mainitem , 1 ) Num = TansferNum ( Num ) local lg_Num=Num --SystemNotice( role , "Num=="..Num) local Item_Stone = {} local Item_StoneLv = {} local Item_StoneID = {} -------ๅฎ็ณ็ฑปๅ -- Gem type Item_Stone[0] = GetNum_Part2 ( Num ) Item_Stone[1] = GetNum_Part4 ( Num ) Item_Stone[2] = GetNum_Part6 ( Num ) -------ๅฎ็ณ็ญ็บง gem grade Item_StoneLv[0] = GetNum_Part3 ( Num ) Item_StoneLv[1] = GetNum_Part5 ( Num ) Item_StoneLv[2] = GetNum_Part7 ( Num ) --------ๅฎ็ณID==StoneTpye_ID [ๅฎ็ณ็ฑปๅ] -- Gem ID==StoneTpye_ID [gem type] Item_StoneID[0] = StoneTpye_ID[Item_Stone[0]] Item_StoneID[1] = StoneTpye_ID[Item_Stone[1]] Item_StoneID[2] = StoneTpye_ID[Item_Stone[2]] local r1 = 0 local r2 = 0 local Item_Lv = 0 local item_tureID=0 ---------ๅๅบ็ๅฎ็ณ้ๅ ทID -- The ID of the gem item retrieved if Item_StoneID[0]~=0 then item_tureID = Item_StoneID[0] --Item_Stone[0] = 0 Item_Lv = Item_StoneLv[0] Item_StoneLv[0] = Item_StoneLv[0]-1 if Item_StoneLv[0]==0 then Item_Stone[0] = 0 end elseif Item_StoneID[0]==0 and Item_StoneID[1]~=0 then item_tureID = Item_StoneID[1] --Item_Stone[1] = 0 Item_Lv = Item_StoneLv[1] Item_StoneLv[1] = Item_StoneLv[1]-1 if Item_StoneLv[1]==0 then Item_Stone[1] = 0 end elseif Item_StoneID[0]==0 and Item_StoneID[1]==0 and Item_StoneID[2]~=0 then item_tureID = Item_StoneID[2] --Item_Stone[2] = 0 Item_Lv = Item_StoneLv[2] Item_StoneLv[2] = Item_StoneLv[2]-1 if Item_StoneLv[2]==0 then Item_Stone[2] = 0 end else SystemNotice( role , "Gem Extraction tool ID error") return end r1,r2 = MakeItem ( role , item_tureID , 1 , 2 ) local Item_ture = GetChaItem ( role , 2 , r2 ) ---------ๅๅบ็ๅฎ็ณๆ้ gem pointer ---------่ฎพ็ฝฎๅฎ็ณ็ญ็บง SetItemAttr ( Item_ture , ITEMATTR_VAL_BaoshiLV , Item_Lv ) ----------้่ฎพ่ฃ ๅค็ฒพ็ผๅฑๆง -- set gem level Num = SetNum_Part2 ( Num , Item_Stone[0] ) Num = SetNum_Part3 ( Num , Item_StoneLv[0] ) Num = SetNum_Part4 ( Num , Item_Stone[1] ) Num = SetNum_Part5 ( Num , Item_StoneLv[1] ) Num = SetNum_Part6 ( Num , Item_Stone[2] ) Num = SetNum_Part7 ( Num , Item_StoneLv[2] ) SetItemForgeParam ( Item_mainitem , 1 , Num ) --------------LG local cha_name = GetChaDefaultName ( role ) LG( "star_tiqu_lg" ,cha_name, item_tureID , Item_Lv , lg_Num , Num ) local R1 = 0 R1 = RemoveChaItem ( role , ItemID_otheritem , 1 , 2 , ItemBag [1] , 2 , 1 , 0 ) --็งป้ค้ณๅญ if R1 == 0 then SystemNotice( role , "moved item failed ") return end end ย Quote Share this post Link to post Share on other sites
Mdrst 38 Report post Posted July 12, 2023 3 hours ago, kyleflow said: snip ย You want to return a refining gem with the same level as the extracted gem? r1 and r2 are respectively the boolean value to see if MakeItem failed or not (so 1 or 0) and the position number where the item will be placed. You can try adding this line afterย SetItemForgeParam ( Item_mainitem , 1 , Num): ย r3,r4 = MakeItem ( role , 885 , 1 , 2 ) local gridItem = GetChaItem (role, 2, r4) SetItemAttr (gridItem, ITEMATTR_VAL_BaoshiLV, Item_Lv) @kyleflow ย Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 12, 2023 1 hour ago, Mdrst said: ย You want to return a refining gem with the same level as the extracted gem? r1 and r2 are respectively the boolean value to see if MakeItem failed or not (so 1 or 0) and the position number where the item will be placed. You can try adding this line afterย SetItemForgeParam ( Item_mainitem , 1 , Num): ย r3,r4 = MakeItem ( role , 885 , 1 , 2 ) local gridItem = GetChaItem (role, 2, r4) SetItemAttr (gridItem, ITEMATTR_VAL_BaoshiLV, Item_Lv) @kyleflow ย Did not work. I declared the value local r3 and r4 = 0 respectively. and then I put down the script at the instructed location. Same as my tested condition before where the item given is not what I need. the result as picture below. ย The Ref return lv2, but the unique return lv1, but with your script, the gem lvl from item is not reduced. With my way at least the process reduced the item parameter but still the gem given come out as the same as your script. Did try to declare my Item_ref_lv inside each if loop with 885 and locally introduced = 0. Not working atm Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted July 12, 2023 @Mdrst bro, I change the location of the script under MakeItem and it worked like a charm. By putting it under the SetParam, the game did not update the value since after i relog, it gave me lv2 item. So thanks.. This is solved. Glad to have your assistance bro. Same goes to @mkhzalehfor indicate which function to work on. Quote Share this post Link to post Share on other sites
mkhzaleh 131 Report post Posted July 13, 2023 give item works just fine as it takes quality parameter ย GiveItem(cha, 0, item_id, quantity, 4)--the 4 is for quality and as gems be 101= lvl 1 102 lvl 2and so onย but you maybe missing item final attr function for events 101-102 ย 2 Quote Share this post Link to post Share on other sites
MonkeyCode 453 Report post Posted July 14, 2023 21 hours ago, mkhzaleh said: give item works just fine as it takes quality parameter ย GiveItem(cha, 0, item_id, quantity, 4)--the 4 is for quality and as gems be 101= lvl 1 102 lvl 2and so onย but you maybe missing item final attr function for events 101-102 ย refactor - it's good. Add_Item_Attr( ITEMATTR_VAL_BaoshiLV, item_event % 100 * 10) ย 2 Quote Share this post Link to post Share on other sites
mkhzaleh 131 Report post Posted July 16, 2023 On 7/14/2023 at 8:24 AM, MonkeyCode said: refactor - it's good. Add_Item_Attr( ITEMATTR_VAL_BaoshiLV, item_event % 100 * 10) ย my files do not use event like that anymore, so i just posted how his files could be lol Quote Share this post Link to post Share on other sites