CheckPettyCashTarget()
From ElectronicWar
| Function information for checkPettyCashTarget() | |
| Function | checkPettyCashTarget() |
| Parameters | None |
| API | Banking/Attack |
| Cost | $1500/$750 |
| Level | 25/60 |
| CPU Usage | 5/8 |
| Description | returns a float value specified at runtime. This value can be used to decide, amongst other things, whether or not we should empty the opponent's petty cash. |
[edit] Malicious Banking Example
float amount = checkPettyCash(); float victimamount = getAmount(); if(amount > checkPettyCashTarget()){ lowerDeposit(getMaliciousIP(),victimamount); }else{ lowerDeposit(getSourceIP(),victimamount); }
If the amount of money the victim is about to deposit is greater than the Petty Cash Target you set when you attacked them, their money will be deposited to the malicious IP you set. If it is less than the petty cash target, they will receive the money as normal.
[edit] Attack Example
if(checkPettyCash() > checkPettyCashTarget()){ emptyPettyCash(); }else{ installScript(); }
If this was in the finalize event of an attack script it would only empty their petty cash if they had more petty cash than you set as the 'Petty Cash Target'. If they do not, it will install a malicious banking script instead.

