You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ive been having trouble killing a script that has workForFaction(faction, "hacking"); in a function.
I was still trying to debug parts of my script but was having trouble because I could not kill it in a timely manner
Every time i kill it will start the faction work again multiple times then take 15+ minutes to die
The full scrip is below.
function work(faction){
while (getFactionRep(faction) < rep) {
if(nonhacking.indexOf(faction)==-1){
workForFaction(faction, "hacking");
} else {
workForFaction(faction,"fieldwork");
}
sleep(sleeptime);
}
}
function workjob(company){
applyToCompany(company,"software");
while (getCompanyRep(company) < corprep) {
workForCompany();
sleep(sleeptime);
}```
}
//list of all corp
corps = ["MegaCorp", "Blade Industries", "Four Sigma", "KuaiGong International", "NWO", "OmniTek Incorporated", "ECorp", "Bachman &", "Associates", "Clarke Incorporated", "Fulcrum Technolgies"];
//list of all factions
knownfactions = ["Sector-12", "Aevum", "Tian Di Hui", "Chongqing", "New tokyo", "Ishima", "Volhaven ", "CSEC", "NiteSec ", "The Black Hand", "BitRunners", "Fulcrum Secret Technologies", "Bachman & Associates", "Megacorp", "KuaiGong International", "Clarke Incorporated", "Blade Industries", "Four Sigma", "ECorp", "OmniTek Incorporated ", "Netburners", "Slum Snakes", "Daedalus", "Tetrads", "Illuminati", "The Covenant", "NWO"];
//list of faction that you cant do hacking missions for.
nonhacking = ["Slum Snakes", "Tetrads" ];
// creating the a list of faction your already in
currentfactions =[];
deletefactions= [];
// other preset veriables
rep = 5000;
maxcorprep = 250000;
corprep = 10000;
corpindex = 0;
sleeptime =240000;
//starting the loop
while (true){
// check faction invites and accept them then remove them from the knowfacttions list
invites = checkFactionInvitations();
if (invites.length > 0 ){
for (i=0; i<invites.length;i++){
joinFaction(invites[i]);
currentfactions.push(invites[i]);
index = knownfactions.indexOf(invites[i]);
if (index > -1){
knownfactions.splice(index, 1);
}
}
}
// check and see if your are already in a faction and add it to the working list
i=0;
for(i=0;i<knownfactions.length;i++){
if (getFactionRep(knownfactions[i]) > 0){
//tprint("adding to list "+ knownfactions[i]);
currentfactions.push(knownfactions[i]);
deletefactions.push(knownfactions[i]);
}
}
for (i=0;i<deletefactions.length; i++ ){
index = knownfactions.indexOf(deletefactions[i]);
if (index > -1){
knownfactions.splice(index, 1);
}
}
deletefactions = [];
//Check if your in a faction to get rep from
if(currentfactions.length>0){
// work for faction
for (i=0;i<currentfactions.length;i++){
work(currentfactions[i]);
}
rep += 10000;
}
//work job
if (corpindex < corps.length){
workjob(corps[corpindex]);
corprep += 10000;
// switching to a new corp if your rep is above 250000 or the set maxcorprep
if (getCompanyRep(corps[corpindex]) > maxcorprep ){
corpindex++;
corprep = 10000;
}
}
//if(getStatLevel('Cha')<1000){
travelToCity('Volhaven');
universityCourse('ZB Institute of Technology','Leadership');
sleep(sleeptime*2);
//}
}
The text was updated successfully, but these errors were encountered:
Ive been having trouble killing a script that has
workForFaction(faction, "hacking");
in a function.I was still trying to debug parts of my script but was having trouble because I could not kill it in a timely manner
Every time i kill it will start the faction work again multiple times then take 15+ minutes to die
The full scrip is below.
The text was updated successfully, but these errors were encountered: