Jump to content
  • 0

about smith's producing weapon


moneymuch

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  03/11/12
  • Last Seen:  

I want to know where is the source of smith's producing weapon about property

oh,my English is bad , i don't know how to say, let me give an example

when smith is producing weapon , he need to put 'Flame Heart', 'Mystic Frozen', 'Rough Wind', 'Great Nature' and 'Star Crumb' ,like as this kind of thing.

how does system determine the effect of these thing . for example , 'Flame Heart' can give fire status to weapon, 'Star Crumb' can give atk to weapon

like skill's damage is in battle.c/damage , then , where is the source of smith's producing weapon about property?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

this one checks what stone is used so it can determined its element..

@skill.c

	for(i=0,sc=0,ele=0;i<3;i++){ //Note that qty should always be one if you are using these!
	int j;
	if( slot[i]<=0 )
		continue;
	j = pc_search_inventory(sd,slot[i]);
	if(j < 0)
		continue;
	if(slot[i]==1000){	/* Star Crumb */
		pc_delitem(sd,j,1,1,0,LOG_TYPE_PRODUCE);
		sc++;
	}
	if(slot[i]>=994 && slot[i]<=997 && ele==0){	/* Flame Heart . . . Great Nature */
		static const int ele_table[4]={3,1,4,2};
		pc_delitem(sd,j,1,1,0,LOG_TYPE_PRODUCE);
		ele=ele_table[slot[i]-994];
	}
}

so the output are the ele(element of the forged item) & sc(damage bonus from star crumb) variable..

:meow:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  03/11/12
  • Last Seen:  

@malufett

thank you very much

can i answer new question?

after I read 'skill_produce_mix', i find

if(rnd()%10000 < make_per || qty > 1){ //Success, or crafting multiple items.
 struct item tmp_item;
 memset(&tmp_item,0,sizeof(tmp_item));
 tmp_item.nameid=nameid;
 tmp_item.amount=1;
 tmp_item.identify=1;
 if(equip){
  tmp_item.card[0]=CARD0_FORGE;
  tmp_item.card[1]=((sc*5)<<8)+ele;
  tmp_item.card[2]=GetWord(sd->status.char_id,0); // CharId
  tmp_item.card[3]=GetWord(sd->status.char_id,1);
 } else {
  //Flag is only used on the end, so it can be used here. [skotlex]

i think , i need to find the thing that is 'tmp_item.card[1]=((sc*5)<<8)+ele;'

i want to alter this part,

at present, its effect is let weapon is add atk , fire status and so on.

i need the effect that is let Armor is add HP or def and fire status, but it is not that damage is fire , yet it is that def is fire,

so i think that 'tmp_item.card[1]=((sc*5)<<8)+ele;' is key !

but i do not understand the Usage of this ,

can you help me ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

tmp_item.card[1]=((sc*5)<<8)+ele;

this value holds the star crumb flag and the element..and it was bit shifted to hold multiply value..

btw this is the part where it was disassemble

if(sd->status.inventory[index].card[0]==CARD0_FORGE)
{ // Forged weapon
    wd->star += (sd->status.inventory[index].card[1]>>8);
    if(wd->star >= 15) wd->star = 40; // 3 Star Crumbs now give +40 dmg
    if(pc_famerank(MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]) ,MAPID_BLACKSMITH))
         wd->star += 10;

    if (!wa->ele) //Do not overwrite element from previous bonuses.
         wa->ele = (sd->status.inventory[index].card[1]&0x0f);
}

:meow:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  03/11/12
  • Last Seen:  

@malufett

 else if(sd->inventory_data[index]->type == IT_ARMOR) {
  int r;
  if ( (r = sd->status.inventory[index].refine) )
refinedef += refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
  if(sd->inventory_data[index]->script) {
if( i == EQI_HAND_L ) //Shield
 sd->state.lr_flag = 3;
run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
if( i == EQI_HAND_L ) //Shield
 sd->state.lr_flag = 0;
if (!calculating) //Abort, run_script retriggered this. [skotlex]
 return 1;
  }
+   if(sd->status.inventory[index].card[0]==CARD0_FORGE)
+   {
+	status->def_ele = (sd->status.inventory[index].card[1]&0x0f);
+	status->ele_lv = 1;
+	clif_displaymessage(sd->fd, "yes,it is here!!!");
+   }
 }
}
if(sd->equip_index[EQI_AMMO] >= 0){
 index = sd->equip_index[EQI_AMMO];
 if(sd->inventory_data[index]){  // Arrows
  sd->bonus.arrow_atk += sd->inventory_data[index]->atk;
  sd->state.lr_flag = 2;

i add it , i equip produced armor ,i can display "yes,it is here!!!"

but it is not effect , how do i need to alter, can you give me a tip.

or i need to add function like as "weapon_atk" in status.h

struct weapon_atk {

unsigned short atk, atk2;

unsigned short range;

unsigned char ele;

};

Edited by moneymuch
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...