No More 'Inventory is full' errors when looting. And will Auto-Vendor/Repair and Auto-Mail items to your alt character.

When a loot window is opened, this addon will scan your inventory, and drop the lowest valued item to make 
room for your loot.  Then the addon will loot for you and close the loot window.  This addon also uses the
same process to auto sell/repair and auto mail items to an alt character.

Filtering: 
You wouldn't want your skinning knife, or your bandages being droped because they are less valuable would 
you?  So I have put in a filtering system.  This is your protected list. You should add strings of text 
that you don't want to BottomlessBag to drop.

example: 
"Use: Restores" would prevent the addon from droping food water, and potions.
to add a string to your protected list simply type "/bbag add Use: Restores"

Recommended: 
disable automatic item deletetion by typeing "/bbag disable" or unchecking this option in the bbag window,
untill you get your protected list how you want it.  Also, use the drop command by typeing "/bbag drop" 
while disabled to test the addon and see if your list is filtering the correct items.

Note: 
AutoLoot should be turned off.  setting is under esc menu, interface options, top right check box.
Also do not use [shift] click to loot either.

Dependencies:  Wowecon price mod

Special Thanks:
To Jay Jay(Knuddelbock) for codeing and translateing the German version.
also to Runkel for some translations as well.
To TallSpirit for helping out with coding the coin loot messages and also the messages which informed
the user how much profit would be made by droping an item in favor of another.

Special Note: If you turn off "Auto Loot" then you are effectively disabling the addon.  The bottomless bag 
aspect of the addon will not work if "Auto Loot" is unchecked.

To temporarily disable the addon while looting, for the purpose of manual looting, hold down 
the [alt] or [ctrl] button while looting.

                                           How the UI works:
type /bbag
the list on the left are your saved files, the list on the right is your (show) list.
to load a file press any button on the left.. ie Loot List, or Mail List, etc.
or double click on a file button.  That list will then appear on the right side. 
In order for bottomless bag to use it you need to press a 'Set as.. ' button, or the addon won't know what 
to use that list for.  Any time you make a change to your list you need to press a "Set as.." button, for 
those changes to take effect.  And remember all bottomlessbag lists are items that you want to keep.  For 
example for the sell list, you want to list items that you DON'T want to sell.
for the mail list, you want to list items that you DON'T want to mail.
for the loot list, you want to list items that you DON'T want to drop.

if you click a list or file button once you may notice that it highlights after you move the mouse off of 
the button, well anyways this highlighted item can be deleted by pressing the "delete selected" button.

The help button isn't hooked to anything..Yet.. Sorry.

How to make your first loot list:
I would probably start off by pressing the "Default List" button.  Most of the items that you wouldn't want
to drop are here.  You can go in and delete the items that you don't need for your skill,
such as "Thieve's Tools" if you not a thief.  
Next your going to want to press the "Set as Loot List" button.
This moves the contents of the list shown into memory so that it can be used.
If you don't press the "Set as Loot List" button, then any changes you have made will not be saved.

                                          A Couple Settings:

Auto Loot:
Your going to want to check the box "Auto Loot" for sure.  This is probably allready checked for you.
With this unchecked, bottomlessbag will not do any looting for you, and this would effectively disable the 
main aspect of this addon.  But some of it's other functions will still work.

Auto Item Deletion:
This setting is for those who trust the list that they have made.  If this box is checked then 
bottomlessbag will not ask before deleting an item.  If this box is unchecked then, when bottomlessbag, 
gets to a point where it needs to delete an item tomake room for loot then a WINDOW WILL POPUP, 
ASKING YOU IF YOU WOULD LIKE TO DELETE THE ITEM, add that item to yourloot list, or simply cancel the 
whole thing and loot yourself.

Loot All Items [For Skinning]:
If you are a skinner, than this option is for you.  This option will loot everything off of the corpse no 
matter what the item's value.  If you're not worried about looting everything on the corpse then simply 
leave this unchecked and bottomlessbag will leave low valued items unlooted on the corpse.

Options Under the "Other Options" Button:

Auto Open Clams:
This will also auto open Slimy Bags Ooz Coverd Bags as well, I didn't have enough room to right that on 
the window.  Simply put, this option will wait for about 7 seconds after the loot window is closed and 
open any clams you may have looted.  The default is set to 7 seconds so that it wont interupt skinning or 
other looting, you may be doing, but you can change this in the "Auto Open Delay:" edit box.

