Jump to content
kyleflow

Extract Gem return Refining Gem? How?

Recommended Posts

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 by Ximboliex

xbx3.png

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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


Discord:Wolfen#1498

https://www.patreon.com/ReTop

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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


Discord:Wolfen#1498

https://www.patreon.com/ReTop

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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))

ย 

  • Thanks 1

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

ย 

Share this post


Link to post
Share on other sites
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




ย 


"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
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.

1749686578_Screenshot2023-07-12140858.png.01a2b8806e64daecc06fb85f4e7eb7bf.png

ย 

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

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites

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

image.png.c32a001a5a89cb7ea48a6c1e38236118.png

ย 

  • Thanks 2

Share this post


Link to post
Share on other sites
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

image.png.c32a001a5a89cb7ea48a6c1e38236118.png

ย 

refactor - it's good.

Add_Item_Attr( ITEMATTR_VAL_BaoshiLV, item_event % 100 * 10)

ย 

  • Haha 2

kong.png

a2.png

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


ร—
×
  • Create New...