GetTargetIP()
From ElectronicWar
| Function information for getTargetIP() | |
| Function | getTargetIP() |
| Parameters | None |
| API | Banking/Attack |
| Cost | $10 |
| Level | 5 |
| CPU Usage | 1 |
| Description | Returns an IP in the form of a string when called in a banking or attacking script. In a banking environment, the function will return the IP address of the computer to which money is being sent. In an attack environment, the function returns the IP address of the computer under attack. |
[edit] Banking Example
getTargetIP() is mainly used in banking scripts during transfers and is used as a parameter of the transfer function to find the proper destination for the money:
lowerTansfer(getTargetIP(), getAmount());
This would send the specified amount to the player at whom the script is targeted.
[edit] Attack Example
getTargetIP() can be used in attack scripts in order to keep the attacker informed of the status of their script:
message(getMaliciousIP(), "You are currently attacking: " + getTargetIP());
This would send a message to the attacker (getMaliciousIP()) informing him that he's attacking the target.

