Giter VIP home page Giter VIP logo

stealyourcarbon's Introduction

StealYourCarbon is a simple reagent restocker addon. When you visit a vendor who sells an item you have told SYC to buy, it buys it for you. Never run out of water again!

SYC will also attempt to restock from your bank. Note that this feature is fairly simple, if you have multiple stacks of the item in your bank SYC will only pull form the first one it finds. If this stack is not enough to fill your bag the next stack in the bank will not be used until you reopen the bank. SYC will not try to split stacks either, so you'll always get a full stack in your bags if enough items are available on the first stack in your bank.

stealyourcarbon's People

Contributors

brantb avatar kergoth avatar kesor avatar oscarucb avatar tekkub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stealyourcarbon's Issues

Not pulling from bank correctly

I finally had to pull something from my bank today and I noticed that SYC could not pull it automatically like it should. It attempted to pull one mana potion from my bank from a stack of three. It made the "potion" sound as if it was going to place one in my bag, but it seemed to have trouble splitting the one from the three stack, and nothing happened. Tried multiple times.

I'm using Combuctor as my bank addon, but I don't think that would cause problems would it? Should also mention that I'm not using any tradeskill bags.

does not trigger on interact

repro:
Set up interact hotkey in default keybinding interface. Approach and target reagents vendor. Hit interact hotkey. SYC does not replenish reagents.

Walk away. Come back near vendor, right click. SYC now replenishes fine.

Thanks for the nice addons.

Please Tek, fix this Addon

I use this since BC and it would be a damn shame if i had to use something else now :)

Buggraber:

1x StealYourCarbon\VendorBuyer.lua:12: attempt to call global 'GetAuctionItemClasses' (a nil value)
StealYourCarbon\VendorBuyer.lua:12: in main chunk

Locals:
myname = "StealYourCarbon"
ns =

{
BANKFRAME_OPENED = defined @StealYourCarbon\Bank.lua:103
ids =
{
}
RegisterEvent = defined @StealYourCarbon\externals\events.lua:8
UnregisterAllEvents = defined @StealYourCarbon\externals\events.lua:19
GSC = defined @StealYourCarbon\externals\gsc.lua:18
OnLoad = defined @StealYourCarbon\StealYourCarbon.lua:6
GS = defined @StealYourCarbon\externals\gsc.lua:44
dbpcname = "StealYourCarbonDB"
Printf = defined @StealYourCarbon\externals\print.lua:6
Print = defined @StealYourCarbon\externals\print.lua:5
UnregisterEvent = defined @StealYourCarbon\externals\events.lua:14
G = defined @StealYourCarbon\externals\gsc.lua:57
}
stacks =
{
}
(_temporary) = nil
(_temporary) = "attempt to call global 'GetAuctionItemClasses' (a nil value)"

buying forced-stack items

Hi - Been using SYC for a long time, one small issue.
Some stackable items are only sold by the merchant in fixed stacks (usually a stack of 5), and SYC does not handle this correctly.

One good example that I care about is Golden Glider http://www.wowhead.com/item=104346 which is Unique(20) and only buyable in stacks of 5. If you have 1 in your bags and configured for a full 20 stack, SYC will try to purchase 19 and fail to purchase any ("Error: You can't buy the specified quantity of that item"). In this case it's not possible to buy 19 (without first deleting some in the bags) but it could at least purchase 15.

Here is the simple fix to do that (rather than failing with an error and doing nothing):

169                                 while tobuy > 0 do
170                                         local thisbuy = min(tobuy, stacks[itemID])
+  171                                       if qty and qty > 1 then thisbuy = min(thisbuy, qty) end -- oscarucb : stack-at-a-time purchase
172                                         BuyMerchantItem(i, thisbuy)
173                                         spent = spent + (price/qty)*thisbuy
174                                         tobuy = tobuy - thisbuy
175                                 end

It might also be nice to have an optional feature to "force fill the stack" (by deleting some in the bags first), but I can live without that.

Config_Bags.lua line 123: attempt to compare number with nil

Receiving the following error after the update to 8.0.1. Thanks.

