Hallo CP'ers,
Er is iets helemaal mis met onze cron_hour, hij hoort om het uur het verdiende geld erbij te schrijven (Van kolonies etc.). Maar wij hebben het idee dat hij dit meerdere malen doet. Spelers die normaal €7.000.000.000 speelgeld op hun contant moeten krijgen, krijgen nu opeens €200.000.000.000. Wij snappen er nu echt helemaal niet meer van, weten jullie wat het probleem is? Hier het script:
PHP
<?php /* ------------------------- */
if($cron_pass != "secretcronpassword")
exit;
$dbres = mysql_query("SELECT * FROM `[overheid]`");
$overheid = mysql_fetch_object($dbres);
$a=$overheid->bank;
$b=10;
$uitkering=$a/$b;
mysql_query("UPDATE `[users]` SET `bank`=`bank`+(`goederen`*4)");
mysql_query("UPDATE `[users]` SET `maxpoints`=`maxpoints`+10");
mysql_query("UPDATE `[stadowner]` SET `gevang`=3");
mysql_query("UPDATE `[stadowner]` SET `gevanguit`=3");
mysql_query("UPDATE `[users]` SET `bankleft`=900");
mysql_query("UPDATE `[users]` SET `maffiarol`=1");
mysql_query("UPDATE `[users]` SET `click`=`click`-1 WHERE `click`=1 AND `activated`=1");
mysql_query("UPDATE `[users]` SET `gaandealen`=`gaandealen`-1 WHERE `gaandealen`=1 AND `activated`=1");
mysql_query("UPDATE `[users]` SET `soldaatzoeken`=`soldaatzoeken`-1 WHERE `soldaatzoeken`=1 AND `activated`=1");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+`soldaat`*10000 WHERE superliddagen > '0' ");
mysql_query("UPDATE `[users]` SET `defence`=`defence`+`soldaat`*10000 WHERE superliddagen > '0' ");
mysql_query("DELETE FROM `[logs]` WHERE `area`='click'");
mysql_query("DELETE FROM `[clan_logs]` WHERE `area`='click'");
mysql_query("UPDATE `[users]` SET `click`=`click`-1 WHERE `click`=1 AND `activated`=1");
mysql_query("UPDATE `[users]` SET `cash`=`cash`+1500 WHERE `vip`=150");
mysql_query("UPDATE `[users]` SET `bank`=`bank`+1500 WHERE `vip`=150");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+100 WHERE `vip`=150");
mysql_query("UPDATE `[users]` SET `defence`=`defence`+100 WHERE `vip`=150");
mysql_query("UPDATE `[users]` SET `clicks`=`clicks`+5 WHERE `vip`=1");
mysql_query("UPDATE `[users]` SET `bank`=`bank`+'$uitkering' WHERE `belasting`='1'");
mysql_query("UPDATE `[clans]` SET `cash`=`cash`+1000,`bank`=`bank`+200");
mysql_query("UPDATE `[users]` SET `level`='1' WHERE `paying`=< 1");
mysql_query("UPDATE `[users]` SET `gijzel`=10 WHERE `activated`=1");
mysql_query("UPDATE `[users]` SET `gijzels`=5 WHERE `activated`=1");
mysql_query("UPDATE `[users]` SET `jointtijd`='0'");
mysql_query("UPDATE `[users]` SET `bankberoof`='0'");
mysql_query("UPDATE `[users]` SET `bescherming`='0'");
mysql_query("UPDATE `[users]` SET `kraak`='0'");
mysql_query("UPDATE `[users]` SET `gijzel1`='10'");
mysql_query("UPDATE `[users]` SET `macroof`='5'");
mysql_query("UPDATE `[users]` SET `overval2`=1 WHERE `activated`=1");
mysql_query("UPDATE `[users]` SET `singlejob`='1'");
mysql_query("UPDATE `[users]` SET `superwerken`='1'");
mysql_query("UPDATE `[users]` SET `top1001`=`top1001`-1 WHERE top1001 > '0'");
mysql_query("UPDATE `[users]` SET `munitie1`='0'");
mysql_query("UPDATE `[users]` SET `spiderbot`='0'");
mysql_query("UPDATE `[users]` SET `giganobot`='0'");
mysql_query("UPDATE `[users]` SET `brontobot`='0'");
mysql_query("UPDATE `[clans]` SET `bankleft`='500'");
mysql_query("UPDATE `[users]` SET `kogeltijd`='0'");
mysql_query("UPDATE `[users]` SET `gijzel`='25' WHERE gijzel < '25' AND superliddagen > '0'");
mysql_query("UPDATE `[users]` SET `gijzel1`='25' WHERE gijzel1 < '25' AND superliddagen > '0'");
mysql_query("UPDATE `[users]` SET `maakbom`='0'");
mysql_query("UPDATE `[users]` SET `maaktank`='0'");
mysql_query("UPDATE `[users]` SET `megalidwerk`='1'");
mysql_query("UPDATE `[users]` SET `koloniezoek`=`koloniezoek`-1 WHERE `koloniezoek`=1 AND `activated`=1");
mysql_query("UPDATE `[users]` SET `superlid`='0' WHERE superlid > '19' AND superlid < '30'");
mysql_query("UPDATE `[users]` SET `cash`=`cash`+`kolonies`*10000000 WHERE superliddagen > '0'");
mysql_query("UPDATE `[users]` SET `bank`=`bank`+`kolonies`*10000000 WHERE superliddagen > '0'");
$dbres = mysql_query("SELECT * FROM `[clans]` WHERE `money_lvl1` > 0");
while($clan = mysql_fetch_object($dbres)) {
if($clan->type == 1)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (50*$clan->money_lvl1) .",`bank`=`bank`+". (150*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}' AND `uurloon`='2'");
else if($clan->type == 2)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (100*$clan->money_lvl1) .",`bank`=`bank`+". (100*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}' AND `uurloon`='2'");
else if($clan->type == 3)
mysql_query("UPDATE `[users]` SET `bank`=`bank`+". (rand(150,300)*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'");
else if($clan->type == 1)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (100*$clan->money_lvl3) .",`bank`=`bank`+". (1250*$clan->money_lvl3) ." WHERE `clan`='{$clan->name}' AND `uurloon`='2'");
else if($clan->type == 2)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (250*$clan->money_lvl5) .",`bank`=`bank`+". (1250*$clan->money_lvl5) ." WHERE `clan`='{$clan->name}' AND `uurloon`='2'");
else if($clan->type == 3)
mysql_query("UPDATE `[users]` SET `bank`=`bank`+". (rand(150,1300)*$clan->money_lvl6) ." WHERE `clan`='{$clan->name}'");
}
Toon Meer
Gr. Wotfnl. :cheer: