
gawduranidiot
Members-
Posts
13 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by gawduranidiot
-
[mccode] A better Safer Forum for your members to enjoy
gawduranidiot replied to Uridium's topic in Free Modifications
Re: [mccode] A better Safer Forum for your members to enjoy I found a forum that is supposed to be easily integratable to work with any database. Here is a link, it's completely free. http://www.boonex.com/products/orca/ Maybe I'm just completely stupid but I can't figure it out. I checked their website for instructions but found nothing. People have asked how to do it on the site but nobody replies. What I have found so far is /xml/orca.php is the integration file... I think. If anyone wants to see if they can figure it out I would appreciate it. I'll keep trying... -
Re: FREE V2 NEW GAME STATS PAGE there it should be fixed now
-
Re: FREE V2 NEW GAME STATS PAGE here is V1... <?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.*,h.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $bm=money_formatter($ir['bankmoney']); $cm=money_formatter($ir['crystals'],''); $qw=($ir['bankcrystal']); $s3=($ir['gangNAME']); $jb=($ir['jNAME']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $q=mysql_query("SELECT userid FROM users"); $membs=mysql_num_rows($q); $q=mysql_query("SELECT userid FROM users WHERE bankmoney>-1"); $banks=mysql_num_rows($q); $q=mysql_query("SELECT userid FROM users WHERE gender='Male'"); $male=mysql_num_rows($q); $q=mysql_query("SELECT userid FROM users WHERE gender='Female'"); $fem=mysql_num_rows($q); $total=0; $q=mysql_query("SELECT money FROM users"); while($r=mysql_fetch_row($q)) { $total+=$r['money']; } $avg=(int) ($total/$membs); $totalb=0; $q=mysql_query("SELECT bankmoney FROM users WHERE bankmoney>-1"); while($r=mysql_fetch_row($q)) { $totalb+=$r['bankmoney']; } $avgb=(int) ($totalb/$banks); $totalc=0; $q=mysql_query("SELECT crystals FROM users"); while($r=mysql_fetch_row($q)) { $totalc+=$r['crystals']; } $totali=0; $q=mysql_query("SELECT inv_qty FROM inventory"); while($r=mysql_fetch_row($q)) { $totali+=$r['inv_qty']; } $avgc=(int) ($totalc/$membs); $q=mysql_query("SELECT mail_id FROM mail"); $mail=mysql_num_rows($q); $q=mysql_query("SELECT evID FROM events"); $events=mysql_num_rows($q); $q=mysql_query("SELECT * FROM records WHERE recid=1",$c); $v=mysql_fetch_array($q); $q=mysql_query("SELECT username FROM users WHERE laston>unix_timestamp()-300*300 ORDER BY laston DESC",$c); $twsev=mysql_num_rows($q); $q=mysql_query("SELECT username FROM users WHERE laston>unix_timestamp()-60*60 ORDER BY laston DESC",$c); $lasthr=mysql_num_rows($q); $q=mysql_query("SELECT username,userid,laston FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC",$c); $fifteen=mysql_num_rows($q); if ($v['rec15']<$fifteen) {mysql_query("UPDATE records SET rec15=$fifteen WHERE recid=1",$c);} if ($v['rec24']<$twsev) {mysql_query("UPDATE records SET rec24=$twsev WHERE recid=1",$c);} if ($v['rec60']<$lasthr) {mysql_query("UPDATE records SET rec60=$lasthr WHERE recid=1",$c);} print "<h3>Mafia Hoodz Statistics</h3> You step into the Statistics Department and login to the service. You see some stats that interest you. <table width=75% cellspacing=1 class='table' border='1' bordercolor='#636363'> <tr> <th colspan=2>Users</th></tr> <tr><td colspan=2> There are currently <font color='red'>$membs</font> {$set['game_name']} players, <font color='green'>$male</font> males and <font color='green'>$fem</font> females.</td> </tr> <tr> <th colspan=2>Users Bank Statistics</th></tr> <tr><td colspan=2>Amount of players with bank accounts: <font color='red'>$banks</font></td> </tr> <tr><td colspan=2>Amount of cash in banks: <font color='red'>\$".money_formatter($totalb,"").". </font></td> </tr> <tr><td colspan=2>The average player has in their bank accnt: <font color='red'>\$".money_formatter($avgb,"").". </font></td> </tr> <tr><th>Users Money</th><th>Users Crystals</th></tr> <tr><td>Amount of cash in circulation: <font color='red'>\$".money_formatter($total,"").". </font></td> <td>Amount of crystals in circulation: <font color='red'>".money_formatter($totalc,"").". </font></td></tr> <tr><td>The average player has: <font color='red'>\$".money_formatter($avg,"").". </font></td> <td>The average player has: <font color='red'>".money_formatter($avgc,"")." </font>crystals.</td></tr> <tr><th>Mails/Events</th><th>Items</th></tr> <tr><td><font color='red'>".money_formatter($mail,"")."</font> mails and <font color='red'>".money_formatter($events,"")." </font>events have been sent.</td> <td>There are currently <font color='red'>".money_formatter($totali,"")." </font>items in circulation.</td></tr> <tr><th>Users Online Statistics</th><th>Users Online All Time Records</th></tr> <tr><td>Within the last 15 minutes: <font color='red'>$fifteen</font></td> <td>15 Minutes Record: <font color='red'>{$v['rec15']}</font></td></tr> <tr><td>Within the last hour: <font color='red'>$lasthr </font></td><td>1 Hour Record: <font color='red'>{$v['rec60']}</font></td></tr> <tr><td>Within the last 24 hours: <font color='red'>$twsev</font></td><td>1 Day Record: <font color='red'>{$v['rec24']}</font></td></tr> </table>"; $h->endpage(); ?>
-
Re: [mccode] Profile Signatures I just quickly skimmed through it and I only saw 2 things that need to be changed. Maybe you should read the conversion tutorial...
-
Re: [mccode] Lucky Dip Since nobody figured out how to stop it from going to negative i will tell you you could change it to an unsigned int in the database, then it cant be negative and then this is the page <?php //Budget streets mod made into a lucky dip mod.. hehe //Author: on_fire (and a bit from veteran) //Converted for Lite by Dabomstew (and veteran) 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); if($ir['gamegoes'] < 1) { die("Sorry, you only have one go each day! "); } if($ir['hospital']) { die ("<h3>Error</h3>What are you doing out of hospital! Go back and rest. What are you thinking?"); } if($ir['jail']) { die ("<h3>Error</h3>What are you doing your in prison! What are you thinking?"); } print " "; $cost=($ir[level]*100); // cost of lucky dip if ($_GET['action'] != 'explore') { print "You have only 1 chance each day on the lucky dip, it will cost you \$$cost You have {$ir['gamegoes']} turns left for today and will be topped up to 1 at midnight. "; print " <form method=post action=luckydip.php?action=explore><input type=hidden name=action value=explore><input type='text' name='gamegoes' value='{$ir['gamegoes']}'> <input type=submit value='Lucky Dip'></form>"; } else { $steps=abs((int) $_POST['gamegoes']); for($i=0;$i<$steps;$i++) { if ($ir['gamegoes'] < 1) { print("You only have one go per day for the lucky dip. come back another day "); } if ($ir['money'] < $cost+1) { print("You don't have the funds to play "); }else{ $chance = rand(1,10); //total of random chances mysql_query("update users set gamegoes=gamegoes-1 where userid=$userid",$c); mysql_query("update users set money=money-$cost where userid=$userid",$c); if ($chance == 1) { //random money $gained=rand(300,400)*$ir['level']; print "You have won [b]\$$gained[/b] "; mysql_query("update users set money=money+$gained where userid=$userid",$c); } if ($chance == 2) { //random money $gain = rand(90,150)*(floor($ir['level']/2)+1); print "You have won [b]\$$gain[/b]. "; mysql_query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 3) { //random money $gain = rand(200,250)*(floor($ir['level']/2)+1); print "You have won [b]\$$gain[/b]. "; mysql_query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 4) { //random item amount $gain = rand(1,5); print "You have won [b]$gain[/b] Red Ball(s) "; mysql_query("INSERT INTO inventory VALUES('',1,$userid,$gain)",$c); } if ($chance == 5) { //random item amount $gain = rand(4,9); print "You have won [b]$gain[/b] crystals."; mysql_query("update users set crystals=crystals+$gain where userid=$userid",$c); } if ($chance == 6) { //random item amount $gain = rand(1,5); print "You have won [b]$gain[/b] morphine(s)"; $itemidexplore = 10; mysql_query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,$gain)",$c); print" "; } if ($chance == 7) {//random item amount $gain = rand(1,5); print "You have won [b]$gain[/b] co proxamol(s)"; mysql_query("INSERT INTO inventory VALUES('',18,$userid,$gain)",$c); } if ($chance == 8) { //random money $gained=rand(200,250)*$ir['level']; print "You have won [b]\$$gained[/b] "; mysql_query("update users set money=money+$gained where userid=$userid",$c); } if ($chance == 9) {//random items i have used the first 26 items in the inventory $gain = rand(1,26); $q=mysql_query("SELECT i.*,it.* FROM items i LEFT JOIN itemtypes it ON i.itmtype=itmtypeid WHERE i.itmid=$gain LIMIT 1",$c); $t=mysql_fetch_array($q); print "You have won a/an {$t['itmname']}"; mysql_query("INSERT INTO inventory VALUES('',$gain,$userid,1)",$c); } if ($chance == 10) {//random dontator days $gain = rand(1,5); print "You have won [b]$gain[/b] donator days!!!! "; mysql_query("update users set donator=donator+$gain where userid=$userid",$c); } } } } $h->endpage; ?>
-
Make users verify their email address?
gawduranidiot replied to gawduranidiot's topic in General Discussion
Re: Make users verify their email address? I probably wasn't being very clear on what I was asking lol I meant have it send an email to them and they have to click the link in the email before they can use the game. -
Re: New mail system, New game, HELP!!! im not very good at coding yet but wouldnt you be able to add something like this to the top of the mail singup page? if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } i know there is probably more to it than that but would that work?
-
Re: who likes mccodes? i didnt like it when i first installed the script because it was so buggy but i fixed all of the bugs i have found so far and i like it now
-
Does anybody have a code to make users verify their email address before they can log in? I have had people using fake emails. EDIT: Sorry I forgot to mention its for V1, I'm busy redoing my game right now.
-
Re: FREE SERVER THAT WORKS WITH MCCODES use ismywebsite.com they will give you more space and bandwidth as you need it they allow cron jobs if you request them by email with the reason you need them
-
How would I make it so donators can't see the ads? Would it be something with this? if($ir['donatordays']) I have V1 by the way.
-
Re: V1 buying items thanks for the quick reply, thats the part i thought it would be but i wasnt sure so would removing the ,0 fix it? EDIT: It did, thanks for the help/
-
When my users buy an item from the shop it will take their money but not give the item. I think the problem is on itembuy.php. <?php /*----------------------------------------------------- -- Mono Country v1.0 -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php ------------------------------------------------------- -- Armory Script PLUS v1.0 -- A product of Flash Fire Gaming -- Copyright held 2006 by Cronus -----------------------------------------------------*/ 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[hospital]>0) die("You are in the hospital for {$ir[hospital]} minutes."); if($ir[jail]>0) die("You are in jail for {$ir[jail]} minutes."); $_GET['ID']= abs((int) $_GET['ID']); $_POST['qty']= abs((int) $_POST['qty']); if(!$_GET['ID'] || !$_POST['qty']) { print "Invalid use of file"; } else if($_POST['qty'] <= 0) { print "You have been added to the delete list for trying to cheat the game."; } else { $q=mysql_query("SELECT * FROM items WHERE itmid={$_GET['ID']}",$c); if(mysql_num_rows($q) == 0) { print "Invalid item ID"; } else { $itemd=mysql_fetch_array($q); if($ir['money'] < $itemd['itmbuyprice']*$_POST['qty']) { print "You don't have enough money to buy this item!"; $h->endpage(); exit; } if($itemd['itmbuyable'] == 0) { print "This item can't be bought!"; $h->endpage(); exit; } $price=($itemd['itmbuyprice']*$_POST['qty']); mysql_query("INSERT INTO inventory VALUES('',{$_GET['ID']},$userid,{$_POST['qty']},0);",$c); mysql_query("UPDATE users SET money=money-$price WHERE userid=$userid",$c); mysql_query("INSERT INTO itembuylogs VALUES ('', $userid, {$_GET['ID']}, $price, {$_POST['qty']}, unix_timestamp(), '{$ir['username']} bought {$_POST['qty']} {$itemd['itmname']}(s) for {$price}')", $c); print "You bought {$_POST['qty']} {$itemd['itmname']}(s) for \$$price"; } } $h->endpage(); ?> Any help would be appreciated :-)