Jump to content
Aleos

Storage Types Optimization

Recommended Posts

Storage Types Optimization
As of Git Hash: ade1b17, rAthena has moved the Cart, Inventory, and Storage types out of the mmo_charstatus!

What does this mean to you?

  • These storage types now mimic Guild Storage and can be loaded/saved whenever needed.
  • Relieves mmo_charstatus from having to send storage types and lets the char-server handle it.
  • All item storage types now have an increased max amount.
  • Custom Storages can be created in conf/inter_server.conf which mimics official behavior of secondary Storages.
    • Each Premium Storage behaves as a unique Storage for players to access.
    • Images below show it in use.
  • Fixes players having to log out to resync cart item data before opening a Vending Store.
  • Refactored player weight and cart weight calculations into their own functions.
  • Added script commands openstorage2 (for premium Storages), guildstoragecountitem[2] and guildstoragedelitem[2].
  • Refactored several function return types as well as documentation.
Quote

*guildstoragecountitem(<nameID>{,<accountID>})
*guildstoragecountitem("<item name>"{,<accountID>})

This command behaves identically to 'countitem', but counts items from the player's
cart, storage, or guild storage.

If no cart is mounted, 'cartcountitem' will return -1.
If player is not in a guild or storage is open, 'guildstoragecountitem' will return -1.


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

*guildstoragecountitem2(<nameID>,<Identified>,<Refine>,<Attribute>,<Card0>,<Card1>,<Card2>,<Card3>{,<accountID>})
*guildstoragecountitem2("<item name>",<Identified>,<Refine>,<Attribute>,<Card0>,<Card1>,<Card2>,<Card3>{,<accountID>})

This command behaves identically to 'countitem2', but counts items from the player's
cart, storage, or guild storage.

If no cart is mounted, 'cartcountitem2' will return -1.
If player is not in a guild or storage is open, 'guildstoragecountitem2' will return -1.

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

*guildstoragedelitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};
*guildstoragedelitem2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};

This command behaves identically to 'delitem2', but deletes items from the player's
cart, storage, or guild storage.

If no cart is mounted, 'cartdelitem2' will return -1.
If player is not in a guild or storage is open, 'guildstoragedelitem2' will return -1.

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

*openstorage2 <storage_id>,<mode>{,<account_id>};

Just like the 'openstorage' command, except this command can open additional storages
by the specified <storage_id>. For <storage_id>, please read the conf/inter_server.conf
for storage groups.

Values for <mode> are:
    STOR_MODE_NONE : Player only can read the storage entries.
    STOR_MODE_GET  : Player can get items from the storage.
    STOR_MODE_PUT  : Player can put items in the storage.

Example:
    if (vip_status(1)) {
        mes "I will open your Premium storage.";
        mes "Thank you for using our service.";
        close2;
        openstorage2 1,STOR_MODE_GET|STOR_MODE_PUT;
    } else {
        mes "Sorry, your Premium status is expired.";
        mes "Storage will be opened but you can't put any item into it.";
        close2;
        openstorage2 1,STOR_MODE_GET;
    }
    end;

Thanks to @Cydh for his work on the Premium Storage support and thanks to @Lighta for the initial support on creating the cleanup. Thanks to everyone else who tested the PR and helped it come to fruition!

storage-normal.jpg

storage-premium.jpg

storage-vip.jpg

  • Upvote 13
Link to comment
Share on other sites

That's pretty neat!

 

 

57 68 65 6e 20 72 69 63 68 2c 20 74 68 69 6e 6b 20 6f 66 20 70 6f 76 65 72 74 79 2c 20 62 75 74 20 64 6f 6e 27 74 20 74 68 69 6e 6b 20 6f 66 20 72 69 63 68 65 73 20 77 68 65 6e 20 79 6f 75 20 61 72 65 20 70 6f 6f 72

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



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.