Recommended:

  • phpclasses.org
  • jsclasses.org
  • jsmag.com
  • siteapps.com
  • View our reviews on Hot Scripts
  • JS Tutorial
  • scripts.com
  • securesignup.com




Recent Comments

Powered by Disqus




Back to articles

Hack terminals in Fallout 3

Code Breaker class helps you to hack terminals in Fallout 3, by suggesting which words better to choose.

Basically in Fallout 3 game, when hacking terminals, you need to guess the correct password. There are set of words given, and by selecting a word as input, you will receive the ammount of correct letters in the provided word as output.

Based on this clues, this class helps you guess the right password, usually in 3 tries.

Package contains codeBreaker.js, codeBreaker.packed.js (packed javascript) example file: example.html to demonstrate class functionality.

Contents

Download

Examples in action

Example scripts provided with package in action:

Method list

Constructor

Back to method list

Method namenew codeBreaker();
DescriptionCreate class instance

Add word

Back to method list

Method nameaddWord(word)
DescriptionAdd new words to set of possible words
Input parameters

string word - possible word

Example input
breaker.addWord("watermelon");

Add array of words

Back to method list

Method nameaddArrayWords(arr)
DescriptionAdd array of words to set of possible solutions
Input parameters

array arr - array of possible words

Example input
breaker.addArrayWords(["watermelon","waterlemon"]);

Add bulk text of words

Back to method list

Method nameaddBulkWords(value)
DescriptionAdd bulk text of words, (each word on new line, can be used with textarea value) to the set of possible solutions
Input parameters

atring value - text with each word on new line

Analyze words

Back to method list

Method nameanalyze()
DescriptionWhen all words added call this method to retrieve best guess option. This method returns object with two properties:
  • words - array of words left to guess from
  • bestIndex - index of the best guess from provided words array

Update word rule

Back to method list

Method nameupdateRule(word,value)
DescriptionAfter you analyzed and tried your guess, terminal provides value of correct letters in provided word. Simply pass the word you selected and the value of correct letters to this method, to retrieve next best guess. This method returns object with two properties:
  • words - array of words left to guess from
  • bestIndex - index of the best guess from provided words array

Latest changes

None for now

You may also be interested in:

Powered by BlogAlike.com

blog comments powered by Disqus