Jump to content
  • 0

About storage_storageadd


Mice

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   20
  • Joined:  12/24/18
  • Last Seen:  

Hello, this is Cydh's @autostore feature.

// @autostore [Cydh]
if (autostoring && sd->state.autostore && !item->expire_time && !id->flag.autoequip && !sd->state.storage_flag && !sd->npc_id) {
    if ((!sd->autostore_weight || (sd->autostore_weight && get_percentage(sd->weight, sd->max_weight) >= sd->autostore_weight))
        && (
               (sd->autostore_type&1 && (id->type == IT_HEALING || id->type == IT_USABLE || id->type == IT_DELAYCONSUME || id->type == IT_CASH))
            || (sd->autostore_type&2 && (id->type == IT_ARMOR || id->type == IT_WEAPON || id->type == IT_SHADOWGEAR || id->type == IT_PETEGG || id->type == IT_PETARMOR))
            || (sd->autostore_type&4 && (id->type == IT_ETC || id->type == IT_AMMO || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2))
            || (sd->autostore_type&8 && id->type == IT_CARD)
            )
        )
    {
        char output[CHAT_SIZE_MAX];
        sd->weight += w;
        clif_updatestatus(*sd, SP_WEIGHT);

        storage_storageadd(sd, &sd->storage, i, amount);
        storage_storageclose(sd);
        clif_storageclose(*sd);

        sprintf(output, "[ Autostore ] %dx %s", amount, id->ename.c_str());
        clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], output, false, SELF);

        achievement_update_objective(sd, AG_GET_ITEM, 1, id->value_sell);
        return ADDITEM_SUCCESS;
    }
}

----------------------------------------------------------

   - ID: 2
     Name: "Storage 2"
     Table: storage2
     Max: 300

   - ID: 3
     Name: "Storage 3"
     Table: storage3
     Max: 300


This is the part where it stores the item in the storage.
storage_storageadd(sd, &sd->storage, i, amount);

Any idea how I can call storage ID: 2 or 3 in that part, so that the item to be autostored will go to the custom storage I created?"

Edited by Mice
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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