Jump to content
MakeWebGames

newttster

Members
  • Posts

    514
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by newttster

  1. newttster

    Variables?

    *nods* I know that as it stands now none of the coding I have done so far is secure. I am waiting until I have everything working the way I want it to, then I will be attacking the security side of it. It will be a while before that comes about though. Hmm ... if worse comes to worst ... I'll hire someone from Danny696's trusted list to help me with the security.
  2. 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')");
  3. 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.
  4. 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");
  5. 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?
  6. 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.
  7. 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.
  8. newttster

    Poster Design

    Once again ... you've done an amazing job.
  9. Thank you bluegman991 changing it to the fetch_assoc with the other changes did it. Thanks again to everyone!
  10. 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)
  11. $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.
  12. 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.
  13. 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.
  14. Got it working!
  15. When you enter new houses into your game via the staff permissions ... you can increase the will there.
  16. No .. the cron jobs have to be set up on the server in order for them to run.
  17. 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.
  18. Very nice, illusions! And will you be sharing the code with us for this one. *smiles*
  19. Depends on what I am doing at the time ... I use Chrome, FF and IE.
  20. Nice. A pic like that could be used for a post apocalyptic world game.
  21. Yes but if you do a count ... you have 6 opening brackets and 8 closing brackets.
  22. Check your curly brackets ... I think you have to many of them.
  23. Fixed. Got it working!
  24. It looks like you are missing break tags.
  25. 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.
×
×
  • Create New...