1
u/xhowlinx Feb 06 '22
imho, the use of creating a variable if you are only referencing it once is not needed.
the line:
while (getServerSecurityLevel('joesguns') >5) weaken('joesguns');
would suffice with less characters.
-2
u/Ian_Mantell Feb 05 '22
Get rid of directly naming a target,
use getHostname()
example weaken.script:
while(true) {
weaken(getHostname());
}1
u/ndmcspadden Feb 05 '22
getHostname returns the server the script is currently running on.
0
u/Ian_Mantell Feb 06 '22 edited Feb 09 '22
yes because this script can and should be executed on the target serveredit: depends heavily on the game stage you're in. In the beginning it makes sense because your own system can only run some scripts itself. It is wise to look into multithreading and NS2.
and you have the damn nerve to downvote because you're not getting the idea of distributing CPU load to remote systems to hack themselves? Or even cross-hack to confuse potential prosecutors. ( edit: that's a shadowrunner approach to the game, you don't have to follow me there)
edit: deleted whining, makes no sense, just like the stubborness I run into, here.
1
u/AaTube Feb 07 '22
That just loses a lot of the intended verbosity of the script. Say, for example, that you are using extra processing power from another server to weaken the target server.
And this is a game. To my extent of knowledge, there's no such thing as being prosecuted in the current version.
Pigs are very intelligent animals. Since they have no sweat, they will wallow in mud to stay cool and immediately clean themselves using trees, or if they can, simply not deal with mud and take a swim in a pool. Pigs exhibit amazing levels of cognition and have even been trained to play video games using a joystick. Pigs learn very fast, and are even smarter than some humans.
0
u/Ian_Mantell Feb 07 '22
It is even euncouraged in the game's documentation to use target servers to run scripts on them for they have RAM.
I did write a routine to get the possible thread amount with the available RAM of any target in respect to the payload RAM usage, the script hacks the ports,
nukes the target, copies the attack script and runs it as often as forementioned code allows it to fit into memory. It multiplies the XP for each run of the weaken grow and hack methods.Of course there is the 2nd version of that script that runs elsewhere and targets another host but it is the rare bird, it only runs on my bought servers and home.
When you're done whiteknighting for ndmcspadden, mabye you can start to realize that it might be possible I am on to something. " It's a game" - yes but you took the time to read and answer this thread, so stop fooling around. I don't.
Pigs will still eat pigs. Smarter than some humans, can be. Prove it.
I personally would go for dolphins though, proper sex addicts, adorable.
2
u/ShadowBalling Feb 08 '22
You're assuming that all servers are equally good to hack, which isn't actually the case in this game.
Each server has its own hack difficulty and growth multipliers, meaning that some servers are inherently more profitable to hack than others. You will get more money for your ram if you hack the most profitable servers instead of having every server hack itself.
All you need to do is calculate which server would be best to hack. There are a few examples on the sub that you can look at for inspiration, just search for "find optimal server script" or something.
1
u/Ian_Mantell Feb 09 '22
Howdy Mr. Shadow.
Have to stop you right in your track, there. I do know what I am doing, I am also aware of the sloppiness involved in my approach vector and why it is okay.
I do not worry about the srvr difficulty because that's what the preliminary weaken attacks are for. It takes a while to get faster, so what? Even when the first wave of four hundred threaded weaken() calls hits after 24 minutes - it gets easier pretty fast. Cashwise you're right - but that's not my concern. Every server tasty 'nuff gets special attention with around 408 threads on a 1TB RAM server I specifically buy only for that juicy target (the selection gets thin >300 hacking so I probe the new members personally) - at the moment (everything above sec.lvl 20 is good, though, because the script just gnaws it down to let it come up on its feet again.) Anyway.
I never assume. I always want something. I am batshit lazy. So I make some paths to it and try it out.
For the effing record, I am at 22B cash*, and hacking servers from that point on is done for raising the hack skill which is a pain in the ass done differently (in the real world at edu/workplaces for example).
And in general... for heavens sake folks give me a break here, can you lot at any point in time stop assuming everybody is unknowing? You could just have _asked_ if I have checked for "optimal approach" to hackability for profit... -sigh-
Previously on Bitburner.
*after expenses - I bought the access to the stock APIs yesterday so I'm onto my autobroker.js and yes, the 22B were done with manual share bids and 21 maxed out hacknet nodes for basic supply.
Are we on the same basic understanding where I am in this game and how horribly anti-OCD i work it, now?
No: for me okay, but be assured, I wanted to be helpful. I just stumble over the realization that almost noone accepts any and seemingly lack the understanding to do something useful with the hinted ideas behind it. Social ranking brain stems running on overheat write here, obviously. Don't forget to downvote my thread.
Yes: good. Make a peace offering, upvote me.Sincerely,
Ian Mantell, a simple guy who loves cookies. And spoiler sections.1
u/_limitless_ Feb 09 '22 edited Feb 09 '22
Have to stop you right in your track, there. I do know what I am doing, I am also aware of the sloppiness involved in my approach vector and why it is okay.
Little did he know, he has no fuckin' clue what he's doing.
Seriously, go to your Stats page and tell us how long you've been playing. What's the most advanced faction you've unlocked?
1
u/Ian_Mantell Feb 09 '22
Dear _limitless_
So three different people now: you're ignoring the topic, you just go personal as your first line of discussion technique. No greetings, of course, do you need to let off steam? Take it where it belongs, to your teachers, bosses or parents. I haven't any intention to accept your emotional dramas.
So, what happened in my game so far? Spoiler format, because someone might want to enjoy the game without reading things that come up later.
I joined NiteSec, if you're about that? Who cares. I don't. Anyways. because I was in their city I also got invited by those Aevum folks, afterwards. Before that came Csec and niteburners etc.
As of now my bitburner runs 24/7 on one of my dev servers and I started some time last week at home on my PC. I exported and imported it in the meantime because I don't want to use my gaming rig's energy consumption while using bitburner and the dev system needs to run anyways. But that gets a bit offtopic. Now, to my favourite part. You.
All I wanted to hint to were some helpful computing power distribution techniques especially when earlier in the game.
Your demand just boils down to something like a length check. I'm not into your narcissistically infested comparison society. I'd rather state that I despise it, silently.
That written, IMO, you are in NO position to demand any explanations or a display of game states as you offered none, reads as : big mouth nothing behind it;
furthermore you are exactly in the same position as your predecessors - regard yourself as dismissed, like a 13 yo, which is the level of behavioral expertise shown here. But in respect of slow personal development I assume you're actually one of those annoying fratfolks, so this is for you:
Y'all, go to r/JordanPeterson and learn to bebetterpeople.
Somehwere in fiction there is a stonewall where a fictional character I respect shot the words: 'No more' into the surface of aforementioned wall.
If you felt misunderstood it might be because I do not speak or read your language properly, I never took courses in arrogance1
u/_limitless_ Feb 09 '22
Homie, anybody with two brain cells to rub together can get to NiteSec in a couple of hours. You started last week? Bruh.
→ More replies (0)1
u/ShadowBalling Feb 09 '22 edited Feb 09 '22
I wanted to be helpful. I just stumble over the realization that almost noone accepts any and seemingly lack the understanding to do something useful with the hinted ideas behind it.
Well yeah, I'm also saying this because I want to be helpful.
"Use the ram in your target servers to run scripts" is good advice, and the next logical step is to use that ram to hack good servers, rather than just making them hack themselves.
I do not worry about the srvr difficulty because that's what the preliminary weaken attacks are for.
The issue is that you cannot weaken a server past its minimum security, and some servers have very high minimum security and not enough maximum money to offset the time loss. Even if you fully weaken a "bad" server before you start hacking, you're going to get less money than if you were targeting a server with a better ratio. An example from my game right now is neo-net, which my findBestServer.js script calculated to be less than half as profitable as joesguns, despite having twice as much money.
Like, I'm not saying it's wrong to have simple or lazy scripts or whatever, I'm just saying that you might as well have your target be an argument rather than just ns.getHostname, because it takes zero effort and it allows you to target servers that you know are good.
11
u/amroamroamro Feb 05 '22 edited Feb 05 '22
the value stored in
avariable doesn't get updated after the first line, you should callgetServerSecutiryLevelagain inside the loopalso
while(..);loose the semicolon at the endalso server name is expected to be a string, quoted inside
"you can do something like this instead:
You might like reading about loops and iterations in javascript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration