Download
(764 b)
Download
Updated: 08-06-09 01:53 AM
Pictures
File Info
Updated:08-06-09 01:53 AM
Created:05-29-09 09:55 AM
Downloads:2,400
Favorites:13
MD5:

Take all Button

Version: 1.1.1
by: JoSchY [More]

Adds a Button to the Lootwindow that will loot all items.

It will only loot items you are allowed to loot, it won't roll on anything.

1.1.1
-TOC bump to 3.2

1.1
-Removed Libs, THANKS TO Tekkub!

1.0.1
-Shame on me, forgot a Lib

1.0
-Release
Optional Files (0)


Post A Reply Comment Options
Unread 07-21-11, 10:50 PM  
spiralofhope
A Deviate Faerie Dragon
 
spiralofhope's Avatar

Forum posts: 13
File comments: 276
Uploads: 0
Code:
local butt = CreateFrame("Button", "TakeAllButton", LootFrame, "UIPanelButtonTemplate")
butt:SetPoint("BOTTOM", LootFrame, "BOTTOMRIGHT", -194, -17)
butt:SetFrameStrata("DIALOG")
butt:SetWidth(100)
butt:SetHeight(24)
butt:SetText("Take all")
butt:SetScript("OnClick", function()
    for i = 1,GetNumLootItems() do LootSlot(i) end
    if LootFrame:IsShown() then CloseLoot() end
end)
Confirmed this works. I didn't even bother packaging this in an Addon, I just added it as a DevPad script.

http://www.wowinterface.com/download...3-_DevPad.html
__________________
spiralofhope.com
Report comment to moderator  
Reply With Quote
Unread 09-13-09, 09:31 AM  
atuin_wow
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 29
Uploads: 2
Error

Hi, JoSchY.

Often there is a following error:

TakeAllButton blocked from using CloseLoot()
Count: 2