Date: 2018-08-08 19:25:36
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\StealYourCarbon\Config_Bags.lua line 123:
attempt to compare number with nil
Debug:
(tail call): ?
[C]: ?
StealYourCarbon\Config_Bags.lua:123:
StealYourCarbon\Config_Bags.lua:115
[C]: Show()
..\FrameXML\UIParent.lua:2611: SetUIPanel()
..\FrameXML\UIParent.lua:2417: ShowUIPanel()
..\FrameXML\UIParent.lua:2317:
..\FrameXML\UIParent.lua:2313
[C]: SetAttribute()
..\FrameXML\UIParent.lua:3138:
..\FrameXML\UIParent.lua:3126
[C]: ShowUIPanel()
..\FrameXML\UIParent.lua:3159: ShowOptionsPanel()
[string ":OnClick"]:2:
[string "
:OnClick"]:1
Locals:
(*temporary) = "LeftButton"
(*temporary) = false
(*temporary) = defined =[C]:-1

AddOns:

not working with some vendors

I noticed this addon not working on Jeeves (engineer dropped repair bot) and also on NPCs that show up after Saurfang fight though they both sell the correct reagents.

buy double stack

i have set SYC to buy for my profession bag 2 stacks of "resilient parchment" (40) and sometimes when i go to the vendor SYC buy 4 stacks (80).

a bit annoying.

LUA error when trying to increase stack size in Classic

I managed to get this running in classic ( I was honestly not expecting that).
It fills up 1 stack of whatever you add to the list, but you can't increase it further.
If you click on the up arrow this error is thrown:

Message: Interface\AddOns\StealYourCarbon\Config_Restock.lua:30: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback])
Time: Thu Aug 29 21:13:01 2019
Count: 1
Stack: Interface\AddOns\StealYourCarbon\Config_Restock.lua:30: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback])
...ce\AddOns\TradeSkillMaster\Core\Lib\ErrorHandler.lua:582: in function <...ce\AddOns\TradeSkillMaster\Core\Lib\ErrorHandler.lua:542>
[C]: ?
[C]: in function `PlaySound'
Interface\AddOns\StealYourCarbon\Config_Restock.lua:30: in function <Interface\AddOns\StealYourCarbon\Config_Restock.lua:29>

Locals: errMsg = "Interface\AddOns\StealYourCarbon\Config_Restock.lua:30: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback])"
tsmErrMsg = nil
oldModule = nil
private = <table> {
 AddonBlockedEvent = <function> defined @Interface\AddOns\TradeSkillMaster\Core\Lib\ErrorHandler.lua:334
 num = 0
 ErrorHandler = <function> defined @Interface\AddOns\TradeSkillMaster\Core\Lib\ErrorHandler.lua:116
 hitInternalError = false
 errorFrame = <unnamed> {
 }
 origErrorHandler = <function> defined @Interface\SharedXML\SharedBasicControls.lua:295
 FormatErrorMessageSection = <function> defined @Interface\AddOns\TradeSkillMaster\Core\Lib\ErrorHandler.lua:349
 SanitizeString = <function> defined @Interface\AddOns\TradeSkillMaster\Core\Lib\ErrorHandler.lua:342
 errorReports = <table> {
 }
 IsTSMAddon = <function> defined @Interface\AddOns\TradeSkillMaster\Core\Lib\ErrorHandler.lua:312
 localLinesTemp = <table> {
 }
 GetStackInfo = <function> defined @Interface\AddOns\TradeSkillMaster\Core\Lib\ErrorHandler.lua:280
}
MAX_STACK_DEPTH = 50
TSM = <table> {
}

Crazy Alchemist's Potion

Restocking of the Crazy Alchemist's Potion from the bank does not seem to work. The stack size of 5 is recognized correctly, but it always seems to take only the smallest stack from the bank and not the amount it is set to (e.g. 20).

Increasing Stack Bug

I get this Error when trying to increase a Stack of item using the Shift Key:

2x StealYourCarbon\Config_Restock.lua:30: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback])
[C]: in function `PlaySound'
StealYourCarbon\Config_Restock.lua:30: in function <StealYourCarbon\Config_Restock.lua:29>

Locals:
(*temporary) = "UChatScrollButton"

Maybe someone can reproduce this?

Thx

Broken in Legion

No longer works with the current patch. Seeing two errors when opening a vendor window...

StealYourCarbon\VendorBuyer.lua:12: attempt to call global 'GetAuctionItemClasses' (a nil value) StealYourCarbon\VendorBuyer.lua:12: in main chunk [C]: in functionLoadAddOn'
AddonLoader\AddonLoader-r135.lua:136: in function LoadAddOn' AddonLoader\AddonLoader-r135.lua:170: in function <AddonLoader\AddonLoader.lua:147>

