Jump to content
Sign in to follow this  

[Guide] Personal Break Time Management

Recommended Posts

Hello MBR community!


V5.2 has expert feature to allow ONE single long personal break instead of letting bot manage Personal breaks

This guide was created to share what I learned writing/testing this code and possible settings to use:


Facts surrounding SC Personal Break 

Facts surrounding SC Personal Break (PB)


FACT: SC has designed PB that you can not avoid being offline for 15-18 minutes or more every 4 hours (if never get attacked and receive shield)!

- can not stop it, can not reduce time, absolutely no process where can not avoid placing your base in match making queue to provide other chance to attack you!


FACT: SC has added a 5 minute timer after you log out, before you base is available in match making search queue - UNLESS your 4 hour attack window is over.

- This "nice" feature allows users to have network OOS issues, or take a biological break; and not get attacked if you log back in before 5 minutes - UNLESS is time for PB.  If log out of CoC 1-4 minute before start of PB, then time required offline needs to be increased due grace time. But grace time is not consistently applied.


FACT: Internet communications is NOT perfect.  It is not an instantaneous 2-way pipeline of data transfer, and computers are each junction in pipe may not respond quickly.  Data packets can even get out of sequence.  Most users have asymmetrical data rates (sending is slower than receiving data)

- Communication randomness creates chaos when trying to use time based events with client (Android OS) and server (SC game servers).  

- It can require many seconds (even minutes) for both of these get same data packets and be in sync.

- Attempting to control Client log off time for PB needs to make allowances for slowest internet operation or it fails for some users.  

- Bot code does not have access to actual client/server messages, so means we must estimate time for entire process [client log off msg - server receive/acknowledge log off msg -reset time- client log on msg - server receive/acknowledge msg - server verify PB time reset, send sync message - Client receive msg]. 



When we 1st got new PB process; thought might be better to take one long 15 min break, instead of dealing with annoying (3) 6 minute (18 minute total) forced breaks.  


What I learned testing code is that SC has designed PB timing so both options are almost equal;

- need to add 1.5 minutes for worst case WWW communication delays. 

- need to add more offline time when remaining time till forced PB is less than 5 minutes due grace timer count down.

So when I try to use SC PB timer (PB info window) and log off before next forced PB,  both methods have about SAME OFFLINE TIME, ~18 minutes!


Does Single personal break even apply to me?

Read before posting!

Wait before you start typing a response... ;) 

:: Above time assumes that you are one of those that almost never gets a shield, such as;

- Maxed out TH10/11 in Bronze-Gold leagues (regardless of loot levels)

- TH7-9 in bronze/silver without enough loot worth stealing.


:: IF you are not one of above groups, then this entire topic is extremely silly for you! Why? ::

- TH7-9, or rushed TH10 in Gold2 or higher, will get attacked 3 out of 4 times they go offline! 

- Time to get attacked depends on loot levels and trophy level; but is usually below 15-18 minutes required to reset PB.

- Once you get attacked, get a shield; and PB is reset in less than 18 minutes! 



After wasting too much time investigating this topic, this Monkey figured out:

- Only way to get around stupid PB warning messages every 4 hours OR have less than 18 minute per break, is to take breaks more frequently than 4 hours!


What I found that seems to work most of time for bot:  16-18 minute break every 3:50 of attack time (or 10 minutes before SC scheduled PB time),  :) 


Additional details on why:

Additional details on why this works!


1) Can not wait past 3 hours 50 minutes;

- Code is NOT always watching PB clock time, is only checking status every 10-90 seconds during non-critical "idle" processes (donate, request, train, collect, between searches, etc)

- Not good idea to interrupt farming attack, never know when it happens, so must add 4 minutes for attack completion on top of partial grace time applied. 

- Need ~1 minute to prepare base for next attack before log off after an attack.

- Not easy to check PB time during BS restart process (up to 6 minutes before time out with Bot stop) 


2) Need 18 minutes worst case, 16 minutes best case, & not 15 minutes best case published by SC;

- Need to add up to 1 min for typical internet communication chaos to enable proper client/server log off, plus time for other conditions.


3) This does not work 100%.  Sometimes need more 15 minutes before PB (3:45) and/or rest time of 19-20 minutes, or I still find a few forced PB in logs.


4) SC has some bugs in forced PB timer.  They fixed one problem last update; even when offline several hours, could log in and be forced to take PB if you did not close client/server connection with normal "close app" protocol. But SC forums have posts with other complaints about PB not working as described.



