![]() ![]() ![]() All this may be in the order of milliseconds or tens of milliseconds but in loop and over time these small amounts can accumulate into seconds of delays that, as experienced, throws off the timing of your scripts. Additionally you need to factor in the time of execution of your scripts. The more things that are going on in this game (and outside this game too - CPU load is a factor) the more likely timeouts will run later. In HTML5 setTimeout/setInterval are not guaranteed to run exactly on schedule. Originally posted by Veldrin:Most of the functions in this game that take time to execute (eg hack, grow, weaken, etc) behind the scenes just use a setTimeout to simulate that execution time. It's when your stacks finish out of order that the server gets drained or the security goes up. What works for me is to start one "stack" every second for the duration of a hack, then wait the duration of a weaken for everything to clear and start again. Here's the tricky part: as long as your stacks don't finish out of order, you can run many copies at once. If you can time the three parts well enough, your "stack" will start and finish with the target server in the same ideal conditions for hacking: full money and minimum security. ![]() ![]() Given that, we can group a weaken, a delayed grow, and a delayed hack such that the hack finishes first and takes half of the target money, the grow finishes after and fills the target money back to full, and the weaken finishes last and brings security back to minimum. Likewise, if you want to maximize the effect of your hacks and grows, you'll want hacks to finish at full target server money, and grow to finish at some amount less than that. If you want to minimize runtime, you'll want to start every weaken, grow, and hack at minimum security. The duration of your weakens, grows, and hacks are determined when you start them, and the effect is determined (and applied) when they finish. Getting your hack scripts really nailed down is worth it for later Bitnodes. Didn't understand so much when I read it but now I understand better having run into the problem myself. Someone else was saying in another thread about how he could start an attack sequence, but by the time it hits (first script ends in the sequence) you have to stop and wait for it all to complete before starting a new sequence of attack, to make sure things don't get thrown off. I'm sure you are probably generating more than enough money really, right? It does help to upgrade your home computer more quickly though. You could probably just say screw it and move on. It's getting so screwy with all this, so I get where you are coming from. I'm thinking now I need to detect when they are getting off and when they do, have the logger.ns send a message to my scheduler.ns to so a reset of things. I've set up a second script called logger.ns that my hack.ns, grow.ns and weaken.ns send a message to via ports when they complete so I can see exactly in what order they end. Above some amount, though, it all goes off the rails. My hacking isn't really leveling up anymore but the timings are getting thrown off anyway after a while, unless I really limit the number of threads. Ya, I'm kind of hitting the same problems as you it sounds like. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |