Jump to content
MakeWebGames

newttster

Members
  • Posts

    513
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by newttster

  1. newttster

    Need Help ASAP

    If you look at the tables he is installing it does include the `donatordays` in his users table. He also has the value set to '0' in his installer query. I am wondering though if the installer file is missing some quotes maybe around the query. This is the original query that goes into the installer ... I'm not sure if that will help you or not.   $db->query("INSERT INTO users (username, 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}', '{$username}', md5('{$_POST['a_password']}'), 1, 100, 0, 0, 2, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['a_gender']}', unix_timestamp(), '{$_POST['a_email']}', -1, '$IP', '$IP')");
  2. newttster

    Variables?

    Yes I understood that. If the field is empty then it returns the "No results". Thanks everyone. I was getting tired of making an already huge table larger. Now that I see that this can be done this way I can rearrange my tables.
  3. On your last amount would you not have to set that to include the interest given for one time ... otherwise they would never get the interest. Right? If your interest is 1% then $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100*2) WHERE bankmoney>0 AND bankmoney<20200000");
  4. newttster

    Variables?

    No ... not creating a new $ir. But ... if I'm following you correctly, if I had a table called `quests` and a row called `stepone` I could declare it like this;   $q = mysql_query("SELECT stepone FROM quests WHERE userid = {$ir['userid']}"); while($quests = mysql_fetch_array($q)) { if ($quest['stepone']=='done') { echo "You have completed step one."; } else { "do something here"; } }   Would that be the right way to do this?
  5. newttster

    Variables?

    One of the things that I have been struggling to understand is declaring a table as a variable. By this I mean ... in McCodes the users table is defined as $ir and then you would have the column (or is it field name)['username']. So any time we see $ir['username'] we know that it will pull the users name from the users table. So far all the things that I have been doing I have been using the existing tables because the table variable is defined. However, I find it extremely cumbersome to keep adding things to tables that already exist ... especially the users table ... that sucker is too full to begin with ... in my opinion. I've googled declaring variables etc ... but I haven't found anything that specifically answers this. Could someone explain how this is done properly. Bearing in mind that if you use any words that are bigger than "and" or "the" this noob will get lost. ;) Thanks.
  6. Under itemuse.php ... try adding if item id == X $chance=rand(0,3) if $chance=1 $hosptime=rand(0,10) etc ... something along those lines should work.
  7. newttster

    Poster Design

    Once again ... you've done an amazing job.
  8. Thank you bluegman991 changing it to the fetch_assoc with the other changes did it. Thanks again to everyone!
  9. Thank you everyone. I did all the changes that you suggested and it now it returns nothing ... $tablets=mysql_query("SELECT inv_qty FROM inventory WHERE inv_itemid='620' AND inv_userid='$userid'"); $tabletsone=mysql_num_rows($tablets); You now have {$tabletsone['inv_qty']} metal tablets left. Gives me ... You now have metal tablets left. I even added tried changing it to ("SELECT `inv_qty` FROM `inventory` WHERE `inv_itemid`='620' AND `inv_userid`='$userid'",$c)
  10. $tablets=mysql_query("SELECT inv_qty FROM inventory WHERE inv_itemid='620' && inv_userid='$userid' LIMIT 1"); $tabletsone=mysql_num_rows($tablets); You now have {$tabletsone} metal tablets left. I am trying to get it to print out the number of item (620) that are in the inventory file. It returns a value of 1 every time. I've tried using fetch_array and fetch_assoc as well.
  11. Find ways to increase the number of crystals in your game either through streets, mining, games etc. If you have a housing mod ... implement taxes. Hold lotteries. Provide a gaming center where they would want to spend their money. Try adding a questing system where they would have to purchase items in order to complete them and reward them with stats or special items that can't be sold. How about a gifting center where they can buy gifts for friends or enemies that can only be sent but not sold. Put a cap both minimum and maximum on how much certain items can be sold for. That's just a few ideas that I can think of. Good luck.
  12. It will still be a one click attack but with different outcomes. I'm trying to get it so that the player hits the attack button ... it runs through the fight and the player has to choose one of three options. I'm tyring to set it up so that they will not be able exit out of the page ... so that they can't ghost or piggy back. And if they do two tab the attack system they lose all their experience.
  13. Got it working!
  14. When you enter new houses into your game via the staff permissions ... you can increase the will there.
  15. No .. the cron jobs have to be set up on the server in order for them to run.
  16. If you purchased the license to Mccodes legally ... you should still have all the files that came with your purchase ... you will find your cron job (s) files there.
  17. Very nice, illusions! And will you be sharing the code with us for this one. *smiles*
  18. Depends on what I am doing at the time ... I use Chrome, FF and IE.
  19. Nice. A pic like that could be used for a post apocalyptic world game.
  20. Yes but if you do a count ... you have 6 opening brackets and 8 closing brackets.
  21. Check your curly brackets ... I think you have to many of them.
  22. Fixed. Got it working!
  23. It looks like you are missing break tags.
  24. That was a mistype on my part when adding the code here. Fixed. The other issues I still have not been able to fix though.
  25. I have been able to get this to work in so far as it adds the silver flakes and reduces the digs by one. I have tried umpteen different ways to try and get the mine_exp to update and it won't. I realize that I need a qualifier in there stating that if the $randsf > 0 it should add the exp ... so far I haven't been able to get that to work. The fields I have for this are mine_exp, mine_level, and mine_max. Mine_max is supposed stays at 100 and each time there is a successful mine the exp_mine is supposed to increment by one. If the mine_exp exceeds the mine_max then it should add 1 level to mine_level. Any ideas or suggestions?   function mine_one() { global $db,$ir,$c,$userid,$h; $randsf=rand(0,10); $gain=(1); if($ir['digs']<=0) { echo"<center>You don't have any digs left. Come back at reset.</center>"; $h->endpage(); exit; } if($ir['mine_exp']>$ir['mine_max']) { $db->query("UPDATE `users` SET `mine_level`=`mine_level` + 1 WHERE `userid`= '$userid'"); } else { $db->query("UPDATE `users` SET `mine_exp`=`mine_exp` + ". $gain .",`digs`=`digs`-1 WHERE `userid` = '$userid'"); item_add($userid, 566, $randsf); echo "<center>You begin mining in the Level 1 mineshaft and found '$randsf' silver flake(s).</center><br />"; echo"<center><a href='mineshaft.php?action=mineone'>Mine Again</a></center><br /> <a href='mineshaft.php'>Back</a></center>"; } } $h->endpage(); ?>
×
×
  • Create New...