Refine rate of WS with visual on how many upgrade it has been

kifu21

New member
Messages
25
Points
0
Age
33
Emulator
Hercules
hi need help on assisting on this source to increase the safety refine of whitesmith and how to show its Upgrade for example

Weapon Upgrade +8 Knife etc

 
Code:
			per = status->get_refine_chance(ditem->wlv, (int)item->refine, REFINE_CHANCE_TYPE_NORMAL) * 10;

			// Aegis leaked formula. [malufett]
			if (sd->status.class == JOB_MECHANIC_T)
				per += 100;
			else
				per += 5 * (sd->status.job_level - 50);
just add per += ... whatever you like

 
I dont get this mam 

void skill_weaponrefine (struct map_session_data *sd, int idx)
{
    nullpo_retv(sd);

    if (idx >= 0 && idx < MAX_INVENTORY) {
        struct item *item;
        struct item_data *ditem = sd->inventory_data[idx];
        item = &sd->status.inventory[idx];

        if (item->nameid > 0 && ditem->type == IT_WEAPON) {
            int material[5] = {
                0,
                ITEMID_PHRACON,
                ITEMID_EMVERETARCON,
                ITEMID_ORIDECON,
                ITEMID_ORIDECON,
            };
            int i = 0, per;
            if( ditem->flag.no_refine ) {
                // if the item isn't refinable
                clif->skill_fail(sd,sd->menuskill_id,USESKILL_FAIL_LEVEL,0);
                return;
            }
            if( item->refine >= sd->menuskill_val || item->refine >= 10 ){
                clif->upgrademessage(sd->fd, 2, item->nameid);
                return;
            }
            if ((i = pc->search_inventory(sd, material[ditem->wlv])) == INDEX_NOT_FOUND) {
                clif->upgrademessage(sd->fd, 3, material[ditem->wlv]);
                return;
            }

            per = status->get_refine_chance(ditem->wlv, (int)item->refine) * 10;

            // Aegis leaked formula. [malufett]
            if (sd->status.class == JOB_MECHANIC_T)
                per += 100;
            else
                per += 5 * (sd->status.job_level - 50);
 

currently stuck here where do i insert the safety refine and item obtained

 
you are asking 2 different things

1. increase the refine chance
look at my post closely ... status->get_refine_chance is equal to *getequiprefinerycnt ...
it reads from db\re\refine._db.conf file
since the line below takes the rand() chance at 1000 and not 100, so per += 100 means increase 10% chance

2. show the item name with +refine
just apply the patch from the topic I link to

 
I already inputted the safety refine my problem now the 2nd one i dont know which line should i add

 
Back
Top