Now if I use the @iteminfo command then I'm getting this result:
As you can see, the script field is just showing weird symbols instead of the actual item script. I already searched the forum for some solutions, but i haven't found anything. I hope you guys can help me with this.
Hi guys,
i just wanted to edit the @iteminfo command for my personal needs. Everything went fine, save for the item script.
I changed the code of the function ACMD_FUNC(iteminfo) from this:
for (i = 0; i < count; i++) { item_data = item_array[i]; sprintf(atcmd_output, "Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s", item_data->name,item_data->jname,item_data->slot,item_data->nameid, itemdb_typename(item_data->type), (item_data->script==NULL)? "None" : "With script" ); clif_displaymessage(fd, atcmd_output); sprintf(atcmd_output, "NPC Buy:%dz, Sell:%dz | Weight: %.1f ", item_data->value_buy, item_data->value_sell, item_data->weight/10. ); clif_displaymessage(fd, atcmd_output); if (item_data->maxchance == -1) strcpy(atcmd_output, " - Available in the shops only."); else if (item_data->maxchance) sprintf(atcmd_output, " - Maximal monsters drop chance: %02.02f%%", (float)item_data->maxchance / 100 ); else strcpy(atcmd_output, " - Monsters don't drop this item."); clif_displaymessage(fd, atcmd_output); } return 0;to this:
clif_disp_onlyself_type(sd, "====================================", 3); for (i=0;i<count;i++) { item_data = item_array[i]; sprintf(atcmd_output, "nr"); clif_disp_onlyself_type(sd, atcmd_output,3); if(!item_data->slot) { sprintf(atcmd_output, "[%d] %s / %s",item_data->nameid,item_data->name,item_data->jname); clif_disp_onlyself_type(sd, atcmd_output,3); } else { sprintf(atcmd_output, "[%d] %s / %s[%d]",item_data->nameid,item_data->name,item_data->jname,item_data->slot); clif_disp_onlyself_type(sd, atcmd_output,3); } sprintf(atcmd_output, "Script: %s",item_data->script); clif_disp_onlyself_type(sd, atcmd_output,2); } clif_disp_onlyself_type(sd, "====================================", 3); return 0;Now if I use the @iteminfo command then I'm getting this result:
As you can see, the script field is just showing weird symbols instead of the actual item script. I already searched the forum for some solutions, but i haven't found anything. I hope you guys can help me with this.
Thanks in advance!
Edited by NightTerrorLink to comment
Share on other sites