Jump to content
MakeWebGames

Coly010

Members
  • Posts

    912
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Coly010

  1. not completely valid i think: SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE itmid={$_POST['ID']} AND i.itmtype=15 AND inv_userid=$userid The where clause is probably where you are having the problems. change to: SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE i.itmid={$_POST['ID']} AND i.itmtype=15 AND iv.inv_userid=$userid  
  2. Simple and basic solution: style='overflow-y:auto;' Put it within table element.
  3. Your variable is called $check. Your passing $checks to mysql_fetch_array. Also, look into mysqli
  4. Change $domain = $_SERVER['HTTP_HOST']; to $domain = $_SERVER['SERVER_NAME'];
  5. Any chance this will be made responsive ?
  6. what im working with. its not great, but its cheap and i'm not paying for it. other members in the house are, so i dont mind. i think my 4G is faster, so normally i just use my phone as a hotspot
  7. Just like any other Mccodes game really. Good luck with it
  8. Like I said, seems like a syntax error. I'll need to see the code to help. What do you use to write your PHP code?
  9. Provide the all the code related to the mod that you have. Your problem sounds like a syntax error, but we'll need to see the code to find it
  10.   The point being that they still earned the 25% bonus. as its a percentage, the two player's aren't gaining the same absolute value. for example. I have 200 defence and 25% bonus. Therefore i gain 50 bonus defence making me have 250. you have 100 defence and 25% bonus. You gain 25 bonus, giving you 125. See what I mean? If you don't give both players the ability of having their bonuses in the fight then I would be fighting you with 250 defence because of my bonus, yet you would only have 100, which is a lot more unfair.
  11. Well my solution was pretty simple really: Add an int(11) column to your gangs table called gang_bonus, or if you want to stick to the naming convention for that table, gangBONUS. at the bottom of your globals.php file if ($ir['gang']) { // player is in a gang. Now retrieve the bonus if any $sql = "SELECT gang_bonus FROM gangs WHERE gangID=".$ir['gang']; $bonus = $db->fetch_single($sql); $ir['strength'] = $ir['strength'] + ($ir['strength'] / 100) * $bonus; // etc... I have a quicker way using another SQL statement to pull the user stats and using a foreach with key and value variables but I thought this was the best to explain it. }   Therefore it adds the bonus right at the beginning, so it still takes place and is in effect but you don't need to modify the user stats table
  12. 5% of what? The stat's current value or the value it is when the leader buys the upgrade? Also, if it starts at 5%, when the leader buys an upgrade, are you going to add a 10% bonus to the user's current stats (which already have a 5% bonus, causing it to be slightly over 10% bonus) or will you remove the old 5% bonus and add the new 10%. Which throws up another point, how you gonna know what is the old 5% of the player's stats?   I've done something like this before so I know how I did it and the approach I took. I'd just like to see if you have everything thought out for it. And don't worry, please don't feel like I'm on your case all the time. If you can think like this when it comes to creating mods and other scripts, you'll be a good programmer.
  13. Yep, your way is simple, but it offers users only the same thing over and over, with a chance of having a smaller time to click. The way I have shown offers more variety for the user. User's love variety. It's a good effort though, and a good mod :) I just wanted to see how the cogs would turn in your head and if you would understand my suggestion. The greatest thing about the way I have it is if you want to use a different animal, then you can use jQuery to change the background-image, then use jQuery to send an asynchronous POST to your code with the new type of animal and if the user got a kill shot and if so, it'll do a certain thing :). Gotta love JavaScript.
  14. What I'm trying to do is to get you thinking. You only need two images. An image of the woods, an image of the deer (just the deer) You would then create the situation for hunting with these two images. You would create three divs. Like so: <div id="hunting-holder"> <div id="woods"></div> <div id="deer"></div> </div>   Next up you're gonna need some CSS #hunting-holder { position: relative; width: 640px; height: 480px; } #hunting-holder > * { margin: 0; } #woods { position: absolute; top: 0; left: 0; background: url("img/woods.png"); z-index: 2; width: 640px; height: 480px; } #deer { position: absolute; background: url("img/deer.png"); z-index: 3; width: 140px; height: 120px; }   Basically, what this does is layer the two inner divs on top of each other, with the deer on top. What you're gonna want to do next is set up some JavaScript to place the deer image in a certain position. I'll use some jQuery to make it easier.   function setup_hunting(){ var deer = $("#deer"), top = deer.offset().top + 100, left = deer.offset().left + 200; deer.css({top: top, left: left}); } function find_shot(mX, mY){ var kill_left = $("#deer").offset().left + 20, kill_right = $("#deer").offset().left + 40, kill_top = $("#deer").offset().top + 10, kill_btm = $("#deer").offset().top + 30; if(mX > kill_left && mX< kill_right && mY > kill_top && mY < kill_btm){ // critical shot } else { // non critical shot or missed } }   The setup_hunting will place the deer at the certain place in the woods. The find_shot will take the mouse's x and y position as the parameters and compare that the kill area which is set up by the variables. That kill area will stay the same no matter where the deer gets placed in the woods
  15. How are you going to determine where the kill shot and non-critical area's of the deer are? Also, if you only need two images, the woods and the deer in the woods, does that mean the deer will always end up in the same place? If so, could a player not just find the kill shot and keep their mouse hovered over that area?
  16. Right. Everyone here is mentioning designs. And whilst it does have issues, don't feel like it's a bad thing what they are saying. It's good. It's showing you areas where you can improve and make better. On my iPhone I saw design issues such as the ones I have uploaded. Gameplay wise: I didn't see a lot to do. At least at the start. All I saw was do a push up, get coffee, risk coffee. Although I did skip the slideshow tutorial as it was taking far too long and wasnt working correctly with my phone. So tips to take away from this. Work on the design. Use something like color-hex.com and find a colour. It'll show the colours that work well along with it. There are some websites that even give you a pallete of colours that match, that you can use for a colour scheme. Next work on design. If your primary target is mobile devices, make text visible and buttons clickable. Have everything scroll down the page. Don't double up tables etc unless you really have to. Bootstrap can help you create a mobile design. Gameplay wise. Make it clear to see what the players can do. And make it fun. I got 6 coffees for using all my brave then did a push up. It just said I did the push up and gave me like 100 strength. But it didn't tell me how much energy was used or the actual amount of strength rewarded. Just a few things I saw.
  17. You can install Ajax?
  18. I don't think they aren't using it for security risks. I see that as a load of codwallop. The reason I don't they would be using it is that they've been around that long that their code was developed before or while some of the major frameworks were still being developed to the point they are today. Coding styles were different back then.
  19. Not according to this ?
  20. That image proved what I was saying no? The list is being ordered by the topics that have the most recent reply?
  21. Clicking new topics shows the topics with the latest replies for me
  22. Coly010

    2016...

    Happy new year to all here!
  23. ITS RESPONISVE :O (well homepage is anyway, didn't go any further) Good job on that at least. The features sound great, hopefully the game works out for you.
  24. Create a new column in the users table called last_AP . Give it an int(11) data type. My SQL is rusty, if this is wrong someone correct it ALTER TABLE users ADD last_AP int(11);   Next, at the bottom of your globals file add this:   $AP_Interval = 60; if(time() - $ir['last_AP'] >= $AP_Interval){ $db->query("UPDATE users SET ap=ap+1, last_AP=".time()." WHERE userid=".$userid); }   This is the logic behind adding the code. It will keep it in tune across multiple pages as an Ajax timeout set at 60 seconds will only work for however long the player stays on the one page. You can use this in your footer then $timeLeft = 60 - (time() - $ir['last_AP']); $timeLeft = $timeLeft > 0 ? $timeLeft : 0; ?>   MWG keeps messing up the last part of my code /: Basically you'll use $timeLeft to set a setInterval(); to send a request to your PHP file. The backend prevents user from updating AP as frequently as they like, the setTimeout will let it happen without waiting for user to refresh page
  25. There's a lot going on in it and it's boxy. I wouldn't use the backgrounds you have in the menu and content boxes. It would look better without or if they were consistent
×
×
  • Create New...