Wait!  My experience is different! :)

Wait - My experience is different!

Probably can manage PB better - when HUMAN is playing game!


Expect some user will argue that my times here are not what they see:

- My number have been tested in real life CoC with MBR 24/7.   Data has been gathered from weeks of logs from 5 bases .

- Have written code to read shield status, and even log SC PB time in the PB information window with OCR to help validate what is possible for bot to manage.

- Requirement for 16-18 minute offline to reset PB timer is typical case.  Actual extra time needed above 15 minutes for majority of users is 50-100 seconds, or 15:50-16:40.  But for slow PC running on 4G wireless network (or a resource limited VM designed to simulate similar worst case), needed 3 minutes or more!

 - Grace timer is inconsistently enabled before forced PB.  During my logs:  Sometimes can log off 2-4 minutes before PB, stay off 16 minutes and PB reset (have zero grace time).  Another event will do same thing, log off 16 minutes, and does not reset PB time!  

- Found that PB reset with intentional log off by BOT is most reliable if:

: offline for 20+ minutes,

: when more than 5 minute before start of forced PB,

: AND when confirm close of CoC app by clicking "Okay" confirming exit. 


So now you have back ground on single event PB feature, should you use it?



1) Feature has potential to slightly increase total CoC online time, depending on risk desired for default of seeing normal 3 PB events?  [Assuming you never get shield]

When only looking at total online time, it is possible to gain ~7 or lose ~15 minutes of CoC time per day.

How about some math on this?


Is really hard to calculate farming time, but here are numbers to total online time:  

Forced PB subtracts 18min * 5.58/day (every 4 hours + 18 min, not 6 times a day!) = 100.46 min/day lost

Early PB log off has several possibilities:

Fast PC/Fast network = 16min * 5.854/day (every 3:50+16min) = 93.65 min/day 

Typical PC/network  = 18min * 5.80/day = 104.5 min/day

Slow PB/Slow network = 20min * 5.76/day = 115.20 min/day


But - Is total time online just waste of time discussing? ;)


2) Maybe we do not care about online time? What about attacks per hour? 

My findings suggest single break will reduce attacks per day by 2-5 attacks for anyone below TH10, unless your storage/league conditions are that NEVER get a shield when offline for normal 6 minute PB events and you can use min setting of short 15 minute PB reset time.


Considering bot only farms 2.5-4 times/hour, and rest of time is waiting for army (unless boosted barracks or TH snipe). 

- If you are TH8 with 200 space army, then 16-18 minute single offline event will add time between attacks, and reduce up to 5 attacks per day.  

- If TH10 with 240 space, using a single event is about same as troop training time.  Here depends on when log off happens if you are reducing number of attacks per day.


3) Is this feature Anti-ban? 

I do not know.  How do real humans behaved when forced into PB?


: Just keep mashing reload until back online?

: Stop playing for X time? 

: Randomly decide between repeated pressing reload and single break?

: Take a nap, ride a bicycle, or simply stop playing CoC all day? :)

One could debate repeatedly on what is normal for addicted CoC gamer regarding PB?


What Settings:

GUI settings are color coded with to help you know what settings:

work for majority of PC (green),

marginal - might not work with slow PC or network (yellow),

and settings that will not reset personal break (red). 

So you can use what ever you like. ;)


Thanks for reading all way down here on how one SILLY feature to combat SC STUPID PB became a university project.

Appreciate your thoughts, inputs, discussion! 


(Mean, rude, or other ridiculous posts will be deleted without notice).

Edited by monkeyhunter
release to public
  • Upvote 10

Share this post

Link to post
Share on other sites

Great topic man!! And as I can see from the date this topic has started until public released (22 days)

it is more than a university project as you said.

Share this post

Link to post
Share on other sites

I have read it all but I'm still kind of confused. Eventually I'll understand all of it on the 2nd go LOL.

thanks for this informative post about PBT, was looking for a something like this the other day but gave up eventually and I stumbled on this post when I was looking for a very different guide lol.

Share this post

Link to post
Share on other sites

Thanks for this, I was trying something like this, personally, i hate the, "you don't get attacked so we will not let you play" 3 times in less than one hour, even if botting, not to mention other issues i was getting because those stupid breaks.  But I was using an automouse clicker set up every 3:45 hour to pause bot and 18 minutes later to resume it lol, but since when memu restarts its window goes wherever it want but where it was before close, i cannot get really usefull data (this metod used to work great on BS).


One again thank you for code it.



Edited by JACS21

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...