Jump to content
  • 0

I have problem with new script command


Question

Posted

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?

6 answers to this question

Recommended Posts

Posted (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 by zxb329622888
Posted

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'.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...