getTargetCPUCost()

From Hack Wars Wiki

Jump to: navigation, search


Function information for getTargetCPUCost()
Function getTargetCPUCost()
API Attacking
Cost $10,000
Level 85
CPU Usage 15
Description Returns a float representing the CPU cost of the port being targeted with an attack.


Example

getTargetCPUCost() could be used to switch your attack to another of the target's ports once their port's CPU cost reaches a certain level.

if(getTargetCPUCost()<=4.0){
   switchAttack();
}

This would switch the attack to another one of their ports if the target's port CPU cost is equal or less than 4.

Personal tools