Auctionator

Auctionator

141M Downloads

Feature Request : Add a "Post all" Checkbox for create a aution for the last partial stack

Nexxxy opened this issue · 9 comments

commented

This addon is awesome, i just miss one thing.

If i have 19 herbs and want to sell them in 5 sized stacks i only can create 3 x 5 = 15.

To sell the missing 4 herbs i have to reclick the herb .. wait again for 37 pages to be scanned and now can create a 1x4 stack.

It would be awesome if there would be a [ ] checkbox below the amount of stacks textbox saying : "Sell all". If checked it creates the max amount of the stacksized stacks + 1 dynamic stack.

In my example that would be 3x5 + 1x4 stacks.

Greetings

Nexxy

commented

Ok i dont get how your code recognizes when a startAuction Event is done.
My solution is to add a CheckBox into the Sell.xml
CheckButton name="Atr_SellallCheckBox" inherits="UICheckButtonTemplate">

then i edited : Atr_CreateAuction_OnClick() in Auctionator.lua

and added
`
-- this Block is for that last unfinished stack
if (Atr_SellallCheckBox:GetChecked() == true) then

Auctionator.Debug.Message( 'Atr_SellallCheckBox Test : Checked' );
countItems = Atr_GetNumItemInBags(gCurrentPane.activeScan.itemLink);
countItems = countItems - (gJustPosted.StackSize * gJustPosted.NumStacks)
Auctionator.Debug.Message( 'Atr_CreateAuction_OnClick() Items left : ',countItems);	
-- this only works if the user rly wants to sell all! 
if (countItems < gJustPosted.StackSize) then		
	StartAuction (stackStartingPrice, stackBuyoutPrice, duration, countItems, 1);   
	Auctionator.Debug.Message( 'Atr_CreateAuction_OnClick : ', "adding 1 last Stack of ", countItems);			
else 
	Auctionator.Debug.Message( 'Atr_CreateAuction_OnClick() Items left : ',gJustPosted.StackSize, " - " ,countItems);	
end	
Atr_SellallCheckBox:SetChecked(false);

end
`

My main Problem is that i cant archive it with 1 single click on create Auction
Greetings
Nexxy

commented

Ok,
my further problem is that if i create a Action with StartAuction(), he just removes the current item from selling ... and i dont geht why. I guess thats why i cant use StartAuction() twice ?

commented

New day new attempt.
I digged further into StartAuction .. this function clears my item.

My new attempt is to reget the ItemLink, find it in our bag, get it on Cursor and drop it again into Auction house.

Meanwhile the Auctionhouse StartAction still takes too long to make the next StartAuction happen .. Thus i have to click twice on Create Auction.

Get the Code here :
https://paste.ofcode.org/9T8JLuHbWYVU7tF7qRC3UT

i also upload my Sell.xml and my Auctionator.lua file here.

commented

Auctionator.lua.txt

Sell.xml.txt

Haha .. github dont support Lua code -> Txt-files

commented

some code polish and improvement :
https://paste.ofcode.org/JwcsjHMEFtjTNty3r2A97G

commented

@Nexxxy If you need a guide on how to submit a PR(pull request),

  1. Make a Fork (button on the top right of the screen)
  2. Push the edit key and change each file that you have changed. Write a title of what the changes where, and some notes if needed in the description.
  3. Follow the steps from the terminal guide starting from creating a pull request
commented

@Nexxxy 404 on that paste link. Can you submit a PR?

commented

Here you go : #336

commented

Closing this and the associate pull request, though your work is very appreciated!! With all of the changes in 8.3, this will probably no longer be necessary...