Hi again, im trying to modify the "equip" script command so it can also equip arrows since it only shows "Item cannot be equipped!" when an arrow id is given. i tried to modify this part of the script code but so far ive not been able to:
BUILDIN_FUNC(equip) {
unsigned short nameid = 0;
TBL_PC *sd;
struct item_data *item_data;
if (!(sd = script_rid2sd(st)))
return SCRIPT_CMD_SUCCESS;
nameid = script_getnum(st,2);
if ((item_data = itemdb_exists(nameid))) {
int i;
ARR_FIND( 0, MAX_INVENTORY, i, sd->status.inventory[i].nameid == nameid );
if (i < MAX_INVENTORY) {
pc_equipitem(sd,i,item_data->equip);
script_pushint(st,1);
return SCRIPT_CMD_SUCCESS;
}
}
ShowError("buildin_equip: Item %hu cannot be equipped\n",nameid);
script_pushint(st,0);
return SCRIPT_CMD_FAILURE;
}
i hope someone is able to lend me a hand with this!, thanks in advance!.
Question
Nuckelavee
Hi again, im trying to modify the "equip" script command so it can also equip arrows since it only shows "Item cannot be equipped!" when an arrow id is given. i tried to modify this part of the script code but so far ive not been able to:
i hope someone is able to lend me a hand with this!, thanks in advance!.
Link to comment
Share on other sites
0 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.