Redirecting

From Hack Wars Wiki

Jump to: navigation, search

Contents

Introduction

Redirecting is a skill in Hack Wars that allows you to get materials for use with the Repair skill. For this you need several things, a port running a Redirect script, and an IP address and a port of that IP address that is also running a Redirect. Then, you simply use the Redirect Tool (Applications -> Hacking Tools -> Redirect Port) and type in the IP and port of the computer to redirect.

Gaining Experience

Each time you redirect one of the items you are trying to redirect, you will get exp based on the rarity of the item.

Exp gained for the redirection of one unit
Commodity Exp
Duct Tape 20
Germanium 40
Silicon 100
YBCO 400
Plutonium  ?

Similarities to attacking

  • You do damage to a port
  • You can overheat while redirecting
  • You can take damage back from firewalls
  • You can attack multiple redirect ports using more than one redirect port at the same time

Differences to attacking

  • You don't need to finish the redirect to get commodities. You get them while you are redirecting
  • You get experience per redirected commodity.
  • You do not get any attack experience
  • Unfortunately no attack API function is part of the redirect API. (it is planned to add many attack functions to the redirect API)
    • You cannot zombiefy redirect ports
    • You cannot use berserk

Anatomy of a Redirect Script

Redirect scripts, like attack scripts, have three main parts:

Initialize

This section is where you can perform checks before you start (such as checking for a specific IP etc.) and it is where you have to put in what type of item you want to redirect.

Example to redirect Duct Tape:

int main() {
   redirectDuctTape();
}


Continue

This section is where you put checks that should run every time the script "hits" the enemy port. For example, you could check to see how much HP your port has and cancel the attack if you take too much damage.

int main() {
}


Finalize

This section is where you put things that should be run after the script is done. For redirect scripts you usually don't put anything here, although you could make a malicious script that sends the IP of the attacker and defender to your IP if you sold the script.

int main() {
}
Personal tools