Jump to content
MakeWebGames

SRB

Members
  • Posts

    785
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by SRB

  1. Then click the link I provided on page one of this thread, and you have almost what you want -- if you want 6 every time, just change the mt_rand to 6 and they'll get 6 every time.
  2. Empties the table and resets auto increment count to 1
  3. Purchase of... ?
  4. Done.   Random Daily Items
  5. Someone asked for this, so here it is. Your players can click on this once daily, and get between 2 and 5 random items at a cost of 100 crystals. SQL CREATE TABLE IF NOT EXISTS `random_items` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `user` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; DAILY CRON mysql_query("TRUNCATE TABLE `random_items`"); CODE (random_items.php) <?php include_once('globals.php'); $sql = "SELECT * FROM `random_items` WHERE `user` = '{$ir['userid']}'"; $run = mysql_query($sql, $c) or die (mysql_error()); if (mysql_num_rows($run) == 0) { if ($ir['crystals'] < 100) { echo '<p>You do not have 100 crystals</p>'; } else { // Create list of valid items $items = array(); $sql = mysql_query("SELECT `itmid`,`itmname` FROM `items` WHERE `itmbuyprice` < 100000 AND `itmbuyable` = 1"); while ($item = mysql_fetch_assoc($sql)) { $items[] = array('id' => $item['itmid'], 'name' => "{$item['itmname']}"); } $amount = mt_rand(2,5); echo '<p>You have collected ' . $amount . ' random items for today.</p> <p>The items you have been given, are:</p> <ul>'; for ($i = 1; $i <= $amount; $i++) { $give = $items[ mt_rand(0, (count($items) - 1)) ]; echo '<li>1x ' . htmlentities($give['name'], ENT_QUOTES, "UTF-8") . '</li>'; item_add($ir['userid'], $give['id'], 1); } echo '</ul>'; $sql = "UPDATE `users` SET `crystals` = `crystals` - 100 WHERE `userid` = '{$ir['userid']}'"; mysql_query($sql, $c) or die (mysql_error()); $sql = "INSERT INTO `random_items` (`user`) VALUES ('{$ir['userid']}')"; mysql_query($sql, $c) or die (mysql_error()); } } else { echo '<p>You have already claimed your free items today.</p>'; } $h->endpage(); LINK echo '<a href="random_items.php">Random Items</a><br />'; NOTE This is untested and wrote "on the fly", so no guarantees of it not having an error, BUT if there is, post here and someone (May be me) should correct it.
  6. You haz giff card!? :o
  7. Makes more sense to have it that way, since mods need all user level access to see. Drop all files that are not required with a quick edit to the auth file and you're away :)
  8. Thanks, a lot of effort went into this :)
  9. So, I've been working on a support ticket system and along the way, I've threw in some additional features which enable it to push questions (with answers) to the FAQ. With that said, here is a run down of features, depending on user level: Player: Can submit a support ticket Can reply to their own tickets   Secretary: Can submit a support ticket Can assign themselves to tickets, which blocks out all other secretaries Can reply to tickets Can close tickets Can "Push to Admin"   Admin: Can reply to tickets Can reply to tickets not assigned to them Can view all tickets, whether assigned to somebody or not Can see status of tickets (Open, closed, and who they're assigned too) Can see tickets that are "Pushed to Admin" Can close tickets Can "Push to FAQ"   PUSH TO FAQ: This allows an admin to throw a question into the FAQ database, which is then stored and can be searched. ADDITIONAL INFO: The FAQ uses FULL-TEXT search, so common words are removed, this created a problem with "will" since it's a common game name and also a stop word within full text searching -- this has been worked around, to be able to keep the search using full text lookups. QUESTIONS? Ask away HAVE A DEMO? Sure: Play Durty - Demo Site ALSO WORTH A MENTION: While the style in the demo isn't too great, I have used the styles that are used within mc code, so drop the file and it should update to the same style as your game. It can, however, be modeled to look pretty neat if you decided to edit to bootstrap, which I decided I would for my own use, below: [ATTACH=CONFIG]1080[/ATTACH] AND Depending on the "type" given, tickets direct to admin only if it's for bugs, cheat reports etc How to purchase this mod? PM me on here, or send payment to [email protected] with your email in the notes, if different to the one you use for paypal.
  10. Thanks. It was my intention to actually make a game and run with it myself, but after owning the domain for years and getting no closer to finishing a personal game code to put on there, I'm giving up on it. Work, kids, the dog, new woman who I now live with etc etc -- no time. The wicked have no rest, I guess.
  11. For sale today is one of my domains, deadlyunderworld.com along with the template attached. Worth noting: Layout is not coded I do not wish to code the template, so would need someone else to do it Domain expires on 14th March 2015 (7 months or so)   Price? Around the $50 mark would be sufficient, but open to reasonable offers. Template creator? Scarlet, who once was a member here. [ATTACH=CONFIG]1076[/ATTACH][ATTACH=CONFIG]1077[/ATTACH][ATTACH=CONFIG]1078[/ATTACH][ATTACH=CONFIG]1079[/ATTACH] PM with any queries and questions you'd like confidential etc ~Luke
  12. So, how would you base your opinion on candidates then, for example, if I chose to do it? I had over 1.2k posts on here, which held various mods, but I had site admin delete them all and I started again, since the community here got lax and wanted everything for free, including code samples for their own mods (which they probably sold), so I decided not to show mine on here. I'd also say I'm one of the best programmers on here (Definitely top 1% of members here), but you can't see my mods. How much does feedback affect it, since most people who know me here can tell you if I can write code etc. And for payments, I'm assuming all payments are made to you, then you pay out, right?
  13. Proven track record? Care to elaborate on the criteria. Also, can you explain the system -- how do payments work? Your cut? Etc.
  14. SRB

    MMCODES v3

    Care to inform me where V3 transpires from, within your original post? You can add as much as you want to V2, but it remains V2 - just modified more. The whole point of versions is to produce changes in the code, normally at the core, so since that hasn't changed, you won't be making V3 of anything. And even if you did re-write parts of the core and add lots of mods, you're not McCodes, so it would still be your V1. Clear this up for me, please.
  15. Why do you need support? To transfer? If so, Log in -> My purchases -> Engines -> Edit (Beside domain) -> Enter Transfer Email -> Hit Transfer
  16. $win = mt_rand(0, count($cars) - 1);
  17. Looks like Daves style of graphics... I'm curious now
  18. Ah, yes, it is. From your link, I was assuming you meant the upper code, since it's saying that's short handed too. To be fair, the wording on that page leaves something to be desired.
  19. Oh, "Ternary Operator" then.
  20. Yeah, I didn't feel the need to update it though and remove the "bloat" -- pointless when, if nobody corrects it, then I'm assuming their other queries are all pulled the same too. No point adding an ice cube to an iceberg
  21. <?php include_once("globals.php"); echo '<h2>Jail</h2>'; if ($ir['hospital'] > 0) { echo "<h4>Sorry this page is not viewable while in hospital!</h4>"; } else if ($ir['jail'] > 0) { echo "<h4>You are currently in prison.</h4> <p>You have " . number_format($ir['jail']) . " minutes remaining of your sentence.</p> <p>Reason for your imprisonment is: " . htmlentities($ir['jail_reason'], ENT_QUOTES, "UTF-8") . ".</p> <h4>Addition Options</h4> <p><a href='bust.php'>Try and escape for " . number_format(floor($ir['maxbrave'] / 2)) . " brave</a></p>"; } else { echo " <table width='75%' class='rounded'> <tr> <th>ID</th> <th>Player</th> <th>Time</th> <th>Level</th> <th>Reason</th> <th>Release</th> </tr>"; $q = db->query("SELECT c.*,u.* FROM `users` u LEFT JOIN `gangs` c ON u.`gangs` = c.`gangID` WHERE u.`jail` > 0 ORDER BY u.`jail` DESC"); if (mysql_num_rows($q) > 0) { while($r = $db->fetch_row($q)) { $num++; if (($num % 2) == 0) { $color="#e3e3e3"; } else { $color="#D8D8D8"; } echo " <tr bgcolor='$color'> <td><a href='viewuser.php?u=" . $r['userid'] . "'>" . htmlentities($r['username'], ENT_QUOTES, "UTF-8") . "</a></td> <td>" . number_format($r['jail']) . " minutes</td> <td>" . number_format($r['level']) . "</td> <td>" . htmlentities($r['jail_reason'], ENT_QUOTES, "UTF-8") . "</td> <td> [<a href='jailbust.php'>Bust</a>] [<a href='jailbail.php'>Bail</a>] </td> <tr>"; } } else { echo " <tr> <th colspan='7'> You walk into the local jail, in the hope of mocking inmates, but there is nobody here. Unlucky, kiddo. </td> </tr>"; } echo "</table>"; } $h->endpage()
  22.   Because that would be the wrong variable to check, since it will be negative if $chance if above 100.   if ($chance > 100) $chance = 100;
  23. Get rid of will and have "Mojo" with an open to "Hide the Mojo" and when successful, the person must say "I lost my Mojo" in chat, to unlock it to rebuild again. Screw it, let's just throw in acid, austin powers and some mini me games, and we're onto a winner, baaabehhh yeahhh!
  24.   Can they buy a baby blue VDub camper with pink and yellow flowers too? That'd be psychedelic baby, yeah!
×
×
  • Create New...