Mechomorph XD Posted May 18, 2012 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 71 Reputation: 1 Joined: 03/06/12 Last Seen: January 22, 2021 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 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 2 Reputation: 0 Joined: 01/07/12 Last Seen: September 24, 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 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 71 Reputation: 1 Joined: 03/06/12 Last Seen: January 22, 2021 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 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 71 Reputation: 1 Joined: 03/06/12 Last Seen: January 22, 2021 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 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 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 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 71 Reputation: 1 Joined: 03/06/12 Last Seen: January 22, 2021 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 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM 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...
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?
Link to comment
Share on other sites
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.