Mechomorph XD Posted May 18, 2012 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
zxb329622888 Posted May 19, 2012 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
Mechomorph XD Posted May 20, 2012 Author 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
QQfoolsorellina Posted May 20, 2012 Posted May 20, 2012 mes ""+getcanrefine(itemid); red part convert int to string Quote
Emistry Posted May 20, 2012 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
Question
Mechomorph XD
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?
6 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.