Jump to content
  • 0
kifu21

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

Question

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

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
			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

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.