Fixed various bugs in v0.35.0 with prestiging

This commit is contained in:
danielyxie
2018-03-03 17:55:58 -06:00
parent bf90b85ae0
commit f8c987a2c0
16 changed files with 815 additions and 619 deletions
@@ -139,19 +139,49 @@ getStats
Returns an object with the Player's stats. The object has the following properties::
Player.hacking
Player.strength
Player.defense
Player.dexterity
Player.agility
Player.charisma
Player.intelligence
{
hacking
strength
defense
dexterity
agility
charisma
intelligence
}
Example::
res = getStats();
print('My charisma level is: ' + res.charisma);
getCharacterInformation
-----------------------
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function.
Returns an object with various information about your character. The object has the following properties::
{
bitnode: Current BitNode number
company: Name of company
jobTitle: Name of job
city: Name of city you are currently in
factions: Array of factions you are currently a member of
tor: Boolean indicating whether or not you have a tor router
//The following apply to when the character is performing
//some type of working action, such as working for a company/faction
timeWorked: Timed worked in ms
workHackExpGain: Hacking experience earned so far from work
workStrExpGain: Str experience earned so far from work
workDefExpGain: Def experience earned so far from work
workDexExpGain: Dex experience earned so far from work
workAgiExpGain: Agi experience earned so far from work
workChaExpGain: Cha experience earned so far from work
workRepGain: Reputation earned so far from work, if applicable
workMoneyGain: Money earned so far from work, if applicable
}
isBusy
------
@@ -270,6 +300,18 @@ getCompanyRep
This function will return the amount of reputation you have at the specified company.
If the company passed in as an argument is invalid, -1 will be returned.
getCompanyFavor
---------------
.. js:function:: getCompanyFavor(companyName)
:param string companyName: Name of the company. CASE-SENSITIVE
If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.
This function will return the amount of favor you have at the specified company.
If the company passed in as an argument is invalid, -1 will be returned.
checkFactionInvitations
-----------------------
@@ -334,6 +376,17 @@ getFactionRep
This function returns the amount of reputation you have for the specified faction.
getFactionFavor
---------------
.. js:function:: getFactionFavor(factionName)
:param string factionName: Name of faction. CASE-SENSITIVE
If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.
This function returns the amount of favor you have for the specified faction.
createProgram
-------------
+6 -2
View File
@@ -156,10 +156,14 @@
<li><a href="netscriptsingularityfunctions.html#getAugmentationsFromFaction">getAugmentationsFromFaction() (built-in function)</a>
</li>
<li><a href="netscriptadvancedfunctions.html#getBitNodeMultipliers">getBitNodeMultipliers() (built-in function)</a>
</li>
<li><a href="netscriptsingularityfunctions.html#getCompanyFavor">getCompanyFavor() (built-in function)</a>
</li>
<li><a href="netscriptsingularityfunctions.html#getCompanyRep">getCompanyRep() (built-in function)</a>
</li>
<li><a href="netscriptsingularityfunctions.html#getCrimeChance">getCrimeChance() (built-in function)</a>
</li>
<li><a href="netscriptsingularityfunctions.html#getFactionFavor">getFactionFavor() (built-in function)</a>
</li>
<li><a href="netscriptsingularityfunctions.html#getFactionRep">getFactionRep() (built-in function)</a>
</li>
@@ -182,11 +186,11 @@
<li><a href="netscriptfunctions.html#getScriptExpGain">getScriptExpGain() (built-in function)</a>
</li>
<li><a href="netscriptfunctions.html#getScriptIncome">getScriptIncome() (built-in function)</a>
</li>
<li><a href="netscriptfunctions.html#getScriptRam">getScriptRam() (built-in function)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="netscriptfunctions.html#getScriptRam">getScriptRam() (built-in function)</a>
</li>
<li><a href="netscriptfunctions.html#getServerBaseSecurityLevel">getServerBaseSecurityLevel() (built-in function)</a>
</li>
<li><a href="netscriptfunctions.html#getServerGrowth">getServerGrowth() (built-in function)</a>
+3
View File
@@ -174,6 +174,7 @@ secrets that you've been searching for.</p>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#purchasetor">purchaseTor</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#purchaseprogram">purchaseProgram</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#getstats">getStats</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#getcharacterinformation">getCharacterInformation</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#isbusy">isBusy</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#stopaction">stopAction</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#upgradehomeram">upgradeHomeRam</a></li>
@@ -181,10 +182,12 @@ secrets that you've been searching for.</p>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#workforcompany">workForCompany</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#applytocompany">applyToCompany</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#getcompanyrep">getCompanyRep</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#getcompanyfavor">getCompanyFavor</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#checkfactioninvitations">checkFactionInvitations</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#joinfaction">joinFaction</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#workforfaction">workForFaction</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#getfactionrep">getFactionRep</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#getfactionfavor">getFactionFavor</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#createprogram">createProgram</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#commitcrime">commitCrime</a></li>
<li class="toctree-l3"><a class="reference internal" href="netscriptsingularityfunctions.html#getcrimechance">getCrimeChance</a></li>
+3
View File
@@ -175,6 +175,7 @@ to reach out to the developer!</p>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#purchasetor">purchaseTor</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#purchaseprogram">purchaseProgram</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#getstats">getStats</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#getcharacterinformation">getCharacterInformation</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#isbusy">isBusy</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#stopaction">stopAction</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#upgradehomeram">upgradeHomeRam</a></li>
@@ -182,10 +183,12 @@ to reach out to the developer!</p>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#workforcompany">workForCompany</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#applytocompany">applyToCompany</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#getcompanyrep">getCompanyRep</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#getcompanyfavor">getCompanyFavor</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#checkfactioninvitations">checkFactionInvitations</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#joinfaction">joinFaction</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#workforfaction">workForFaction</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#getfactionrep">getFactionRep</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#getfactionfavor">getFactionFavor</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#createprogram">createProgram</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#commitcrime">commitCrime</a></li>
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html#getcrimechance">getCrimeChance</a></li>
+84 -7
View File
@@ -223,13 +223,15 @@ Terminal <em>buy</em> command.</p>
<code class="descname">getStats</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#getStats" title="Permalink to this definition"></a></dt>
<dd><p>If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function.</p>
<p>Returns an object with the Player's stats. The object has the following properties:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Player</span><span class="o">.</span><span class="n">hacking</span>
<span class="n">Player</span><span class="o">.</span><span class="n">strength</span>
<span class="n">Player</span><span class="o">.</span><span class="n">defense</span>
<span class="n">Player</span><span class="o">.</span><span class="n">dexterity</span>
<span class="n">Player</span><span class="o">.</span><span class="n">agility</span>
<span class="n">Player</span><span class="o">.</span><span class="n">charisma</span>
<span class="n">Player</span><span class="o">.</span><span class="n">intelligence</span>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="n">hacking</span>
<span class="n">strength</span>
<span class="n">defense</span>
<span class="n">dexterity</span>
<span class="n">agility</span>
<span class="n">charisma</span>
<span class="n">intelligence</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Example:</p>
@@ -239,6 +241,35 @@ Terminal <em>buy</em> command.</p>
</div>
</dd></dl>
</div>
<div class="section" id="getcharacterinformation">
<h2>getCharacterInformation<a class="headerlink" href="#getcharacterinformation" title="Permalink to this headline"></a></h2>
<blockquote>
<div><p>If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function.</p>
<p>Returns an object with various information about your character. The object has the following properties:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="n">bitnode</span><span class="p">:</span> <span class="n">Current</span> <span class="n">BitNode</span> <span class="n">number</span>
<span class="n">company</span><span class="p">:</span> <span class="n">Name</span> <span class="n">of</span> <span class="n">company</span>
<span class="n">jobTitle</span><span class="p">:</span> <span class="n">Name</span> <span class="n">of</span> <span class="n">job</span>
<span class="n">city</span><span class="p">:</span> <span class="n">Name</span> <span class="n">of</span> <span class="n">city</span> <span class="n">you</span> <span class="n">are</span> <span class="n">currently</span> <span class="ow">in</span>
<span class="n">factions</span><span class="p">:</span> <span class="n">Array</span> <span class="n">of</span> <span class="n">factions</span> <span class="n">you</span> <span class="n">are</span> <span class="n">currently</span> <span class="n">a</span> <span class="n">member</span> <span class="n">of</span>
<span class="n">tor</span><span class="p">:</span> <span class="n">Boolean</span> <span class="n">indicating</span> <span class="n">whether</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">you</span> <span class="n">have</span> <span class="n">a</span> <span class="n">tor</span> <span class="n">router</span>
<span class="o">//</span><span class="n">The</span> <span class="n">following</span> <span class="n">apply</span> <span class="n">to</span> <span class="n">when</span> <span class="n">the</span> <span class="n">character</span> <span class="ow">is</span> <span class="n">performing</span>
<span class="o">//</span><span class="n">some</span> <span class="nb">type</span> <span class="n">of</span> <span class="n">working</span> <span class="n">action</span><span class="p">,</span> <span class="n">such</span> <span class="k">as</span> <span class="n">working</span> <span class="k">for</span> <span class="n">a</span> <span class="n">company</span><span class="o">/</span><span class="n">faction</span>
<span class="n">timeWorked</span><span class="p">:</span> <span class="n">Timed</span> <span class="n">worked</span> <span class="ow">in</span> <span class="n">ms</span>
<span class="n">workHackExpGain</span><span class="p">:</span> <span class="n">Hacking</span> <span class="n">experience</span> <span class="n">earned</span> <span class="n">so</span> <span class="n">far</span> <span class="kn">from</span> <span class="nn">work</span>
<span class="n">workStrExpGain</span><span class="p">:</span> <span class="n">Str</span> <span class="n">experience</span> <span class="n">earned</span> <span class="n">so</span> <span class="n">far</span> <span class="kn">from</span> <span class="nn">work</span>
<span class="n">workDefExpGain</span><span class="p">:</span> <span class="n">Def</span> <span class="n">experience</span> <span class="n">earned</span> <span class="n">so</span> <span class="n">far</span> <span class="kn">from</span> <span class="nn">work</span>
<span class="n">workDexExpGain</span><span class="p">:</span> <span class="n">Dex</span> <span class="n">experience</span> <span class="n">earned</span> <span class="n">so</span> <span class="n">far</span> <span class="kn">from</span> <span class="nn">work</span>
<span class="n">workAgiExpGain</span><span class="p">:</span> <span class="n">Agi</span> <span class="n">experience</span> <span class="n">earned</span> <span class="n">so</span> <span class="n">far</span> <span class="kn">from</span> <span class="nn">work</span>
<span class="n">workChaExpGain</span><span class="p">:</span> <span class="n">Cha</span> <span class="n">experience</span> <span class="n">earned</span> <span class="n">so</span> <span class="n">far</span> <span class="kn">from</span> <span class="nn">work</span>
<span class="n">workRepGain</span><span class="p">:</span> <span class="n">Reputation</span> <span class="n">earned</span> <span class="n">so</span> <span class="n">far</span> <span class="kn">from</span> <span class="nn">work</span><span class="p">,</span> <span class="k">if</span> <span class="n">applicable</span>
<span class="n">workMoneyGain</span><span class="p">:</span> <span class="n">Money</span> <span class="n">earned</span> <span class="n">so</span> <span class="n">far</span> <span class="kn">from</span> <span class="nn">work</span><span class="p">,</span> <span class="k">if</span> <span class="n">applicable</span>
<span class="p">}</span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="isbusy">
<h2>isBusy<a class="headerlink" href="#isbusy" title="Permalink to this headline"></a></h2>
@@ -379,6 +410,28 @@ if you are trying to use this function to apply for a promotion and you don't ge
If the company passed in as an argument is invalid, -1 will be returned.</p>
</dd></dl>
</div>
<div class="section" id="getcompanyfavor">
<h2>getCompanyFavor<a class="headerlink" href="#getcompanyfavor" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="getCompanyFavor">
<code class="descname">getCompanyFavor</code><span class="sig-paren">(</span><em>companyName</em><span class="sig-paren">)</span><a class="headerlink" href="#getCompanyFavor" title="Permalink to this definition"></a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Arguments:</th><td class="field-body"><ul class="first last simple">
<li><strong>companyName</strong> (<em>string</em>) -- Name of the company. CASE-SENSITIVE</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.</p>
<p>This function will return the amount of favor you have at the specified company.
If the company passed in as an argument is invalid, -1 will be returned.</p>
</dd></dl>
</div>
<div class="section" id="checkfactioninvitations">
<h2>checkFactionInvitations<a class="headerlink" href="#checkfactioninvitations" title="Permalink to this headline"></a></h2>
@@ -473,6 +526,27 @@ reputation. One small hack to get around this is to continuously restart the act
<p>This function returns the amount of reputation you have for the specified faction.</p>
</dd></dl>
</div>
<div class="section" id="getfactionfavor">
<h2>getFactionFavor<a class="headerlink" href="#getfactionfavor" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="getFactionFavor">
<code class="descname">getFactionFavor</code><span class="sig-paren">(</span><em>factionName</em><span class="sig-paren">)</span><a class="headerlink" href="#getFactionFavor" title="Permalink to this definition"></a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Arguments:</th><td class="field-body"><ul class="first last simple">
<li><strong>factionName</strong> (<em>string</em>) -- Name of faction. CASE-SENSITIVE</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.</p>
<p>This function returns the amount of favor you have for the specified faction.</p>
</dd></dl>
</div>
<div class="section" id="createprogram">
<h2>createProgram<a class="headerlink" href="#createprogram" title="Permalink to this headline"></a></h2>
@@ -678,6 +752,7 @@ This script will be run with no arguments and 1 thread. It must be located on yo
<li class="toctree-l3"><a class="reference internal" href="#purchasetor">purchaseTor</a></li>
<li class="toctree-l3"><a class="reference internal" href="#purchaseprogram">purchaseProgram</a></li>
<li class="toctree-l3"><a class="reference internal" href="#getstats">getStats</a></li>
<li class="toctree-l3"><a class="reference internal" href="#getcharacterinformation">getCharacterInformation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#isbusy">isBusy</a></li>
<li class="toctree-l3"><a class="reference internal" href="#stopaction">stopAction</a></li>
<li class="toctree-l3"><a class="reference internal" href="#upgradehomeram">upgradeHomeRam</a></li>
@@ -685,10 +760,12 @@ This script will be run with no arguments and 1 thread. It must be located on yo
<li class="toctree-l3"><a class="reference internal" href="#workforcompany">workForCompany</a></li>
<li class="toctree-l3"><a class="reference internal" href="#applytocompany">applyToCompany</a></li>
<li class="toctree-l3"><a class="reference internal" href="#getcompanyrep">getCompanyRep</a></li>
<li class="toctree-l3"><a class="reference internal" href="#getcompanyfavor">getCompanyFavor</a></li>
<li class="toctree-l3"><a class="reference internal" href="#checkfactioninvitations">checkFactionInvitations</a></li>
<li class="toctree-l3"><a class="reference internal" href="#joinfaction">joinFaction</a></li>
<li class="toctree-l3"><a class="reference internal" href="#workforfaction">workForFaction</a></li>
<li class="toctree-l3"><a class="reference internal" href="#getfactionrep">getFactionRep</a></li>
<li class="toctree-l3"><a class="reference internal" href="#getfactionfavor">getFactionFavor</a></li>
<li class="toctree-l3"><a class="reference internal" href="#createprogram">createProgram</a></li>
<li class="toctree-l3"><a class="reference internal" href="#commitcrime">commitCrime</a></li>
<li class="toctree-l3"><a class="reference internal" href="#getcrimechance">getCrimeChance</a></li>
BIN
View File
Binary file not shown.
+1 -1
View File
File diff suppressed because one or more lines are too long