Ishy
Members-
Posts
203 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Ishy
-
Re: [V2] Reward the active. - Punish the inactive. I like this, I added one like this to my game but not as much was places on it, I will over write it with this one :-D Thanks
-
Re: [FREE][MCCODE V1] Mass Payment Well you see, I coded it to help people who don't run the games like that and like giving out free things to members. :-D
-
Re: [FREE][MCCODE V1] Mass Payment Thanks all. :-)
-
Re: crime hospital time Replace the other code I had with this: else { print $r['crimeFTEXT']; $chance=rand(1,2); if ($chance == 1) { $hosp=rand(2,7); mysql_query("UPDATE users SET hospital={$hosp}, hospreason='Failed a crime' WHERE userid=$userid",$c); } if ($chance == 2) { $jail=rand(2,7); mysql_query("UPDATE users SET jail={$jail}, jail_reason='Failed a crime' WHERE userid=$userid",$c); } } That should make it random to go to jail or hospital. If have any problems please message me. Enjoy :-)
-
Re: crime hospital time You wouldn't need an SQL for mine.
-
Re: IP Banning tool [v1] Nice one.
-
Re: MCcode V1.1 New Jobs[Free] Thanks
-
Re: crime hospital time He asked how to go in hospital when failing a crime, I gave him an easy way :-D Go on as well tho Klikoka He would have to add 2 more fields in tho crimeJTEXT and crimeHTEXT I need mine so they randomly go in hospital on FTEXT
-
Re: Generate Password I like it, nice one mate.
-
Re: Hoes and Drugs cron Ya, that is right nice one westy.
-
Re: new login.php I was going to post a login, you took it LOL :-(
-
Re: Gift.php [edited] LOL Bran, I tihnk yuo SQL makes loads of sense LOL I think we could make that work :-D
-
Re: MCcode V1.1 New Jobs[Free] Thanks both :-)
-
All you have to do is: Open job.php and replace all with: <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.*,j.*,jr.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON jr.jrID=u.jobrank WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $_GET['interview'] = abs((int) $_GET['interview']); if(!$ir['job']) { if(!$_GET['interview']) { print " <font size='2'>NOTE:If any of the 'Req' fields are <font color=green>Green</font> it means that you have reached the required stat you need. However if any of the 'Req' fields are <font color=red>Red</font> it means that you need to more training on that particular stat.</font> Hi, looks like you don't have a job yet, here are the jobs you can get. <table width='100%' class='coll' border='1'> <Tr background='theader.gif'> <th background='theader.gif'>Job Name</th> <th background='theader.gif'>Job Desc</th> <th background='theader.gif'>Req Strength</th> <th background='theader.gif'>Req Labour</th> <th background='theader.gif'>Req IQ</th> <th background='theader.gif'>Get</th> </tr>"; $q=mysql_query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID",$c); while($r=mysql_fetch_array($q)) { print "<tr bgcolor='black'> <td>{$r['jNAME']}</td> <td>{$r['jDESC']}</td><td>"; if($ir['strength'] < $r['jrSTRN']) { print "<font color=red>{$r['jrSTRN']}</font>"; } else { print "<font color=green>{$r['jrSTRN']}</font>"; } echo "</td><td>"; if($ir['labour'] < $r['jrLABOURN']) { print "<font color=red>{$r['jrLABOURN']}</font>"; } else { print "<font color=green>{$r['jrLABOURN']}</font>"; } echo "</td><td>"; if($ir['IQ'] < $r['jrIQN']) { print "<font color=red>{$r['jrIQN']}</font>"; } else { print "<font color=green>{$r['jrIQN']}</font>"; } echo "</td> <td>[url='job.php?interview={$r[']Get Job[/url]</td> </tr> "; } print "</table>"; } else { $q=mysql_query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID WHERE j.jID={$_GET['interview']}",$c); $r=mysql_fetch_array($q); if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { mysql_query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;",$c); print "<font color=green>[b]Congratulations you got the job! [url='job.php']<u>>Go To Your Job</u>[/url]"; } else { print "<font color=red>Sorry but you are not good enough to get this job, you need:"; if($ir['strength'] < $r['jrSTRN']) { $s=$r['jrSTRN']-$ir['strength']; print " $s more Strength,"; } if($ir['labour'] < $r['jrLABOURN']) { $s=$r['jrLABOURN']-$ir['labour']; print " $s more Labour,"; } if($ir['IQ'] < $r['jrIQN']) { $s=$r['jrIQN']-$ir['IQ']; print " $s more IQ, "; } print "to get the job. [url='index.php']<u>Back Home</u>[/url]"; } } } else { switch($_GET['action']) { case 'quit': quit_job(); break; case 'promote': job_promote(); break; default: job_index(); break; } } function job_index() { global $ir,$c,$userid,$h; print "<h3>Your Job</h3> You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} each day at 5pm! You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour! <table width=50%><tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</td></tr><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table> [b]Job Ranks[/b] <table width=75%><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th></tr>"; $q=mysql_query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;",$c); while($r=mysql_fetch_array($q)) { print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td></tr>"; } print "</table> [url='job.php?action=promote']> Try To Get Promoted[/url] [url='job.php?action=quit']> Quit[/url]"; } function job_promote() { global $ir,$c,$userid,$h; $q=mysql_query("SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1",$c); if(mysql_num_rows($q) == 0) { print "Sorry, you cannot be promoted at this time. [url='job.php']> Back[/url]"; } else { $r=mysql_fetch_array($q); mysql_query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid",$c); print "Congrats, you have been promoted to {$r['jrNAME']} [url='job.php']> Back[/url]"; } } function quit_job() { global $ir,$c,$userid,$h; mysql_query("UPDATE users SET job=0,jobrank=0 WHERE userid=$userid",$c); print "You have quit your job! [url='job.php']> Back[/url]"; } $h->endpage(); ?> And your done. NOTE: This will only work on plain jobs, if any other changes have been added to jobs it might conflict with this addon and will not work. If you have any problems please message me! Thanks Toxication :-)
-
Re: Need Help With Reward Script Give us some more informations about this reward script and we might be able to help you :-)
-
Re: crime hospital time Here is a simple way of doing it: Open docrime.php and find: else { print $r['crimeFTEXT']; } Then replace that code with: else { print $r['crimeFTEXT']; $hosptime= rand(2,7); mysql_query("UPDATE users SET hospital={$hosptime}, hospreason='Failed a crime' WHERE userid=$userid",$c); } There you have it, that should work, don't think there will be any problems with it. :-D
-
Re: [v1] New criminal.php layout (FREE) Hey, if you all want to learn how to convert go here: http://criminalexistence.com/ceforums/index.php?topic=16667.0
-
Re: Energy regen for donators Hmm... Is there a certain percentage you want all the Energy Crons to go up by on every user?
-
Re: simple stupid question No problem :-) Enjoy
-
Re: HOW DO I SORT OUT THE DATABASE!!! Ok, the codes you are using are V1.1 and so here is what you do. Go to mysql.php And do this: <? $c=mysql_connect('localhost','CPANEL USERNAME HERE','CPANEL PASSWORD HERE') or die(mysql_error()); mysql_select_db('FULL DATABASE NAME HERE',$c); ?> If not, you will have to go onto your cPanel and click on: 'MySQL Databases' and you will know what to do then. I know this is a complicated situation for new coders, if you need help please message me. Thanks Toxication :-D
-
Re: simple stupid question Or... You can just add in percentage like I said here is an example: Replace your old query with this and you will get 60% of your EXP needed. $expgain=$ir['exp_needed']/100*60; $db->query("UPDATE users SET exp=exp+{$expgain} WHERE userid=$userid");
-
Re: [v1] New criminal.php layout (FREE) I have another style for criminal.php if you want. Firstly put in this link:http://www.futureconvict.com/tablehgrad1.png Then save the picture as 'tablehgrad1.png' and upload onto your server. Secondly open header.php and find: <head> <title>Your Game Name</title> <style> body { font-family:helvetica, arial, geneva, sans-serif;font-size:12;color: black; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12;color: black; } </style> </head> Then replace with: <head> <title>Your Game Name</title> <style> body { font-family:helvetica, arial, geneva, sans-serif;font-size:12;color: black; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12;color: black; } table.coll { border-collapse:collapse; border-style:solid; } </style> </head> Then open criminal.php and replace all with: <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if($ir['jail']) { print"You cannot do crimes while youre in jail."; $h->endpage(); exit; } if($ir['hospital']) { print"You cannot do crimes while youre in the hospital."; $h->endpage(); exit; }$q=mysql_query("SELECT * FROM crimegroups ORDER by cgORDER ASC",$c); print "[b]Do Crimes[/b] <table width='75%' class='coll' border='1' bordercolor='black'> <tr background='tablehgrad1.png'> <th background='tablehgrad1.png'>Crime</th> <th background='tablehgrad1.png'>Cost</th> <th background='tablehgrad1.png'>Payout</th> <th background='tablehgrad1.png'>Do</th></tr>"; while($r=mysql_fetch_array($q)) { print " <tr background='tablehgrad1.png'> <td colspan='4' background='tablehgrad1.png'><center>{$r['cgNAME']}</td> </tr>"; $q2=mysql_query("SELECT * FROM crimes WHERE crimeGROUP={$r['cgID']}",$c); while ($r2=mysql_fetch_array($q2)) { print " <tr bgcolor='#303030'> <td>{$r2['crimeNAME']}</td> <td><center>{$r2['crimeBRAVE']} Brave</td> <td><center>\${$r2['crimeSUCCESSMUNY']}</center></td> <td><center>[url='docrime.php?c={$r2[']Do[/url]</center></td> </tr>"; } } $h->endpage(); ?> Then you are done!!! :-D If you want a screenshot visit here: http://www.futureconvict.com/screenshot.jpg Or if you need any help please message me! Thanks Toxication
-
Re: Game Ranks LOL calm it please, he is only trying to help :-)
-
Re: any idea's I would do what Danny said but also get the drift of MCcodes, it is very easy when you get the idea of MCcodes, like all the queries start with the same thing e.g. 'mysql_query' and end with the same thing e.g. '$c,");'. I would just look through the scripts and see what each code does. If you have any questions about MCcodes please mail me. :mrgreen:
-
Re: simple stupid question In which way? Percentage or amount?