Sort and Combine Snippet

Cage9d9

Member
Joined
Aug 26, 2008
Messages
210
Reaction score
5
Points
18
Hi All - I've never really posted my own macro work on the forums here before but I thought I'd share this piece with you. I ran into a situation where my inventory was filling up with particular item's during a night's farm and I would run out of inventory space. The items were required for a combine and in the morning I would wake up and do the combines and start my farming all over. So I thought to myself, if I could farm, loot AND combine I would be MUCH more efficient.

With some help from Fry last night I learned how I can move items around in the inventory, so I wrote a couple of functions which can be called/manipulated to do this for you. I started with Fry's basic Inventory.mac to get a better understanding of looping through the inventory, but I think a majority of the code is now mine. Take a look and let me know what you think.

NOTE: I've put more comments than code in the snippet because I think others who may be interested in learning how to write scripts could gain something from this.

DISCLAIMER: This is potentially a shitty way to do my task, but it has proven to work well. Keep in mind that I was after 1 specific thing, having my character combine a single type of item in a single combine pack over night to keep inventory from over flowing. It has worked like a charm. I however did not invest tons of time into calculating particular variables in a good manner or defining tons of variables to make customization easier. End Users can simply modify it to fit their needs as well.

Enough bullshit, here is the short ass script with tons of comments.
 

Attachments

  • SortAndCombine.mac
    4.4 KB · Views: 15
Last edited: