Jump to content
MakeWebGames

SRB

Members
  • Posts

    785
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by SRB

  1. So, I seen the thread by Razor and thought about a system for housing I built before and figured maybe someone could write it and make themselves some monies. ---------------------------------------------------- I made one ages ago, but no idea where the hell it went!   It pretty much summed up to requiring 3 materials; wood, brick and slate.   Search To get them, you would have to find the slate in a search file (Navigate through with arrows - not just click link)   Each "step" would cost 5 energy, with the success rate to find anything being around 10%, so a lot of energy to get your parts.   The table for storing the search was pretty basic as I ran it one a 20 by 20 grid (400 spots);   TABLE `material_search` - location - material - amount   The amount was there because when found, the code automatically moved it, but I didn't stop "stacking", so if you go there, you get one, take a step left, then right and you could get a second until they were gone.   Market The market was simple - you could list materials you own for sale.   House List The list would list houses, how much of each material you needed, how many "hours" to build, the cost of equipment hire to build and how much "will" was recieved.   ** See Building for the hours explained.   TABLE `houses` - id - name - will - wood - brick - slate - cost - hours   Building Once building was started (Takes all materials and costs), you then had to click to build with a few criteria;   * You can only click once within an hour (Think timestamps to ensure an hour) * My game had 8 hour work days, so maximum 8 hours a day could be taken from your build time * Each click takes 10 energy to perform an hours work.   Database, something along the lines of   TABLE `house_build` - id - user - house - hours - last - today   I actually used a difference database structure, where every build entered a row with time. This allowed me better flexibility, but if you don't plan to change a lot, you can do the above with similar results.   Some Calculations So, let's assume that you need 100 wood, 100 brick, 100 slate, costs $200,000 to hire equipment and takes 120 hours.   Your final calculations will look like;   Wood, Brick and Slate With 10% success, potentially up to 1000 energy per material type (3,000 total)   Build Time (Energy) Hours * 10 for build time. (1200 total)   Money $200,000   Benefits to a system like this? * You actually have to work for your propery and for once, activity is the key (Unless game rich!) * New players have a way to make money by selling materials for people not wishing to bother searching and just buy. * Players have to think about a tactic as they have to weigh up gym gains vs energy to build - resulting in differing strategies * Rental would be worthwhile and benefitial to the people who put the time in - make money
  2. Caused by...   [b]Will: 50000%[/b]
  3. I'm confused. Do you mean:- 1. What is the cost (Fee's) from each sale? 2. How much is it to create a wallet? 3. How much annually to keep your wallet? If any of those:- 1. Pretty much the same as paypal (3.4% + £0.20) - Link 2. Free 3. Nothing Sign Up EDIT If you mean to set up and "IPN", it shouldn't be too hard to do using google API (Here) -- If you click the PHP sign, it makes it simpler too :)
  4. Or, you could think a little and check your header file and add the parts there? Forget all of this;   function check_travel() { global $db; global $ir,$userid; if($ir['traveltime'] > 0) { print "You have to wait {$ir['traveltime']} before you can access this page as you are travelling!"; exit; } }   Now move similar into the header file where it's needed; Hint: it's normally below the "DONATE AND GIVE ME YOUR MONIIIIEEESS" area, where the main content starts. That is where you need to check for travelling.   if ($ir['traveltime'] > 0) { $valid_in_travel = array('/mailbox.php', '/events.php'); if (!in_array($_SERVER['PHP_SELF'], $valid_in_travel)) { echo 'You are currently travelling. You will reach your destination in approximately ' . number_format($ir['traveltime']) . ' minutes.'; /* NOTES: * End html so it formats properly * Normally needs some tables or div's closing END NOTES */ exit; } }   Simple enough.
  5. SRB

    The time has come...

    The temptation to stay away from trolling hot-spots is just so immensely hard. *sigh*
  6. SRB

    People.....

    Indeed it was. Google ran an ad campaign on them. Definitely a legit company :P Ironically -- google would have held the answer to that also :D
  7. SRB

    People.....

    I'm Luke, as most know here. I used to work for a company building the back-end to a dealer management system, but was glad to leave, for the following reasons;   1. They still used COBOL and had no desire to update their program to any of the C variations - old school! 2. They used in-line HTML in their front end and didn't wish to change 3. Their PHP version was about 2.6, so no new functionality would work -- no progress on knowledge! 4. The system of giving work left a lot to be desired ** 5. Pay was below par for the amount of crap you had to deal with. ** The manager would pass work down to me, which I would do and all would work correctly. I then had to give the work to the "senior" developer, who was a COBOL programmer with little understanding of the PHP/JavaScript I'd wrote, so would take parts out and edit bits. End result would be my edited work going live and me being given the bollocking as it didn't work like it did when I wrote it. Apparently the "senior" developer changing code, was not enough reason for me not to get the bollocking - ugh!   I now work for Cambridge Satchel, doing leather cutting. While this is a drastic move away from programming, it's a blessing to be doing something different as working with computers for the best part of 10 years, was increasingly becoming annoying. Enough about me - who has the beer?
  8. TRUNCATE TABLE `users`;   Simple enough.
  9. SRB

    2013... 2014

    Yeah, it's almost that time, folks. A new year... maybe a new start? New aspirations? New plans? New dreams? New wimminz? Any resolutions you are setting that you know you'll never manage? (WE all either do stuff we won't succeed with or crap we don't care about anyway, right?) My resolutions; 1. Drink less than 20 beers this year. 2. Quit smoking weed 3. Stop killing kittens 4. Make love to a man. How realistic they are; 1. Only drank 2 in the last 9 months... EASY! 2. I don't smoke weed, so DONE! 3. Don't recall killing one before. DONE. 4. HELL NO! Just NO, NO and NOO! So, I guess 75% of them being accomplished is an achievement in itself. List yours! Oh yeah, edit...
  10. On what basis are you making that claim, Sir?
  11. SRB

    MVC or not MVC

    Looks awfully complicated. Why do I need a thousand files to do the few tasks I require?
  12. SRB

    MVC or not MVC

    I built a game using MVC but never launched. Well, I say built -- I was 90% into the basic core game before I lost interest. It ran smooth and fast, but editing took longer due to having the HTML and PHP separate, so you end up flicking through too many folders in FTP to get to PHP files, then navigate the template folder to find the correct directory for the associated file.
  13. That is assuming I don't have access to the phone number (Yet not my primary) and address (friends). Name is always mine as is date of birth -- I can't lose the domains and they can't be seized as I have all the info and access to any paper mail they send. ------------------------------------- Unless I have something to hide? You ARE talking to me -- rather not have some domains linked directly to me when they are used for... fun :P
  14. ​ && !preg_match('[^1-9]', $_POST['ID'])   So ID 80 fails... and 70, 60, 50, 40, 30, 20 and 10.... and all multiples of 10.   Very nice.
  15. Or just use false information :D
  16. I don't believe there is a game running using the "engine" yet -- few supposed to be in production, but no pre-release screenshots etc yet.
  17. Problem was? I am guessing incorrect column count...
  18. Add error reporting to this line;   mysql_query("INSERT INTO gangs VALUES('','$name','$desc','','','','',0,0,100,$userid,$userid,5,0,0,'')");   To become;   mysql_query("INSERT INTO gangs VALUES('','$name','$desc','','','','',0,0,100,$userid,$userid,5,0,0,'')") or die (mysql_error());   And see what error it tells you.
  19. I hate reading the posts -- poorly formatted content, hard to decipher and always over the top -- a simple question somehow requires re-inventing the universe every time.
  20. I was bored, so wrote the code how I feel it should have been wrote to start with. If anybody uses it, check the mysql calls the correct table/fields in the database and you will need to create the $my variable that contains the players data (Current player you're logged in with)   <?php session_start(); include("inc/main.php"); // Check user is logged in; if (!array_key_exists('user', $_SESSION) && is_string($_SESSION['user'])) { header('location:index.php'); exit; } include("inc/user_info.php"); // Check GET->id is valid (Is set, is string and numeric) $id = (array_key_exists('id', $_GET) && is_string($_GET['id']) && ctype_digit($_GET['id'])) ? substr($_GET['id'], 0, 12) : FALSE ; if ($id) { // Check a user exists with the ID; $sql = "SELECT `id`,`name` FROM `players` WHERE `id` = '{$id}'"; $run = mysql_query($sql)) if (mysql_num_rows($run) == 1) { // Pull name and id; $to = mysql_fetch_assoc($run); // Check the data has been posted; if ($_SERVER['REQUEST_METHOD'] == "POST") { // Check amount if above 0; $amount = abs ((int) $_POST['points']); if ($amount > 0) { if ($amount > $my['points']) { echo 'You do not have enough points to give that many away.'; } else if ($id == $my['id']) { echo 'How would sending points to yourself benifit you?'; } else { mysql_query("UPDATE `users` SET `points` = `points` + $amount WHERE `id` = '$id' "); mysql_query("UPDATE `users` SET `points` = `points` - $amount WHERE `username` = '{$_SESSION['user']}' "); echo 'You sent ' . number_format($amount) . ' points to ' . htmlentities($to['name'], "UTF-8", "ENT_QUOTES") . '!'; } } } echo '<h3>Send Points</h3> Amount: <input type="text" name="points"> <input type="submit" name="send" value="Send Points!"> </form>'; } else { echo 'Invalid user selected.'; } } else { echo 'No valid ID provided.'; }
  21. SRB

    A second eye.

    Inbox me. Potential to be interested.
  22. Am I the only one who found that funny? Buying something that is free? Lollerskates, for sure.
  23. Why use a 3rd party script hosted on servers, that if sold, you could potentially lose control of? You also have to question the legitimacy of handing all of your emails to a third party. Yes, some big companies do it, but I imagine they have a far better TOS etc than most games online, that actually means they can since it's been agreed to. In this case, I would suggest using a 3rd party lib, but host it yourself as then all data remains in your hands, rendering the above null. I'd personally use SwiftMailer as I have used the lib a few times and never had issues.
  24. SRB

    Why?

    You clearly aren't entertaining them with what you have. I have seen game owners keep players active simply by running random competitions in game -- like randomly asking a question in chat and first to answer right, wins. This keeps people talking in the game. Community makes a game now -- long are the days of having limited choice, where a game just had to be playable. Now you need a community and good communication options, to make them last. The world has moved on rapidly and people just aren't adjusting fast enough to it.
  25. You're not querying whether the user exists who they wish to send to...
×
×
  • Create New...