Jump to content
MakeWebGames

Curt

Members
  • Posts

    525
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Curt

  1. ok so your simply trying to make a log system for your lottery system ? $db->query("INSERT INTO 'lotterywins' VALUES ('', '{$ir['username']}', '{$r['amount']}')"); First off you need to make sure the column count matches. next you need to make sure that the $r variable is defined for $r['amount'] then the above query should work. also that script is a bit confusing...what exactly are you doing with the $_GET['ID'] ?...because looks like nothing from what i see...
  2. I recently added a Marriage Mod to my game and I edited it so players can only marry someone of the opposite sex. Then today I get a message from a member saying i can be sued for prohibiting gay marriage... My question is can i be sued for prohibiting gay marriage ?   thank you if anyone can help cheers
  3. lol..this is my fault for the very crappy coding job i did on this...lol remove line 81 and you should be fine...ill also update the first post..
  4. Im looking to buy a nice login page for my game and possibly a register page as well... my price range is between 10$ and 30$ pm me with quotes or whatever...and ill show you an example of something im looking for.. thanks
  5. sounds like a nice mod :)
  6. Good luck, I hope you get to the bottom of this soon, because from the way it sounds this person is definitely trying to frame you and doing a damn good job of it. cheers
  7. the first post with the code for the home.php has been updated and should work fine now...
  8. please point out the bugs also...
  9. Actually you do need to add that, the way you have it now when ever someone upgrades their house it does a new insert instead of updating their old data. lol..i secured those querys quickly before i posted this so i guess i made a few typos :(   thx for pointing that out to me :)
  10. hmm thinking u put the code in wrong :P...u can pm me your estate and i will fix it ;)
  11. A very basic mod to start off with, you can go inside your house and do various activitys... home.php <?php include "globals.php"; // CALL Your House DATA $h=$db->query("SELECT * FROM home_users WHERE home_userid={$userid}"); $home=$db->fetch_row($h); $hh=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $hhh=$db->fetch_row($hh); if ($home['home_userid'] == '') { echo " YOU ARE HOMELESS ! "; return; } echo "<h1> INSIDE YOUR {$hhh['hNAME']} </h1><hr>"; echo " You have entered your house, so what you gonna do ?"; echo " "; echo "[[url='home.php?action=upgrades'] Buy Upgrades [/url]]"; echo " "; echo "[[url='home.php?action=livingroom'] Enter Living Room [/url]]--[[url='home.php?action=bedroom'] Enter Bed Room [/url]]--[[url='home.php?action=kitchen'] Enter Kitchen [/url]]"; switch($_GET['action']) { case "livingroom": living_room(); break; case "bedroom": bed_room(); break; case "kitchen": kitchen(); break; case "upgrades": home_upgrade(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h,$home; echo " "; echo " Each room has different things for you to do !"; } function living_room() { global $db, $ir,$c,$userid,$h,$home; echo " <h3> LIVING ROOM </h3><hr width=25%> "; if($_POST['TV']) { if ($home['home_tv'] == 0) { echo " You do not own a TV "; return; } else { if ($ir['watched_tv'] != 0) { echo " You can only watch TV once a hour."; return; } $db->query(sprintf("UPDATE home_users SET home_microwave = $u WHERE home_userid = %u",1, $userid)); $db->query(sprintf("UPDATE users SET view_tv = view_tv + %u, brave=maxbrave WHERE userid = %u",1,$userid)); echo " You watched your TV for a while and gain 100 % Nerve !"; return; } } if($_POST['SIT']) { if ($home['home_couch'] == 0) { echo " You do not own a Couch ! "; return; } else { if ($ir['watched_couch'] != 0) { echo " You can only nap on your sofa once a hour."; return; } $will = $ir['maxwill'] * .20; $willgain= $ir['will'] + $will; if ($willgain > $ir['maxwill']) { $willgain = $ir['maxgain'];} $db->query(sprintf("UPDATE users SET sleep_sofa = sleep_sofa + %u, will=%u WHERE userid = %u",1,$willgain,$userid)); echo " You napped on your sofa and gained some Awake !"; return; } } if ($home['home_tv'] > 0) { echo "<table width=80%> <tr> <td width='25%'>[img=images/home/tv.png]</td> <td> Once a HOUR you can view the television. You will gain 100% Nerve for this action. </td> <td>"; echo " <form action='home.php?action=livingroom' method='POST'> <input type='hidden' name='TV' /> <input type='submit' value='Watch TV' name='TV' /></form> "; echo "</td></tr></table>"; } else { echo " YOU DONT OWN A TELEVISION. "; } echo " "; if ($home['home_couch'] > 0) { echo "<table width=80%> <tr> <td width='25%'>[img=images/home/couch.png]</td> <td> Once a HOUR you can take a nap on your Sofa. You will gain 50% Awake for this action. </td><td>"; echo " <form action='home.php?action=livingroom' method='POST'> <input type='hidden' name='SIT' /> <input type='submit' value='Sit Down' name='SIT' /></form> "; echo "</td></tr></table>"; } else { echo " YOU DONT OWN A SOFA. "; } } function bed_room() { global $db, $ir,$c,$userid,$h,$home; echo " <h3> BED ROOM </h3><hr width=25%> "; if($_POST['SLEEP']) { if ($home['home_bed'] == 0) { echo " You do not own a Bed "; return; } else { if ($ir['sleep_bed'] >= 2) { echo " You can only Sleep in your bed 2 times a day."; return; } $db->query(sprintf("UPDATE users SET sleep_bed = sleep_bed + %u, energy=maxenergy, will=maxwill WHERE userid = %u",1,$userid)); echo " You went to sleep for a while and gained Full Energy and Awake !"; return; } } echo " "; if ($home['home_bed'] > 0) { echo "<table width=80%> <tr> <td width='25%'>[img=images/home/bed.png]</td> <td> Twice a DAY you can go to sleep on your Bed. You will gain Full Energy and Awake for this action. </td><td>"; echo " <form action='home.php?action=bedroom' method='POST'> <input type='hidden' name='SLEEP' /> <input type='submit' value='Sleep' name='SLEEP' /></form> "; echo "</td></tr></table>"; } else { echo " YOU DONT OWN A BED. "; } } function kitchen() { global $db, $ir,$c,$userid,$h,$home; echo " <h3> KITCHEN </h3><hr width=25%> "; if($_POST['STOVE']) { if ($home['home_refridgerator'] ==0) { echo " A refridgerator is required to cook meals. "; return; } else { if ($home['home_stove'] == 0) { echo " You do not own a stove "; return; } else { if ($ir['meals_eat'] >= 3) { echo " You can only eat 3 meals a day."; return; } $db->query(sprintf("UPDATE users SET meal_eat = meal_eat + %u, energy=maxenergy, hp=maxhp WHERE userid = %u",1,$userid)); echo " You cooked a Superb Meal and gained Full Energy and Health. !"; return; } } } if($_POST['MICROWAVE']) { if ($home['home_refridgerator'] ==0) { echo " A refridgerator is required to cook meals. "; return; } else { if ($home['home_microwave'] == 0) { echo " You do not own a microwave "; return; } else { if ($ir['meals_eat'] >= 3) { echo " You can only eat 3 times a day."; return; } $energy = $ir['maxenergy'] * .50; $health = $ir['maxhp'] * .50; $energygain = $ir['energy'] + $energy; if ($energygain > $ir['maxenergy']) { $energygain = $ir['maxenergy']; } $healthgain = $ir['hp'] + $health; if ($healthgain > $ir['maxhp']) { $healthgain = $ir['maxhp']; } $db->query(sprintf("UPDATE users SET meal_eat = meal_eat + %u, energy=%u, hp=%u WHERE userid = %u",1,$energygain,$healthgain,$userid)); echo " You Cooked a decent meal and gained some Energy and Health !"; return; } } } echo " "; if ($home['home_refridgerator'] > 0) { echo "<table width=80%> <tr> <td width='25%'>[img=images/home/fridge.png]</td> <td> You can Eat 3 Times a day.</td> <td> NO ACTIONS </td></tr></table>"; } else { echo " YOU DONT OWN A REFRIDGERATOR. "; } echo " "; if ($home['home_stove'] > 0) { echo "<table width=80%> <tr> <td width='25%'>[img=images/home/stove.png]</td> <td> You will gain FULL Energy and Awake for this action. </td><td>"; echo " <form action='home.php?action=kitchen' method='POST'> <input type='hidden' name='STOVE' /> <input type='submit' value='Cook' name='STOVE' /></form> "; echo "</td></tr></table>"; } else { echo " YOU DONT OWN A STOVE. "; } echo " "; if ($home['home_microwave'] > 0) { echo "<table width=80%> <tr> <td width='25%'>[img=images/home/microwave.png]</td> <td> You will gain 50% Energy and Awake for this action. </td><td>"; echo " <form action='home.php?action=kitchen' method='POST'> <input type='hidden' name='MICROWAVE' /> <input type='submit' value='Cook' name='MICROWAVE' /></form> "; echo "</td></tr></table>"; } else { echo " YOU DONT OWN A MICROWAVE. "; } } function home_upgrade() { global $db, $ir,$c,$userid,$h,$home; echo " <h3> Home Upgrades </h3><hr width=25%> "; $_POST['buyTV'] = mysql_real_escape_string($_POST['buyTV']); if($_POST['buyTV']) { if ($home['home_tv'] != 0) { echo " YOU ALREADY OWN A TV. "; return;} if ($ir['money'] < 10000000) { echo " You cannot afford a TV ! "; return; } $db->query(sprintf("UPDATE home_users SET home_tv = %u WHERE home_userid = %u",1,$userid)); $db->query(sprintf("UPDATE users SET money = money - %u WHERE userid = %u",10000000,$userid)); echo " You have successfully purchased a TV !"; return; } $_POST['buySOFA'] = mysql_real_escape_string($_POST['buySOFA']); if($_POST['buySOFA']) { if ($home['home_couch'] != 0) { echo " YOU ALREADY OWN A SOFA. "; return;} if ($ir['money'] < 25000000) { echo " You cannot afford a Sofa ! "; return; } $db->query(sprintf("UPDATE home_users SET home_couch = %u WHERE home_userid = %u",1,$userid)); $db->query(sprintf("UPDATE users SET money = money - %u WHERE userid = %u",25000000,$userid)); echo " You have successfully purchased a Sofa !"; return; } if($_POST['buyBED']) { if ($home['home_bed'] != 0) { echo " YOU ALREADY OWN A BED. "; return;} if ($ir['money'] < 100000000) { echo " You cannot afford a Bed! "; return; } $db->query(sprintf("UPDATE home_users SET home_bed = %u WHERE home_userid = %u",1,$userid)); $db->query(sprintf("UPDATE users SET money = money - %u WHERE userid = %u",100000000,$userid)); echo " You have successfully purchased a bed !"; return; } if($_POST['buyFRIDGE']) { if ($home['home_refridgerator'] != 0) { echo " YOU ALREADY OWN A REFRIDGERATOR. "; return;} if ($ir['money'] < 150000000) { echo " You cannot afford a Refridgerator! "; return; } $db->query(sprintf("UPDATE home_users SET home_refridgerator = %u WHERE home_userid = %u",1,$userid)); $db->query(sprintf("UPDATE users SET money = money - %u WHERE userid = %u",15000000,$userid)); echo " You have successfully purchased a Refridgerator !"; return; } if($_POST['buySTOVE']) { if ($home['home_stove'] != 0) { echo " YOU ALREADY OWN A STOVE. "; return;} if ($ir['money'] < 200000000) { echo " You cannot afford a Stove! "; return; } $db->query(sprintf("UPDATE home_users SET home_stove = %u WHERE home_userid = %u",1,$userid)); $db->query(sprintf("UPDATE users SET money = money - %u WHERE userid = %u",20000000,$userid)); echo " You have successfully purchased a Stove !"; return; } if($_POST['buyMICROWAVE']) { if ($home['home_microwave'] != 0) { echo " YOU ALREADY OWN A MICROWAVE. "; return;} if ($ir['money'] < 50000000) { echo " You cannot afford a Microwave! "; return; } $db->query(sprintf("UPDATE home_users SET home_microwave = %u WHERE home_userid = %u",1, $userid)); $db->query(sprintf("UPDATE users SET money = money - %u WHERE userid = %u",50000000, $userid)); echo " You have successfully purchased a Microwave !"; return; } echo "<table width=80%> <th colspan=4> LIVING ROOM UPGRADES </th> </tr> <th> </th> <th> DESCRIPTION </th> <th> PRICE </th> <th> PURCHASE </th> <tr><td width=25%>[img=images/home/tv.png]</td> <td> A nice addition to anyones living room !</td> <td> \$10,000,000 </td><td>"; if ($home['home_tv'] == 0) { echo " <form action='home.php?action=upgrades' method='POST'> <input type='hidden' name='buyTV' /> <input type='submit' value='Buy' name='buyTV' /></form> "; } else { echo " BOUGHT "; } echo " </td></tr><tr> <td>[img=images/home/couch.png]</td> <td> A very Comfortable Sofa to lounge on. </td> <td> \$25,000,000 </td><td>"; if ($home['home_couch'] == 0) { echo " <form action='home.php?action=upgrades' method='POST'> <input type='hidden' name='buySOFA' /> <input type='submit' value='Buy' name='buySOFA' /></form> "; } else { echo " BOUGHT "; } echo "</td></tr> </table>"; echo " <hr width=80%> "; echo "<table width=80%> <th colspan=4> BEDROOM UPGRADES </th> </tr> <th> </th> <th> DESCRIPTION </th> <th> PRICE </th> <th> PURCHASE </th> <tr><td width=25%>[img=images/home/bed.png]</td> <td> Anyone who owns a house will need a Bed !</td> <td> \$100,000,000 </td><td>"; if ($home['home_bed'] == 0) { echo " <form action='home.php?action=upgrades' method='POST'> <input type='hidden' name='buyBED' /> <input type='submit' value='Buy' name='buyBED' /></form> "; } else { echo " BOUGHT "; } echo " </td></tr> </table>"; echo " <hr width=80%> "; echo "<table width=80%> <th colspan=4> KITCHEN UPGRADES </th> </tr> <th> </th> <th> DESCRIPTION </th> <th> PRICE </th> <th> PURCHASE </th> <tr><td width=25%>[img=images/home/fridge.png]</td> <td> Who dont need a Fridgerator ?</td> <td> \$150,000,000 </td><td>"; if ($home['home_refridgerator'] == 0) { echo " <form action='home.php?action=upgrades' method='POST'> <input type='hidden' name='buyFRIDGE' /> <input type='submit' value='Buy' name='buyFRIDGE' /></form> "; } else { echo " BOUGHT "; } echo " </td></tr><tr> <td>[img=images/home/stove.png]</td> <td> Best way to cook your meals. </td> <td> \$200,000,000 </td><td>"; if ($home['home_stove'] == 0) { echo " <form action='home.php?action=upgrades' method='POST'> <input type='hidden' name='buySTOVE' /> <input type='submit' value='Buy' name='buySTOVE' /></form> "; } else { echo " BOUGHT "; } echo " </td></tr><tr> <td>[img=images/home/microwave.png]</td> <td> Cook your meals with this, not as effective as the stove but gets the job done. </td> <td> \$50,000,000 </td><td>"; if ($home['home_microwave'] == 0) { echo " <form action='home.php?action=upgrades' method='POST'> <input type='hidden' name='buyMICROWAVE' /> <input type='submit' value='Buy' name='buyMICROWAVE' /></form> "; } else { echo " BOUGHT "; } echo " </td></tr> </table>"; } $h->endpage(); ?> ----------------------------- EDIT TO ESTATE.PHP ----------------------------- add this under globals.php $h=$db->query("SELECT * FROM home_users WHERE home_userid={$userid}"); $home=$db->fetch_row($h);   then find where your player has successfully bought a house and add this above it :   if ($home['home_userid'] == $userid) { $db->query("UPDATE home_users SET home_houseID = {$_GET['property']} WHERE home_userid = {$userid}"); } else { $db->query("INSERT INTO home_users VALUES('$userid',{$_GET['property']},'','','','','','','')"); }   SQL's   -- -- Table structure for table `home_users` -- CREATE TABLE IF NOT EXISTS `home_users` ( `home_userid` int(11) NOT NULL, `home_houseid` int(11) NOT NULL, `home_couch` int(11) NOT NULL, `home_tv` int(11) NOT NULL, `home_bed` int(11) NOT NULL, `home_stove` int(11) NOT NULL, `home_microwave` int(11) NOT NULL, `home_refridgerator` int(11) NOT NULL, `home_computer` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `home_users` --   ALTER TABLE `users` ADD `view_tv` INT(11) NOT NULL DEFAULT '0'; ALTER TABLE `users` ADD `sleep_sofa` INT(11) NOT NULL DEFAULT '0'; ALTER TABLE `users` ADD `sleep_bed` INT(11) NOT NULL DEFAULT '0'; ALTER TABLE `users` ADD `meal_eat` INT(11) NOT NULL DEFAULT '0';   CRON QUERIES : 1 HOUR CRON :   $db->query(sprintf("UPDATE users SET view_tv = %u, sleep_sofa = %u",0,0));   Day Cron :   $db->query(sprintf("UPDATE users SET sleep_bed = %u, meal_eat = %u",0,0));   Enjoy and feel free to change it any way you want :)
  12. lol..very small bugs..?? if its the crons ill set them up now, because this mod works fine...BTW I Have big plans for this MOD...and im gonna work over the next few days to greatly expand this mod....:) and when u buy now future upgrades free of charge... :) ...because with the ideas im having i may have to raise the price a bit :P well gonna go back to work now :D cheers   ***EDIT*** suddenly i am seeing a few other mnor errors...lol srry they will fixed quickly :P
  13. Ive decided to give this basic mod for free. :)
  14. hmm try something like this : ORDER BY money DESC,userid   $q=$db->query("SELECT cb.*,u.*,c.npcid,cy.cityname FROM challengebots cb LEFT JOIN users u ON cb.cb_npcid=u.userid LEFT JOIN challengesbeaten c ON c.npcid=u.userid AND c.userid=$userid LEFT JOIN cities cy ON u.location=cy.cityid ORDER BY level DESC");
  15. just want to clarify the error i had earlier was my fault :P...and nothing to do with the mod itself :) MOD WORKS PERFECT :D cheers
  16. ok first of all i would like to thank Richard, BludClart and Immortalthug for the time and effort they have put into his mod. It is a very nice addition to any game. Also, when someone trys to accept someone into there company it doesnt seem to work...just curious if anyone else has had this problem ? it doesnt error, it just shows a blank page (NOT BLANK WHITE PAGE, a blank ingame page..) i havent had time to look thru the code fully yet..so i was wondering if anyone else had this minor error.. cheers
  17. mod looks very promising :D i just now got the files, gonna set it up and see how it goes :D
  18. lol, cool...just making sure... as for your problem im not sure because i dont use crons, i use timestamps... does it give you an error ?...that would help someone figure out the problem for you.. good luck getting your problem fixed. cheers
  19. LOL, I am curious are you actually using code=GAMECODEHERE ? simple mistake i guess if you are, look in your config file and you will see : 'code' => 'YOURCODEHERE' << put that code in place of GAMECODEHERE... lol, unless u was just using GAMECODEHERE as an example :P
  20. This is a simple error with a simple solution... its telling you that the amount of values you are inserting does not match up with the amount of fields in the jobranks table.. the insert is showing 10 fields in the jobranks table in your database, verifiy if this is correct :) hope that helps cheers
  21. I would of never of thought of that one lol why make one when its freely available to me ?...not like i want to add any other features so it sounds like a waste to me.... saves me time to work on bigger and better mods.... make one...ahahahahaahh...i dont need to ;)
  22. cool, I have a copy of the Version that uses money, but not gonna post it cause it will probably just be deleted again...lol cheers
  23. Very nice template, and a good price :) if you like this layout i recommend u buy it before someone else does :P   cheers
  24. I am curious as to wtf happened to the free blackjack mod that was here ?... if it was deleted i would like to know why, seeing as it was here for months...then i come along and fix it so it uses money and it gets deleted... thanks
  25. very nice mod, more ways for users to upgrade their gang, i like it :) if i was not broke i would definatly like to have this :P best of luck with sells :D
×
×
  • Create New...