Mad Walker Posted October 17, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 177 Reputation: 9 Joined: 06/25/12 Last Seen: October 31, 2016 Share Posted October 17, 2012 What part of this code should I edit to make the down refine to 5? For example I have +15 Armor, after it fails it will become +10 Armor. BUILDIN_FUNC(downrefitem){ 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.equip; //Logs items, got from (N)PC scripts [Lupus] log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory); sd->status.inventory.refine++; pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below clif_refine(sd->fd,2,i,sd->status.inventory.refine = sd->status.inventory.refine - 2); 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); clif_additem(sd,i,1,0); pc_equipitem(sd,i,ep); clif_misceffect(&sd->bl,2); } return 0; } Quote Link to comment Share on other sites More sharing options...
GmOcean Posted October 17, 2012 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted October 17, 2012 I'm going to guess it's this line here: clif_refine(sd->fd,2,i,sd->status.inventory[i].refine = sd->status.inventory[i].refine - 2); But i don't see why you can't just simple run the same line of text 5x in the script? Quote Link to comment Share on other sites More sharing options...
Mad Walker Posted October 17, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 177 Reputation: 9 Joined: 06/25/12 Last Seen: October 31, 2016 Author Share Posted October 17, 2012 lol I'm derping! Thanks for the advice. My brain is buffering, maybe that's a good idea instead of changing some source codes. Thanks anyway! Quote Link to comment Share on other sites More sharing options...
Question
Mad Walker
What part of this code should I edit to make the down refine to 5? For example I have +15 Armor, after it fails it will become +10 Armor.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.