Jump to content
MakeWebGames

SRB

Members
  • Posts

    785
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by SRB

  1. I need a computer setup on the digitalocean lines :(
  2. SRB

    Regex Help

    Awful at English too :P
  3. Holy Moly! It would be quicker to list what is right with the external pages - nothing. Colours - clashing. Bad. Fonts - far too big. Graphics - terrible. Layout - what is it even optimized for?
  4. SRB

    2016...

    Happy 2016, suckaaaaz!
  5. To be fair, when the forums were running whatever the previous software was, it shown ID's and I believe I was ID 128, so there won't be many with an account this old.   Can I say I was 11 and act like I am now 21(ish)? :D   I honestly do not recall the last time I viewed my own profile. Nobody messages me there and I am pretty sure I remember what's on my profile, so it's a wasted click for me - nothing I want to see there.
  6. So, I just noticed the new layout provides joined date on posts. Curious if anybody is still active who has a date equal to or before mine.
  7. Right there, near the bottom of the screenshot.
  8. [MENTION=73087]capstan1011[/MENTION] is looking for one. Worth approaching him.
  9. So, just stumbled upon this - http://www.father.io   Who'd play it? What's your opinions? Discuss.
  10. It has a spoon-feed-me community though - should help with crons on their servers
  11.   Can't speak for MTG's codes personally, as I haven't seen it. However I have heard it's pretty much in similar format to mcCodes, so possibly no better.   Panther is hardly maintained either, by the look of the last commit logs.     No, that wasn't in reference to the code, but more to the fact people will sit and scream across the forums that the code is piss poor, but the second they see a few dollars, they will roll around in said **** for days.     Indeed, it wasn't. However, on the basis that most game owners go in for the profit as their first priority, it makes perfect sense to jump in with MC code (Not that I recommend the code - I don't recomment any! I make more money from custom engines.) as all the patches are openly accessible, for the worst of the security issues.   Couple weeks and they are ready to do what they have set out to do.     Me too. Apparently there are no midget nurses in this hospital. Not good - I want midget nurses.     Better is subjective. From us, as developers by profession (assuming you may be), cleaner code is better. For someone who's aim is to just boost their paypal account in the run up to christmas? Hell no. Theres far too much resources for the games across these boards.   For the latter, mc codes is a gold mine, if even short term.     Would you like to state that NWE is decent code?
  12. I always find it ironic when I see people who've made money working on mccode games, slating it so badly. mcCodes is never bad when you're profiting from it. Sure, the code sucks, but with a little work, it's playable and easily modifiable. I get sick of seeing someone ask for X and everyone offer them A, B, Y and Z. Judging from the post, I'd say it's quite clear he knows what he wants - there was no question about alternatives to the code. Anybody want to chime in and suggest NWE, which (in my opinion) is no better than mcCodes - Does anybody even have a game running live yet on NWE?
  13. Can you ask Lynn to Skype call me please?
  14. :( -msg2short-
  15. I have proof that this is a hoax - I have found photographic images of them all (MTG, Donnie, and A2TC) in close contact at a local meet - I believe the meet organisation was called Lemon Party.
  16. $1.4m a day income? You got me, I will bid $1,337
  17. . If you're into that, go play golf.   That hurt my brain! It's cool though, I understand - it's a struggle to perfect English when you're good at sports and popular in your age group. Totally get it.
  18. Changed the file around some for you.   Pub File <?php /* Created by SecurityEh. Credits to TheMasterGeneral. Re-write and DB integration by some ******* on MGW. License - daFuqULike */ require_once('globals.php'); /* Lets throw some functions in the mix real quick */ function hospitalize($id, $time, $reason) { user_punishment_update($id, $time, $reason, 'hospital', 'hospital_reason'); } function lockup($id, $time, $reason) { user_punishment_update($id, $time, $reason, 'jail', 'jail_reason'); } function user_punishment_update($id, $time, $reason, $field, $reason_field) { $id = ctype_digit($id) ? $id : FALSE ; $time = ctype_digit($time) ? $time : FALSE ; $reason = is_string($reason) ? $reason : FALSE ; if ($id && $time && $reason) { $sql = "UPDATE users SET $field = $field + $time, $field_reason = ".$db->escape($reason)." WHERE userid = $id"; $db->query($sql); } } /* Now for ze code */ if ($ir['hospital']) { echo 'Only healthy players can have a drink'; } else if ($ir['jail']) { echo 'Only good players can are allowed to have a drink'; } else { if ($ir['goldcoin'] <= 0) { $sql = "UPDATE users SET goldcoin = 0 WHERE userid = ".$userid; $db->query($sql); } if ($ir['exp'] <= 0) { $sql = "UPDATE users SET exp = 0 WHERE userid = ".$userid; $db->query($sql); } echo '<h2>Welcome to the Pub, '.$ir['username'].'</h2>'; if ($_SERVER['REQUEST_METHOD'] == "POST") { if ($ir['daily_drinks']) { // Since drink doesn't actually define options, when posted, this is just here for future expansion; $drink = isset($_POST['drink']) && ctype_digit($_POST['drink']) ? $_POST['drink'] : FALSE ; // Renamed $drink to $random, since $random is what it be. $random = mt_rand(1, 8); $expgain = max($ir['exp'] / 100, 50); // 1% of current. Maximum of 50. $willloss = MAX($ir['will'] / 20, 50); // 5% of current. Maximum of 50. $goldloss = 20; $goldgain = mt_rand(1, 8); $silvgain = mt_rand(1, 10); if ($random == 1) { echo '<p>Damn, calm down. Sunk that like it was the titanic. Ready for another one? <small>[+'.$goldgain.' Gold]</small></p>'; $sql = "UPDATE users SET goldcoin = goldcoin + $goldgain WHERE userid = ".$userid; $db->query($sql); } else if ($random == 2) { echo '<p><b>Nurse :</b> The results are back. You were drugged. You also hit your head dancing naked in the street. So Smart! <small>[+'.$expgain.' exp]</small></p>'; $time = mt_rand(100, 600); $reason = 'Slightly Tipsy'; hospitalize($userid, $time, $reason); $sql = "UPDATE users SET exp = exp + $expgain WHERE userid = ".$userid; $db->query($sql); } else if ($random == 3) { echo '<p><b>Officer :</b> Starting a fight when drinking, you idiot? Yeah, jail for you!</p>'; $time = mt_rand(20, 400); $reason = 'Fighting outside of the Pub'; lockup($userid, $time, $reason); } else if ($random == 4) { echo '<p><b>Passerby :</b> You alright down there mate? Look a little bit drunk and you may want to wipe that vomit off your face.</p>'; } else if ($random == 5) { echo '<p><b>Nurse :</b> Nothing major, you were just unconcious. <small>[-'.$willloss' will]</small></p>'; $sql = "UPDATE users SET will = will - $willloss WHERE userid = ".$userid; $db->query($sql); } else if ($random == 6) { echo '<p><b>Officer :</b> Next time, pay for your drink and I won\'t have to send you to jail, you idiot!</p>'; $time = mt_rand(40, 180); $reason = 'Bad Manners.. Tsk Tsk'; lockup($userid, $time, $reason); $sql = "UPDATE users SET exp = exp + $expgain WHERE userid = ".$userid; $db->query($sql); } else if ($random == 7) { $coins = min($ir['goldcoin'], $goldloss); echo '<p><b>Nurse :</b> It would appear that you got mugged. Notice what you are missing? <small>[-'.$coins.' gold]</small></p>'; $time = mt_rand(30, 150); $reason = 'Mugged at the Pub'; hospitalize($userid, $time, $reason); $sql = "UPDATE users SET goldcoin = goldcoin - $coins WHERE userid = ".$userid; $db->query($sql); } else if ($random == 8) { echo '<p><b>Landlord :</b> Here you go, you dropped these. <small>[+'.$silvgain.' silver]</small></p>'; $sql = "UPDATE users SET crystals = crystals + $silvgain WHERE userid = ".$userid; $db->query($sql); } } } if ($ir['daily_drinks']) { echo 'We can not promise you are not going to come to any harm in this place, but we can promise you something alcoholic!<br /> So, '.($ir['gender'] == "Male" ? 'Chap', 'Darlin\'').', what is your choice of sin today?<br /> <hr style="margin: 0 auto; width: 30px;" /> <form action="" method="post"> <select name="drink"> <option value="1">Lager</option> <option value="2">Cider</option> <option value="3">Brandy</option> <option value="4">Vodka</option> <option value="5">Wine</option> <option value="6">Gin and Tonic</option> </select> <button>Get Drink</button> </form>'; } else { echo '<h4>You have used up your drink allowance for today, '.($ir['gender'] == "Male" ? 'pal', 'Darlin\'').'</h4> <p>You\'re drunk, <a href="index.php">go home</a></p>'; } } $h->endpage();   SQL - Assuming none of these are in the end-users database; ALTER TABLE users ADD daily_drinks tinyint(3) UNSIGNED NOT NULL DEFAULT 10; ALTER TABLE users ADD goldcoin int(10) UNSIGNED NOT NULL DEFAULT 0;   Cron Lines - daily/hourly cron $sql = "UPDATE users SET daily_drinks = 10"; $db->query($sql);   Notes At this point, it's worth noting that the drinks selection does nothing at all and the results are the same whichever you use. Anybody feel like expanding it?   Disclaimer THIS IS NOT TESTED AND I OFFER NO WARRANTY OF IT WORKING. HOWEVER, IF YOU FIND A PROBLEM, POST IT HERE - MYSELF OR OTHER COMMUNITY USERS MAY BE ABLE TO FIX IT FOR YOU.
  19. Those functions make the assumption people are using time stamps and not countdown minutes. If those are added to to a game using count down minutes, you are essentially giving them an hour hospital time per minute. Might want to include your own functions, for when game owners haven't converted there stuff over to time stamps.
  20. Points to note; Calculations Pointless In the code, you have multiple calculations for values, such as; -5 / 100 * 41 -20 / 100 * 12 Why are we even calculating with PHP when you can just answer the math yourself and use a static number? Respectively, they are; 2.05 2.40   Indentation Style :: None Please, pick a bracket style and indentation style. And use it. Multiple Line Ternary Why do we need 3 lines here? $_POST['drink'] = (isset($_POST['drink']) && is_numeric($_POST['drink'])) ? abs(intval($_POST['drink'])) : '0'; Also, use ctype_digit in place of is_numeric and you won't need to type cast the shizzle. 0 doesn't need quotations. It's a number, not a string. $_POST['drink'] = isset($_POST['drink']) && ctype_digit($_POST['drink']) ? $_POST['drink'] : 0 ;   White Space - Why so much, bro!? Why do we have so much random indentation here? echo " <form method='post'> So you've found {$set['game_name']} Eh, What's makes you think we'll serve a scrub like yourself... Huh, you have word from the Admin to be hear well... Ok step right in what would you like we have Beer, Cider, Vodka you name it we got it. <input type='hidden' name='drink' value='submit' />"; echo "</select> <input type='submit' value='Drink' /> </form>"; And why are 2 echo's required? They do do calls at PHP level to re-initiate - negligable, but if you want to learn to do "this" (AKA Comp00tr shiz), do it properly. Also, no idea why there is a closing select, yet no opening ones, or options. echo "<form method='post'> So you've found {$set['game_name']} Eh, What's makes you think we'll serve a scrub like yourself... Huh, you have word from the Admin to be hear well... Ok step right in what would you like we have Beer, Cider, Vodka you name it we got it. <input type='hidden' name='drink' value='submit' /> <input type='submit' value='Drink' /> </form>";
  21. The same reason you post to spam the links in your signature - because we can.
  22.   Judging by the signature links, I think you may be talking to a bot
  23. SRB

    So what is new?

    I continued to have a secret love for midgets and it's landed me in hot spots with the law on a few occasions. Apparently using them as condoms whilst penetrating a cow is wrong. One died of suffocation - how was I supposed to know that 30 seconds inside a cow could kill someone? Pfft. #thatIsAll
  24. Can we define code sprints as sports. The sprint part of the naming is confusing me!
  25. Please, never get into a sales job. I would like to buy a 55 inch TV Ok, here is your DVD player ;P
×
×
  • Create New...