How does the ATTR_JOB connect to the gems?

Potato

Pirate
Registered
LV
0
 
Joined
Mar 15, 2026
Messages
13
Reaction score
1
Points
8
1783843981864.webp
As you can see the same function is being called the only difference is the itemIDs + ATTR_JOB yet somehow first function gives sword with fiery gem and other gives bow with explosive gem
If I had to guess the gem is based on the ATTR_JOB but from where does it connect?

1783844115485.webp
We can also see here the same thing, same fuction but 3 different outcomes:
1. greatsword with furious gem
2. sword with fiery
3. gun with explosive

can someone explain how i would change the gem connected to each function? like i want to make say ATTR_JOB-9 (CRUS) = 13 (Eye of BD)
 
i make some chest like this:
function ItemUsexxxxxx( role, Item )
local Cha_Boat = 0
Cha_Boat = GetCtrlBoat ( role )
if Cha_Boat ~= nil then
SystemNotice( role , "Cannot use in sea" )
UseItemFailed ( role )
return
end
local Item_CanGet = GetChaFreeBagGridNum ( role )
if Item_CanGet < 5 then
SystemNotice(role ,"You need at least 5 inventory slots")
UseItemFailed ( role )
return
end
local item1 = xxxx --(item id, armor,boot,glove,weapon)
ForgeItem( role , item1 , H , X , X1 , Y , Y2 , Z , Z3 ) -- item1(piece), H (how many slots u want on that piece), X (ID of gem from stoneinfo 1st socket), X1 (Level of gem of the first socket), Y (ID of gem from stoneinfo 2nd slot), Y2 (Level of gem of 2nd socket), Z (ID of gem from stoneinfo 3rd slot), Z3 (Level of gem of 3rd socket)
end
 
AttrCalculate.lua
Check for function Creat_Item(item, item_type, item_lv, item_event)
You will see below item_type == 1 for single weapon and so on.
Part 1 = Socket
Part 2 = Gem ID
Part 3 = Gem Level.
 
Now that i think of it could also be reading itemtype but either ways the question remains, from where?
 
AttrCalculate.lua
Check for function Creat_Item(item, item_type, item_lv, item_event)
You will see below item_type == 1 for single weapon and so on.
Part 1 = Socket
Part 2 = Gem ID
Part 3 = Gem Level.
lol after i posted i saw this , anyway yeah ig that makes sense, itemtype connects the gem
 
  • Like
Reactions: Pixel