Call Stack:
[C]: in function `CloseLoot'
Interface\AddOns\TakeAllButton\TakeAllButton.lua:9: in function <Interface\AddOns\TakeAllButton\TakeAllButton.lua:7>

Is this very bad?
Report comment to moderator  
Reply With Quote
Unread 06-01-09, 11:22 AM  
xtoq
An Aku'mai Servant
 
xtoq's Avatar
AddOn Author - Click to view AddOns

Forum posts: 32
File comments: 642
Uploads: 4
Originally posted by JoSchY
Wow, Im impressed
I planed to get rid of those Libs too, but dont have that much experience with WoW-API right now.
Thank you soo much, this is gonna help alot on other projects Im working on.
Tekkub is the man. And I'm not just saying that so he will give me bacon...
Report comment to moderator  
Reply With Quote
Unread 06-01-09, 08:03 AM  
Melody Kitn
A Deviate Faerie Dragon

Forum posts: 11
File comments: 5
Uploads: 0
Such a simple and useful little button that I never knew I'd want, but most certainly do!

Thank you for this spiffy addon!
Report comment to moderator  
Reply With Quote
Unread 06-01-09, 04:02 AM  
JoSchY
A Kobold Labourer
 
JoSchY's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 8
Uploads: 2
Wow, Im impressed
I planed to get rid of those Libs too, but dont have that much experience with WoW-API right now.
Thank you soo much, this is gonna help alot on other projects Im working on.
Report comment to moderator  
Reply With Quote
Unread 05-31-09, 02:53 PM  
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view AddOns

Forum posts: 960
File comments: 334
Uploads: 67
Originally posted by JoSchY
I know how Autoloot works and I dont like it.
And I know that shift-loot will loot everything as well.
This isn't what I was pointing out. If you turn on auto-loot, shift-loot will do the reverse. I was offering up that as a solution because it *sounds* like you want auto-loot most of the time, but the ability to override it in specific cases, and this provides that. The majority of cases would require one cilck, with the edge case requiring a modified click... instead of the majority requiring two clicks and the edge requiring one.

What I meant by the code comment was, you've got about 70 LoC (tiny addon, that's great) but you load up 5 libs (AceAddon, AceConsole, CBH/AceEvent, AceLocale), you don't use AceConsole or AceLocale, and you could handle your event dispatching with a single line of code since you already have a frame. Digging a little further, I see that you're only using the event handler to show and hide your frame, which the frame renderer will manage for you if you anchor the frame correctly. This is what your addon looks like if you clean out all the unneeded bits:

Code:
local butt = CreateFrame("Button", "TakeAllButton", LootFrame, "UIPanelButtonTemplate")
butt:SetPoint("BOTTOM", LootFrame, "BOTTOMRIGHT", -194, -17)
butt:SetFrameStrata("DIALOG")
butt:SetWidth(100)
butt:SetHeight(24)
butt:SetText("Take all")
butt:SetScript("OnClick", function()
	for i = 1,GetNumLootItems() do LootSlot(i) end
	if LootFrame:IsShown() then CloseLoot() end
end)
Don't be mad at me, I'm just offering up help :P I wasn't going to use your addon in the first place because I don't need it, that doesn't mean I can't help you make it better/smaller/faster/stronger/deeper.
__________________
I have reached enlightment.
Thank you bacon!
Report comment to moderator  
Reply With Quote
Unread 05-31-09, 01:37 PM  
JoSchY
A Kobold Labourer
 
JoSchY's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 8
Uploads: 2
Originally posted by Tekkub
Have you tried turning autoloot on, and shift-looting when you don't want to take items automatically? It's the simplest solution I've found, certainly better than throwing a bunch of code at the problem (not that your addon is large, but you are loading a lot of library code just for an event handler...)
I know how Autoloot works and I dont like it.
And I know that shift-loot will loot everything as well.
This addon might be unnecessary in your eyes but for other ppl its not.
Its a matter of the gameplay.
If you dont like it, dont use it.

Originally posted by X-buZZ
I would love to see this addon compatible with XLoot. Would an integration be possible?

Kind regards
X-buZZ
Will have a look into that.
Last edited by JoSchY : 05-31-09 at 01:38 PM.
Report comment to moderator  
Reply With Quote
Unread 05-31-09, 01:12 PM  
X-buZZ
A Kobold Labourer

Forum posts: 1
File comments: 56
Uploads: 0
I would love to see this addon compatible with XLoot. Would an integration be possible?

Kind regards
X-buZZ
Last edited by X-buZZ : 05-31-09 at 01:12 PM.
Report comment to moderator  
Reply With Quote
Unread 05-31-09, 12:37 PM  
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view AddOns

Forum posts: 960
File comments: 334
Uploads: 67
Originally posted by JoSchY
In certain cases I dont want to Loot everything or just want to have a look at the loot first, before taking it.
Have you tried turning autoloot on, and shift-looting when you don't want to take items automatically? It's the simplest solution I've found, certainly better than throwing a bunch of code at the problem (not that your addon is large, but you are loading a lot of library code just for an event handler...)
__________________
I have reached enlightment.
Thank you bacon!
Report comment to moderator  
Reply With Quote
Unread 05-31-09, 07:06 AM  
JoSchY
A Kobold Labourer
 
JoSchY's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 8
Uploads: 2
Re: Button location

Originally posted by Vymrr
Is it possible to have the button at the top of the loot window? Because I have 'open loot window at mouse' and it's kind of counterintuitive for me to move my mouse all the way down of the loot window to click it rather than just being able to click the button straight away when the window opens.
Yes, heres a Patchfile for that:
http://www.wowinterface.com/download...tion.html#info
Make sure you install 1.0.1 first I forgot a Lib with the first release.
Report comment to moderator  
Reply With Quote
Unread 05-31-09, 03:57 AM  
Vymrr
A Kobold Labourer

Forum posts: 0
File comments: 11
Uploads: 0
Button location

Is it possible to have the button at the top of the loot window? Because I have 'open loot window at mouse' and it's kind of counterintuitive for me to move my mouse all the way down of the loot window to click it rather than just being able to click the button straight away when the window opens.
Report comment to moderator  
Reply With Quote
Unread 05-30-09, 03:54 AM  
JoSchY
A Kobold Labourer
 
JoSchY's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 8
Uploads: 2
Originally posted by xtoq
Just out of curiousity, how is this different than turning autoloot on?
Some Time ago I played the Tabula Rasa Beta. It had a Button like that standardly.
After the Beta ended I got back to play WoW but had a little trouble with familiarization back to it.
Thats why I programmed this.

In certain cases I dont want to Loot everything or just want to have a look at the loot first, before taking it.
Report comment to moderator  
Reply With Quote
Unread 05-29-09, 01:11 PM  
xtoq
An Aku'mai Servant
 
xtoq's Avatar
AddOn Author - Click to view AddOns

Forum posts: 32
File comments: 642
Uploads: 4
Just out of curiousity, how is this different than turning autoloot on?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: