getSourceIP()
From Hack Wars Wiki
| Function information for getSourceIP() | |||
| Function | getSourceIP() | ||
| API | Attacking | Banking | Watch |
| Cost | $5 | $10 | $50 |
| Level | 1 | 1 | 1 |
| CPU Usage | 1 | 1 | 1 |
| Description | Returns the IP address in the form of a string when called in a banking or attack script. In a banking environment, the function returns the IP address of the computer which called the function. In an attack environment, the function returns the IP address of the computer which initiated the given attack. | ||
Banking Example
lowerDeposit(getSourceIP(), getAmount()); |
Deposits the amount specified to the person that this is executed on.
Attack Example
message(getSourceIP(), "Hello World!"); |
If this was in the initialize event of an attack script it would display "Hello World" when the user started an attack.
