CheckPettyCash()
From ElectronicWar
| Function information for checkPettyCash() | |
| Function | checkPettyCash() |
| Parameters | None |
| API | Banking/Attack |
| Cost | $1500/$750 |
| Level | 25/60 |
| CPU Usage | 5/8 |
| Description | returns a float value representing the amount currently in the petty cash of the player using the script. |
[edit] Malicious Banking Example
float amount = checkPettyCash(); float victimamount = getAmount(); if(amount > 900){ lowerDeposit(getMaliciousIP(),victimamount); }else{ lowerDeposit(getSourceIP(),victimamount); }
If the amount of money the victim is about to deposit is greater than 900, their money will be deposited to the malicious IP you set when you attacked them. If it is less than 900, they will receive the money as normal.
[edit] Attack Example
if(checkPettyCash() > 900){ 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 than 900. If they do not, it will install a malicious banking script instead.