Auto Sell:   !!!CAUTION!!!  Read before you enable this option. !!!CAUTION!!!
With this option checked, bottomlessbag will automaticly sell and repair when the vendor window is opened.
!!!CAUTION!!! if you do not have a sell list set, and this option is checked, then bottomlessbag will 
attempt to sell everything  in your bags, EVERYTHING WILL BE SOLD, and the buy back tab on the vendor 
window only hold like 10 items I think.  So be carefull.

Auto Mail:   !!!CAUTION!!!  Read before you enable this option. !!!CAUTION!!!
Just as the "Auto Sell" option above this will mail everything in your bags not on your mail list to a 
user defined mail recipient.  When you click on the "Mail List" or "Set as Mail List" buttons, a edit box 
will appear where you can enter in the name of your (mule) toon that you want you mass mails to go to.
With this option set, I would first visit the vendor NPC to sell your junk before you use this option.
!!!CAUTION!!! if you do not have a mail list set, and have a name entered in as a "Mail Recipient", and 
this option is checked, then bottomlessbag will attempt to mail everything in your bags, EVERYTHING WILL 
BE MAILED, to the name you entered in the "Mail Recipient:" edit box.

Leave Slots Empty:
This option specifies to bottomlessbag how many bag slots you would like to keep empty.  This is usefull 
for conjured items which are not looted such as soul shards, or conjured food and water.  If you conjure 
allot of items this option will save space in you bags so they can be recieved without a "bags are full" 
error.

Auto Loot Delay:
This is the amount of time that bottomlessbag will wait between picking up each individual loot item.  
Bottomlessbag waits to allow time for the preveously looted item to make it to your inventory, so that it 
can have the option of deleting that item to make room for the next.  This also helps prevent 
miscalculations that can lead to bottomlessbag trying to loot too many items at once.

Auto Open Delay:
This is the amount of time that bottomlessbag will wait before trying to open clams, slimy bags, or ooz 
covered bags, after the loot window is closed.  This delay is to prevent interuptions to other looting, 
or skinning, that you may be doing right after you loot the first corpse for example.

Auto Mail Delay:
WoW servers are pretty slow when it comes to the mail system sometimes.  It is important that any mail 
sent is completed server-side before another mail is attempted.  Other wise bottomlessbag will mail empty 
messages, and you still get charged 30 copper for an item that never got mailed.  If you run into problems 
like this then increase the time by typeing an higher number into the edit box.

How to Save Lists:
First, press the "Saved Lists" button if it is present.
Create your list in the right side of the window.
Enter in a name for your list in the bottom edit box of the left side of the window.
And press the "Save" button or press [Enter].

If your simply modifing an already saved list then just highlight it's name on the left list with by 
single clicking it and then press the "Save" button.  This will over write that saved list with what ever 
is on the right side list shown.

                                                 HOW TO LOAD SAVED LISTS:

Press the "Saved Lists" button if pressent and then DOUBLE CLICK on the list name in the left side list.

If you have any questions, you can email me at boredbotting@yahoo.com or see if I'm on AIM with the 
callsign boredbotting.


Text Usage:

Type "/bbag [option1] [text[or option2]] [option2 text]" to configure the addon with the following options

Unless other wise specified all options below will alter the Loot list, not the mail list, or sell list.

on         : Enables Auto looting "/bbag on"
off        : Disables Auto looting "/bbag off"
help       : Shows you the list of options available. "/bbag help", or just "/bbag"
add        : Adds strings to your protected filter list. "/bbag add [string to add to list]" or 
             "/bbag add [number of stacks to protect] [string to add to list]
del        : Deletes strings from your protected filter list. "/bbag del [# of string to del] 
             (This function only accepts numbers, not strings.  Use "/bbag show" to see numbers)
show       : Shows the contents of the current filter list. "/bbag show"
restore    : Restores the previous list.  Usefull, if you loaded a list and forgot to save the last one. 
		    "/bbag restore"
wipe       : Erases the current list. Usefull for a fresh start. "/bbag wipe"
default    : There is a default list included to get you started. "/bbag default" 
                (the defualt list is not automaticly installed, you must type "/bbag default" to load it)
enable     : This option will enable the automatic deletion of items. "/bbag enable"
disable    : This will disable automatic item deletion. "/bbag disable"
drop       : This will drop you lowest valued item. "/bbag drop"
quality	   : This will protect items of specified quality or higher from being droped.
disenchant : This will create or edit a macro that will disenchant your lowest disenchantable item.
lootall    : Toggles clearing the corpse or leaving lower valued items unlooted. "/bbag lootall [on|off]"
sell       : Will sell all unprotected items at vendor if vendor window open(still pretty buggy, be 
             carefull) "/bbag sell"
