Jump to content
MakeWebGames

Snatchy

Members
  • Posts

    120
  • Joined

  • Last visited

    Never

Everything posted by Snatchy

  1. Re: FACEBOOK GAME DEVELOPMENT   that's blown out of the water by mob wars and all those other sorts of games.
  2. hey all, I'm looking at making an application for facebook, I was wondering if anyone else was interested in making like a communal script for the CE community. V2 to facebook conversion perhaps?? Just thought I would put it out there and see iwhat sort of feedback i would get. Cheers Snatchy
  3. Re: McCodes v2.0.2 attack hey wicked are there any previews of your game engine? or do you need beta testers?
  4. Did anyone have any trouble with the auction cron not finishing the auctions? mine is just letting the numbers go into the negative. (example ; -1day15mins) instead of crediting the auction to the rightfull owner.
  5. I can't work out what i am missing for my auto donator to work, i have edited all the donator packs to items and have that working fine. i just can't seem to get my auto donating to work. can someone pm me or get me on messenger at [email protected]. Cheers. Snatchy
  6. Re: Which mysql query? if i do $ir instead of $r then it displays the user strength in all posistions and not all the different strengths.
  7. Re: Which mysql query? The gang table, users table and userstats tables are joined BECAUSE your in THE HALL OF FAME it displays your GANG TAG and your USERNAME and then sorts out whos got the most strength from highest to lowest with the USERSTATS table. ok now is all i want to do is display the amount of strength that the user that is displayed has. {$r['strength']} is what i added in to display the strength but it doesn't seem to work. It's doing my wig in. Can someone please help me with disp[laying the strength. Cheers Snatchy PS. Please don't answer me and try to make me look like a dumb ass like the last answer that wasn't actually an answer to the question that was asked. I felt that answer to my question was just a pick at me so I'm Picking Back. If you had of read the question right you would know that the script is the hall of fame and you would of also realised that you need to query all 3 tables for what you want displayed. Oh and other than the strength bit i have added it was original MC Code by Dabs so ya picking on his coding there.... Not mine. Cheers Snatchy
  8. hey guys. i just can't seem to get this right. in the hall of fame i want to display not only the the posision of their userstats but the actual stat its self. function hof_strength() { global $db,$ir,$c,$userid, $myf; print "<table border=3 bgcolor=black> <tr><td><font color=green>[b]Showing the 20 users with the highest strength</td></tr></table> <table border=3 bgcolor=black> <tr><th><font color=yellow>[b]Posistion</th> <th><font color=yellow>[b]User</th> <th><font color=yellow>[b]Strength</th></tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.strength DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr><td>$t$p$et</td> <td><font color=red>$t{$r['gangPREF']}</font> {$r['username']} [{$r['userid']}]$et</td> <td>{$r['strength']}</td></tr>"; } print "</table>"; } That's what is there so far. I thought {$r['strength']} would have worked, th table comes up right. i just can't get the stat to display. Cheers Snatchy
  9. I am told by my server that this script is using to mahy resources. Is there any way i can optimise it and if so how do i go about this? <?php include "mysql.php"; global $c; //brave update $q1=mysql_query("SELECT COUNT(*) as users FROM users",$c); $r=mysql_fetch_array($q1); $rows=$r['users']; print "Found $rows users to process."; $i=1; $next=$rows; $query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave$query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave"; $query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp$query4="UPDATE users SET hp=maxhp WHERE hp>maxhp"; mysql_query($query,$c) or die("\nError Executing Query 1 for updating users $i to $next\n$query\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query2,$c) or die("\nError Executing Query 2 for updating users $i to $next\n$query2\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query3,$c) or die("\nError Executing Query 3 for updating users $i to $next\n$query3\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query4,$c) or die("\nError Executing Query 4 for updating users $i to $next\n$query4\n".mysql_error()."\nError Code:".mysql_errno()); print "\nUsers $i to $next updated successfully."; print "\nDone."; ?> Cheers Snatchy
  10. hi guys i want to know how to get mysql to handle only one query at a time.... My auctions script( and yes it's an MC CODES problem) lags out form everyone clickin on it at the last minute and has caused me heaps of hassels with the person winning so i was just wondering if it is possible to get mysql to handle 1 query at a time instead of it tryint to handle 20 at thte last second. Cheers Snatchy
  11. Re: mysql inquiry so i take it you don't know then?
  12. I was just wondering if anybody new how to make mysql handle only one query at a time... I have Gbay Auctions for my site... I had to take it down as when people were bidding at the last minute it was lagging out really bad and everything was going haywire. I read somewhere a while ago about making mysql only handle one query at a time. this would be great for my auctions script as it would hopefully cut out the lag on the bids. Cheers guys and gals, Snatchy
  13. Re: New City   <?php /** * @author ShannenName * @copyright 2007 */ 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'],''); $bm=money_formatter($ir['l100bank']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if ($ir['user_level'] != 2) { print "You sneak, get out of here!"; $h->endpage(); exit; } $posta = mysql_real_escape_string(print_r($_POST, 1), $c); $geta = mysql_real_escape_string(print_r($_GET, 1), $c); mysql_query("INSERT INTO adminlogs VALUES('', $userid, '$posta', '$geta', unix_timestamp() )", $c); switch ($_GET['action']) { /* case "delcity": delcity(); break;*/ case 'newcity': new_city(); break; case 'newcitysub': new_city_sub(); break; case 'editcity': edit_city(); break; case 'editcitysub': edit_city_sub(); break; case 'delcity': del_city(); break; case 'delcitysub': del_city_sub(); break; } print "</br >[[url='newcity01.php?action=newcity']Create New city[/url]] [[url='newcity01.php?action=editcity']Edit City[/url]] [[url='newcity01.php?action=delcity']Delete City[/url]] City List <table> <tr><td>"; $q=mysql_query("SELECT * FROM cities ",$c); print"<table width=95% bgcolor=#ff9900 align=center border=1 cellspacing=0><tr style='background:#ff6633'><th>city id no.</th><th>Name</th><th>Description</th><th>Min Level</th></tr>"; while($r=mysql_fetch_array($q)) { print "<tr><td>{$r['cityid']}</td><td>{$r['cityname']}</td><td>{$r['citydesc']}</td><td>{$r['cityminlevel']}</td></tr>"; } print "</table>"; function new_city() { global $ir, $c, $h, $userid; print "<h3>Create New City</h3> This will create a new city. <form action='newcity01.php?action=newcitysub' method='post'> City name: <input type='text' name='cityname' /> City desc: <input type='text' name='citydesc' /> City min level <input type='text' name='cityminlevel' /> <input type='submit' value='Create New city' /></form>"; } function new_city_sub() { global $ir, $c, $h, $userid; $_POST['cityminlevel'] = abs((int)$_POST['cityminlevel']); mysql_query("INSERT INTO cities (cityname, citydesc, cityminlevel) VALUES ('{$_POST['cityname']}', '{$_POST['citydesc']}', '{$_POST['cityminlevel']}');", $c); print "[url='admin.php']> Back[/url]"; } function edit_city() { global $ir, $c, $h, $userid, $cityid; print "<h3>Edit City</h3> This will edit a city. <form action='newcity01.php?action=editcitysub' method='post'> City City id: <input type='text' name='cityid' /> City Name EXACTLY as it appears: <input type='text' name='cityname' /> City desc: <input type='text' name='citydesc' /> City min level <input type='text' name='cityminlevel' /> <input type='submit' value='Edit city' /></form>"; } function edit_city_sub() { global $ir,$c,$h,$userid; mysql_query("UPDATE cities SET cityid='{$_POST['cityid']}',cityname='{$_POST['cityname']}', citydesc='{$_POST['citydesc']}', cityminlevel='{$_POST['cityminlevel']}' WHERE cityid='{$_POST['cityid']}'",$c); print "City edited..."; } function del_city() { global $ir, $c, $h, $userid, $cityid; print "<h3>Delet City</h3> This will delete a city. <form action='newcity01.php?action=delcitysub' method='post'> City id: <input type='text' name='cityid' /> <input type='submit' value='Delete city' /></form>"; } function del_city_sub() { global $ir,$c,$h,$userid; mysql_query("DELETE FROM cities WHERE cityid='{$_POST['cityid']}'",$c); print "City deleted"; } $h->endpage(); ?>
  14. Re: New City   <?php /** * @author ShannenName * @copyright 2007 */ 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'],''); $bm=money_formatter($ir['l100bank']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if ($ir['user_level'] != 2) { print "You sneak, get out of here!"; $h->endpage(); exit; } $posta = mysql_real_escape_string(print_r($_POST, 1), $c); $geta = mysql_real_escape_string(print_r($_GET, 1), $c); mysql_query("INSERT INTO adminlogs VALUES('', $userid, '$posta', '$geta', unix_timestamp() )", $c); switch ($_GET['action']) { case "delcity": delcity(); break; case 'newcity': new_city(); break; case 'newcitysub': new_city_sub(); break; case 'editcity': edit_city(); break; case 'editcitysub': edit_city_sub(); break; } print "</br >[[url='newcity01.php?action=newcity']Create New city[/url]] [[url='newcity01.php?action=editcity']Edit City[/url]] City List <table> <tr><td>"; $q=mysql_query("SELECT * FROM cities ",$c); print"<table width=95% bgcolor=#ff9900 align=center border=1 cellspacing=0><tr style='background:#ff6633'><th>city id no.</th><th>Name</th><th>Description</th><th>Min Level</th><th> </th></tr>"; while($r=mysql_fetch_array($q)) { print "<tr><td>{$r['cityid']}</td><td>{$r['cityname']}</td><td>{$r['citydesc']}</td><td>{$r['cityminlevel']}</td></tr>"; } print "</table>"; function new_city() { global $ir, $c, $h, $userid; print "<h3>Create New City</h3> This will create a new city. <form action='newcity01.php?action=newcitysub' method='post'> City name: <input type='text' name='cityname' /> City desc: <input type='text' name='citydesc' /> City min level <input type='text' name='cityminlevel' /> <input type='submit' value='Create New city' /></form>"; } function new_city_sub() { global $ir, $c, $h, $userid; $_POST['cityminlevel'] = abs((int)$_POST['cityminlevel']); mysql_query("INSERT INTO cities (cityname, citydesc, cityminlevel) VALUES ('{$_POST['cityname']}', '{$_POST['citydesc']}', '{$_POST['cityminlevel']}');", $c); print "[url='admin.php']> Back[/url]"; } function edit_city() { global $ir, $c, $h, $userid, $cityid; print "<h3>Edit City</h3> This will edit a city. <form action='newcity01.php?action=editcitysub' method='post'> City City id: <input type='text' name='cityid' /> City Name EXACTLY as it appears: <input type='text' name='cityname' /> City desc: <input type='text' name='citydesc' /> City min level <input type='text' name='cityminlevel' /> <input type='submit' value='Edit city' /></form>"; } function edit_city_sub() { global $ir,$c,$h,$userid; mysql_query("UPDATE cities SET cityid='{$_POST['cityid']}',cityname='{$_POST['cityname']}', citydesc='{$_POST['citydesc']}', cityminlevel='{$_POST['cityminlevel']}' WHERE cityid='{$_POST['cityid']}'",$c); print "City edited..."; } $h->endpage(); ?> Try that
  15. has anybody had people signing out of their account and logging into someone elses when they click on some links... yeah i know, it's a weird one.
  16. Re: advanced attack.php thanks heaps, i changed the formula to the same as yours and it seems to be working fine now.
  17. Re: advanced attack.php $stole=(float) (rand($r['money']/500,$r['money']/20)); that's what i have on that line... will try it the same way as yours and thanks for the help, i appreciate it a lot guys
  18. Re: advanced attack.php yep i have altered the database to bigint 40, I've also taken out all the (int) i could in the attack and mugging scripts and where i couldn't take it out i changed it to float
  19. I started a similar post about this problem a while ago but no one could seem to help me so I'm trying to get a fix for this, even if i have to pay someone to do it. When someone attacks someone and then mugs them if the player that they are mugging has more than 2.14 billion on hand there's a good chance that the person that is doing the mugging receives a negative result. does anyone else have or know of anyone else that has this problem with mugging? and does anyone or can someone fix this for me? will pay money if nescersary, NEED IT FIXED FAST THOUGH.
  20. how do i stop the url manipulation when people buy items?
  21. Re: itembuy.php it's ok i have had it fixed.
  22. Re: itembuy.php i really can't figure this out, it jsut keeps coming up with this item can't be bought... please help
  23. Re: URL Manipulation why would it be annoying??? do you exploit games with it?
  24. how do i stop this from happening. is there a way to hide it from users?
  25. Re: itembuy.php thanks for the help in fixing this but it's still not quite right. it stops you from buying stuff when you havn't got enough money or crystals on hand but when you have enough to buy something it comes up as this item can not be bought.
×
×
  • Create New...