Stop from Over-Heating
From Hack Wars Wiki
This script can be used as (part of) the Continue section of your attack script. It checks your computer to see if you're about to overheat, and if so, it will cancel the attack to prevent it. In addition it sends you a message telling you it cancelled the attack.
int main{ // sets percent to your current cpu load by dividing your cpuload by max cpu load. float percent =getCPULoad()/getMaximumCPULoad(); // says if percent is greater than or equal to 95% then it will cancel. // you can edit the number, but remember 1 = 100% 0.50 = 50% etc. if(percent >= 0.95){ cancelAttack(); // cancels the attack // Sends you a message telling you it cancelled the attack. message(getSourceIP(),"Cancelling attack because you are about to over-heat."); } // end of if } //end of main |
This script uses lots of functions, so if you are curious as to what some of these do, I've provided links below.
See
getCPULoad()
getMaximumCPULoad()
cancelAttack()
message()
getSourceIP()
--Ltlwinters 19:35, 23 November 2008 (UTC)