mail       : Will mail all unprotected items to an alt toon of your choosing.  Set recipeint in bbag window.
emptyslot  : specifies a number of bag slots to keep empty. "/bbag emptyslot 2" will keep to bag slots 
             empty.
delay      : specifies how long to delay between looting items.
                example: "/bbag delay 1" will delay between looting by 1 second.
delay open : specifies how long to wait after closing the loot window to open a looted clam or 
		      slimy bag.     example: "/bbag delay open 5" will wait 5 seconds before opening.
delay mail : secifies how long to wait between mailings when useing the auto mail function.

autoloot   : toggles bbag's ability to overide WoW's autoloot setting.
cfg        : Will load bbag settings from the "BottomLessBag.cfg" file, will override current settings.

file       : This is the first option of two to the list file options of the addon. 
             "/bbag file [option2] [list name]"

file dir   : Shows all of your saved lists.
file save  : Will save your current list. "/bbag file save [list name goes here, my contain spaces]
file show  : Shows the contents of a saved list. "/bbag file show [list you want to see]
file del   : Erases a saved file. "/bbag file del [list to be deleted]
file load  : Loads a saved file. "/bbag file load [name of file to load


Change Log:
V1.01	Bugs : Fixed
1) Would not work with virgin install: Edited on/off code.
2) Would not drop items unless there was an auction price: Now drops items with auction or vendor price 
   listed.
3) If item was white or higher and if it didn't have an auction price: would assign last item price scaned to give faulty price

v1.01 Features Added:
1) new [option1]: quality
     type: "/bbag quality [#/color/quality] to protect items of that quality or higher.
     ie..  "/bbag quality green" will protect all green items or higher from being droped.
	 
v1.02 Features Added:
1) now uses either Auctioneer(Informant) or Wowecon. (if both loaded will use Wowecon)
2) new [option1]: disenchant
	type: "/bbag disenchant" to creat a macro that will disenchant your lowest disenchantable item.
	If you don't have a "BottomlessBagDisenchant" macro allready then it will create one for you and put it
	on the cursor for you to place somewhere on your action bar.

1.03 Features Added:
1) ability to protect only a specified number of stacks of items.  For example type "/bbag add 2 Meat" and 
   the addon will only protect 2 stacks of any item with "Meat" in the tool tip.
2) added protection against double entries.  If you add an item to the list, the addon will overwrite any 
   item with the same string or text. So if you allready have a list item of "Light Leather" and you 
   type "/bbag add 2 Light Leather" then the addon with overwrite the "Light Leather" entry with 2 stacks 
   of Light Leather.

1.04 Bugs Fixed:
1) Fixed problem with error due to nill value when item with out data base price was scanned.

B1.05b Features Added:
1)Now have option to only protect a defined number of item stacks, instead of all stacks with protected 
   text.
2)Now have option to leave lower valued items unlooted: Type '/bbag lootall on' or '/bbag lootall off' 
   to enable or disable this feature.  When not looting an item because lower value or because automatic 
   item deletion is disabled then the addon will display the item value as well.
3)Added ability to temporarily disable BottomlessBag if looting while [ctrl] [shift] or [alt] buttons 
   are being pressed. (note: whatever you have your autoloot key set too will try to auto loot corpse.)
   (So typically the [shift] button will not stop autoloots)

B1.05c Bugs Fixed:
1) Fixed bug where Bottomless bag would treat a quest item as a low valued item and not loot it while in 
   lootall off mode.

B1.05c Features Added:
1) Added very buggy sell option.  When vendor window is open type "/bbag sell" and the addon will sell all 
   unprotected items.  buggy because, it seems to disregard protected stack numbers.

B1.05d Bugs Fixed:
1) Fixed bug where Bottomless bag would not load saved lists correctly.

1.05 Features Added:
1) All features of Beta versions 1.05's

1.05 Bugs Fixed:
1) Added Engineering Bags to bags that will not be checked (I don't know how, I missed that one.)
2) When loading a saved list, the previous list can now be restored with restore function(as originally 
   intended)

1.051 Features Added:
1) Now able to shift click up to 3 items at a time, for use with the add command.  
    example: "/bbag add [Boar Meat][Tiger Meat][Long Sword of the Bear]  However, you can not specify 
	stack numbers when using an item link with the add command.
