darkog Posted September 9, 2011 Share Posted September 9, 2011 Where exactly has changed over time and jail hospital, players spend too much time in prison or in hospital! in which file and where? thank you very much Quote Link to comment Share on other sites More sharing options...
Ben Nash Posted September 9, 2011 Share Posted September 9, 2011 Huh i don't understand what your asking for... Quote Link to comment Share on other sites More sharing options...
Dave Posted September 9, 2011 Share Posted September 9, 2011 If you're looking for how their counted down you might want to look into the cron_minute.php file. I'm not entirely sure if this is what you're after. Quote Link to comment Share on other sites More sharing options...
darkog Posted September 9, 2011 Author Share Posted September 9, 2011 suite jail time and hospital changed time in prison and hospital in the script for "street research" my players are from 20 minutes to 3 hours in jail or hospital! it's much too! or set it exactly! sorry I am French and my English is very bad! thank you Quote Link to comment Share on other sites More sharing options...
darkog Posted September 9, 2011 Author Share Posted September 9, 2011 if it is in cron minute, what am I change exactly and where? Quote Link to comment Share on other sites More sharing options...
Ben Nash Posted September 9, 2011 Share Posted September 9, 2011 Add my msn so we can talk better: [email protected] Quote Link to comment Share on other sites More sharing options...
Dave Posted September 9, 2011 Share Posted September 9, 2011 You'll need to modify the street research php page. Quote Link to comment Share on other sites More sharing options...
darkog Posted September 10, 2011 Author Share Posted September 10, 2011 suite streets Here is the page "streets" thank you to tell me or make corrections? <?php $noturns = "Désolé, il fait trop noir pour vous aujourd'hui. Revenez demain"; include(DIRNAME(__FILE__) . '/globals.php'); if($ir['turns'] <= 0) { echo $noturns; $h->endpage(); exit; } if($ir['jail'] or $ir['hospital']) { print "Cette page ne peut être consulté en prison ou à l'hôpital."; $h->endpage(); exit; } $_GET['act'] = isset($_GET['act']) && is_string($_GET['act']) ? trim($_GET['act']) : ""; switch($_GET['act']) { case 'search': search_streets(); break; default: index(); break; } function index() { global $db, $ir, $userid, $h, $db; $cityname = $db->fetch_single($db->query("SELECT cityname FROM cities WHERE cityid = ".$ir['location'])); $Type = mt_rand(1, 8); echo "<h2 style='text-align:center;'>".$cityname." Rues</center></h2><br>"; echo " <style type='text/css'> .style1 { text-align: center; } </style> <div class='style1'> bienvenue dans les rues {$ir['username']}. Vous avez actuellement <b>{$ir['turns']} tours</b> à faire aujourd'hui!<br><br> Cliquez sur une case pour commencer à chercher ! <br><br> </div> "; echo " <center> <img src='images/streets.jpg' border='0' usemap='#Map'></center> <map name='Map'> <area shape='rect' coords='2,2,66,66' href='?act=search&search=".$Type."'> <area shape='rect' coords='69,2,134,66' href='?act=search&search=".$Type."'> <area shape='rect' coords='138,2,202,66' href='?act=search&search=".$Type."'> <area shape='rect' coords='205,2,270,66' href='?act=search&search=".$Type."'> <area shape='rect' coords='274,2,338,66' href='?act=search&search=".$Type."'> <area shape='rect' coords='340,2,407,66' href='?act=search&search=".$Type."'> <area shape='rect' coords='2,70,66,133' href='?act=search&search=".$Type."'> <area shape='rect' coords='69,70,136,133' href='?act=search&search=".$Type."'> <area shape='rect' coords='137,70,202,133' href='?act=search&search=".$Type."'> <area shape='rect' coords='205,70,270,133' href='?act=search&search=".$Type."'> <area shape='rect' coords='274,70,338,133' href='?act=search&search=".$Type."'> <area shape='rect' coords='340,70,407,133' href='?act=search&search=".$Type."'> <area shape='rect' coords='2,138,405,202' href='?act=search&search=".$Type."'> <area shape='rect' coords='69,138,406,202' href='?act=search&search=".$Type."'> <area shape='rect' coords='137,138,338,202' href='?act=search&search=".$Type."'> <area shape='rect' coords='205,138,271,202' href='?act=search&search=".$Type."'> <area shape='rect' coords='274,138,338,202'href='?act=search&search=".$Type."'> <area shape='rect' coords='340,138,407,202' href='?act=search&search=".$Type."'> <area shape='rect' coords='2,206,66,270' href='?act=search&search=".$Type."'> <area shape='rect' coords='69,206,136,270' href='?act=search&search=".$Type."'> <area shape='rect' coords='137,206,202,270' href='?act=search&search=".$Type."'> <area shape='rect' coords='205,206,270,270' href='?act=search&search=".$Type."'> <area shape='rect' coords='274,206,338,270' href='?act=search&search=".$Type."'> <area shape='rect' coords='340,206,407,270' href='?act=search&search=".$Type."'> <area shape='rect' coords='2,273,66,337' href='?act=search&search=".$Type."'> <area shape='rect' coords='69,273,136,337' href='?act=search&search=".$Type."'> <area shape='rect' coords='137,273,202,337' href='?act=search&search=".$Type."'> <area shape='rect' coords='205,273,270,337' href='?act=search&search=".$Type."'> <area shape='rect' coords='274,273,338,337' href='?act=search&search=".$Type."'> <area shape='rect' coords='340,273,407,337' href='?act=search&search=".$Type."'> <area shape='rect' coords='2,341,66,405' href='?act=search&search=".$Type."'> <area shape='rect' coords='69,341,136,405' href='?act=search&search=".$Type."'> <area shape='rect' coords='137,341,202,405' href='?act=search&search=".$Type."'> <area shape='rect' coords='205,341,270,405' href='?act=search&search=".$Type."'> <area shape='rect' coords='274,341,338,405' href='?act=search&search=".$Type."'> <area shape='rect' coords='340,341,407,405' href='?act=search&search=".$Type."'> <area shape='rect' coords='2,410,66,473' href='?act=search&search=".$Type."'> <area shape='rect' coords='69,410,136,473' href='?act=search&search=".$Type."'> <area shape='rect' coords='137,410,202,473' href='?act=search&search=".$Type."'> <area shape='rect' coords='205,410,270,473' href='?act=search&search=".$Type."'> <area shape='rect' coords='274,410,338,473' href='?act=search&search=".$Type."'> <area shape='rect' coords='340,410,407,473' href='?act=search&search=".$Type."'> </map> </center>"; } function search_streets() { global $db, $ir, $userid, $h; /*----------------------------------------------------- # Start Config # -----------------------------------------------------*/ $cityname = $db->fetch_single($db->query("SELECT cityname FROM cities WHERE cityid = ".$ir['location'])); $nonrecorded = "What you doing here?<br /><a href='index.php'>Revenir</a>"; $rand = mt_rand(0,2); $randhard = mt_rand(0,3); $randmoney = mt_rand(1,100); $randcrystals = mt_rand(1,8); $itemidsearch2 = 5; //Item id for search 2 $quantitysearch2 = 1; //Item quantity for search 2 $itemidsearch4 = 10; //Item id for search 4 $quantitysearch4 = 1; //Item quantity for search 4 $itemidsearch5 = 3; //Item id for search 5 $quantitysearch5 = 1; //Item quantity for search 5 $itemidsearch7 = 8; //Item id for search 7 $quantitysearch7 = 1; //Item quantity for search 7 $itemidsearch8 = 5; //Item id for search 8 $quantitysearch8 = 1; //Item quantity for search 8 /*----------------------------------------------------- # End Config # -----------------------------------------------------*/ $_GET['search'] = abs(@intval($_GET['search'])); if(!$_GET['search']) { echo $nonrecorded; $h->endpage(); exit; } $db->query("UPDATE `users` SET `turns`=`turns`-1 WHERE `userid`=$userid"); if($_GET['search'] == 1) { if($rand == 1) { $db->query("UPDATE `users` SET `money`=`money`+".$randmoney." WHERE `userid`=$userid"); echo "<span style='color:green;font-weight:700;'>Succès</span><br />vous avez trouvé ".money_formatter($randmoney)." après avoir cherché dans une case au hasard"; } else { echo "<span style='color:red;font-weight:700;'>Pas de chance!</span><br />Vous recherchez dans ".$cityname." Vous n'avez rien rencontré d'utile<br />"; } } else if($_GET['search'] == 2) { if($rand == 1) { $db->query("INSERT INTO `inventory` VALUES('',$itemidsearch2,$userid,$quantitysearch2)"); echo "<span style='color:green;font-weight:700;'>Succès</span><br />Vous cherchez dans ".$cityname." vous avez trouvé un objet mystérieux. Allez à votre inventaire pour savoir ce que c'est"; } else { $Time = mt_rand(2,30); echo "<span style='color:red;font-weight:700;'>Unlucky!</span><br />En recherchant dans".$cityname." un officier de police vous arrête."; $db->query(sprintf("UPDATE `users` SET `jail` = %u, `jail_reason` = 'Arrêter pour avoir traîner %s' WHERE `userid` = %u", $Time, $cityname, $userid)); } } else if($_GET['search'] == 3) { if($rand == 1) { $db->query("UPDATE `users` SET `money`=`money`+".$randmoney." WHERE `userid`=$userid"); echo "<font color = 'green'><b>Succès</b></font><br />Vous trouvez ".money_formatter($randmoney)." après avoir volé un vieil homme au hasard"; } else { $Time = mt_rand(2,300); echo "<span style='color:red;font-weight:700;'>Unlucky!</span><br />En cherchant dans ".$cityname." tu as reçu une balle."; $db->query(sprintf("UPDATE `users` SET `hospital` = %u, `hospreason` = 'While searching %s they got shot' WHERE `userid` = %u", $Time, $cityname, $userid)); } } else if($_GET['search'] == 4) { if($randhard == 1) { $db->query("INSERT INTO inventory VALUES('',$itemidsearch4,$userid,$quantitysearch4)"); echo "<span style='color:green;font-weight:700;'>Success</span><br />recherche dans ".$cityname." vous avez trouvé un objet mystérieux. Allez à votre inventaire pour savoir ce que c'est"; } else { echo "<span style='color:red;font-weight:700;'>Pas de chance!</span><br />En cherchant dans ".$cityname." vous n'avez rien trouvé!"; } } else if($_GET['search'] == 5) { $db->query("INSERT INTO inventory VALUES('',$itemidsearch5,$userid,$quantitysearch5)"); echo "<span style='color:green;font-weight:700;'>Success</span><br />Vous cherchez dans ".$cityname." vous avez trouvé un objet mystérieux. Allez à votre inventaire pour savoir ce que c'est"; } else if($_GET['search'] == 6) { if($rand == 1) { $db->query("UPDATE users SET `crystals`=`crystals`+".$randcrystals." WHERE userid=$userid"); echo "<span style='color:green;font-weight:700;'>Success</span><br />Recherche dans".$cityname." Vous êtes tombé dans un trou et avez trouvé la mine de cristal, vous avez pris ".number_format($randcrystals); } else { $Time = mt_rand(2,30); echo "<span style='color:red;font-weight:700;'>Unlucky!</span><br />En cherchant dans ".$cityname." un officier de police vous arrête."; $db->query(sprintf("UPDATE `users` SET `jail` = %u, `jail_reason` = 'Arrêter pour traîner dans les rues %s' WHERE `userid` = %u", $Time, $cityname, $userid)); } } else if($_GET['search'] == 7) { if($rand == 1) { $db->query("INSERT INTO inventory VALUES('',$itemidsearch7,$userid,$quantitysearch7)"); echo "<span style='color:green;font-weight:700;'>Success</span><br />Recherche dans ".$cityname." vous avez trouvé un objet mystérieux. Allez à votre inventaire pour savoir ce que c'est"; } else { $Time = mt_rand(2,30); echo "<span style='color:red;font-weight:700;'>Unlucky!</span><br />En cherchant dans ".$cityname." un officier de police vous arrête."; $db->query(sprintf("UPDATE `users` SET `jail` = %u, `jail_reason` = 'Arrêter pour vagabondage %s' WHERE `userid` = %u", $Time, $cityname, $userid)); } } else if($_GET['search'] == 8) { if($randhard == 1) { $db->query("INSERT INTO inventory VALUES('',$itemidsearch8,$userid,$quantitysearch8)"); echo "<span style='color:green;font-weight:700;'>Succès</span><br />En cherchant dans ".$cityname." vous avez trouvé un objet mystérieux. Allez à votre inventaire pour savoir ce que c'est"; } else { $Time = mt_rand(2,30); echo "<span style='color:red;font-weight:700;'>Pas de chance!</span><br />En cherchant dans ".$cityname." un officier de police vous arrête."; $db->query(sprintf("UPDATE `users` SET `jail` = %u, `jail_reason` = 'Arrêter pour vagabondage %s' WHERE `userid` = %u", $Time, $cityname, $userid)); } } } $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
Lithium Posted September 10, 2011 Share Posted September 10, 2011 (edited) You might want to change this... $Time = mt_rand(2,300); It's the only bit that goes over 30 minutes... 300 = 5hours Edited September 11, 2011 by Lithium Quote Link to comment Share on other sites More sharing options...
darkog Posted September 11, 2011 Author Share Posted September 11, 2011 merci beaucoup! thank you very much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.