It's a client issue. Change the clif_add_random_options function to skip empty entries. Something like...
/// Fills in part of the item buffers that calls for variable bonuses data. [Napster]
/// A maximum of 5 random options can be supported.
static uint8 clif_add_random_options( struct ItemOptions buf[MAX_ITEM_RDM_OPT], struct item* it ){
nullpo_retr( 0, it );
uint8 count = 0;
memset(buf, 0, sizeof(struct ItemOptions) * MAX_ITEM_RDM_OPT);
for( int i = 0; i < MAX_ITEM_RDM_OPT; i++ ){
if( it->option[i].id ){
buf[count].index = it->option[i].id; // OptIndex
buf[count].value = it->option[i].value; // Value
buf[count].param = it->option[i].param; // Param1
count++;
}
}
#if MAX_ITEM_RDM_OPT < 5
for( ; i < 5; i++ ){
buf[i].index = 0; // OptIndex
buf[i].value = 0; // Value
buf[i].param = 0; // Param1
}
#endif
return count;
}