2) Changed the default protected Items list to add Minning Pick, Blacksmith Hammer, Fishing Pole, 
    Theives' Tools, Empty Vials, Runed Enchanting Rods, and Jewel Crafting Items

B1.051a Bugs Fixed:
1) some times a tooltip was appearing in the top lift hand side of the screen.  I've added code to try to 
   eliminate it.

Beta1.06b
Added UI! more formal documentation to follow.

Beta 1.05c
Added: Feature to leave one bag slot empty, this is toggled by 
'/bbag emptyslot on' and '/bbag emptyslot off' or just toggle it in the UI.

Fixed error with BottomLessBagKeepEmptySlot being nil and all.

Fixed error when pressing save button with nothing to save

Added a delay fuction to help with some mod interface errors
type '/bbag delay 1' to delay on second
decimals are ok so '/bbag delay .1' also works.

Beta 1.06d
Added all of TallSpirits code, I've integrated it, but did not test it so let me know if I have to fix 
something.

Tallspirits addistions:
1) I added Auctioneer price lookups (will use if actively loaded and WoWEcon is not loaded). 
2) Tells you the quantities of the loot and drop stacks if > 1 (i.e.' x3'). 
3) Tells you the prices, only using auction prices if above a certain amount 
    (e.g. 5s at levels 1-12, 10s at level 22, 20s at 48, 25s at 60-70). 
4) Tells you the potential profit or loss if you are in non-auto drop mode. 
5) Tells you if a loot is a unique quest item (not verified if it detects properly). 
6) Will not loot & leaves bag open if in a group/raid and item is a roll for need/greed item. 
7) Should auto loot BoP items when soloing. 

For example, 
'You have 3 Clams and 2 Containers unopened. 
Bags Are FULL! Trying to loot [Vanadium Talisman of the Owl] (A:1g87s97c). 
Left -click to delete [Torn Leather Scraps]x6 (42c), or right-click to cancel. 
A potential profit of 1g87s55c.'

Fixed Bug: Endless, bags are full errors when automatic item deletion is disabled.

Hooked up save buttons: now you must use the bbag window to 'set as sell List' to make a sell list. When 
   you type '/bbag sell' with vendor window open, bbag will sell anything not on the sell list.

version 1.06e:
Fixed Bug found by Tallspirit about prob with looting bind on loot items

Added Clam opener:
will automatically open clams, slimy bags, or oozing bags 10 seconds after the loot window is closed. 
I wouldn't recomend below 2 seconds though.  You can change this time by typing:
'/bbag delay open 2' to set the opening delay to 2 seconds.

versiont 1.06f bugs fixed:
fixed the leave one bag slot open not working bug.
fixed bug where clam opener would try to delete the clam it was trying to open.
the addon will delete any item that it tries to open more than once. now there will no longer be a endless 
loop if you don't want to loot the items inside.

Beta 1.06g:
Bugs fixed:
1) Some variables not set when new character created, which caused nil errors.  Problem corrected.
2) Nil error poped up when bags become full of all protected items.  Problem has been corrected.
3) Clams, Slimy Bags, and Ooz Covered Bags, where not being opened on newly created characters.  Problem 
   corrected.
4) Addon got confused when actual number of empty bag slots was fewer than what was set.  This caused addon
   to stop working... This was corrected by telling addon to delete items to get empty slots back to 
   desired number.
5) Added code to make the disenchant macro less buggy.  macro no longer tries to disenchant precious stones, and recipes also.

Beta 1.06h:
Features Added:
1) Added more reliable looting method which trys to wait untill an item is looted an in your bags before 
   it loots the next item. This prevents issues with sometimes your bags getting full by looting too many 
   items at once.
2) Added a pop up window to prompt for item deletion with has the option to add that item to your loot list.
3) Added mail functions:  This enables you to mail items not on your mail list to a mule toon who can 
   auction those items later.
4) Added auto Sell and auto Mail options which will activate this functions when the appropriate windows 
   are opened.
    For example if the options are checked and you open the mail window, then bottomlessbag will 
	automatically try to mail unprotected items to your mule toon.  The same is true for the Sell option 
	which will automatically sell your stuff not on your sell list and repair your armor.
	
Beta 1.06i:
Bugs Fixed:
1) No more double Loot attempts, delete attempts, or Mail notices.
2) The BBag menu now reflects delay and other changes, when those changes are made via typed commands.
3) Removed "<Right Click to Open>" from the default list, because it doesn't work.
4) When attempting to mail a conjured or soulbound item, now says it can't mail item, instead of saying 
   trying to mail item.

