To help a player level up, and to make some cash, Hack Wars offers a series of programming challenges. These challenges have an API specifically designed to create and solve interesting (and sometimes difficult) challenges.
Challenge scripts are created in the Script Editor using functions from the Challenge API. Challenges are listed in the Help section under the System menu. This provides what input will be given for the challenge, what output is expected from the Challenge script, and the monetary and XP rewards, as well as the Challenge Number. You must have an active Banking port to receive money from a Challenge! To create a Challenge script, create a new script in the Script Editor. To run the challenge script, choose the Run Challenge Script option in the Script Editor and enter the Challenge ID (Challenge Code, as given in the Help file):
Reviewing the Programming section of the manual may help you to complete a Challenge script.
A player may complete each Challenge only once. A list of challenges you have completed is given in your profile.
The description of a Challenge dictates what input will be given and asks for a specific output. The goal of your Challenge script is to convert the given input to the expected output. The inputs can consist of strings, floats or integers, and the corresponding functions to get these are getInputString, getInputFloat and getInputInt. Use setOutputString, setOutputFloat, etc. to output the expected result.
Note: the getInput functions return the next element in an array each time they are called. Therefore they should generally be called only once, and the value should be stored as a variable.
For instance, here’s an example of how to complete the first Challenge:
setOutputString(getInputString());
Recent comments
55 sec ago
13 hours 41 min ago
16 hours 15 min ago
19 hours 22 min ago
20 hours 36 min ago
1 day 4 hours ago
4 days 5 hours ago
4 days 14 hours ago
4 days 14 hours ago
4 days 17 hours ago