PClog
From Hack Wars Wiki
| Information for the PClog Script | |
| Script | PClog |
| API | Attack |
| Cost | $1,020 |
| Level | 60 Attack |
| CPU Usage | 20 |
| Description | This script will log all noticed petty cash values on the NPC you are attacking.
Every time a NPC heals it's petty cash is randomly reassigned a new value. This script logs all these values while making sure not to write twice the same value in the pclog.txt file. The purpose of this script is to gather petty cash values on NPCs in order to make statistics: find the average value and the range of petty cash values. This script does not discriminate between NPCs, if you attack different NPCs and write those values in the same file the data will be useless. Make sure to empty the file or rename the old one before switching NPC when you are gathering data. |
| Output | N/A |
Finalize:
int main(){ int p=getTargetPort(); if(p==1){emptyPettyCash();} else{showChoices();} } |
This part is not essential and can be changed to your liking. It empties the NPC's cash if you are attacking the bank port and shows choices otherwise.
Continue:
int main(){ string c=readLine("pclog.txt",countLines("pclog.txt")-1); float a=checkPettyCash(); if(c== + a + " "){} else{writeLine("pclog.txt", + a + " ");} } |
Make sure to create this pclog.txt file before running this script.
