Jump to content
  • 0

Weapon Lvl 5 for the skill Weapon Refine


Bake Mono

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   1
  • Joined:  11/15/11
  • Last Seen:  

I was looking to see if it'd be possible to add in a custom weapon level "5" for some custom weapons on my server. From what I have done below, I tested by changing the weapon level of Angra Manyu to 5. After getting an enriched oridecon, it appeared in the refinement window on my whitesmith. However, when clicked, it did nothing.

So far I have done the following in my source code, noted with the comment starting with "// Custom":

Here's the snippet from the clif.c file

/// Presents a list of weapon items that can be refined [Taken from jAthena] (ZC_NOTIFY_WEAPONITEMLIST).
/// 0221 <packet len>.W { <index>.W <name id>.W <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W }*
void clif_item_refine_list(struct map_session_data *sd)
{
int i,c;
int fd;
int skilllv;
int wlv;
int refine_item[6]; // Custom -- Increased from "int refine_item[5];

nullpo_retv(sd);

skilllv = pc_checkskill(sd,WS_WEAPONREFINE);

fd=sd->fd;

refine_item[0] = -1;
refine_item[1] = pc_search_inventory(sd,1010);
refine_item[2] = pc_search_inventory(sd,1011);
refine_item[3] = refine_item[4] = pc_search_inventory(sd,984);
refine_item[5] = pc_search_inventory(sd,7620); // Custom -- Added new line so it uses enriched oridecon

WFIFOHEAD(fd, MAX_INVENTORY * 13 + 4);
WFIFOW(fd,0)=0x221;
for(i=c=0;i<MAX_INVENTORY;i++){
	if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].refine < skilllv &&
		sd->status.inventory[i].identify && (wlv=itemdb_wlv(sd->status.inventory[i].nameid)) >=1 &&
		refine_item[wlv]!=-1 && !(sd->status.inventory[i].equip&EQP_ARMS)){
		WFIFOW(fd,c*13+ 4)=i+2;
		WFIFOW(fd,c*13+ 6)=sd->status.inventory[i].nameid;
		WFIFOB(fd,c*13+ 8)=sd->status.inventory[i].refine;
		clif_addcards(WFIFOP(fd,c*13+9), &sd->status.inventory[i]);
		c++;
	}
}
WFIFOW(fd,2)=c*13+4;
WFIFOSET(fd,WFIFOW(fd,2));
if (c > 0) {
	sd->menuskill_id = WS_WEAPONREFINE;
	sd->menuskill_val = skilllv;
}
}

And this is the refine_db.txt

// Database for upgrading items.
// Stats per level for safe upgrade, Stats per level after safe limit, Safe level limit, Lv.1 %, Lv 2 %, Lv.3%, ect...
// Armor defense is done in percentage (ie 70 = .7 def)
// Weapons are whole numbers (ie 3 = 3 atk)

70, 4,4, 100,100,100,100, 60, 40, 40, 20, 20, 10, 50, 30, 30, 20, 20, 10, 10, 10, 10, 10,	// Armor
 2, 3,7, 100,100,100,100,100,100,100, 60, 40, 20, 70, 70, 50, 50, 30, 30, 20, 20, 10, 10,	// Lv.1 Weapons
 3, 5,6, 100,100,100,100,100,100, 60, 40, 20, 20, 70, 50, 50, 30, 30, 20, 20, 10, 10, 10,	// Lv.2 Weapons
 5, 8,5, 100,100,100,100,100, 60, 50, 20, 20, 20, 50, 50, 30, 30, 20, 20, 10, 10, 10, 10,	// Lv.3 Weapons
 7,13,4, 100,100,100,100, 60, 40, 40, 20, 20, 10, 50, 30, 30, 20, 20, 10, 10, 10, 10, 10,	// Lv.4 Weapons
10,18,2, 100,100, 80, 60, 60, 20, 20, 15, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,			// Custom -- Lv.5 Weapons

What else should be done, or what file should I look into?

Edited by Bake Mono
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   1
  • Joined:  11/15/11
  • Last Seen:  

Hopefully, I'm able to bump this as it's been quite some time. =x

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   1
  • Joined:  11/15/11
  • Last Seen:  

That is wonderful! Thank you very much~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

do you have a patch for rathena version?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  231
  • Reputation:   24
  • Joined:  12/18/11
  • Last Seen:  

is this usable on rAthena?

Link to comment
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
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

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