Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,124
  • Joined

  • Last visited

  • Days Won

    144

Everything posted by Magictallguy

  1. Re: [mccode] Personal Detals for v2.0 You need to add in the SQL!
  2. Re: How Do I Lower Stat Gained In Gym v1 or v2? v1 $gain=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/150);   v2 $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/150);   Change that to a lower number and you'll be lowering the outcome of the stat gain! :)
  3. Re: Help using Tables! Try this!   <?php include "globals.php"; $tresder=(int) rand(100,999); if($ir['jail'] or $ir['hospital']) { die("This Page Cannot be Accessed while in Jail or Hospital."); } if ($ir['donatorpack'] == 0) { print" <table cellpadding=8 width=95% border=1> <th width=25%> <form action=starterkit.php> <input type='submit' value='Claim your free Starter Kit now! (THIS DOES NOT WORK YET!'></form>"; } $eon = mysql_fetch_array($db->query("SELECT * FROM cities WHERE cityid = '{$ir['location']}'")); echo "<hr>{$eon['cityname']} <hr>"; $eon = mysql_fetch_array($db->query("SELECT * FROM cities WHERE cityid = '{$ir['location']}'")); echo "<marquee>Your Currently Exploring {$eon['cityname']}, Theres Going To Be All New Stuff, Coming Soon!</marquee> <hr> <center> <table width=90% cellspacing=1 class='table'> <tr style='background:grey'> <td valign=top> <center><u><font color=#0066FF><h3>Shops and Markets</h3></u> [url='shops.php']Shops[/url] [url='itemmarket.php']Item Market[/url] [url='cmarket.php']Crystal Market[/url] [url='stockmarket.php']Stock Market[/url] [url='evolutionsstore.php']Evolutions Store[/url]</td> <td valign=top> <center> <u> <font color=#0066FF><font-family: verdana><h3>Local City</h3></u> [url='monorail.php']Travel Agency[/url] [url='estate.php']Estate Agent[/url] [url='bank.php']City Bank[/url] [url='stockportfolio.php']Stock Portfolio[/url] [url='ruby_trader.php']Ruby Trader[/url] [url='crystaltemple.php']Crystal Trader[/url] "; if($ir['location'] == 5) { print " [url='cyberbank.php']Cyber Bank[/url] "; } print "</td> <td valign=top> <center><u><font color=#0066FF><h3>Dark Side</h3></u> [url='gangcentral.php']Gangs[/url] [url='gangwars.php']Gang Wars[/url] [url='slotsmachine.php?tresde=$tresder']Slots Machine[/url] [url='roulette.php?tresde=$tresder']Roulette[/url] [url='lucky.php']Lucky Boxes[/url]"; if($ir['location'] == 6) { print " [url='brothel.php']Brothel[/url] "; } if($ir['location'] == 5) { print " [url='slotsmachine3.php']Super Slots[/url] "; } print "</td> </tr> <tr height=100> <td valign=top> <center><u><font color=#0066FF><h3>Statistics Dept</h3></u> [url='userlist.php']User List[/url] [url='stafflist.php']{$set['game_name']} Staff[/url] [url='halloffame.php']Hall of Fame[/url] [url='usersonline.php']Users Online[/url]</td><td valign=top> <center><u><font color=#0066FF><h3>Mysterious</h3></u> [url='polling.php']Polling Booth[/url] [url='bounty.php']Bounty[/url] [url='battletent.php']Battle Tent[/url]</td><td valign=top> <center><u><font color=#0066FF><h3>Jails</h3></u> [url='fedjail.php']Federal Jail[/url] [url='jail.php']City Jail[/url] "; print "</td></tr></table> This is your referal link: http://{$domain}/register.php?REF=$userid Every signup from this link earns you 5 valuable crystals!"; if($ir['user_level'] > 1) { //-- Finding items query $fia=(int) rand(1000000,9999999); $fib=(int) rand(1000000,9999999); if($fia == $fib) { $iq=$db->query("SELECT * FROM items WHERE itmbuyable=1 ORDER BY rand() LIMIT 1",$c); $r=mysql_fetch_array($iq); $item=$r['itmid']; $userid=$ir['userid']; $db->query("INSERT INTO inventory VALUES ('', $item, $userid, 21)",$c); event_add($userid,"You found a {$r['itmname']} While Walking Around the city.",$c); } print " [url='staff.php']| Staff Panel |[/url] \n[b]</tr></th></td></table>[/b]"; } $h->endpage(); ?>
  4. Re: Tutorial: v1 - v2 Conversion I wasn't talking about you! xD I have a friend in the UK who now actually runs a 4th site and is a worse scripter than you!
  5. Re: [v2]Reset Specific User[v2] Ah fair enough. One of those "had to be there" moments was it?
  6. Re: [mccode] Personal Detals for v2.0 To get back on topic!... FOR V1 ------------------------- Preferences addition function detail_change() { global $ir,$c,$userid,$h; print "<h3>Personal Details</h3> <form action='preferences.php?action=detailchange2' method='post'> <select name='personal' type='dropdown'> <option value='ON'>Yes <option value='OFF'>No</select> <input type='submit' value='Change Info' /></form>"; } function do_detail_change() { global $ir,$c,$userid,$h; $_POST['personal']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['personal']); mysql_query("UPDATE users SET personal='{$_POST['personal']}' WHERE userid=$userid",$c); print "People can now view your personal Details!"; } function pers_change() { global $ir,$c,$userid,$h; print "<h3>Personal Details Change</h3> Please note that you have your personal details set to off/no then people will not be able to view your personal details. <form action='preferences.php?action=eperschange2' method='post'> Name: <input type='text' name='name' /> Last Name: <input type='text' name='last' /> Age: <input type='text' name='age' /> Aim Of The Game: <input type='text' name='aog' /> MSN: <input type='text' name='msn' /> AIM: <input type='text' name='aim' /> AOL: <input type='text' name='aol' /> Yahoo: <input type='text' name='yahoo' /> <input type='submit' value='Change Personal Details' /></form>"; } function ed_pers_change() { global $ir,$c,$userid,$h; mysql_query("UPDATE users SET name='{$_POST['name']}', last='{$_POST['last']}', age='{$_POST['age']}', aog='{$_POST['aog']}', msn='{$_POST['msn']}', aim='{$_POST['aim']}', aol='{$_POST['aol']}', yahoo='{$_POST['yahoo']}' WHERE userid=$userid",$c); print "Personal Details changed!"; }   Register.php query change mysql_query("INSERT INTO users (username, login_name, name, last, age, aog, msn, aim, aol, yahoo, personal, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES( '{$username}', '{$username}', '{$_POST['name']}', '{$_POST['last']}', '{$_POST['age']}', '{$_POST['aog']}', '{$_POST['msn']}', '{$_POST['aim']}', '{$_POST['aol']}', '{$_POST['yahoo']}', '{$_POST['personal']}' md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', unix_timestamp(), '{$_POST['email']}', -1, '$ip')", $c); $i=mysql_insert_id($c);   Everything else remains the same!
  7. Re: [mccode] Personal Detals for v2.0 I've just spotted the error! xD '{$_POST['personal']} needs to be '{$_POST['personal']}'
  8. Re: News Paper Ads no sql   CREATE TABLE `npaper` ( `npID` int(11) NOT NULL auto_increment, `npADDER` int(11) NOT NULL default '0', `npTITLE` varchar(255) NOT NULL default '', `npBODY` text NOT NULL, `npTIME` int(11) NOT NULL default '0', PRIMARY KEY (`npID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;   (Just testing the sql tags - seeing if they exist! xD)
  9. Re: Edit Item Type Code Solved Nicely done :)
  10. Re: new login.php Sounds good to me!  
  11. Re: Name Colour Change Hey hey nicely done! :D
  12. Re: Transferring Crimes? Aren't we all...
  13. Re: class mysql error in v2 On some cPanels the htdocs folder is called public_html or www - both take you to the same place. Create a folder called class inside your public_html and upload the 2 class_db_mysql(i).php files!
  14. Re: Large Number.... Try this:   <td><a href='estate.php?property={$r['hID']}'>Buy</td></tr>"; } print "</table>";
  15. Re: Paper Ads He's a good boy *pats him on the head* HAHA!!
  16. Re: crons In which case you error is in your jobs - not crons
  17. Re: securing against mysql injection Nice to see you again AH! Anyway yes :P Note: "mres" stands for "mysql_real_escape_string" (saves me from typing it out all the time!) The idea of a mres is to clean the users input before it reaches the query. Although the manual states to put mres after the query - Nyna's way (and I know this to be right as she effectively rewrote the entire thing xD) puts it before! xD
  18. Re: Attacking There was no need to reset...It's one of the users (or you) that was making Line 145 $mydamage=(int) (($r1['weapon']*$youdata['strength']/($odata['guard']/1.5))*(rand(8000,12000)/10000));   Line 146 $hitratio=max(10,min(60*$ir['agility']/$odata['agility'],95));   Line 200 $dam=(int) (($enweps[$weptouse]['weapon']*$odata['strength']/($youdata['guard']/1.5))*(rand(8000,12000)/10000));   Line 202 $hitratio=max(10,min(60*$odata['agility']/$ir['agility'],95));   Chances are you and the other person had similar stats and weaponry (just a guess xD) If you wish to disable these errors from showing up. Find in header.php error_reporting(E_ALL); And simply either delete it or stick these in front: // EG //error_reporting(E_ALL);
  19. Re: Mass Mail error Quote: "what do i do" 1. Learn to code 2. Learn to punctuate! Damn... 3. Replace your $db->queries' with these: $db->query("INSERT INTO mail VALUES('', 0, 0, {$r['userid']}, unix_timestamp(),'$subj','{$_POST['text']}')"); print "Mass mail sent to {$r['username']}. "; $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid = {$r['userid']}");
  20. Re: Polls error Are you by any chance a hippy? (Hippies are cool!)  
  21. Re: Drugs Error Hahaha point well made!
  22. Re: who likes mccodes? A simple Google search got me this... Very hard to get? I think not! 3rd result in Google!
  23. Re: Hosting for Mccodes Or www.voxitize.com! xD
  24. Re: V2 Problems Replace your entire massmailer function with this (should be at the bottom of staff_special.php): function massmailer() { global $db,$ir,$c,$userid; if($_POST['text']) { $_POST['text']=nl2br(strip_tags($_POST['text'])); $subj="This is a mass mail from the administration"; if($_POST['cat']==1) $q=$db->query("SELECT * FROM users "); else if($_POST['cat']==2) $q=$db->query("SELECT * FROM users WHERE user_level > 1"); else if($_POST['cat']==3) $q=$db->query("SELECT * FROM users WHERE user_level=2"); else if($_POST['cat']==4) $q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); else $q=$db->query("SELECT * FROM users WHERE user_level={$_POST['level']}"); while($r=$db->fetch_row($q)) { $db->query("INSERT INTO mail VALUES('', 0, 0, {$r['userid']}, unix_timestamp(),'$subj','{$_POST['text']}')"); print "Mass mail sent to {$r['username']}. "; $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid = {$r['userid']}"); } print "Mass mail sending complete! [url='staff_special.php?action=massmailer']> Back[/url]"; } else { print "[b]Mass Mailer[/b] <form action='staff_special.php?action=massmailer' method='post'> Text: <textarea name='text' rows='7' cols='40'></textarea> <input type='radio' name='cat' value='1' /> Send to all members <input type='radio' name='cat' value='2' /> Send to staff only <input type='radio' name='cat' value='3' /> Send to admins only <input type='radio' name='cat' value='4' /> Send to users online OR Send to user level: <input type='radio' name='level' value='1' /> Member <input type='radio' name='level' value='2' /> Admin <input type='radio' name='level' value='3' /> Secretary <input type='radio' name='level' value='4' /> Special Op <input type='radio' name='level' value='5' /> Assistant <input type='submit' value='Send' /></form>"; } }
  25. Re: Database...Annoying! Try this:   <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $mpq = $db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp = $db->fetch_row($mpq); $_GET['property']=abs((float) $_GET['property']); if($_GET['property']) { $npq = $db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np = $db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { echo "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { echo "You do not have enough money to buy the " . $np['hNAME']; } else { $houseprice = ($np['hPRICE']); $db->query("UPDATE users SET money=money-$houseprice,will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); echo "Congrats, you bought the {$np['hNAME']} for £{$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq = $db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np = $db->fetch_row($npq); if($ir['maxwill'] == 100) { echo "You already live in the lowest property!"; } else { $houseprice = ($np['hPRICE']); $db->query("UPDATE users SET money=money+$houseprice,will=0,maxwill=100 WHERE userid=$userid"); echo "You sold your {$np['hNAME']} and went back to your wooden hut."; } } else { echo "Your current property: [b]{$mp['hNAME']}[/b] The houses you can buy are listed below. Click a house to buy it. "; if($ir['maxwill'] > 100) { echo "[url='estate.php?sellhouse']Sell Your House[/url] "; } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { echo "[url='estate.php?property={$r[']{$r['hNAME']}[/url] &nbsp - Cost: £" . number_format($r['hPRICE'], "") . " &nbsp - Will Bar: " . number_format($r['hWILL'], "") . " "; } } $h->endpage(); ?>
×
×
  • Create New...