Mechomorph XD Posted May 18, 2012 Share Posted May 18, 2012 I want to do a new script command, It's can return value of refinable. Syntax : getcanrefine(item_id), It'll return 1 when that item can refine or 0 when can't But in itemdb.h on item_data structure, no have about refinable variable. How to add it and where? Quote Link to comment Share on other sites More sharing options...
zxb329622888 Posted May 19, 2012 Share Posted May 19, 2012 (edited) BUILDIN_FUNC(getcanrefine) { int itemid; struct item_data* i_data; TBL_PC *sd; sd = script_rid2sd(st); if( sd == NULL ) return 0; itemid = script_getnum(st,2); i_data = itemdb_exists(itemid); if( i_data <= 0) { return 0; } script_pushint(st,i_data->flag.no_refine); return 0; } Edited May 19, 2012 by zxb329622888 Quote Link to comment Share on other sites More sharing options...
Mechomorph XD Posted May 19, 2012 Author Share Posted May 19, 2012 Thank You, Girl Quote Link to comment Share on other sites More sharing options...
Mechomorph XD Posted May 20, 2012 Author Share Posted May 20, 2012 [Warning]: Unexpected type for argument 1. Expected string. [Debug]: Data: number value=1 [Debug]: Function: mes above code had warning Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted May 20, 2012 Share Posted May 20, 2012 mes ""+getcanrefine(itemid); red part convert int to string Quote Link to comment Share on other sites More sharing options...
Mechomorph XD Posted May 20, 2012 Author Share Posted May 20, 2012 thank you girl Quote Link to comment Share on other sites More sharing options...
Emistry Posted May 20, 2012 Share Posted May 20, 2012 huh ? why add a new 1 when we already have this ? *getequipisenableref(<equipment slot>) Will return 1 if the item equipped on the invoking character in the specified equipment slot is refinable, and 0 if it isn't. For a list of equipment slots see 'getequipid'. Quote Link to comment Share on other sites More sharing options...
I want to do a new script command, It's can return value of refinable.
But in itemdb.h on item_data structure, no have about refinable variable. How to add it and where?
Link to comment
Share on other sites