• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [PB] advanced TSM AH bot profile

    Discussion in 'Archives' started by glvtron, Mar 23, 2012.

    1. glvtron

      glvtron Member

      Joined:
      Mar 10, 2012
      Messages:
      128
      Likes Received:
      3
      Trophy Points:
      18
      Last update:
      • Patcher: 2012.12.15
      • Profile: 2012.12.14
      Bugs:

      Patcher:
      • Works with latest TSM version only
      • Uninstall by running the patcher again.
      • Virus scan 1
      • Virus scan 2
      • NSIS Installer source file included

      Todo:
      • Randomize path or atleast AH NPC
      • Implement restock (pbank/gbank, craft from AH, craft from farming mats)
      • Use TSM Auto-Mail button
      • Use GetAll scan
      • Make it use HBRelog
      • Some error handling and debugging features

      Description:
      This profile works with the famous TradeSkillMaster addon, and tries to make use of this great addon from a botting POV.

      What the bot will do, when you start it:
      1. Runs to nearest AH, and does cancelling
      2. Even if there is nothing that had been cancelled, it runs to the mailbox and fetches mail
      3. Keeps running between AH and mailbox, posting items on the AH, until mailbox is emptied
      4. Starts a random timer 10-15minutes, when expired the bot will start again.

      Features:
      • Auto-cancel auctions which you've been undercut
      • Auto-fetch mails with the use of TSM_Mailing
      • Auto-post auctions from your bags and mailbox

      Instructions:
      1. Download profile
      2. Revert to / Install original TSM
      3. Download and run patcher
      4. Use TradeSkillMaster_Mailing as mailbox addon
      5. Set appropriate macros
        • Keyboard macro: F1 ( /click TSMAuctioningCancelButton ) and F2 (/click TSMAuctioningPostButton )
        • Mousewheel macro: use TSM built-in mousewheel macro , bind to CTRL (Modifiers: CTRL)
      6. Adjust settings in profile (all time related settings are meant in seconds)
        • FirstStart: Delay before bot starts
        • MinWait: Minimum delay between cycles
        • MaxWait: Maximum delay between cycles
        • MouseWheel: True if you are using mousewheel macro
        • GreedyScan: True if you want the bot, to start posting/canceling while a scan is in progress
        • GetAllScan: True if you want the bot, to do a GetAll scan before starting a posting/canceling cycle
        • PostFirst: True if you want the bot, to do posting first
        • DoCancel: True if you want the bot, to do canceling

      Credits:
      • Toney for inspiring me with his TSM profile
      • Sapu and other TSM devs for making such awesome WoW Addon

      Teaser:
      [video=youtube_share;y5VOh0RHHVE]http://youtu.be/y5VOh0RHHVE[/video]
      This is only canceling-posting, when I have some time I make another video with the rest.

      If you like my profile please donate, thanks!
      [​IMG]
       

      Attached Files:

      Last edited: Dec 15, 2012
    2. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      Nice! Good to see the project getting updated :).
      I'm looking forward to seeing your progress.
       
    3. kira20203

      kira20203 New Member

      Joined:
      Nov 9, 2011
      Messages:
      3
      Likes Received:
      0
      Trophy Points:
      0
      You have my attention.
       
    4. thedon19

      thedon19 Member

      Joined:
      Mar 4, 2010
      Messages:
      193
      Likes Received:
      0
      Trophy Points:
      16
      would be happy to help you test :)
       
    5. Smix

      Smix New Member

      Joined:
      Aug 30, 2011
      Messages:
      215
      Likes Received:
      2
      Trophy Points:
      0
      Omfg
      Finally! Was waiting for this since January i guess lol.

      I'l help with testing for sure.
       
      Last edited: Mar 25, 2012
    6. glvtron

      glvtron Member

      Joined:
      Mar 10, 2012
      Messages:
      128
      Likes Received:
      3
      Trophy Points:
      18
      Last update: 2012.09.19

      TradeSkillMaster_Auctioning/modules/PostScan.lua
      • Add these lines to the bottom of the file
        Code:
        	function Post:isScanningPBT()
        		return isScanning
        	end
        

      TradeSkillMaster_Auctioning/modules/CancelScan.lua
      • Add these lines to the bottom of the file
        Code:
        	function Cancel:isScanningPBT()
        		return isScanning
        	end
        

      TradeSkillMaster/Auction/AuctionFrame.lua
      • Replace lines
        Code:
        	for i, moduleInfo in ipairs(buttonInfo) do
        		local frame = CreateSidebarButtonContainer(moduleInfo.module)
        		tinsert(buttonFrames, frame)
        		local buttons = {}
        		frame.buttons = buttons
        		for j, mode in ipairs(moduleInfo.modes) do
        			local btn = CreateFrame("Button", [COLOR="#FF0000"]nil[/COLOR], frame)
        
        with
        Code:
        	[COLOR="#00FF00"]local k = 0	[/COLOR]
        	for i, moduleInfo in ipairs(buttonInfo) do
        		local frame = CreateSidebarButtonContainer(moduleInfo.module)
        		tinsert(buttonFrames, frame)
        		local buttons = {}
        		frame.buttons = buttons
        		for j, mode in ipairs(moduleInfo.modes) do
        			[COLOR="#00FF00"]k = k + 1[/COLOR]
        			local btn = CreateFrame("Button", [COLOR="#00FF00"]"feature"..k[/COLOR], frame)
        
      • Replace line
        Code:
        			TSMAPI:CreateTimeDelay("auctionButtonClick", 0.01, function() self:GetScript("On[COLOR="#FF0000"]MouseUp[/COLOR]")(self) end)
        with
        Code:
        			TSMAPI:CreateTimeDelay("auctionButtonClick", 0.01, function() self:GetScript("On[COLOR="#00FF00"]Click[/COLOR]")(self) end)
      • Replace lines
        Code:
        		btn:SetScript("On[COLOR="#FF0000"]MouseUp[/COLOR]", function(self, button)
        				UnlockAllHighlight()
        				self:LockHighlight()
        				private:OnSidebarButtonClick(mode, [COLOR="#FF0000"]button[/COLOR])
        			end)
        
        with
        Code:
        		btn:SetScript("On[COLOR="#00FF00"]Click[/COLOR]", function(self)
        				UnlockAllHighlight()
        				self:LockHighlight()
        				private:OnSidebarButtonClick(mode, [COLOR="#00FF00"]"LeftButton"[/COLOR])
        			end)
        
        Note: Here lies one of the backdraws of doing this modify, is that you lose the ability to do a right click custom-scan.
      • Delete the red colored part
        Code:
        	return TSM.db [COLOR="#FF0000"]and tonumber(select(3, strfind(debugstack(), "([0-9]+)"))) == private.num[/COLOR]
        like this
        Code:
        	return TSM.db

      TradeSkillMaster/Auction/AuctionUtil.lua
      It's a bit hard to edit this one, because the critical functions are compressed into one line.
      • Delete the red colored part
        Code:
        if i == "info" then [COLOR="#FF0000"]if (time() - (test or 0)) > 1 then wipe(fPrivate) error("Invalid access of protected table.", 2) end[/COLOR] else
        
        like this
        Code:
        if i == "info" then else
        
      • Replace red colored part
        Code:
        fPrivate.mode = mode.obj [COLOR="#FF0000"]getmetatable(mode).__newindex(mode, "result", fPrivate.mode:Show(fPrivate.frame, button)) if getmetatable(mode).__eq(mode, "isValid") then local function callback(flag) if flag then mode.result = debugstack() fPrivate.mode:Show(fPrivate.frame, button) else wipe(fPrivate) print("Error: You failed TradeSkillMaster's anti-bot test. TSM Won't work until you reload your UI.") return end end TSMAPI:RunTest(fPrivate.frame, callback) end[/COLOR] return mode.info
        with
        Code:
        fPrivate.mode = mode.obj [COLOR="#00FF00"]fPrivate.mode:Show(fPrivate.frame, button)[/COLOR] return mode.info
        
      • Delete the red colored part
        Code:
        return [COLOR="#FF0000"]fPrivate:CheckEnv() or[/COLOR] temp.modeText
        
        like this
        Code:
        return temp.modeText
        

      TradeSkillMaster_Mailing/TradeSkillMaster_Mailing.lua
      • Replace red colored part
        Code:
        	local button = CreateFrame("Button", [COLOR="#FF0000"]nil[/COLOR], InboxFrame, "UIPanelButtonTemplate")
        with
        Code:
        	local button = CreateFrame("Button", [COLOR="#00FF00"]"TSMOpenAllMail"[/COLOR], InboxFrame, "UIPanelButtonTemplate")
      • Comment out line
        Code:
        		error("Stack overflow.", 2)
        by entering "--" at the start of the line, like this
        Code:
        [COLOR="#00FF00"]--[/COLOR]		error("Stack overflow.", 2)
       
      Last edited: Sep 18, 2012
      Gentoo and Toney001 like this.
    7. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      Sweet! I'll give it a spin tonight and report back.

      I do suggest you make your own thread, because this should essentially replace mine and will make it easier for a) people to +rep you and b) give support to it without having to guess which one they are using.

      Thanks for sharing!
       
    8. Azucar

      Azucar Member

      Joined:
      Mar 26, 2010
      Messages:
      439
      Likes Received:
      2
      Trophy Points:
      18
      Already had this working to begin with. :p
       
      Last edited: Mar 27, 2012
    9. Smix

      Smix New Member

      Joined:
      Aug 30, 2011
      Messages:
      215
      Likes Received:
      2
      Trophy Points:
      0
      Ok il start.
      It does not initiate cancelling, means does not click cancel button and just goes for next action in a second after opening auction window. Canceling scan ended. Canceling cycle ended.
      Same with posting.
      It does not pick mail items from mailbox after false cancelling and just stays near mailbox with mail window opened forever.
      Latest TSM from curseforge and PB.

      Um im confused seeing post above me, gonna try oldish TSM.
       
    10. glvtron

      glvtron Member

      Joined:
      Mar 10, 2012
      Messages:
      128
      Likes Received:
      3
      Trophy Points:
      18
      I think you did not modify your TSM files. You need to modify them, check post #6. If you did, maybe you forgot to reload UI after modifying the files. Awaiting your reply!


      Right :) Then you could tell me which feature would you like to see next? :) I'm working on Restock by Crafting and buying mats from AH, but I have some problems with it yet not properly "seeing" shop list.
       
      Last edited: Mar 26, 2012
    11. Azucar

      Azucar Member

      Joined:
      Mar 26, 2010
      Messages:
      439
      Likes Received:
      2
      Trophy Points:
      18
      I have two macros on my action bar mapped to F1 & F2 and posting and canceling works fine.
       
    12. glvtron

      glvtron Member

      Joined:
      Mar 10, 2012
      Messages:
      128
      Likes Received:
      3
      Trophy Points:
      18
      This profile works with the TSM mousewheel macro :) If you would like to see feature added for button hotkeys, let me know it :)
       
    13. Smix

      Smix New Member

      Joined:
      Aug 30, 2011
      Messages:
      215
      Likes Received:
      2
      Trophy Points:
      0
      I did modify files before putting em to my wow folder even so ;)
      I did not made clean install tho, just replaced old TSM with new one without touching WTF files with groups etc. Tho its unlikely may cause problems.
      Well lets wait for more replies for now.

      Meanwhile want to throw that its not really obvious how u wanna bind your wheel.
      I mean there are few options with alt or ctrl or shift. seen LCTRL in profile tho.
       
      Last edited: Mar 26, 2012
    14. glvtron

      glvtron Member

      Joined:
      Mar 10, 2012
      Messages:
      128
      Likes Received:
      3
      Trophy Points:
      18
      Oh yes, you are right. I totally forgot to mention it needs to be bind to CTRL. Will edit my post, thanks!

      On the otherhand its not the cause of your problem, bot not doing anything. Does your debug log tell any errors?
       
      Last edited: Mar 26, 2012
    15. Smix

      Smix New Member

      Joined:
      Aug 30, 2011
      Messages:
      215
      Likes Received:
      2
      Trophy Points:
      0
      nope no errors, lets just wait for some more success replies so i know for sure the problem is on my side.
       
    16. thaone0523

      thaone0523 Member

      Joined:
      Jul 25, 2011
      Messages:
      130
      Likes Received:
      0
      Trophy Points:
      16
      I have done everything you have advised here and am getting the below error.

      [1:51:38 PM:967] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Styx.InvalidObjectPointerException: Cannot read a descriptor on an invalid object.
      at Styx.WoWInternals.WoWObjects.WoWObject.#eve[T](UInt32 field)
      at Styx.WoWInternals.WoWObjects.WoWObject.#dve[T](Int32 offsetIndex)
      at Styx.WoWInternals.WoWObjects.WoWUnit.get_Level()
      at Honorbuddy.MainWindow.#3Uc()
      --- End of inner exception stack trace ---
      at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
      at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
      at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
      at System.Delegate.DynamicInvokeImpl(Object[] args)
      at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
      at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

      What seems to occur is the bot runs to ah. TSM is not the default tab it opens to so it says that scan complete runs to mailbox gets the mail runs back to ah activates ah then sits there because once again TSM is not default window although i have it set in the TSM options. I even tried restoring the original files without the edits you provided and did it again. LUA edits take into account if you have crafting and others listed you know how the windows are set to the side of the TSM AH window? I dont think i missed a step. I even did a fresh HB and PB install with only this to see if it was a Plugin error same issue.

      One more question is for the postscan and cancelscan LUA are you sure we should put it after the original ending or should we replace it?

      Great work but i think we need to be a bit clearer as no one seems to be getting this to function correctly...
       
    17. glvtron

      glvtron Member

      Joined:
      Mar 10, 2012
      Messages:
      128
      Likes Received:
      3
      Trophy Points:
      18
      You should set TSM tab open by default. If I get you right, you did this, and still it did not open by default? If thats the case, could you check any LUA errors? (by setting Interface->Help->Display LUA errors, ingame)

      edit: I think we found the problem (Azucar helped me :p thanks), fix incoming in a few minutes. temporary fix is to install and load all TSM modules.
       
      Last edited: Mar 26, 2012
    18. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      I just noticed I posted this on your thread lol
      I thought you had posted it on mine, which didn't make much sense...

      Sorry ahaha
       
    19. glvtron

      glvtron Member

      Joined:
      Mar 10, 2012
      Messages:
      128
      Likes Received:
      3
      Trophy Points:
      18
      fix is up at post #6

      edit: need to apply another bugfix that made it not work at all

      TradeSkillMaster/Auction/
      AuctionFrame.lua
      replace lines

      with

      Note: Here lies one of the backdraws of doing this modify, is that you lose the ability to do a right click custom-scan.

      TradeSkillMaster_Mailing/
      TradeSkillMaster_Mailing.lua
      replace line
      with
       
      Last edited: Mar 26, 2012
    20. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      I'll toy around with the actual profile when I have more time (it's a lot fancier than mine), but just for the sake of experimenting, I did the pertinent file modifications and updated my own profile and it seems to be working perfectly.
      Can't wait to see where you take this :).

      +rep to you sir!

      PS. Do you think you could edit the mailing module to allow access to the "Auto-Mail" button? Because that's 10 times better than having to deal with HB's ONE mail recipient (and having to add multiple lines of code to send stuff to different toons).
       

    Share This Page