intValue()
From Hack Wars Wiki
| Information for free function intValue() | |
| Function | intValue(float value) |
| API | Attacking, Banking, FTP, Watch, HTTP, Challenges |
| Description | Returns an integer of the value given. |
It always rounds down.
Attack Script Example
int porthealth = intValue(getHP()); if(porthealth < 10){ cancelAttack(); } |
If this was placed in the continue event of an attack script it would cancel the attack if the port's HP ever fell below 10. intValue() will ensure that the port health is never a float value.
