Jump to content

Recommended Posts

Posted

File Name: @storeit - Store all Non-Equipped Items

File Submitter: Akinari

File Submitted: 23 Oct 2013

File Category: Source Modifications

Content Author: Akinari, Sol

This is a simple command I've had laying around for a long time, so I figured I'd package it up and send it out. Like the title states, this is like @storeall, except it will ignore equipped items. Meant for the adventurer on the go who needs a quick inventory cleanup when farming. To add it, simple place the files in the src/custom folder If you already use these files, then just copy in the code from these ones into your already populated files. Then do a clean make.

Click here to download this file

Posted

Nice release, this can be incredibly useful. Especially for the exact purpose you've said lol.

 

@off topic - I didn't even know about that folder... this definitely makes adding custom things easier, provided all src can be added in a similar manner.

Posted

Nice release, this can be incredibly useful. Especially for the exact purpose you've said lol.

 

@off topic - I didn't even know about that folder... this definitely makes adding custom things easier, provided all src can be added in a similar manner.

 

Part of the reason I released this was to show people this has existed for the last couple of months.  Although the original concept was from brathena.

  • 9 months later...
  • 5 years later...
  • 6 months later...
  • 1 month later...
Posted
Quote

In file included from atcommand.cpp:10623:0:
../custom/atcommand.inc: In function 'int atcommand_storeit(int, map_session_data*, const char*, const char*)':
../custom/atcommand.inc:48:18: error: 'struct mmo_charstatus' has no member named 'inventory'
   if (sd->status.inventory.amount) {
                  ^
../custom/atcommand.inc:49:18: error: 'struct mmo_charstatus' has no member named 'inventory'
    if(sd->status.inventory.equip == 0)
                  ^
../custom/atcommand.inc:50:43: error: 'struct mmo_charstatus' has no member named 'inve ntory'
     storage_storageadd(sd,  i, sd->status.inventory.amount);

Where should I have change on it?

Please guide me

 

Hi rathena!

I was adding @Akinari "@storeit"  to my server. But I got error when I was recompile it. Anyone could help me on that?? I'm still learning on it.

Quote

/*==========================================
 * @storeit
 * Put everything not equipped into storage.
 *------------------------------------------*/
ACMD_FUNC(storeit) {

    int i;
    nullpo_retr(-1, sd);

    if (sd->npc_id)
    {
        clif_displaymessage(fd, "You cannot be talking to an NPC and use this command.");
        return -1;
    }

    if (sd->state.storage_flag != 1)
      {    //Open storage.
        switch (storage_storageopen(sd)) {
        case 2: //Try again
            clif_displaymessage(fd, "Run this command again..");
            return 0;
        case 1: //Failure
            clif_displaymessage(fd, "You can't open the storage currently.");
            return -1;
        }
    }
    for (i = 0; i < MAX_INVENTORY; i++) {
        if (sd->status.inventory.amount) {
            if(sd->status.inventory.equip == 0)
                storage_storageadd(sd,  i, sd->status.inventory.amount);
        }
    }
    storage_storageclose(sd);

    clif_displaymessage(fd, "It is done");
    return 0;
}

this is the commands I added to src/custom/atcommand.inc

Quote

ACMD_DEF(storeit),

And this is where I added to src/custom/atcommand_def.inc

 

After I recompile my server:

error.thumb.png.d23e3843a64355dc9dbbf9d87f8c0ea7.png

Anyone could guide me on this?

Im sorry if I posted on the wrong section , Please move me to the right one. Thanks!!!

  • 2 weeks later...
  • 3 months later...
  • 1 month later...
Posted (edited)

Hi There, i got no error but its not working it also affects the @storeall function when storeall was used nothing happens except from the items equipped on alt Q they will be unequipped

my mistake its actually working i just had issues with max storage settings ?

Edited by kalabasa
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...