Jump to content
  • 0

edit @dropall command help me please


hakuren

Question


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  67
  • Reputation:   23
  • Joined:  11/14/11
  • Last Seen:  

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 :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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 :D

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!!!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  67
  • Reputation:   23
  • Joined:  11/14/11
  • Last Seen:  

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;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

sir why is that i cant drop item (32[hand left])?

Edited by hakuren
Link to comment
Share on other sites

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.

×
×
  • Create New...