• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Plugin] BreakTaker

    Discussion in 'Uncataloged' started by Ramakandra, Jun 21, 2013.

    1. Ramakandra

      Ramakandra New Member

      Joined:
      Oct 18, 2012
      Messages:
      49
      Likes Received:
      1
      Trophy Points:
      0
      This plugin pauses the currently running action of the bot for a random period every X hours, its all configurable by editing the .cs file.

      Credit goes to no1knowsy , this is a port from his plugin for DemonBuddy: http://www.thebuddyforum.com/demonbuddy-forum/plugins/54592-plugin-breaktaker-takes-breaks-orly.html

      Everytime this plugin takes a break it will say the number of minutes.seconds on /party so it can synch with other plugins/mods etc.. if you dont want this to happend
      edit the .cs file and comment with // line 161:

      //Lua.DoString(string.Format("SendChatMessage(\"{0}\", 'PARTY');", RealBreakTime.ToString()));

      Download:

      View attachment BreakTaker.cs

      You will see on the log:
      Code:
      [BreakTaker] 1.11 minutes until next break at 22:30.
      [BreakTaker] Break Starting!
      [BreakTaker] Taking break for 7.31 minutes. Will resume around 21:59.
      
      Config:
      Code:
              // All values are in minutes.  So 1 hour = 60 minutes.  3 hours = 180. etc...
              // These ones will be how long your breaks will last, and it will be somewhere between these two options.
              // Suggested Value: 60 - 120 minutes (equivalent to 1-2 hours)
              public static int minBreakTime = 5;
              public static int maxBreakTime = 10;
      
              // These ones will be how the bot should go between breaks, and as above it will be somewhere between these two options.
              // Suggested Value: 60 - 120 (equivalent to 1-2 hours)
              public static int minBetweenTime = 15;
              public static int maxBetweenTime = 60;
      
              // How often to print a message to the log stating how long until the next break. Set to -1 to disable.
              public static int logTimer = 1;
      
              //We would prefer to be in a good place if we're going to take a break. If once it's break time we're not in town or do not leave a game for this long then force a town portal and quit.
              public static int forceTimer = 2;
      
       
      Last edited: Jun 22, 2013
      perryjo17 likes this.
    2. R2D69

      R2D69 New Member

      Joined:
      Jan 31, 2013
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      Demonbuddy ? Did you opened wrong forum or write wrong man ? If this is for honorbuddy I'll use it :3
       
    3. Ramakandra

      Ramakandra New Member

      Joined:
      Oct 18, 2012
      Messages:
      49
      Likes Received:
      1
      Trophy Points:
      0
      Read again.
       
    4. Flappie

      Flappie New Member

      Joined:
      Mar 14, 2012
      Messages:
      36
      Likes Received:
      0
      Trophy Points:
      0
      I'll quote for this purpose :p

       
    5. leetdemon

      leetdemon Member

      Joined:
      Jan 15, 2010
      Messages:
      433
      Likes Received:
      3
      Trophy Points:
      18
      so what exactly does it do when it takes a break just stand still where it is? does it log out of the game?
       
    6. Conifer

      Conifer New Member

      Joined:
      Jun 4, 2013
      Messages:
      29
      Likes Received:
      0
      Trophy Points:
      0
      I want to know too
       
    7. Ramakandra

      Ramakandra New Member

      Joined:
      Oct 18, 2012
      Messages:
      49
      Likes Received:
      1
      Trophy Points:
      0
      Nothing it pauses the bot like if you were to afk and probably wont change it since it does what i need it to.
      However people are free to modify it for their purpose.
       
    8. leetdemon

      leetdemon Member

      Joined:
      Jan 15, 2010
      Messages:
      433
      Likes Received:
      3
      Trophy Points:
      18
      ahh ok ty sir
       
    9. Lokeboy

      Lokeboy Member

      Joined:
      Feb 13, 2010
      Messages:
      196
      Likes Received:
      2
      Trophy Points:
      18
      Where do i put the file? Not under plugins right?
       
    10. Cataphract

      Cataphract Member

      Joined:
      Oct 31, 2011
      Messages:
      159
      Likes Received:
      6
      Trophy Points:
      18
      Create a directory "BreakTaker" in your plugins folder and place the BreakTaker.cs in there.

      @Ramakandra

      Nice one. However, could u please implement, that it doesn't pause while in a pet battle? :D
       
    11. Ramakandra

      Ramakandra New Member

      Joined:
      Oct 18, 2012
      Messages:
      49
      Likes Received:
      1
      Trophy Points:
      0
      Add this function after line 199

      Code:
              public bool InPetCombat()
              {
                  List<string> cnt = Lua.GetReturnValues("dummy,reason=C_PetBattles.IsTrapAvailable() return dummy,reason");
      
                  if (cnt != null) { if (cnt[1] != "0") return true; }
                  return false;
              }
      
      And then at line 152 change:

      Code:
      if (!IsBreaking && ((DateTime.Now - BottingStartTime).TotalMinutes >= WaitTime) )
      
      With:
      Code:
      if (!IsBreaking && ((DateTime.Now - BottingStartTime).TotalMinutes >= WaitTime) && !InPetCombat())
      
       
    12. Kjin

      Kjin New Member

      Joined:
      Feb 13, 2013
      Messages:
      287
      Likes Received:
      1
      Trophy Points:
      0
      Thanks a lot for this plugin!

      I just have a question: Why do you make it post in /Party chat? Could you make an option to turn it off without having to edit the .cs?
      Simply because it'd make updating the plugin easier.

      Also are you planning on using a SVN for the plugin?

      Regards
       
    13. cordes96

      cordes96 Member

      Joined:
      May 7, 2012
      Messages:
      183
      Likes Received:
      1
      Trophy Points:
      18
      Amazing while Farming. I love the way it tells you what time it'll start again and how much time. If there was a GUI it be even better. but im happy with what i got
       
    14. Thomas_7

      Thomas_7 New Member

      Joined:
      Aug 1, 2013
      Messages:
      28
      Likes Received:
      1
      Trophy Points:
      0
      Seems handy, but reporting in party chat doesnt seem like a good idea. If Blizz for any reason will check your account (or get a red flag while filtering for keywords like BreakTaker), its automatic ban. Why not report in HB mod itself, like LogMeOut, PPP and others are doing?

      If I just edit out chat line like you suggested, it will mean I'm flying blind (no idea when/how long, etc).
       
    15. Ramakandra

      Ramakandra New Member

      Joined:
      Oct 18, 2012
      Messages:
      49
      Likes Received:
      1
      Trophy Points:
      0
      It doesnt say "hey im using a bot, ban me!", it just says the number of minutes it will break for, ie 7.1, etc..
      The reason is because i have other plugins that read this number and wait for this amount of time before continuing, in this case it wouldnt work to run the plugin on all the bots since they would have to sync some other way.
      Anyway thats why i mention how to get rid of that feature, just comment the line and done.
       
    16. Jandurson

      Jandurson New Member

      Joined:
      Dec 9, 2011
      Messages:
      162
      Likes Received:
      0
      Trophy Points:
      0
      Any reason this wouldn't show up in the plugin list? I have it in Plugins\BreakTaker\BreakTaker.cs
       
    17. Ramakandra

      Ramakandra New Member

      Joined:
      Oct 18, 2012
      Messages:
      49
      Likes Received:
      1
      Trophy Points:
      0
      No, its working with the latest version. Try recompiling the plugins with the menu Plugins->Recompile all
      Otherwise check for errors on the log.
       
    18. escequi

      escequi New Member

      Joined:
      Nov 25, 2011
      Messages:
      143
      Likes Received:
      0
      Trophy Points:
      0
      Compiler Error: c:\Users\Victor\Desktop\DLs\Hacks\WoW\HB\Plugins\BreakTaker\BreakTaker.cs(161,1) : error CS1059: The operand of an increment or decrement operator must be a variable, property or indexer
      Compiler Error: c:\Users\Victor\Desktop\DLs\Hacks\WoW\HB\Plugins\BreakTaker\BreakTaker.cs(161,1) : error CS0023: Operator '--' cannot be applied to operand of type 'void'

      Okay so i got that error because i've commented the line to send msg for party with "--", after commenting with // its working fine now! Thx for the plugin
       
    19. Ramakandra

      Ramakandra New Member

      Joined:
      Oct 18, 2012
      Messages:
      49
      Likes Received:
      1
      Trophy Points:
      0
      Yea it was my mistake, -- are used on LUA to comment not C#.
       
    20. symen

      symen New Member

      Joined:
      Nov 21, 2012
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      0
      would be great if you can make it posible that it fight back if the toon gets attacked and it wont take a break if we are already in combat ;)
       

    Share This Page