Jump to content
MakeWebGames

Smokey

Members
  • Posts

    137
  • Joined

  • Last visited

Everything posted by Smokey

  1. Smokey

    Why?

    I have 1.6k total users and about 110 - 130 logging in everyday. I am ALWAYS working on new updates and I keep the users fairly informed so they can expect some of whats coming, this also falls in line with keeping them interested. I try to keep things lively by having competitions. Like for instance right now there is a competition going that I built, snowball fights, first you build your snow fort and watch it grow and you have a time limit to build it up, 7 days or so, then you fight against the other forts to see who will come out on top. Then everyone gets to destroy my mega fort and whoever gets the most damage wins, point is keeping them entertained is KEY. And originality goes a long way too. Also communication and community, my users know I can be found in the chat most hours of the day and I listen to ideas or help players when needed. I spent tons of money on advertising at first, and I feel like I got ripped off so I don't really recommend it unless you have a super awesome frontpage that people can't resist signing up to. Most of this was already said in this thread really but my 2 cents anyway.
  2. yea i was working my way towards that, if i do it i'll update it here as well edit: Actually I don't think I'm going to take the time to do that, I got some other stuff I gotta get ready for Christmas. :P
  3. This mod started out as illusions advent calendar found here..http://makewebgames.io/showthread.php/35039-Christmas-Advent-Calendar-WORKING-COPY Figured I would point credit even though almost all the code has been re-written. This mod has no map area like the original as I could not get it to work correctly. It is a bit simpler I think but much more effective and honestly with a little more time I could have probably made the db table much smaller. There are no crons at all, it uses the server time to determine whether a door is locked or not. The doors can only be accessed in the month of Dec. between the 1st and the 25th. and individual doors can only be accessed on the correct day, and they can only be opened once, so if you miss a day, you cannot open the door for that day (hovering over the door will tell you which day it can be opened, hovering over an already opened door - which is a gift box - will tell you which day it was opened. There are no entries to the users table, it has all been moved to a separate table. You will have to change the item ids in the array to your own items, and make adjustments to the xmaStop function how you see fit. You may also need to change the way item pics are displayed as it is coded to fit my game. Once you have this going you won't need to do ANYTHING except run a single query before next Christmas to reset it (included), it will run each year like clockwork. The rewards given are cash, points/crystals and an item. I will post the php files here so you all can look at them but everything you need is in the zip file. If you use this mod please give some feedback! adventcal.php <? include "globals.php"; $query=sprintf("SELECT * FROM advent WHERE (userid = %u)", $ir['userid']); $query2=$db->query($query); if(!$db->num_rows($query2)) { die("<h3>You dont have a calendar yet"); } $r=$db->fetch_row($query2); print "<table width='100%' background='images/advent/xmasback.jpg' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'><tr>"; print "<td>"; if($r['frame1'] != 1) { print "<a href='advents.php?event=1'><img src='images/advent/dr1.png' title='Open on December 1st' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift1.png' title='This door was opened on Dec. 1st' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame2'] != 1) { print "<a href='advents.php?event=2'><img src='images/advent/dr2.png' title='Open on December 2nd' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift2.png' title='This door was opened on Dec. 2nd' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame3'] != 1) { print "<a href='advents.php?event=3'><img src='images/advent/dr3.png' title='Open on December 3rd' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift3.png' title='This door was opened on Dec. 3rd' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame4'] != 1) { print "<a href='advents.php?event=4'><img src='images/advent/dr4.png' title='Open on December 4th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift4.png' title='This door was opened on Dec. 4th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame5'] != 1) { print "<a href='advents.php?event=5'><img src='images/advent/dr5.png' title='Open on December 5th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift5.png' title='This door was opened on Dec. 5th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td></tr><tr><td>"; if($r['frame6'] != 1) { print "<a href='advents.php?event=6'><img src='images/advent/dr6.png' title='Open on December 6th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift6.png' title='This door was opened on Dec. 6th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame7'] != 1) { print "<a href='advents.php?event=7'><img src='images/advent/dr7.png' title='Open on December 7th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift7.png' title='This door was opened on Dec. 7th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame8'] != 1) { print "<a href='advents.php?event=8'><img src='images/advent/dr8.png' title='Open on December 8th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift8.png' title='This door was opened on Dec. 8th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame9'] != 1) { print "<a href='advents.php?event=9'><img src='images/advent/dr9.png' title='Open on December 9th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift9.png' title='This door was opened on Dec. 9th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame10'] != 1) { print "<a href='advents.php?event=10'><img src='images/advent/dr10.png' title='Open on December 10th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift10.png' title='This door was opened on Dec. 10th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td></tr><tr><td>"; if($r['frame11'] != 1) { print "<a href='advents.php?event=11'><img src='images/advent/dr11.png' title='Open on December 11th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift11.png' title='This door was opened on Dec. 11th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame12'] != 1) { print "<a href='advents.php?event=12'><img src='images/advent/dr12.png' title='Open on December 12th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift12.png' title='This door was opened on Dec. 12th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame13'] != 1) { print "<a href='advents.php?event=13'><img src='images/advent/dr13.png' title='Open on December 13th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift13.png' title='This door was opened on Dec. 13th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame14'] != 1) { print "<a href='advents.php?event=14'><img src='images/advent/dr14.png' title='Open on December 14th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift14.png' title='This door was opened on Dec. 14th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame15'] != 1) { print "<a href='advents.php?event=15'><img src='images/advent/dr15.png' title='Open on December 14th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift15.png' title='This door was opened on Dec. 15th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td></tr><tr><td>"; if($r['frame16'] != 1) { print "<a href='advents.php?event=16'><img src='images/advent/dr16.png' title='Open on December 16th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift16.png' title='This door was opened on Dec. 16th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame17'] != 1) { print "<a href='advents.php?event=17'><img src='images/advent/dr17.png' title='Open on December 17th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift17.png' title='This door was opened on Dec. 17th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame18'] != 1) { print "<a href='advents.php?event=18'><img src='images/advent/dr18.png' title='Open on December 18th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift18.png' title='This door was opened on Dec. 18th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame19'] != 1) { print "<a href='advents.php?event=19'><img src='images/advent/dr19.png' title='Open on December 19th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift19.png' title='This door was opened on Dec. 19th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame20'] != 1) { print "<a href='advents.php?event=20'><img src='images/advent/dr20.png' title='Open on December 20th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift20.png' title='This door was opened on Dec. 20th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td></tr><tr><td>"; if($r['frame21'] != 1) { print "<a href='advents.php?event=21'><img src='images/advent/dr21.png' title='Open on December 21st' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift21.png' title='This door was opened on Dec. 21st' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame22'] != 1) { print "<a href='advents.php?event=22'><img src='images/advent/dr22.png' title='Open on December 22nd' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift22.png' title='This door was opened on Dec. 22nd' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame23'] != 1) { print "<a href='advents.php?event=23'><img src='images/advent/dr23.png' title='Open on December 23rd' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift23.png' title='This door was opened on Dec. 23rd' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame24'] != 1) { print "<a href='advents.php?event=24'><img src='images/advent/dr24.png' title='Open on December 24th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift24.png' title='This door was opened on Christmas Eve' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><td>"; if($r['frame25'] != 1) { print "<a href='advents.php?event=25'><img src='images/advent/dr25.png' title='Open on December 25th' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'></a>"; } else { print "<img src='images/advent/gift25.png' title='Have a Merry Mayhem Christmas!' style='border:1px solid black;border-radius: 15px;margin: 10px 20;'>"; } print "</td><tr></table>"; $h->endpage(); exit; ?> advents.php <? include "globals.php"; function xmaStop($msg) { global $h; echo "<div style='color: red;background-color: #00D619;border: 3px solid;background-repeat: no-repeat;background-position: 10px center;width: 60%;border-radius: 15px;margin: 10px 0;padding: 15px 0px 15px 0px;'><img src='images/advent/tree.png' height='150'/><br>",$msg; $h->endpage(); exit; } //if($ir['userid'] != 1) { xmaStop ("The advent calendar is closed to the public right now."); } function ordinal_suffix($num){ if($num < 11 || $num > 13){ switch($num % 10){ case 1: return 'st'; case 2: return 'nd'; case 3: return 'rd'; } } return 'th'; } $seccurrency = "points"; //change to points/crystals $filename="adventwords.txt"; $words=file($filename); shuffle($words); $wordz=$words[0]; $word = "Random Christmas Fact: ".$wordz.""; $_GET['event'] == (int) $_GET['event']; $xmass = array('30' => '1','31' => '2','330' => '3','32' => '4','331' => '5','33' => '6','332' => '7','34' => '8','333' => '9','35' => '10','336' => '11','36' => '12','339' => '13'); $pressie = array_rand($xmass,1); $queryx=sprintf("SELECT itmname FROM items WHERE (itmid = %u)", $pressie); $queryx2=$db->query($queryx); $rx=$db->fetch_row($queryx2); $cash = rand(120000,295000); $tend = rand(3,15); $frame = "frame".$_GET['event'].""; $dayz = date ('j'); $month = date ('n'); if($month != 12 OR $dayz > 25) { xmaStop ("The advent calendar can only be accessed between the 1st and 25th of December!"); } $query=sprintf("SELECT * FROM advent WHERE (userid = %u)", $ir['userid']); $query2=$db->query($query); $r=$db->fetch_row($query2); if(!$_GET['event']) { xmaStop ("What are you doing?"); } if($dayz != $_GET['event']) { xmaStop ("Sorry, you can only open this door on the ".$_GET['event']."".ordinal_suffix($_GET['event'])." day of Christmas.<br><br><a href='index.php'>Home</a>");} if($r[''.$frame.''] > 0) { xmaStop ("Sorry, you have already opened this door today.<br><br><a href='index.php'>Home</a>");} if($_GET['event'] == '1') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame1=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 1 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '2') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame2=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 2 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '3') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame3=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 3 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '4') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame4=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 4 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '5') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame5=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 5 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } if($_GET['event'] == '6') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame6=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 6 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '7') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame7=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 7 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '8') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame8=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 8 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '9') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame9=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 9 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '10') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame10=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 10 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '11') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame11=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 11 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '12') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame12=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 12 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '13') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame13=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 13 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } if($_GET['event'] == '14') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame14=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 14 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '15') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame15=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 15 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '16') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame16=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 16 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '17') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame17=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 17 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '18') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame18=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 18 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '19') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame19=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 19 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '20') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame20=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 20 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '21') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame21=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 21 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } if($_GET['event'] == '22') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame22=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 22 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '23') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame23=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 23 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '24') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame24=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 24 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } else if($_GET['event'] == '25') { item_add($userid,$pressie,1); $db->query("UPDATE users SET money=money+$cash, crystals=crystals+$tend WHERE userid=$userid"); $db->query("UPDATE advent SET frame25=1 WHERE userid=$userid"); print "<table width=100%><tr align=center><td colspan=2 style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h2>".$word."</h2></td></tr><tr align=center><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><h3>You Opened Door Number 25 and found -<br></h3><h2>".$tend." ".$seccurrency."<br><a href='iteminfo.php?ID=".$pressie."'>".$rx['itmname']."</a><br>".money_formatter($cash)." in cash</h2></td><td style='color: #C20000;background-color: #00D619;border:2px solid;border-radius: 15px;margin: 10px 20;'><img src='itempics/".$pressie.".jpg' height='100'></td></tr></table> <a href='adventcal.php'>Go Back</a>"; } $h->endpage(); exit; ?> Open register.php find: $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); put this under it: $db->query("INSERT INTO advent VALUES($i, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); SQL: DROP TABLE IF EXISTS `advent`; CREATE TABLE IF NOT EXISTS `advent` ( `userid` int(11) NOT NULL AUTO_INCREMENT, `frame1` int(2) NOT NULL DEFAULT '0', `frame2` int(2) NOT NULL DEFAULT '0', `frame3` int(2) NOT NULL DEFAULT '0', `frame4` int(2) NOT NULL DEFAULT '0', `frame5` int(2) NOT NULL DEFAULT '0', `frame6` int(2) NOT NULL DEFAULT '0', `frame7` int(2) NOT NULL DEFAULT '0', `frame8` int(2) NOT NULL DEFAULT '0', `frame9` int(2) NOT NULL DEFAULT '0', `frame10` int(2) NOT NULL DEFAULT '0', `frame11` int(2) NOT NULL DEFAULT '0', `frame12` int(2) NOT NULL DEFAULT '0', `frame13` int(2) NOT NULL DEFAULT '0', `frame14` int(2) NOT NULL DEFAULT '0', `frame15` int(2) NOT NULL DEFAULT '0', `frame16` int(2) NOT NULL DEFAULT '0', `frame17` int(2) NOT NULL DEFAULT '0', `frame18` int(2) NOT NULL DEFAULT '0', `frame19` int(2) NOT NULL DEFAULT '0', `frame20` int(2) NOT NULL DEFAULT '0', `frame21` int(2) NOT NULL DEFAULT '0', `frame22` int(2) NOT NULL DEFAULT '0', `frame23` int(2) NOT NULL DEFAULT '0', `frame24` int(2) NOT NULL DEFAULT '0', `frame25` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; Run this script one time to add existing users to the advent table, you can name it whatever you want: <?php include "globals.php"; global $db,$ir,$c,$h; function xmaStop($msg) { global $h; echo "<div style='color: red;background-color: #00D619;border: 3px solid;background-repeat: no-repeat;background-position: 10px center;width: 60%;border-radius: 15px;margin: 10px 0;padding: 15px 0px 15px 0px;'><img src='images/tree.png' height='150'/><br>",$msg; $h->endpage(); exit; } if($ir['userid'] != 1) { xmaStop ("You cannot be here"); } $q=mysql_query("SELECT userid,username FROM users",$c); while($adv=mysql_fetch_array($q)) { $db->query("INSERT INTO advent VALUES({$adv['userid']}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,)") or die(mysql_error()); print "Details for {$adv['username']} added</br>"; } ?> All files incuding images are in the zip file, the door images are just pulled from google and the gifts are free vector images. http://www22.zippyshare.com/v/31678161/file.html
  4. Does anyone have the images for this still?
  5. I was just going over the kidnapping sections while converting this to fit with my Cartels and I happened to notice that the 2 queries needed to deduct from one and pay the other gang are not there :P $db->query(sprintf("UPDATE `gangs` SET `gangMONEY` = `gangMONEY` - '%d' WHERE (`gangID` = %u)", $row['gkRansom'], $r['gangID'])); $db->query(sprintf("UPDATE `gangs` SET `gangMONEY` = `gangMONEY` + '%d' WHERE (`gangID` = %u)", $row['gkRansom'], $row['gangID']));
  6. if($_GET['action']=='100mill'){ if (($ir['money']+$ir['bankmoney']) <100000000) { echo "You need to have 100 million in your bank and/or onhand to access here..."; echo " <a href='h2.php'>Go Back to Honor Awards</a> "; $h->endpage(); } }   It looks like you have an extra curly at the bottom of this piece of code, it should only be one. It looks like it would use both of them but this statement doesn't actually close until later on.   if($_GET['action']=='100mill'){ if (($ir['money']+$ir['bankmoney']) <100000000) { echo "You need to have 100 million in your bank and/or onhand to access here..."; echo " <a href='h2.php'>Go Back to Honor Awards</a> "; $h->endpage(); } } $gh=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='100mill'",$c); if(mysql_num_rows($gh)) { print "You have already recieved that award you can only recieve each award once! "; print "<a href='h2.php'>Back to Honor Awards</a> "; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'100mill')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Congratulations on having collected 100 million. You have been credited with one honor award."; print "<a href='h2.php'>Back to Honor Awards</a> "; } }   It closes at the end here. So the curly at the bottom of the first piece of code is causing your error.
  7. Who said I wasn't going to change anything? I'm going to lower the amount of columns in the users table...that is change.
  8. Yea I will definitely do it on my dev site and move it over. We'll see how that goes and I'll post up how well it worked out when I'm done, and thanks for your help Haunted Dawg.
  9. The reason the users table has so many columns is because when I first started coding I thought everything pertaining to a users account was suppose to be held in the users table. So a lot of columns were added when adding mods and different things. Now when I build a mod I do my best to keep it out of the users table completely.
  10. It's 264 columns, only 1577 rows(users) and about 10 or so of those are deleted. I'm thinking what I may do, it can't hurt anyways, is take the last 50 columns or so (1 at a time) and move them to another table then change the necessary files to reflect the table change (luckily those columns will only point to a couple files each if that), creating a 2nd users table and using this table for all future users table columns. It will take me some time to do I suppose. I'm not sure how to put a slow query log on the mysql class I'll have to research that. I'm a very quick study, almost anything I try to learn, I learn. :P It seems its the same 2 or 3 queries that keep repeating in my tmp slow query log, updating the events (events table) and laston, lastip (users table).
  11. laston is already INT(11). I did change it to use time() so hopefully that will help. Honestly I'm thinknig its something else that is causing the queries to run slow. One of the queries in the log: $db->query("UPDATE `events` SET `evREAD` = 1 WHERE `evUSER` = $userid"); Which just to try and optimize a bit I changed to: $db->query("UPDATE `events` SET `evREAD` = 1 WHERE `evREAD` != 1 AND `evUSER` = $userid"); This is a pretty simple query though and I don't see how it would cause a problem like this, I'm wondering if maybe my users table is just too big so it causes other queries to lag out as well, it has 264 columns.
  12. Yea that's what I think too there must be sort of query loop. I have looked through the header and index files and made sure no user table querys selected everything but only what it needed (and most other queries as well). I'm going to have to look into how to track it as I have no clue. The slow_queries I'm sure is too high, right now when I checked it it was at 145.2k so there are for sure some slow queries, I just don't know how to track them down yet. Ok so I found the slow queries logs, there is one particular query that is repeated more than any other, and its a default query that comes with mccodes and is in the header.php:   $db->query("UPDATE `users` SET `laston` = ".$_SERVER['REQUEST_TIME'].",`lastip` = '$IP' WHERE `userid` = $userid",$c);   Wouldn't it just be easier to SET laston = unix_timestamp() ?
  13. This has been an issue for well over a year now, so if it was because of a modification I put in I wouldnt have a clue as to what it was. It doesn't happen until there are about 30 people online. As far as it being my shared host, I had the same problem, even worse, with past hosts. When it first started happening I figured it was due to more and more users, so I moved to a VPS. It not only caused the errors still but it also caused that VPS to keep restarting. Bluehost I have had the least amount of problems with and have been with them for almost a year. I'm not sure what you mean here. Check what about the database?
  14.   I have bluehost shared and using v2. I contacted them some time ago and this was their response: This problem is caused by an issue with the coding. Your mysql connections are not closing where and when they should close. You should contact a website builder to help you fix that code. Pretty vague. I'm hoping its not some rogue query that is maybe causing an infinite loop or something, it would be near impossible for me to go through every file and every query looking for it.
  15. I have seen that thread and a hundred like it. None of them give me any real answers. It was to my understanding that connections were by default non-persistent so they should close automatically.   Exactly how do you do this? Like I said I thought they closed automatically. As for the phpmyadmin, i have no privileges tab. But as stated my max_user_connections is set at 15 and from what I hear that is plenty. Also max_connections is set at 1500.
  16. No Dave, this happens when I am not running your chat as well. I have not had your chat running for at least 48 hours now, and just put in my header code for arrow chat. Same thing happens, it lags out and I start getting these connection errors. And to be honest it happens extremely quicker with arrow chat as it does with yours. And it only happens 1 second after the minute mark which I find to be very odd as I really don't think its my cron file.
  17. I still have not figured out what is causing this issue, the errors are always timestamped 1 second after the minute (:01) or occasionally 2 seconds after. So I figured it was in the minute cron file. but I cannot for the life of me see anything in my minute cron that would cause this unless it has to do with the db connection itself. include_once "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id;   Looks fine to me. There are some exceptionally good PHP coders here so surely someone would have some sort of clue as to what is causing this? My max_user_connections is set at 15. Also my max_connections is set at 1500. When I run the command to see connected threads (SHOW STATUS WHERE `variable_name` = 'Threads_connected';) it can vary greatly, from 4 threads up to 60 or so. And it can go up that far within a couple seconds as I can run the command twice within a few seconds and get a result from both ends of that range. I really need to get this issue sorted as the game is trying to grow but cant considering once so many people (30 or so) are online at the same time it starts throwing these errors.
  18. All you have to do is start your game, then refresh the page until you get a safe number to bet high or low on, so if you know how to use it you will virtually never lose..
  19. IF he does have legal grounds and you decide to pay for the codes, I would strongly suggest contacting him via Icecoldnetworks or ruthless city and make sure you're actually dealing with him before giving him any sort of payment. You never know it may just be some d-bag trying to scam you out of $80
  20. Daves is good, I own that one, and Cronus's isnt too bad either, a bit simpler than Daves, I own that one too. Both have good qualities, Daves looks more professional by far in my opinion. Cronus's is a bit easier for the user BUT Daves has a shopping cart. So it really depends on your preference.
  21. I've tried to contact you through Oxyden but its closed down for remodeling :P
  22. I have no idea, I have been trying to find the source of it for several weeks now lol
  23. Partial texts Id User Host db Command Time State Info Kill Kill 18796133 -removed- localhost -removed- Query 0 NULL SHOW PROCESSLIST   This is all I get when i run that query
  24. But its suppose to NOT be persistent connections so I shouldn't have to close, they should be closing automatically or so I thought. And to be honest I'm not exactly sure how to. On someones advice I put mysql_close(); at the bottom of the header, no change.
  25. I am currently using an old gang kidnapping mod, very simple but not made very well. I am also in the middle of converting a Faction mod into a Cartel Mod with lots of new stuff added, I do believe I'm going to work this mod into the Cartels as it looks much more comprehensive :thumbsup:
×
×
  • Create New...