• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [PB] Toney's (very basic) TSM-Based AH Bot Profile

    Discussion in 'ProfessionBuddy Profiles' started by Toney001, Dec 19, 2011.

    1. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      [PB] Toney's TSM-Based AH Bot Profile

      DISCLAIMER

      First of all, I wanna make clear that I have no real knowledge of coding. I've made this profile instructing myself by reading guides, searching the forums and looking through other profiles in order to learn what function did what I needed to do.
      That said, as it is, this profile does exactly what I need it to do, nothing more, nothing less, and unless I have a need to add functionality to it, chances are I won't.
      BUT, this is a wonderful community, and as such, I want to contribute in any way I can. This is better than nothing and should provide people with an easy solution to their basic AHing needs.

      However, feel free to take it and modify it in any way you want. If you can make something better out of this, the only thing I ask is that you share it so we can all take advantage of it.
      Like I said, I probably won't be adding functionality to it unless I have a need for something (mostly because I'd have to go through the trouble of researching), but I figured someone could use this as a base.
      BUT if you are a coder, you feel you can contribute and wanna adopt this for further developing, please, be my guest.

      Second of all, I want to give credit to the people that deserve it, in no particular order, and ask you (urge you, really) to take 10 seconds to give them +rep (click on their name to go to a post of theirs), because without them, we'd still be without a working AH Bot:


      Highvoltz:
      For developing PB, among countless plugins, and for supporting it. Without his continued support I wouldn't have found the answers I needed. Also, my profile uses his AH Bot profile as inspiration (to say the least).

      Inrego: This guy... He made the code cleaner, and smarter. He deserves the most credit. If you're gonna give +rep to someone, it should be him.

      Now that's outta the way, let's get down to business!

      So what is this?

      This is a very simple automation profile for TSM. It's very basic, but works beautifully.

      Why TSM?

      TSM is more reliable than PB's AH bot, has more depth of configuration, and a more user friendly interface.
      Also, different PB AH profiles will sell different things depending on the user. This way, this works for everyone, all the user has to do is appropriately set up TSM (attached guide below).

      Another advantage is longevity. Unless PB stops being able to press keys, this should only require minor tweaks with new releases.

      How does it work and what does it do?

      I first intended it to work by running code through HB. For some reason, it didn't work. I tried making HB run the macros from the game. That didn't work either. As third time is the charm, I made it emulate keystrokes (as the very same macros manually pressed in game worked perfectly), and voila!

      It starts by going to the nearest AH and doing a posting cycle. After that, it'll generate a random number (between 15 to 30 mins) to "schedule" a cancelling cycle, and another (between 30 to 60 secs) to "schedule a posting cycle".
      It'll keep posting (when the timer is up) until the cancelling timer is up, then it'll finish the current task, if any, and start the cancelling cycle, effectively cancelling any undercut auction and retrieving your mail, if you have any.

      Enough chatter, I wanna sell sum stuffs!!!

      Setp 1: Download and install the required addons

      TradeSkillMaster

      Lib: Stub

      Make sure this addons are correctly installed in your WoW's addon folder, and properly enabled ingame.

      Also, a good partner for this is the HB Plugin "TurboMailer". It'll speed up the mail retrieval part.
      You can get it here: TurboMailer

      TurboMailer goes in your HB > Plugins Folder.

      Step 2: Macros

      Since hardware events are needed, we need to make the following ingame macros for the bot to emulate a "button press":

      • /click TSMAucPostButton
      • /click TSMAucCancelButton

      Bind the first one to F1, and the second one to F2.

      Step 4: Proper TSM configuration

      Make absolutely sure to set your TSM Sidebar to be displayed automatically. You do this by opening the AH, clicking on the TSM button at the top right (to open the sidebar the first time), and then checking the "Open Sidebar Automatically" box.
      Also, make your groups, categories and whatever it's needed to start posting auctions.
      If you need a TSM guide, google is your friend.

      Step 5: Starting up!

      Download my profile View attachment [PB] Toney's TSM-Based AHBot v1.1.xml .

      Open up HB, select PB as the botbase, click on Bot Config and load up the profile.

      As long as you've properly set up TSM and, obviously, have stuff in your bags to sell, you can sit back and enjoy.
      Normally I send stuff to this toon for posting, so he'll pick it up on it's own. The only interaction I have is actually sending my gold back to my main account. Use your preferred method for that.

      Step 6: Closing

      One last thing. If you'd like to modify the timers that are used for either posting or cancelling, this is where you need to go:

      TSM Timers.jpg

      The timers are in seconds. Out of the box, the posting timers are a random number between 30s to 60s, and the cancelling timers are 15m to 30m.

      I know there's a lot of people that can get good use out of this, so if you're one of those people, go back to the top of the page and give +rep to the people that made this happen.
       
      Last edited: Mar 12, 2012
      Jacan and imdasandman like this.
    2. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      Reserved.
       
    3. ronaldiflo

      ronaldiflo New Member

      Joined:
      Mar 16, 2011
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      0
      thank you very much, i ll try it and post a feedback later ! :)
       
    4. guizadas

      guizadas Member

      Joined:
      Dec 14, 2011
      Messages:
      60
      Likes Received:
      0
      Trophy Points:
      6
      Looks awesome, can't wait to check this out. I have a few questions i'd like to know though!

      1) I'm coming from Pirox where profiles worked quite differently. Do I need to park my bank/auction toon near an auctioneer? What happens if he's not?

      I saw that this is the following line:
      I'm a complete noob with HB profiling, does this only move him to a specific auctioneer, or the nearestAH he can find?


      2) How could I implement him going to a mailbox, retrieving mail, and coming back to the auctioneer? I made a very sweet profile with Pirox that did this, but don't have the slightest clue. I would really like to customize this to better suit my needs, could you point me in the right direction of where you found some of the more useful learning materials to develop my own profile?

      +rep!
       
    5. ronaldiflo

      ronaldiflo New Member

      Joined:
      Mar 16, 2011
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      0
      1) he will go to the nearest AH he can find

      2) he will go retrieving mail, and coming back to the auctioneer alone after auctions canceling :)

      sorry for my english
       
    6. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      The profile auto detects AH and mailboxes within 100 yards. As long as you stay within the vecinity of the auctioneer, you'll be safe.

      As for resources, there's a small guide in the PB directory. You also learn a lot just from going through other profiles and seeing what they do and what lines of code are used for what.
      Also, use the forums to look for answers to questions you might have and someone may have asked before.

      As for the mailbox, the profile does this.
      I reposts every 30-60 seconds (random) and cancels auctions every 10-15 mins (random). After it cancels, it retrieves mails and goes back to posting.

      If you want you can reduce the timer for the cancelling routine, or you can just move some functions around. Depends on what you wanna do.
      If you tell me what you wanna do I might be able to point you somewhere :).
       
    7. guizadas

      guizadas Member

      Joined:
      Dec 14, 2011
      Messages:
      60
      Likes Received:
      0
      Trophy Points:
      6
      Ok, this is how I had my pirox setup.

      I had 2 AH Posting profiles. One for peek times (i.e. raid times 17:00 - 20:00) and a second AH profile to just squeeze in between gathering profiles.

      As you mentioned, one of the difficulties is knowing when the 'post cycle' has ended. During peek times, as auctions tend to get undercut very frequently and also tend so sell very fast, I had him click the /bpost every 50seconds and spamming "/click TSMAucPostButton" in between. Sometimes it was send /bpost too early and it would do nothing but this way it would minimize the idle time because it would start a new posting cycle every 50 seconds. This way I could make sure I always at the lowest seller and was reposting as soon as my items were sold. after 5 mins or so of non-stop posting or undercutting. i'd pause it for 1 minute, cancel auctions, retrieve mail and then repeat from start. The code seems straight forward enough for me to edit myself, i'll let you know how it goes!
       
      Last edited: Dec 19, 2011
    8. guizadas

      guizadas Member

      Joined:
      Dec 14, 2011
      Messages:
      60
      Likes Received:
      0
      Trophy Points:
      6
      Also, is there a loop function in PB for spamming the macro? Gets pretty annoying to edit!
       
    9. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      To be honest, I don't even use a random timer for posting myself. Just added it in case anybody cared. I have it set up to non stop posting with cancel/mail breaks every 15 mins (I carry enormous amounts of stock on my toon so I don't have to waste time with frequent mail checks).

      Just edit the lines I mentioned on the first post and you can change it to whatever you want. Have in mind they are in seconds. The first number is the min, the second is the max, and the result will be in between those two, at random.
       
    10. theatristformallyknownasG

      theatristformallyknownasG Active Member

      Joined:
      Jan 16, 2010
      Messages:
      3,041
      Likes Received:
      8
      Trophy Points:
      38
      Thanks for this.

      G
       
    11. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      Maybe. Like I said, I don't know anything about coding and what little PB I know, I researched it for this.
      Ideally, the bot would detect there's a frame called "TSMAucPostButton" (or the cancel counterpart) and spam the macro for as long as it could detect it, but I don't know if this is possible or how to do it, so I set it up to just spam it a lot for good measure lol.
      The end result is similar really. If you post a lot of stuff, you'll only have to let it go for a few more seconds after TSM is done. If you don't post a lot, you can always trim the spamming.
       
    12. blasi

      blasi New Member

      Joined:
      Dec 17, 2010
      Messages:
      64
      Likes Received:
      0
      Trophy Points:
      0
      this sounds very cool, if this undercuts correctly, it's definetly worth it !
       
    13. Gentoo

      Gentoo Active Member

      Joined:
      Apr 29, 2011
      Messages:
      1,364
      Likes Received:
      24
      Trophy Points:
      38
      I am having a issue with it not finishing canceling auctions before it runs to the mailbox. It get's about 1/2 way through and takes off to get the mail. I have hundreds of items up at a time. Other than that, working great.

      any suggestions?
       
    14. imdasandman

      imdasandman Active Member

      Joined:
      Feb 2, 2011
      Messages:
      1,207
      Likes Received:
      6
      Trophy Points:
      38
      yep but gonna take some leg work on your end....
      first off I would open the profile in notepad++ or another program used for coding....
      second find this code:
      <CustomAction Code="Lua.DoString(string.Format("RunMacroText(\"{0}\")", "/click bcancel"), 0);"/>
      <WaitAction Condition="false" Timeout="20000"/>

      third change the Timeout="20000" to a bigger number so it cancels more auctions like lets say you want to double the amount of time change the 20000 to 40000....
      VERY IMPORTANT STEP HERE:
      Now since you have changed the master If statement for canceling auctions.... you also need to adds lines of code
      the lines you need to add more of are:
      <CustomAction Code="KeyboardManager.KeyUpDown((char)Keys.F2);"/>
      <WaitAction Condition="false" Timeout="200"/>

      Now the original profile has 100 of these under the orignal code we just edited... Reasoning is each one of these functions are the "mouse clicks" in TSM to cancel auctions.
      Simple math shows 100lines of code x delay time of 200ms= 20000 MS(this was the original number that in my example we changed to 40000)

      So what you would have to do in this example would be to take the total amount of time allowed to perform the cancelation of auctions and divide that by the time it takes to perform each "mouse click"
      so that would be 40000 MS/ 200 MS= 200 lines of code
      so take:
      <CustomAction Code="KeyboardManager.KeyUpDown((char)Keys.F2);"/>
      <WaitAction Condition="false" Timeout="200"/>

      and add it 200 more times



      I have not tested this but it should fix your issue.

      K going to bed for real now
       
      Last edited: Dec 20, 2011
    15. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      Nono, the timeout is just a bit of wait time to let TSM scan the AH. I have it set low so it can start cancelling/posting right away. It has no influence in the time it spends with the cancelling routine.
      What you need to do, Gentoo, is what Imdasandman said in the end. Find the following code:

      <CustomAction Code="KeyboardManager.KeyUpDown((char)Keys.F2);"/>
      <WaitAction Condition="false" Timeout="200"/>


      And copy/paste it a bunch of times. This will add clicks to the cancel routine.
      As it said in the first post, I added as many clicks as I felt I needed myself, but people should add/remove them as they see fit (same if they wanna alter the intervals for each routine).

      I'm glad it's working for you, other than that.
       
    16. guizadas

      guizadas Member

      Joined:
      Dec 14, 2011
      Messages:
      60
      Likes Received:
      0
      Trophy Points:
      6
      I'm trying to use this profile with ARelog, but everytime I ask it to load ProfessionBuddy as the Bot, it loads ArchaeologyBuddy instead and my characters just ends up going to the Arch trainer... Any ideas how to set up PB profile to run in ARelog?
       
    17. vitalic

      vitalic Banned

      Joined:
      Jun 21, 2010
      Messages:
      99
      Likes Received:
      0
      Trophy Points:
      0
      could we not modify TSM to post data about how many auctions need to be posted/cancelled to either chat or combat log etc. and get HB to read the data from there?
       
    18. Inrego

      Inrego New Member Buddy Store Developer

      Joined:
      Feb 7, 2010
      Messages:
      2,765
      Likes Received:
      71
      Trophy Points:
      0
      Woah, you could use a loop to press that button 100 and 200 times instead of putting it in there 100 or 200 times.
       
    19. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      Sorry, can't help you there. I do my AHing from an account on my main BNET account, and as such, don't use it with Arelog. Just load it manually when I actually play.
      The whole botbase thing is fairly new. I'm sure Highvoltz will come up with a command for profiles to set the secondary botbase from the start.
      My only advise is to just wait for an answer from him.

      Dunno. Maybe. I've no idea how.
      Ideally the bot would detect the TSM frame button and press it for as long as it could "see" it. I think that CAN be done, I just don't know how, and I have gotten no response whatsoever in the PB thread so... Bruteforce it is for now.
      At the end of the day, it works the same anyway. I just wanted it to clean up the code.
       
    20. Toney001

      Toney001 New Member

      Joined:
      Oct 12, 2011
      Messages:
      1,206
      Likes Received:
      5
      Trophy Points:
      0
      Hey, I made very clear that I had no idea what I was doing!
      Mind sharng? :)
       

    Share This Page