Jump to content
MakeWebGames

boots

Members
  • Posts

    91
  • Joined

  • Last visited

Everything posted by boots

  1. Thankyou Octarine all seems well now,still got a lot to learn here,i find it so hard somthimes i seem to spend more time reading then i do building my game, thanks again Octarine :)
  2. Ive changed the as float unsigned NOT NULL DEFAULT '0 do i also change the length/values ? of leave at 11.4?
  3. yes noththing has been changed, I dont know alot about coding still learning Ive done ok so far with help from here and just having a go but this time Im stuck,Im still testing and building the game all was good till 1 of my tester's made level 165
  4. So how do i change it so we can get higher than level 165, or where do i change it ? Im lost sorry for being a pain
  5. in my db exp i have,decimal length/values, 11.4, and default,0.0000, do i change the 11.4 to a bigger number ?
  6. for some reason i cant level past 165 the XP just stops at 99%, is there a cap on levs? or is juat a bug in my game i cant work it out please help thanks
  7. QUERY ERROR: Query was INSERT INTO itembuylogs VALUES ('', 1, 16, 75, 1, unix_timestamp(), 'BOOTSON bought 1 Bat(s) for 75') i get this error when i buy from the shops strange thing is i get it i buy with money and card
  8. Looks great :) i also like your explore page
  9. i know this is an old post but i cant find the download for the images can you please give me the images
  10. I would like to sell items in the shops for crystal's aswell as cash, Is there a mod i can buy for this ? or can some-one help me with the code so i can give it go thanks :)
  11. I have tried many things to try and fix this but still no joy, so i have now made it work in the day cron without the, if(date('G')==17) still dont understand why it dont work in the hour cron ,my sever time is correct
  12. My job is not crediting my users,please help 1 hour cron if(date('G')==17) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY, u.exp=u.exp+(jr.jrPAY/20) WHERE u.job > 0 AND u.jobrank > 0"); $db->query("UPDATE userstats us LEFT JOIN users u ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET us.strength=(us.strength+1)+jr.jrSTRG-1,us.labour=(us.labour+1)+jr.jrLABOURG-1,us.IQ=(us.IQ+1)+jr.jrIQG-1 WHERE u.job > 0 AND u.jobrank > 0"); } if($set['validate_period'] == 60 && $set['validate_on']) { $db->query("UPDATE users SET verified=0"); } ?> i have ran manual cron no errors job.php <?php $jobquery=1; include "globals.php"; $_GET['interview'] = isset($_GET['interview']) && is_string($_GET['interview']) && preg_match("`^\d+$`ims", $_GET['interview']) ? @intval($_GET['interview']) : 0; if(!$ir['job']) { if(!$_GET['interview']) { print " <div class='generalinfo_txt'> <div><img src='images/info_left.jpg' alt='' /></div> <div class='info_mid'><h2 style='padding-top:10px;'> Job Central </h2></div> <div><img src='images/info_right.jpg' alt='' /></div> </div> <div class='generalinfo_simple'><br> <br><br> <font size='2'>NOTE:If any of the 'Req' fields are <font color=green>Green</font> it means that you have reached the required stat you need.<br/> However if any of the 'Req' fields are <font color=red>Red</font> it means that you need to more training on that particular stat.</font> <br/><Br/> Hi, looks like you don't have a job yet, here are the jobs you can get.<br /><br/> <table width='100%' class='table' border='1'> <Tr background='theader.gif'> <th background='theader.gif'>Job Name</th> <th background='theader.gif'>Job Desc</th> <th background='theader.gif'>Req Strength</th> <th background='theader.gif'>Req Labour</th> <th background='theader.gif'>Req IQ</th> <th background='theader.gif'>Get</th> </tr>"; $q=$db->query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID"); while($r=$db->fetch_row($q)) { print "<tr bgcolor='black'> <td>{$r['jNAME']}</td> <td>{$r['jDESC']}</td><td>"; if($ir['strength'] < $r['jrSTRN']) { print "<font color=red>{$r['jrSTRN']}</font>"; } else { print "<font color=green>{$r['jrSTRN']}</font>"; } echo "</td><td>"; if($ir['labour'] < $r['jrLABOURN']) { print "<font color=red>{$r['jrLABOURN']}</font>"; } else { print "<font color=green>{$r['jrLABOURN']}</font>"; } echo "</td><td>"; if($ir['IQ'] < $r['jrIQN']) { print "<font color=red>{$r['jrIQN']}</font>"; } else { print "<font color=green>{$r['jrIQN']}</font>"; } echo "</td> <td><a href='job.php?interview={$r['jID']}'>Get Job</a></td> </tr> "; } print " </table></div><div><img src='images/generalinfo_btm.jpg' alt='' /></div><br></div></div></div></div></div> "; } else { $q=$db->query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID WHERE j.jID={$_GET['interview']}"); $r=$db->fetch_row($q); if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { $db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;"); print "<font color=green><b> <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> Congratulations you got the job!</div></div><br/> <a href='job.php'><u>Go To Your Job</u></a>"; } else { print " <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> <font color=red> Sorry but you are not good enough to get this job, you need: "; if($ir['strength'] < $r['jrSTRN']) { $s=$r['jrSTRN']-$ir['strength']; print " $s more Strength,"; } if($ir['labour'] < $r['jrLABOURN']) { $s=$r['jrLABOURN']-$ir['labour']; print " $s more Labour,"; } if($ir['IQ'] < $r['jrIQN']) { $s=$r['jrIQN']-$ir['IQ']; print " $s more IQ, "; } print "to get the job.</div></div> <a href='job.php'><u>Back</u></a> "; } } } else { switch($_GET['action']) { case 'quit': quit_job(); break; case 'promote': job_promote(); break; default: job_index(); break; } } function job_index() { global $db, $ir,$c,$userid,$h; print " <div class='generalinfo_txt'> <div><img src='images/info_left.jpg' alt='' /></div> <div class='info_mid'><h2 style='padding-top:10px;'> Job Central </h2></div> <div><img src='images/info_right.jpg' alt='' /></div> </div> <div class='generalinfo_simple'><br> <br><br> You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} each day at 5pm!<br /> You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour!<br /><br> <table width=50% cellspacing=1 class='table'><tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</td></tr><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table> <br><b>Job Ranks</b><br /> <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th></tr>"; $q=$db->query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td></tr>"; } print "</table><br/><b><a href='job.php?action=promote'>Try To Get Promoted</a></b> | <b><a href='job.php?action=quit'>Quit Job</a></b></div><div><img src='images/generalinfo_btm.jpg' alt='' /></div><br></div></div></div></div></div><br /> "; } function job_promote() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1"); if($db->num_rows($q) == 0) { print " <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> <font color=red>Sorry, you cannot be promoted at this time.</font> </div></div> <br /> <a href='job.php'><u>Back</a></a>"; } else { $r=$db->fetch_row($q); $db->query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid"); print " <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> Congrats, you have been promoted to {$r['jrNAME']}. </div></div> <br /> <a href='job.php'>Back</a>"; } } function quit_job() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET job=0,jobrank=0 WHERE userid=$userid"); print " <div id='mainOutput' style='text-align: center; color: green; width: 600px; border: 1px solid #222222; height: 70px; margin: 0 auto 10px; clear: both; position: relative; left: -20px; padding: 8px'> You have quit your job!</div></div><br /> <a href='job.php'>Back</a>"; } $h->endpage(); ?>   read most of the posts on this forum but still cant fix
  13. Please help Im trying to get this to run my bodygaurd cron all works fine with the hosp and jail but i cant seem to make it work for the bgaurd this what i have now like i say hosp and jail work fine   <?PHP $result = $db->query("SELECT * FROM `updates` WHERE `name` = '1min'"); $result = $db->fetch_row($result); $hla = time() - $result['last']; if($hla > (60)) { $n = floor($hla / 60); $hospital = (1 * $n); $bguard = (1 * $n); $jail = (1 * $n); $query_hos = sprintf("UPDATE users SET hospital = hospital - %u WHERE hospital <> 0", $hospital); $query_jail = sprintf("UPDATE users SET jail = jail - %u WHERE jail <> 0", $jail); $query_bguard = sprintf("UPDATE users SET bguard = bguard - %u WHERE bguard <> 0", $bguard); $db->query($query_hos); $db->query($query_jail); $db->query($query_bguard); $db->query("UPDATE `users` SET `hospital` = 0 WHERE `hospital` < 0"); $db->query("UPDATE `users` SET `jail` = 0 WHERE `jail` < 0"); $db->query("UPDATE users SET bguard=bguard-1 WHERE bguard>0"); $db->query("UPDATE users SET bguard=0 WHERE bguard<0"); $time = time(); $db->query("UPDATE `updates` SET `last` = ".$time." WHERE `name` = '1min'"); $floor = $time - (floor($time / 60) * 60); if($floor > 0) { $newUpdate = time() - $floor; $db->query("UPDATE `updates` SET `last` = ".$newUpdate." WHERE `name` = '1min'"); } } ?>   This is my 1 min cron   <?PHP include "config.php"; include "language.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; $db->query("UPDATE users set hospital=hospital-1 WHERE hospital>0"); $db->query("UPDATE `users` SET jail=jail-1 WHERE `jail` > 0"); $db->query("UPDATE users SET traveltime=traveltime-1 WHERE traveltime > 0"); $db->query("UPDATE users SET bguard=bguard-1 WHERE bguard>0"); $db->query("UPDATE users SET bguard=0 WHERE bguard<0"); $hc=$db->num_rows($db->query("SELECT * FROM users WHERE hospital > 0")); $jc=$db->num_rows($db->query("SELECT * FROM users WHERE jail > 0")); $db->query("UPDATE settings SET conf_value='$hc' WHERE conf_name='hospital_count'"); $db->query("UPDATE settings SET conf_value='$jc' WHERE conf_name='jail_count'"); ?>
  14. Thakyou Sniko
  15. I have now taken down the chat,it is Ajax you can find the chat here http://store.davemacaulay.com/products/Ajax-Gang%7B47%7DChannel-Chat-System.html the chat is great and i will have it up and running again when i move servers, Im hosting with http://www.hosting24.com, Iam new to running a game so i dont know if its the game causing the prob or the severs,i do have my test site on a sub donmain on hostgatar which runs fine,so it looks like i will host there,still not sure yet, I still have a lot of work to get the 100% the way i want it and as Im a noob i spend more time with the script then having to worry about severs i thought i had that part sorted looks like i got that wrong big time :(
  16. Im looking for a good sever,all was well with my sever untill i added a shoutbox :( who do use? what do you think is the best for a small timer just starting up? Website you were trying to visit was disabled for 5 minutes, because it received over 20% of total server requests. It means that this website was using over 20% of processor resources, which is above allowed limit. Website was temporary disabled to protect server from overloading and other websites on server. Please try again in 5 minutes. yet only 2 online
  17. no joy :(   Parse error: syntax error, unexpected T_STRING in /home/bootson/public_html/mafia/signup.php on line 403 line 403, $db->query("INSERT INTO mail VALUES ('',0,1,$i,unix_timestamp(),'Welcome','Welcome {$ir["username"]}.to gang land killers! Please Read the Tutorial,<a href = "helptutorial.php">Tutorial</a> To receive your Welcome Starter Pack mail admin,Enjoy the game If you Need any help just mail me or use the chat box')",$c);
  18. Im trying to add a link in my welcome message i have tried it so many ways but still no joy :( QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'helptutorial.php' />Tutorial To receive your Welcome Starter Pack mail admin' at line 1 Query was INSERT INTO mail VALUES ('',0,1,62,unix_timestamp(),'Welcome','Welcome .to gang land killers! Please Read the Tutorial,Tutorial To receive your Welcome Starter Pack mail admin,Enjoy the game If you Need any help just mail me or use the chat box')   $db->query("INSERT INTO mail VALUES ('',0,1,$i,unix_timestamp(),'Welcome','Welcome {$ir['username']}.to gang land killers! Please Read the Tutorial,<a href = 'helptutorial.php' />Tutorial</a> To receive your Welcome Starter Pack mail admin,Enjoy the game If you Need any help just mail me or use the chat box')",$c); $db->query("UPDATE users SET new_mail = new_mail + 1 WHERE userid = $i"); if($_POST['ref']) {
  19. Thank you Octarine :)
  20. $db->query("INSERT INTO users (username, display_pic, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', 'http://{$_SERVER['HTTP_HOST']}/images/avatar.gif', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10, 5)"); $db->query("INSERT INTO mail VALUES ('',0,1,$i,unix_timestamp(),'Welcome','Welcome to gang land killers')",$c); if($_POST['ref']) { require "global_func.php"; this does send the mail,but it dont show in the you have mail part,so when the new guy 1st logs in they dont know they have mail but the mail is in the mailbox
  21. cant even find a modules folder ??
  22. Thankyou :) lucky, this noob is learning
  23. It seems the item's found on the streets go into inventory as single items cant get them to group :( } else if($_GET['search'] == 2) { if($rand == 1) { $db->query("INSERT INTO `inventory` VALUES('',$itemidsearch2,$userid,$quantitysearch2)"); echo "<span style='color:green;font-weight:700;'>Success</span><br />While searching ".$cityname." you found an mysterious item. Go to your inventory to find out what"; } else {   this is what i have changed but dont work as you guys will know $db->query("UPDATE INTO inventory SET('',$itemidsearch8,$userid,$quantitysearch8)"); where am i going wrong ?   function item_add($user, $itemid, $qty, $notid=0) { global $db; if($notid > 0) { $q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} and inv_itemid={$itemid} AND inv_id != {$notid}"); } else { $q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} and inv_itemid={$itemid}"); } if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); $db->query("UPDATE inventory SET inv_qty=inv_qty+{$qty} WHERE inv_id={$r['inv_id']}"); } else { $db->query("INSERT INTO inventory (inv_itemid, inv_userid, inv_qty) VALUES ({$itemid}, {$user}, {$qty})"); } } i found this on the furums but just dont know how to add it to the script :(
  24. boots

    hosptal times

    Its all new to me and i find it very hard to get my head round,got along way to go but slowly getting into it and so far enjoying it going blind from looking at my screen for hours though lol, thanks to this forum i can learn alot with your help guys thanks again :D
  25. boots

    hosptal times

    thankyou so much been searching the here for what seems like ages, and now i see how its done i can't belive i missed it :)
×
×
  • Create New...