Jump to content
  • 0

Question

7 answers to this question

Recommended Posts

Posted

/*==========================================
 * Refine +1 item at pos and log and display refine
 *------------------------------------------*/
BUILDIN_FUNC(successrefitem)
{
	int i=-1,num,ep;
	TBL_PC *sd;

	num = script_getnum(st,2);
	sd = script_rid2sd(st);
	if( sd == NULL )
		return 0;

	if (num > 0 && num <= ARRAYLENGTH(equip))
		i=pc_checkequip(sd,equip[num-1]);
	if(i >= 0) {
		ep=sd->status.inventory[i].equip;

		//Logs items, got from (N)PC scripts [Lupus]
		log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]);

		sd->status.inventory[i].refine++;
		pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below

		clif_refine(sd->fd,0,i,sd->status.inventory[i].refine);
		clif_delitem(sd,i,1,3);

		//Logs items, got from (N)PC scripts [Lupus]
		log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]);

		clif_additem(sd,i,1,0);
		pc_equipitem(sd,i,ep);
		clif_misceffect(&sd->bl,3);
		if(sd->status.inventory[i].refine == MAX_REFINE &&
			sd->status.inventory[i].card[0] == CARD0_FORGE &&
		  	sd->status.char_id == (int)MakeDWord(sd->status.inventory[i].card[2],sd->status.inventory[i].card[3])
		){ // Fame point system [DracoRPG]
	 		switch (sd->inventory_data[i]->wlv){
				case 1:
					pc_addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point
					break;
				case 2:
					pc_addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point
					break;
				case 3:
					pc_addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point
					break;
	 	 	 }
		}
	}

	return 0;
}

 

switch (sd->inventory_data[i]->wlv){
case 1:
	pc_addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point
	break;
case 2:
	pc_addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point
	break;
case 3:
	pc_addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point
	break;
}
Posted

this is about the script you gave me on blacksmith forged points..i dont know on how or where should i start...please can you give me an guide or step by step guide for it? 

 

 

Posted

that script command also do what you want..there is nothing you have to add or change ==''

 

and...please refrain from creating multiple topic just for one problem...

Posted (edited)

case 1:
pc_addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point
break;
case 2:
pc_addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point
break;
case 3:
pc_addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point
break;
}

This is source modification, its scr located in your trunk/src. (In skill.c and script.c) You dont need to change the src, because the default value of +10 forge = 1000 fame.

 

Change (sd,1000) "1000" to how many fame points you want in those cases, after doing that compile your server.

 

Edited by Lil Troll

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...