-
Posts
2,155 -
Joined
-
Last visited
-
Days Won
155
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
We all know MC Craps here, your reasons don't need to be said :P Agreed Most of the actual developers for hire here and more than capable of working under orders, we wouldn't get clients that way ;)
-
I can build it exactly how you want it. If you want it to be similar to MC Craps, then I can give you that. If you want something completely different, I may be able to give you that too (my ability is limited by my knowledge (as is everyone's)) I'd charge £5,000 - £6,000 for a full-fledged system with ease-of-use and ease-of-modification (and that includes the rights to the code..)
-
Repaired :)
-
Right, there is a way to fix that, but that means grabbing a local copy of the jQuery lib. Also, that's not what's causing the issue.. If you'd like, I'll take a look and see what I can find.
-
If you're using Firefox/Chrome, please enable the console and reload the page. Paste any error messages please
-
I would highly recommend using an SFTP program - FileZilla is completely free and will have everything you need :)
-
So, yeah, gang ranks.. I made a gang ranks module for DRCity (when it was still running) and, now that I have no use for it, I'm releasing it.. Here's the repo: https://bitbucket.org/Magictallguy/mc-codes-gang-ranks Knock yourselves out! Any issues, either post here and post a bug on the issue tracking (registration not required) Note: This one will require some coding on your end, but really not that much. You'll need to take a look at the SQL table to understand what needs to go where
-
Snippet updated, code tested, fully working - - - Updated - - - There's a minor issue that I didn't notice until now - please use the updated snippet
-
Right, I'm gonna upload a copy and do some testing on my private test rig.. Bear with me
-
Try this: Code moved to snippet My guess is that you don't have the correct functions installed on your system - namely mny_stripfmt() Feckin' MWG's syntax highlighter is whacking extra spacing in where it shouldn't.. I'll whack up a snippet for you... https://bitbucket.org/snippets/Magictallguy/p7rx
-
Correctly converted and sent to your inbox (as you messaged me with it too -.-) <?php require_once "globals.php"; if (!$_GET['spend']) { print "Welcome to the Honor Award Exchange Center! You have <b>{$ir['honor']}</b> Honor Awards. What would you like to spend your Honor Awards on? <a href='HonorExchange.php?spend=IQ'>IQ - 100 IQ per Honor Award</a> <a href='HonorExchange.php?spend=labour3'>Trade for Labour Points - 3,000 Labour Points per Honor Award</a> <a href='HonorExchange.php?spend=guard3'>Trade for Defense - 3,000 Defense per Honor Award</a> <a href='HonorExchange.php?spend=agility3'>Trade for Agility - 3,000 Speed per Honor Award</a> <a href='HonorExchange.php?spend=strength3'>Trade for Strength - 3,000 strength per Honor Award</a> <a href='HonorExchange.php?spend=money'>Money - \$2,000,000 per Honor Award</a>"; } else if ($_GET['spend'] == 'IQ') { print "Type in the amount of Honor Awards you want to swap for IQ.<br />You have <b>{$ir['honor']}</b> Honor Awards.<br />One Honor Award = 100 IQ.<form action='HonorExchange.php?spend=IQ2' method='post'><input type='text' name='honor' /><input type='submit' value='Swap' /></form>"; } else if ($_GET['spend'] == 'IQ2') { $_POST['honor'] = (int) $_POST['honor']; if ($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form<br /><a href='HonorExchange.php?spend=IQ'>Back</a>"; } else { $iqgain = $_POST['honor'] * 100; $_POST['honor'] = strip_tags($_POST['honor']); $_POST['honor'] = mny_stripfmt($_POST['honor']); $_POST['honor'] = abs((int) ($_POST['honor'])); $db->query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid", $c); $db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid", $c); print "You traded {$_POST['honor']} Honor Awards for $iqgain IQ."; } } else if ($_GET['spend'] == 'labour3') { print "Type in the amount of Honor Awards you want to swap for labour points.<br />You have <b>{$ir['honor']}</b> Honor Awards.<br />One Honor Award = 300,000 labour points.<form action='HonorExchange.php?spend=labour4' method='post'><input type='text' name='honor' /><input type='submit' value='Swap' /></form>"; } else if ($_GET['spend'] == 'labour4') { $_POST['honor'] = (int) $_POST['honor']; if ($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /><a href='HonorExchange.php?spend=labour3'>Back</a>"; } else { $labourgain = $_POST['honor'] * 3000; $_POST['honor'] = strip_tags($_POST['honor']); $_POST['honor'] = mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor'] = abs((int) ($_POST['honor'])); $db->query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid", $c); $db->query("UPDATE userstats SET labour=labour+$labourgain WHERE userid=$userid", $c); print "You traded {$_POST['honor']} Honor Awards for $labourgain labour points."; } } else if ($_GET['spend'] == 'guard3') { print "Type in the amount of Honor Awards you want to swap for Defense.<br />You have <b>{$ir['honor']}</b> Honor Awards.<br />One Honor Award = 3,000 Defense.<form action='HonorExchange.php?spend=guard4' method='post'><input type='text' name='honor' /><input type='submit' value='Swap' /></form>"; } else if ($_GET['spend'] == 'guard4') { $_POST['honor'] = (int) $_POST['honor']; $_POST['honor'] = strip_tags($_POST['honor']); $_POST['honor'] = mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor'] = abs((int) ($_POST['honor'])); if ($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /><a href='HonorExchange.php?spend=guard3'>Back</a>"; } else { $guardgain = $_POST['honor'] * 3000; $_POST['honor'] = strip_tags($_POST['honor']); $_POST['honor'] = mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor'] = abs((int) ($_POST['honor'])); $db->query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid", $c); $db->query("UPDATE userstats SET guard=guard+$guardgain WHERE userid=$userid", $c); print "You traded {$_POST['honor']} Honor Awards for $guardgain Defense."; } } else if ($_GET['spend'] == 'agility3') { print "Type in the amount of Honor Awards you want to swap for Agility.<br />You have <b>{$ir['honor']}</b> Honor Awards.<br />One Honor Award = 3,000 Agility.<form action='HonorExchange.php?spend=agility4' method='post'><input type='text' name='honor' /><input type='submit' value='Swap' /></form>"; } else if ($_GET['spend'] == 'agility4') { $_POST['honor'] = (int) $_POST['honor']; if ($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /><a href='HonorExchange.php?spend=agility3'>Back</a>"; } else { $agilitygain = $_POST['honor'] * 3000; $_POST['honor'] = strip_tags($_POST['honor']); $_POST['honor'] = mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor'] = abs((int) ($_POST['honor'])); $db->query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid", $c); $db->query("UPDATE userstats SET agility=agility+$agilitygain WHERE userid=$userid", $c); print "You traded {$_POST['honor']} Honor Awards for $agilitygain Agility."; } } else if ($_GET['spend'] == 'strength3') { print "Type in the amount of Honor Awards you want to swap for Strength.<br />You have <b>{$ir['honor']}</b> Honor Awards.<br />One Honor Award = 3,000 Strength.<form action='HonorExchange.php?spend=strength4' method='post'><input type='text' name='honor' /><input type='submit' value='Swap' /></form>"; } else if ($_GET['spend'] == 'strength4') { $_POST['honor'] = (int) $_POST['honor']; if ($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /><a href='HonorExchange.php?spend=strength3'>Back</a>"; } else { $strengthgain = $_POST['honor'] * 3000; $_POST['honor'] = strip_tags($_POST['honor']); $_POST['honor'] = mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor'] = abs((int) ($_POST['honor'])); $db->query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid", $c); $db->query("UPDATE userstats SET strength=strength+$strengthgain WHERE userid=$userid", $c); print "You traded {$_POST['honor']} Honor Awards for $strengthgain Strength."; } } else if ($_GET['spend'] == 'money') { print "Type in the amount of Honor Awards you want to swap for \$\$\$.<br />You have <b>{$ir['honor']}</b> Honor Awards.<br />One Honor Award = \$2,000,000.<form action='HonorExchange.php?spend=money2' method='post'><input type='text' name='honor' /><input type='submit' value='Swap' /></form>"; } else if ($_GET['spend'] == 'money2') { $_POST['honor'] = (int) $_POST['honor']; if ($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /><a href='HonorExchange.php?spend=money'>Back</a>"; } else { $iqgain = $_POST['honor'] * 2000000; $_POST['honor'] = strip_tags($_POST['honor']); $_POST['honor'] = mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor'] = abs((int) ($_POST['honor'])); $_POST['money'] = strip_tags($_POST['money']); $_POST['money'] = mny_stripfmt($_POST['money'], ENT_QUOTES); $_POST['money'] = abs($_POST['money']); $db->query("UPDATE users SET honor=honor-{$_POST['honor']},money=money+$iqgain WHERE userid=$userid", $c); print "You traded {$_POST['honor']} Honor Awards for \$$iqgain."; } } $h->endpage();
-
A basic wiki for this can now be found here I'll update as I figure out more information about it :)
-
Aye, I've managed to debug! Make sure you're using the MySQLi class that MC Craps v2 comes with Edit config.php, find the 'driver' part and change 'mysql' to 'mysqli' MC Craps <= v2.0.2 doesn't come with a MySQLi version of the escape() function, simply add the code below to above the final closing curly brace } function escape($str) { return mysqli_real_escape_string($this->connection_id, $str); }
-
Working on it ;)
-
To anyone having issues with the archive extraction (Linux users mostly) It's a zip within a zip. But the zipception doesn't have an extension. Rename the extracted archive to "chat.zip" and extract as normal
-
I love you and want your code babies *as the White Chicks* That. Is. So. Sexy..
-
It's supposed to return blank, nothing is being printed to the user. Also, make sure your cron is setup to use the correct path (and code). Normally something like: * * * * 0 curl yoursite.tld/path/to/lottery_cron.php?code=THE_CODE_FROM_YOUR_CONFIG.PHP_FILE Note: it could do with converting to v2 I'll do the cron file for you. You may wish to use this topic to help you if you're not sure on how to do it lottery_cron.php <?php include "./config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db = new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c = $db->connection_id; include "./global_func.php"; $lotteryDetails = $db->query("SELECT * FROM lotteryDetails"); $ld = $db->fetch_row($lotteryDetails); $winNumbers = array(); for($i = 0; $i < 6; $i++) { $num = mt_rand(1, 46); if(empty($winNumbers)) array_push($winNumbers, $num); else { while(in_array($num, $winNumbers)) $num = mt_rand(1, 46); array_push($winNumbers, $num); } } sort($winNumbers); $wn = implode(",", $winNumbers); $getTickets = $db->query("SELECT * FROM lotterytickets"); $jackpot = $db->num_rows($getTickets) * $ld['lotprice'] + $ld['lotjackpot']; $zero = 0; $one = 0; $two = 0; $three = 0; $four = 0; $five = 0; $six = 0; $users = array(); while($gt = $db->fetch_row($getTickets)) { $yourNumbers = explode(",", $gt['numbers']); sort($yourNumbers); if(empty($users)) array_push($users, $gt['userid']); else { if(!in_array($gt['userid'], $users)) array_push($users, $gt['userid']); } $correct = 0; foreach($yourNumbers as $yn) if(in_array($yn, $winNumbers)) ++$correct; if($correct == 0) ++$zero; if($correct == 1) ++$one; if($correct == 2) ++$two; if($correct == 3) ++$three; if($correct == 4) ++$four; if($correct == 5) ++$five; if($correct == 6) ++$six; $db->query("UPDATE lotterytickets SET correct = " . $correct . " WHERE id = " . $gt['id']); } $potWin = array(); $countUsers = count($users); if(!empty($users)) { for($ui = 0; $ui < $countUsers; $ui++) { $selectCorrect = $db->query("SELECT correct, id, userid, numbers FROM lotterytickets WHERE userid = " . $users[$ui]); $event = "<b><u>The winning numbers are: " . $wn . ".</u></b><br />"; $event .= "The results from your " . abs(@intval($db->num_rows($selectCorrect))) . " lottery tickets:<br />"; $nowin = array( 0, 1, 2 ); $total = 0; while($sc = $db->fetch_row($selectCorrect)) { $event .= "<b>Ticket numbers: " . $sc['numbers'] . "</b>"; if(in_array($sc['correct'], $nowin)) $event .= "<i> -- " . $sc['correct'] . " matching number(s) (no winnings)</i>"; else { if($sc['correct'] == 3) $winnings = $ld['lotprice'] + floor($ld['lotprice'] * 0.5); if($sc['correct'] == 4) $winnings = $ld['lotprice'] + floor($ld['lotprice'] * 0.8); if($sc['correct'] == 5) $winnings = $ld['lotprice'] + floor($ld['lotprice'] * 1.4); if($sc['correct'] == 6) { $winnings = $ld['lotprice'] + floor($jackpot / $six); array_push($potWin, $users[$ui]); } $event .= "<i> -- " . $sc['correct'] . " matching numbers (Won \$" . number_format($winnings) . ")</i>"; $total += $winnings; } } $event .= "You won a total of \$" . number_format($total) . ".<hr />"; event_add($users[$ui], trim($event)); $db->query("UPDATE users SET money = money + " . $total . " WHERE userid = " . $users[$ui]); } $winners = !empty($potWin) ? implode(",", $potWin) : 'N/A'; $db->query("INSERT INTO lotterydone (ldID, ldNUMBERS, ldZERO, ldONE, ldTWO, ldTHREE, ldFOUR, ldFIVE, ldSIX, ldPOT, ldPOTWIN, ldTIME) VALUES('','" . $wn . "', " . $zero . ", " . $one . ", " . $two . ", " . $three . ", " . $four . ", " . $five . ", " . $six . ", " . $jackpot . ", '" . $winners . "', UNIX_TIMESTAMP())"); $jp = !$six ? $jackpot : 0; $db->query("UPDATE lotteryDetails SET lotjackpot = " . $jp); } else event_add(1, "No lottery this week. :("); $db->query("TRUNCATE TABLE lotterytickets");
-
Ajaxify, jQuery your Entire MC-Code Game [Any MC-Code Version]
Magictallguy replied to Sim's topic in Free Modifications
Not compatible (OOTB anyway) with Dave's chat -
v2 is compatible with v2.0.5b and, for the most part, vice versa. The main differences are as above. Simply add in the protections ;)
-
Prepending my classes with "mtg_" is just a personal preference. It makes no difference in the usage itself. And yes, I know about error handling. I've wrote and used many different error handlers for different projects. I like Laravel, never stated I don't. I just don't like the stock error handling system. There's normally far too much information being displayed to repair the more common errors. Whilst the highly-verbose output does come in handy, I find it a little overkill personally. I like clear and concise.
-
With a little work, you could easily convert to a v2-esque system. I'll even throw-in a quick PDO class for ya! Edit: I've moved the class (and usage instructions) to my blog - my profile receives more views than this topic will! :P
-
Post the rest of it.. No. I'm not. I'm saying that you had received a copy of my code as it was uploaded to your1 site. False, I purposely leave little markers2 in the code that make it identifiable to me. The backup you uploaded was not from before my work, it was my work! The site is far from dead. It gets, on average, 3,950 unique visitors and 19,582 page hits a day, and is worth $18,000+3. It has a very active userbase and most of the people on here (minus a few isolated incidents) are friendly and willing to set their time aside to help others. For the love of all that is holy; if you're going to slate pretty much everything you can, you may want to be able to back it up with evidence to support your claims4 1 At the time of the job 2 The markers are almost invisible to most, I will happily show you 3Source 4 Which, for the record, you have failed to do throughout this entire topic
-
Oh, that's cute.. You've opened 36 disputes against me, stating that you haven't received the code, but you've stated here on multiple occasions that you have.. Nicely done!
-
I have legal recourse. I have proof and have provided it - you haven't. I'm pulling this "****" here to warn others against you and Donnie - as I've previously stated. I don't doubt the players, I doubt you. What story? Again, I have provided proof (and before it was requested, i.e. on my first post!). Also, why would I spend weeks upon weeks working on code and then destroy it in a couple of days? This is after the partnership broke down and he left DRCity to me. I even granted him a full week to grab a backup of the repaired code (this is before I had realised exactly how much he had stolen) 1. How can I steal players that are already there? I don't advertise on other games, I go via word of mouth. Players have their own minds. By that alone, it's virtually impossible for me to "steal" players. 2. I didn't try to steal players anyway, I had no reason or intention. This isn't a shaming topic, this is a friendly warning to others - as previously stated (now multiple times). I've kept my story straight, you've constantly changed yours. I've remained as calm and polite as possible, you've been slanderous and insulting to, not only myself but, to other members of this forum. To, er, you know, prove this too.. You haven't seen me calling others, and I quote: "****ing retards" and "pedos", have you? Sticks and stones, mate.. What gives you the right to insult a memberbase of over 1,000 people - most of which, you probably don't know? Sticks and stones, mate.. Again, I've kept my story straight - you haven't.. Please provide proof and a list of your previously used handles. The name "A2TC" isn't in my list. I invite you to do so. I've provided proof, you haven't.. even after multiple requests The code is in your possession, however, it's not yours. I retain all rights to my code as I wrote it. For example: You own films, right? DVDs, Blu-ray, downloaded, hell VHS! Doesn't mean you own the rights.. My portfolio spans 6 years and is rather extensive; MafiaTurf, Gangsta City Online, Samurai Assault, just to name a few.. Would you like me to write something up right now that you won't find anywhere else? I am more than capable and can, yet again, prove it! Allow me to finish that sentence.. "All you did here was allow people to see how many issues you have with Donnie and I" I did not intend to hurt you or Donnie - I don't have to, you already did. From code that isn't yours. I'm a developer with 10 years experience, up for hire as a freelancer for 6. Of course I have a track record, and of course it's not going to be squeaky clean. However, from all the reviews I've had, I'd estimate that at least 90% were positive, a couple were neutral. The bad reviews, hell, you can't win 'em all! Yet another request.. Please provide proof, this isn't a Sun tabloid I haven't sold code since 2010 I haven't stolen since ... ever! I haven't had to, you've done that for me repeatedly. I waste no time of my own. I have provided what evidence I currently and I'm waiting on a response from Microsoft to provide me with the rest. Also, my time is mine to waste - you haven't paid for it! See above quotation response I will provide actual concrete proof! Hire me or don't, your own choice. I'm not going to force-feed you my code
-
So, not only have you not been able to provide proof when 2 people on 3 occasions have politely requested it; you're now attacking me with false accusations? Well.. Thank you for being you!