StealYourCarbon\StealYourCarbon-6.0.0.25-Beta.lua:9: attempt to call field 'MERCHANT_SHOW' (a nil value) StealYourCarbon\StealYourCarbon-6.0.0.25-Beta.lua:9: in functionOnLoad'
StealYourCarbon\externals\events.lua:57: in function <StealYourCarbon\externals\events.lua:41>
StealYourCarbon\externals\events.lua:89: in function <StealYourCarbon\externals\events.lua:88>
[C]: in function LoadAddOn' AddonLoader\AddonLoader-r135.lua:136: in functionLoadAddOn'
AddonLoader\AddonLoader-r135.lua:170: in function <AddonLoader\AddonLoader.lua:147>`

Incorrect cost feedback in chat

SYC 4.0.0.17-Beta, WoW 4.0.1 live, USEnglish client/server, no prior saved variables, level 80 character. Have SYC set to buy 80 Honeymint Tea as well as set to provide "Chat feedback". Have 60 Tea already in bags, so its to buy a total of 20.

Open a vendor, 20 of the item is properly bought. Chat feedback reports the proper quantity bought on the first line chat received. However on the next line, receive the following: "Steal Your Carbon: Spent 18.70". The"18" text is gold in color while "70" is gray; that number should represent gold & silver spent. But its wrong.

The amount I actually spent on that transaction: 3g 74s (at a Revered faction discount). But even without any faction discount, the cost for 20 Honeymint Tea is only 4g 40s. Not 18g 70s as reported by SYC.

This incorrect cost reporting persisted no matter how many items it actually bought on further tests. 7 Honeymint Tea bought: reported "Spent 6.54", actual amount spent was 1.30.90. Non-faction discount cost: 1.54. And so on.

slash commands broken with AddonLoader

If the current alpha is loaded with AddonLoader the slash commands are totally non-functional, because they are registered incorrectly.

Here is the fix:

*** orig/StealYourCarbon.lua    Sat Aug 14 12:28:26 2010
--- StealYourCarbon.lua Thu Sep  2 15:41:55 2010
***************
*** 55,63 ****
  --      Slash Command      --
  -----------------------------

! SLASH_CARBON1 = "/carbon"
! SLASH_CARBON2 = "/syc"
! SlashCmdList.CARBON = function(input)
        if input == "" then
                InterfaceOptionsFrame_OpenToCategory(StealYourCarbon.configframe)
        else
--- 55,61 ----
  --      Slash Command      --
  -----------------------------

! function SYC_Command(input)
        if input == "" then
                InterfaceOptionsFrame_OpenToCategory(StealYourCarbon.configframe)
        else
***************
*** 74,80 ****
                end
        end
  end
!

  ----------------------------------------
  --      Quicklaunch registration      --
--- 72,81 ----
                end
        end
  end
! SLASH_CARBON1 = "/carbon"
! SlashCmdList["CARBON"]= SYC_Command
! SLASH_SYC1 = "/syc"
! SlashCmdList["SYC"]= SYC_Command

  ----------------------------------------
  --      Quicklaunch registration      --

latest version not working

version 3.0.3.16 beta wasn't working for me. No error messages, just it didn't work when I went to a vendor who had stuff I'd told SYC to track. I tried disabling all addons except syc. No joy. Tried deleting the saved variables, and still only syc active. No joy. Went back to the previous version (15). Works fine (so far anyway). No idea what the problem might be.

In GUI, adding stacks fails beyond first stack (& ease issue removing items)

SYC 4.0.0.17-Beta, WoW 4.0.1 live, USEnglish client/server, no prior saved variables, level 80 character. Load SYC by any means (command, opening a vendor, etc.) & head into its option panel.

On the first tab ("These items are only restocked if you are NOT carrying a tradeskill bag"), try adding a stack of Honeymint Tea. SHIFT-click a stack already in the character's bag, select 1 item (not a stack) & drag it over to the drop area in options, SHIFT-click the drop area. Sure enough, a full stack of 20 Honeymint Tea shows up in the drop area.

But then try adding additional stacks using the same method (I normally carry 80 on that character). It fails to add any more items to the drop area using that method.

So then cleared the drop area. Clicked the down quantity arrow 20 times to reduce the amount to 0. Which is a big hassle, increasingly big the more items you have there. Then closed & reopened the options panel.

Tried again, but this time SHIFT-clicked a full stack of 20 out of my bags to add to the drop area each time. Again, the first stack could be added to the drop area without a problem. But subsequent stacks SHIFT-clicked on the drop area failed to increase the amount there at all. The second new drop area that appears beside the first one once you have items in the first does not allow the same item to be added.

So had to manually click the up-quantity arrow beside the drop area a full 60 times to get the total amount I wanted it to record to buy. Which is unexpected & a big hassle. No errors at any time.

The only way to either add many items to buy (beyond 1 stack) or remove an item without issues is to use the "/carbon add Item Link" command. Normally expect a GUI to make things "easier"/faster to use; currently SYC's doesn't.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.