Release Version 1.06
1)Mail function now lag resistant.
2)Added ability to temporarily disable auto looting, mailing, and vendoring by holding down 
   the [alt] or [ctrl] button.
3)Adjusted default delay settings.
4)Minor adjustments to UI.
5)Auto Mail and Vendor will now close their appropriat windows when done.

Release Version 1.061
Bugs Fixed:
1) Reset allot of default values that weren't getting set.
Features Added:
2) Added "Sludge-covered Object" to the list of openables.

Release Version 1.062
Bugs Fixed:
1) Altered code to stop nil values in the 'Other Options' menu.

Release Version 1.063
Bugs Fixed:
1) Fixed bug that cause the delete prompt window to prompt twice and result in error.

Alternate Version 1.064
Added German Translation!
Thanks to Jay Jay(Knuddelbock) for codeing and translateing the German version.
also thanks to Runkel for some translations as well.

Release Version 1.065
Bugs Fixed:
1)bbag would hang up on lower valued items when not set to loot all.  Whould miss coins and what not.
2)would sometimes get a nil error on first loot.
Notes:
1)bbag is still suseptible to lag. In order to prevent "inventory is full errors" you will need to set aside
a couple of empty slots. bbag should still loot everything no matter what, but you may get an iventory full
message if you don't have enough empty slots.
Features Added:
1)German now in regular version.

Release Version 1.066
Bugs Fixed:
1)Sometimes bbag wouldn't auto loot Bind on Pickup Items
2)Sometimes bbag would ask twice to delete an item, and then crash.
3)Sometimes bbag would not loot all items on a corpse even if there was room.
4)Error when trying to use "/bbag disenchant" function with no disenchantable items available.
Features Added:
1)Added text in the bbag menu to make operation more understandable.

Release Version 1.066
Bugs Fixed:
1)Pluged up another hole where some items wouldn't get looted.

Release Version 1.07
Features Added:
1)Added Buy List; to have bbag buy 10 drinks use this string:"10 drinking" will buy highest usable drink.
  to make bbag buy 50 food use this string in the buy list: "50 eating" will buy highest usable food.
  This option will not buy anything if you allready have these items in your bags.

  Type "/bbag buy" or activate Auto Buy Option to use this function.

2)Added Eat, and Drink Macros to auto select appropriate food or drink to use.
  type "/bbag eat" or "/bbag drink" and this will make a macro to be placed on your action bar.
  When these macros are pressed bbag will use the lowest valued food or drink.
  
Release Version 1.071
Bugs Fixed:
1)Fixed the "lootall" appearing in some windows other than the bbag window.
2)bbag is now a little better at not leaving loot behind.

Release Version 1.072
Bugs Fixed:
1)bbag is now a lot better at not leaving loot behind.

Release Version 1.073
Bugs Fixed:
1)May have corrected some issues of favoring lower valued items over higher valued ones. (still looking into this problem)
2)When useing "/bbag eat" or "/bbag drink" bbag now correctly displayes an accurate message.
3)The quality protection buttons have been reworded to more accuratly describe it's function.
4)Corrected a bug that messed up saved lists when attempting to save a virgin list.
5)bbag macros will now be saved per character, instead of per account.
6)bbag's auto sell feature will no longer sell all items in your bags if the sell list is empty.  Will display a message instead.

Release Version 1.074
functions added:
1) Added option to open/close vendor window after bbag completes buy/sell/repair function.
2) If Loot or Sell list is empty the default list will be used instead.
3) Set default protection to green, instead of purple.
4) Added typed function to turn off bbag overriding WoW's auto loot fuction.
type "/bbag autoloot" to toggle this function.
Warning:this function, when not in normal setting, will severly hinder bbag's ability to keep bag space under control.

Release Version 1.075
Bugs Fixed:
1) Auto Sell wouldn't work with 2.3.0 patch
functions added:
1) Added Shift Clicking (Yahoo!) You can now shift click items to add them to your exception lists.
2) Added a config file, that can be used to set up bbag. 
	You can edit this file "BottomLessBag.cfg" with notepad, or wordpad
	You can use this file by typing "/bbag cfg"
Warning: Use of this function will override current bbag settings.

Release Version 1.076
Bugs Fixed:
1) Problem with auto buy not working with certain items
functions added:
1) Can set mail window to remain open after auto mail is complete( Check the "Auto Close Vendor and Mail Windows" option)
2) Now has the ability to use the "Keep Empty Slots" for looting when there are no dropable items.