Legato Posted December 23, 2011 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 87 Reputation: 1 Joined: 11/20/11 Last Seen: September 10, 2013 Share Posted December 23, 2011 Hiya, everyone. Everytime I log off and then log back in, the costume item that is made by this custom command(Made by Greenbox) is always taken off. This is the code for the command. @costumeitem // Costume Item System [GreenBox] ACMD_FUNC(costumeitem) { struct item item_tmp; struct item_data *item_data; char item_name[100]; int item_id, number = 0; int flag; int loop, get_count, i; nullpo_retr(-1, sd); memset(item_name, '\0', sizeof(item_name)); if (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %", item_name, &number) < 1 && sscanf(message, "%99s %d", item_name, &number) < 1 )) { clif_displaymessage(fd, "Please, at least enter an option. (usage: @costumeitem <item name or ID> <quantity>)."); return -1; } if (number <= 0) number = 1; item_id = 0; if ((item_data = itemdb_searchname(item_name)) != NULL || (item_data = itemdb_exists(atoi(item_name))) != NULL) item_id = item_data->nameid; if (item_id > 500) { loop = 1; get_count = number; if (!(item_data->equip&EQP_HEAD_LOW) && !(item_data->equip&EQP_COSTUME_HEAD_LOW) && !(item_data->equip&EQP_HEAD_MID) && !(item_data->equip&EQP_COSTUME_HEAD_MID) && !(item_data->equip&EQP_HEAD_TOP) && !(item_data->equip&EQP_COSTUME_HEAD_TOP) ) { clif_displaymessage(fd, "This can't be a costume item."); return 1; } for (i = 0; i < loop; i++) { memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; item_tmp.refine = 0; item_tmp.attribute = 5; item_tmp.card[0] = 0; item_tmp.card[1] = 0; item_tmp.card[2] = 0; item_tmp.card[3] = 0; if ((flag = pc_additem(sd, &item_tmp, get_count))) clif_additem(sd, 0, 0, flag); } //Logs (A)dmins items [Lupus] if(log_config.enable_logs&0x400) log_pick_pc(sd, "A", item_tmp.nameid, number, &item_tmp); clif_displaymessage(fd, msg_txt(18)); // Item criado. } else { clif_displaymessage(fd, msg_txt(19)); // Nome/ID inválido. return -1; } return 0; } Quote Link to comment Share on other sites More sharing options...
Arcenciel Posted December 23, 2011 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 1315 Reputation: 372 Joined: 12/10/11 Last Seen: August 31, 2013 Share Posted December 23, 2011 This isn't an answer to your question but costumes are now supported by rAthena. You no longer have to use any custom edits. Just update your rA. http://sourceforge.n...hangeset/15194/ http://sourceforge.n...hangeset/15195/ Quote Link to comment Share on other sites More sharing options...
Legato Posted December 23, 2011 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 87 Reputation: 1 Joined: 11/20/11 Last Seen: September 10, 2013 Author Share Posted December 23, 2011 (edited) Thanks for replying, Arcenciel. Yea, I knew that. You already told me on the other topic. Well, it's weird, because on eAthena, 3ceam and ream I could use the full diff of costume items that I found on eA without experiencing the problem I've stated on my first post. But, on rAthena, there's no warning or error showing when I'm recompiling. Everytime I created a costume item with that command(256,512 and 1 as for their locations) server keeps on un-equipping it upon log-in. EDIT: Nvm. Fixed it. Edited December 23, 2011 by Legato Quote Link to comment Share on other sites More sharing options...
Question
Legato
Hiya, everyone. Everytime I log off and then log back in, the costume item that is made by this custom command(Made by Greenbox) is always taken off.
This is the code for the command.
@costumeitem
Link to comment
Share on other sites
2 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.