hakuren Posted January 21, 2012 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Share Posted January 21, 2012 hello is there any possibility to edit @dropall but in this case only one equip item will be dropped example @dropequip 512 (Mid Headgear) only item location(512) will be drop on the floor is this possible? Quote Link to comment Share on other sites More sharing options...
FatalEror Posted January 22, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 67 Reputation: 23 Joined: 11/14/11 Last Seen: October 3, 2014 Share Posted January 22, 2012 So if you write @dropequip 512 it will drop all your Mid Headgear in inventory? Or only drop it when equipped in Mid Head? To drop spesific equip in inventory: Open .../map/atcommand.c Search: /*========================================== * @dropall by [MouseJstr] * Drop all your possession on the ground *------------------------------------------*/ ACMD_FUNC(dropall) { int i; nullpo_retr(-1, sd); for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount) { if(sd->status.inventory[i].equip != 0) pc_unequipitem(sd, i, 3); pc_dropitem(sd, i, sd->status.inventory[i].amount); } } return 0; } Add below: /*========================================== * @dropequip [FE] * Drop spesific equipment to the ground *------------------------------------------*/ ACMD_FUNC(dropequip) { int i; unsigned short pos; nullpo_retr(-1, sd); if (!message || !*message) { clif_displaymessage(fd, "Please enter equip location: @dropequip <equip_location>"); clif_displaymessage(fd, " 1: Head Low 2: Hand Right 4: Garment 8: Acc Left"); clif_displaymessage(fd, " 16: Armor 32: Hand Left 64: Shoes 128: Acc Right"); clif_displaymessage(fd, "256: Head Top 512: Head Mid"); return -1; } pos = atoi(message); for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount && sd->inventory_data[i]->equip&pos) { if(sd->status.inventory[i].equip != 0) pc_unequipitem(sd, i, 3); //unequip item if equipped pc_dropitem(sd, i, sd->status.inventory[i].amount); } } return 0; } Search: { "dropall", 40,40, atcommand_dropall }, Add below: { "dropequip", 40,40, atcommand_dropequip }, Recompile.. Open .../conf/atcommand_athena.conf Search: // Drop all your items dropall: 40,60 Add below: // Drop spesific equipment dropequip: 40,60 I hope it right Quote Link to comment Share on other sites More sharing options...
hakuren Posted January 22, 2012 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted January 22, 2012 So if you write @dropequip 512 it will drop all your Mid Headgear in inventory? Or only drop it when equipped in Mid Head? To drop spesific equip in inventory: Open .../map/atcommand.c Search: /*========================================== * @dropall by [MouseJstr] * Drop all your possession on the ground *------------------------------------------*/ ACMD_FUNC(dropall) { int i; nullpo_retr(-1, sd); for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount) { if(sd->status.inventory[i].equip != 0) pc_unequipitem(sd, i, 3); pc_dropitem(sd, i, sd->status.inventory[i].amount); } } return 0; } Add below: /*========================================== * @dropequip [FE] * Drop spesific equipment to the ground *------------------------------------------*/ ACMD_FUNC(dropequip) { int i; unsigned short pos; nullpo_retr(-1, sd); if (!message || !*message) { clif_displaymessage(fd, "Please enter equip location: @dropequip <equip_location>"); clif_displaymessage(fd, " 1: Head Low 2: Hand Right 4: Garment 8: Acc Left"); clif_displaymessage(fd, " 16: Armor 32: Hand Left 64: Shoes 128: Acc Right"); clif_displaymessage(fd, "256: Head Top 512: Head Mid"); return -1; } pos = atoi(message); for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount && sd->inventory_data[i]->equip&pos) { if(sd->status.inventory[i].equip != 0) pc_unequipitem(sd, i, 3); //unequip item if equipped pc_dropitem(sd, i, sd->status.inventory[i].amount); } } return 0; } Search: { "dropall", 40,40, atcommand_dropall }, Add below: { "dropequip", 40,40, atcommand_dropequip }, Recompile.. Open .../conf/atcommand_athena.conf Search: // Drop all your items dropall: 40,60 Add below: // Drop spesific equipment dropequip: 40,60 I hope it right sir i already check it, it works but when i type @dropequip 2 and i have 2 blade on equipment and 2 balmung on inventory when i already type it all of them were drop so can you help me to edit sorry sir im very noob with this source editing thank you in advance for helping thank you so much!!! Quote Link to comment Share on other sites More sharing options...
FatalEror Posted January 22, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 67 Reputation: 23 Joined: 11/14/11 Last Seen: October 3, 2014 Share Posted January 22, 2012 Change to this: /*========================================== * @dropequip [FE] * Drop spesific equipment to the ground *------------------------------------------*/ ACMD_FUNC(dropequip) { int i; unsigned short pos; nullpo_retr(-1, sd); if (!message || !*message) { clif_displaymessage(fd, "Please enter equip location: @dropequip <equip_location>"); clif_displaymessage(fd, " 1: Head Low 2: Hand Right 4: Garment 8: Acc Left"); clif_displaymessage(fd, " 16: Armor 32: Hand Left 64: Shoes 128: Acc Right"); clif_displaymessage(fd, "256: Head Top 512: Head Mid"); return -1; } pos = atoi(message); for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount && sd->inventory_data[i]->equip&pos) { if(sd->status.inventory[i].equip&pos) { pc_unequipitem(sd, i, 3); pc_dropitem(sd, i, sd->status.inventory[i].amount); } //-Delete code below if you only want to drop an equipped item--- else if (!sd->status.inventory[i].equip) pc_dropitem(sd, i, sd->status.inventory[i].amount); //--------------------------------------------------------------- } } return 0; } Quote Link to comment Share on other sites More sharing options...
hakuren Posted January 22, 2012 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted January 22, 2012 (edited) sir why is that i cant drop item (32[hand left])? Edited January 22, 2012 by hakuren Quote Link to comment Share on other sites More sharing options...
Question
hakuren
hello is there any possibility to edit @dropall but in this case only one equip item will be dropped
example @dropequip 512 (Mid Headgear) only item location(512) will be drop on the floor
is this possible?
Link to comment
Share on other sites
4 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.