
BlueDevil23
Members-
Posts
328 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by BlueDevil23
-
Re: [mccode v2] Job Recode Thanks everyone
-
Re: [mccode v2] Weather Gym [$1.00] The demo site, has the updated weather gym... but it still has some slight bugs, as you might notice, but at least you can see the main idea, if you wish. The fully completed, bug-free update will be out tomorrow.
-
Re: [mccode v2] Crystal Temple Yes, you want the integer value, not the string representation of it.
-
Re: [mccode v2] Weather Gym [$1.00] That can be done, and will try to be done by today.
-
Re: [mccode v2] Weather Gym [$1.00] Thanks guys :) If anyone has any ideas for an update, let me know. Seeing as the last two updates came through buyer's ideas, thought I'd throw it out there, that if you have an idea for this let me know.
-
Re: [mccode v2] Weather Gym [$1.00] Thanks Strats. :) and thanks a lot Killah, really appreciated.
-
Re: [mccode v2] Weather Gym [$1.00] Update 2 is out, and anyone that has purchased this mod, has received the updated files through email. Update 2: A complete recode of monorail.php, and an added link next to the list of cities, that allows you to click it, and see the current weather(and weather code, so your players can try and figure out which codes, give better or worse stats), all through an XHR call (AJAX). Once your players keep using the gym, and figure out most of the weather code's advantages and disadvantages, this update will be very useful to the players, to see which city they want to go to, and train in. Now, you could use this opportunity to raise the ticket prices to go from city to city, and this could be a good way to get some money out of the game. But, it's all your choice, do with it, as you will :) EDIT: Maybe we can even get Killah to update the demo site, with the latest update, so you can see it in action :P
-
Re: cron_day.php Will sum1 plz post alll teh mccode V2 .php's plz? :? :?
-
Re: [mccode v2] Crystal Temple You could basically copy and paste what he has there. $configs = array('EnergyRefill' => 10,'WillRefill' => 10, 'BraveRefill' => 10,'DonatorDays' => 10, 'Protection' => 10); To call it simply use... $configs['EnergyRefill'] etc etc
-
Once again, I was going to be needing monorail.php for an upcoming update to a paid modification I've made. So, I recoded it, so I would have a good base to start off with. Simply replace your monorail.php with this one, if you would like <?php include "globals.php"; $ticketprice = 1000; // Set this to the price, you would like the players to pay, to travel between cities echo <<<EOFS1 <style type="text/css"> .success { color: green; } .fail { color: red; } table { text-align: center; } </style> EOFS1; $_GET['to'] = (!empty($_GET['to']) && ctype_digit($_GET['to']) && isset($_GET['to']) ? abs(@intval($_GET['to'])) : FALSE); if(!$_GET['to']) { echo" <h1> Welcome to the Monorail Station. </h1>"; echo "<h3> It costs \$$ticketprice for a ticket </h3>"; echo "<h3> Where would you like to travel today?</h3>"; $get_cities = sprintf("SELECT * FROM `cities` WHERE `cityid` != %d AND `cityminlevel` <= %d", $ir['location'], $ir['level']); $q = mysql_query($get_cities); if($q === FALSE) { echo "".mysql_error().""; } echo <<<EOF1 <table style="width:75%;border-spacing:1"> <tr> <th> Name </th> <th> Description </th> <th> Min Level </th> <th> </th> </tr> EOF1; while($r = $db->fetch_row($q)) { echo <<<EOF2 <tr> <td> {$r['cityname']} </td> <td> {$r['citydesc']} </td> <td> {$r['cityminlevel']} </td> <td> [url='monorail.php?to={$r[']Go[/url] </td> </tr> EOF2; } echo "</table>"; } else { if($ir['money'] < $ticketprice) { echo "<h3 class='fail'> You don't have enough money </h3>"; } else if($_GET['to'] != $_GET['to']) { echo "<h3 class='fail'> Invalid city ID </h3>"; } else { $select_cities = sprintf("SELECT * FROM `cities` WHERE `cityid` = %d AND `cityminlevel` <= %d", $_GET['to'], $ir['level']); $q = mysql_query($select_cities); if($q === FALSE) { echo "".mysql_error().""; } if(!$db->num_rows($q)) { echo "<h3 class='fail'> Error, this city either does not exist or you cannot go there </h3>"; } else { $update_query = sprintf("UPDATE `users` SET `money` = `money` - %d, `location` = %d WHERE `userid` = %u", $ticketprice, $_GET['to'], abs(@intval($userid))); $foo = mysql_query($update_query); if($foo === FALSE) { echo "".mysql_error().""; } $r = $db->fetch_row($q); printf("<h3 class='success'> Congratulations, you paid \$%d and travelled to %s on the monorail! </h3>", $ticketprice, $r['cityname']); } } } $h->endpage(); ?>
-
Re: [mccode v2] Weather Gym [$1.00] Thanks everyone for the positive comments. Anyone that has purchased this, has been sent the first update through email (or IM, if I caught you through there), and any one that bought it after the update, has the fully updated script :) Update 1: A small request from a buyer, to be able to show the user's stat ranks. I thought it would be a worthy enough of a modification to send out as an update. Of course this is optional, if you like this the way it is already, or don't wont the user's stat ranks box there. This can be turned off and on, in the config file. :)
-
Re: [mccode v2] Crystal Temple My bad, I split it from a paid topic, and forgot to move it out of this thread, thanks wolfe
-
Strats was having some issues making some modifications to her jobs.php today, so I thought I would help her out. So, I decided I would recode job.php, first, and then add the modification she needed, afterwards. So here is job.php without the modifications, so you can replace it with yours if you choose so. <?php $jobquery = 1; require_once "globals.php"; echo <<<EOFS1 <style type="text/css"> .linkslist { list-style-type: none; line-height: 2em; } .convo { padding-bottom: 10px; } table { text-align: center; } </style> EOFS1; $_GET['interview'] = (!empty($_GET['interview']) && ctype_digit($_GET['interview']) && isset($_GET['interview']) ? abs(@intval($_GET['interview'])) : ""); $_GET['action'] = (!empty($_GET['action']) && ctype_alpha($_GET['action']) && isset($_GET['action']) ? strtolower(trim(htmlentities($_GET['action']))) : ""); if(!$ir['job']) { if(!$_GET['interview'] || strlen($_GET['interview']) < 1) { echo "<h2>You do not have a job yet</h2>"; echo "<h3>A list of jobs is available below</h3>"; $jobselect_query = "SELECT * FROM jobs"; $q = mysql_query($jobselect_query); if($q === FALSE) { echo "".mysql_error().""; } echo "[list=1]"; while($r = $db->fetch_row($q)) { printf("[*] %s - %s - [url='job.php?interview=%d'] Go to interview [/url] ", htmlentities($r['jNAME']), htmlentities($r['jDESC']), abs(@intval($r['jID']))); } echo "[/list]"; } else { $q_query = sprintf("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID WHERE j.jID=%d", $_GET['interview']); $q = mysql_query($q_query); if($q === FALSE) { echo "".mysql_error().""; } $r = $db->fetch_row($q); printf("<p class='convo'> %s: So, %s, you were looking for a job with us?</p>", htmlentities($r['jOWNER']), htmlentities($ir['username'])); printf("<p class='convo'> %s: Yes, please! </p>", htmlentities($ir['username'])); if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { $get_job_query = sprintf("UPDATE `users` SET `job` = %d, `jobrank` = %d WHERE `userid` = %u", $_GET['interview'], abs(@intval($r['jrID'])), abs(@intval($userid))); $get_job = mysql_query($get_job_query); if($get_job === FALSE) { echo "".mysql_error().""; } printf("<p class='convo'> %s: Okay, %s, we're good to go. See you tomorrow. </p>", htmlentities($r['jOWNER']), htmlentities($ir['username'])); printf("<p class='convo'> %s: Thanks! </p>", htmlentities($ir['username'])); echo "<span style:'text-align:center> [url='job.php'] Start your job! [/url] </span>"; } else { printf("<p class='convo'> %s: Sorry, %s, you're not qualified to work in this job path. You'll need:", htmlentities($r['jOWNER']), htmlentities($ir['username'])); if($ir['strength'] < $r['jrSTRN']) { $s = $r['jrSTRN'] - $ir['strength']; echo " $s more strength, "; } if($ir['labour'] < $r['jrLABOURN']) { $s=$r['jrLABOURN']-$ir['labour']; echo " $s more labour, "; } if($ir['IQ'] < $r['jrIQN']) { $s=$r['jrIQN']-$ir['IQ']; echo " $s more IQ, "; } echo "before you'll be able to work here! </p>"; echo "[url='index.php']Maybe next time...[/url]"; } } } else { switch($_GET['action']) { case 'quit': quit_job(); break; case 'promote': job_promote(); break; default: job_index(); break; } } function job_index() { global $db, $ir,$c,$userid,$h; echo "<h3>Your Job</h3>"; printf("<h5> You currently work in the %s!</h5>", htmlentities($ir['jNAME'])); printf("<h5> You receive \$%d each day at 5pm! </h5>", abs(@intval($ir['jrPAY']))); printf("<h5> You also receive %d IQ, %d strength, and %d labour! </h5>", abs(@intval($ir['jrIQG'])), abs(@intval($ir['jrSTRG'])), abs(@intval($ir['jrLABOURG']))); echo <<<EOF1 <table style='width:50%;border-spacing:1;'> <tr> <td>Strength: {$ir['strength']}</td> <td>IQ: {$ir['IQ']}</td> </tr> <tr> <td>Labour: {$ir['labour']}</td> <td>Job Rank: {$ir['jrNAME']}</td> </tr> </table> <h3>Job Ranks</h3> <table style='width:75%;border-spacing:1;'> <tr> <th>Title</th> <th>Pay</th> <th>Strength Reqd</th> <th>IQ Reqd</th> <th>Labour Reqd</th> </tr> EOF1; $select_job = sprintf("SELECT * FROM `jobranks` WHERE `jrJOB` = %d ORDER BY `jrPAY` ASC", abs(@intval($ir['job']))); $q = mysql_query($select_job); if($q === FALSE) { echo "".mysql_error().""; } while($r = $db->fetch_row($q)) { echo <<<EOF2 <tr> <td>{$r['jrNAME']}</td> <td>\${$r['jrPAY']}</td> <td>{$r['jrSTRN']}</td> <td>{$r['jrIQN']}</td> <td>{$r['jrLABOURN']}</td> </tr> EOF2; } echo "</table>"; echo "[list=1]"; echo "[*] [url='job.php?action=promote'] > Try To Get Promoted [/url] "; echo "[*] [url='job.php?action=quit']> Quit[/url] "; echo "[/list]"; } function job_promote() { global $db,$ir,$c,$userid,$h; $select_ranks = "SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1"; $q = $db->query($select_ranks); if($q === FALSE) { echo "".mysql_error().""; } if($db->num_rows($q) == 0) { echo "<h3> Sorry, you cannot be promoted at this time </h3>"; echo "[url='job.php'] > Back [/url]"; } else { $r = $db->fetch_row($q); $update_job = sprintf("UPDATE `users` SET `jobrank` = %d WHERE (`userid` = %u)", abs(@intval($r['jrID'])), abs(@intval($userid))); $do_update_job = mysql_query($update_job); if($do_update_job === FALSE) { echo "".mysql_error().""; } printf("<h3> Congrats, you have been promoted to %s</h3>", htmlentities($r['jrNAME'])); echo "[url='job.php'] > Back [/url]"; } } function quit_job() { global $db,$ir,$c,$userid,$h; $del_job = sprintf("UPDATE `users` SET `job` = 0, `jobrank` = 0 WHERE (`userid` = %u)", abs(@intval($userid))); $do_del_job = mysql_query($del_job); if($do_del_job === FALSE) { echo "".mysql_error().""; } echo "<h3> You have quit your job! </h3>"; echo "[url='job.php'] > Back [/url]"; } $h->endpage(); ?>
-
Re: [mccode v2] Simple Job Specials $r['jrID'] is empty, and that's why you're getting that error. Try to figure out why $r['jrID'] is empty by following simply debugging steps.
-
Re: [mccode v2] Weather Gym [$1.00] Thanks parelem :)
-
Re: [mccode v2] Weather Gym [$1.00] Thanks Karlos :) Package sent.
-
Re: [mccode v2] Weather Gym [$1.00] Also, if you would like your players to figure out easier what the gains are You could echo out the code at the moment, and post a chart somewhere(the chart is included in wegym.config.php) showing which codes, give more or less of each stat :)
-
Re: [mccode v2] Weather Gym [$1.00] Thanks :) You don't have to exactly tell the user the equations are updated through weather, because they will never know so. The only way they will be able to tell, is your telling them, that the gains are different all the time, in different cities, and them trying to figure out which stat is giving more out at that time. P.S. Don't let the price fool ya ;)
-
This mod takes the gym script to a whole other level This gym will take a real-time updated RSS feed, and change your gyms equations depending on the weather, in the city the user is in(the weather actually comes from a city you pick(zipcode). If its sunny in City 1, the user may get more strength than usual, if its cloudy in City 2, the user may get less agility than usual. Easily customizable, and well coded. Your purchase will include; wegym.php, wegym.config.php, and WeatherGymInstructions.txt and support. This mod can be tested at http://convictsunleashed.com/demo (thanks to Killah) *Also, no need to sign up, or even sign in to the test game, just go to the link, and you will be logged into the demo account, simply click, "Weather Gym" on the main menu, and your there :) Send payments to [email protected] through PayPal Package will be sent to the email on the paypal address, unless specified otherwise... It's 4:45 AM right now.. lol, any questions, and more information, will be added tomorrow, since I know some people wont fully understand it... :)
-
Re: [mccode v2] Looking for someone to secure You know I'll help you out, just holler.
-
[V2] Help needed with staff_items2.php please
BlueDevil23 replied to Iumadder's topic in General Discussion
Re: [V2] Help needed with staff_items2.php please The exact error the page spits out at ya, will help us more :) -
Re: [mccode v2] Gift.php [edited] Give him a break, he's trying, and at least giving credit.
-
Re: [mccode v2] Tag Mod (Complete) tagmarket.php <?php require_once "globals.php"; echo <<<EOF1 <style type='text/css'> .success { color: green; } .fail { color: red; } .padder { padding: 0 7px 25px 7px; } legend { margin-left: 1em; color: #FFF; font-weight: bold; } fieldset ol { padding: 1em 1em 0 1em; list-style: none; } fieldset ol li { float: left; clear: left; width: 100%; padding-bottom: 0.7em; } label { float: left; width: 10em; margin-right: 1em; } fieldset .submit { float: none; width: auto; border-style: none; padding-left: 12em; } </style> EOF1; (($ir['hospital'] > 0 || $ir['jail'] > 0) ? die("You cannot view this page while you are in hospital / jail.") : FALSE); echo "<h3> Tag Market </h3>"; ((!empty($_GET['action']) && ctype_alpha($_GET['action']) && isset($_GET['action'])) ? $_GET['action'] = strtolower(trim(htmlentities($_GET['action']))) : $_GET['action'] = ""); switch($_GET['action']) { case "buy": tag_buy(); break; case "remove": tag_remove(); break; case "add": tag_add(); break; default: tmarket_index(); break; } function tmarket_index() { global $db,$ir,$c,$userid,$h; echo "<h2 style='text-align:center;> Viewing all listings... </h2>"; echo "<span style='text-align:center;>[url='tagmarket.php?action=add'] > Add A Listing [/url]</span>"; echo "<table width='75%' cellspacing='1'>"; echo "<tr>"; echo "<th> Adder </th>"; echo "<th>Qty</th>"; echo "<th> Price each </th>"; echo "<th> Price total </th>"; echo "<th> Links </th>"; echo "</tr>"; $q = mysql_query("SELECT tm.*, u.* FROM tagmarket tm LEFT JOIN users u ON u.userid=tm.tmADDER ORDER BY tmPRICE/tmQTY ASC") or die(mysql_error()); while($r=$db->fetch_row($q)) { (($r['tmADDER'] == $userid) ? $link = "[url='tagmarket.php?action=remove&ID=".abs(@intval($r[']Remove[/url]" : $link = "[url='tagmarket.php?action=buy&ID=".abs(@intval($r[']Buy[/url]"); $each = abs(@intval($r['tmPRICE'] / $r['tmQTY'])); echo "<tr>"; printf("<td> [url='viewuser.php?u=%d'] %s [/url] [%d] </td>", abs(@intval($r['userid'])), htmlentities($r['username']), abs(@intval($r['userid']))); printf("<td> %d </td>", abs(@intval($r['tmQTY']))); printf("<td> \$'.number_format(%d).' </td>", $each); printf("<td> \$'.number_format(%d).' </td>", abs(@intval($r['tmPRICE']))); printf("<td> [%s] </td>", $link); echo "</tr>"; } echo "</table>"; } function tag_remove() { global $db,$ir,$c,$userid,$h; (isset($_GET['ID']) && ctype_digit($_GET['ID']) ? $_GET['ID'] = abs(@intval($_GET['ID'])) : $_GET['ID'] = ""); $q = mysql_query("SELECT * FROM `tagmarket` WHERE `tmID` = {$_GET['ID']} AND `tmADDER` = ".abs(@intval($userid))."") or die(mysql_error()); if(!$db->num_rows($q)) { echo "<h3 class='fail'>Error, either these tags do not exist, or you are not the owner</h3>"; echo "[url='tagmarket.php']> Back[/url]"; return; } $r=$db->fetch_row($q); mysql_query(sprintf("UPDATE `users` SET `HDTags` = `HDTags` + ('%d') WHERE `userid` = ('%d')", abs(@intval($r['tmQTY'])), abs(@intval($userid)))) or die(mysql_error()); mysql_query(sprintf("DELETE FROM `tagmarket` WHERE `tmID` = ('%d')", $_GET['ID'])) or die(mysql_error()); echo "<h3 class='success'> Tags removed from market! </h3>"; echo "[url='tagmarket.php']> Back[/url]"; } function tag_buy() { global $db,$ir,$c,$userid,$h; (isset($_GET['ID']) && ctype_digit($_GET['ID']) ? $_GET['ID'] = abs(@intval($_GET['ID'])) : $_GET['ID'] = ""); $q = mysql_query("SELECT * FROM `tagmarket` cm WHERE `tmID` = {$_GET['ID']}") or die(mysql_error()); if(!$db->num_rows($q)) { echo "<h3 class='fail'> Error, either these Tags do not exist, or they have already been bought </h3>"; echo "[url='tagmarket.php']> Back[/url]"; return; } $r=$db->fetch_row($q); if($r['tmPRICE'] > $ir['money']) { echo "<h3 class='fail'> Error, you do not have the funds to buy these Tags </h3>"; echo "[url='tagmarket.php']> Back[/url]"; return; } mysql_query(sprintf("UPDATE `users` SET `HDTags` = `HDTags` + ('%d') WHERE `userid` = ('%u')", abs(@intval($r['tmQTY'])), abs(@intval($userid)))) or die(mysql_error()); mysql_query(sprintf("DELETE FROM `tagmarket` WHERE `tmID` = ('%d')", $_GET['ID'])) or die(mysql_error()); mysql_query(sprintf("UPDATE `users` SET `money` = `money` - ('%d') WHERE `userid` = ('%u')", abs(@intval($r['tmPRICE'])), abs(@intval($userid)))) or die(mysql_error()); mysql_query(sprintf("UPDATE `users` SET `money` = `money` + ('%d') WHERE `userid` = ('%u')", abs(@intval($r['tmPRICE'])), abs(@intval($r['tmADDER'])))) or die(mysql_error()); event_add(abs(@intval($r['tmADDER'])),"[url='viewuser.php?u=']{$ir['username']}[/url] bought your {$r['tmQTY']} Tags from the market for \${$r['tmPRICE']}",$c); echo "<h3 class='success'> You bought the ".abs(@intval($r['tmQTY']))." Tags from the market for \${$r['tmPRICE']}."; } function tag_add() { global $db,$ir,$c,$userid,$h; $_POST['amnt'] = (!empty($_POST['amnt']) && ctype_digit($_POST['amnt']) && isset($_POST['amnt']) ? abs(@intval($_POST['amnt'])) : ""); $_POST['amnt'] = (!empty($_POST['price']) && ctype_digit($_POST['price']) && isset($_POST['price']) ? abs(@intval($_POST['price'])) : ""); if($_POST['amnt']) { (($_POST['amnt'] > $ir['HDTags']) ? die("You are trying to add more tags to the market than you have.") : FALSE); $docheck = mysql_query(sprintf("SELECT `tmID` FROM `tagmarket` WHERE `tmADDER` = ('%u')", abs(@intval($userid)))) or die(mysql_error()); if(mysql_num_rows($docheck) >= 2) { echo "<h2 class='fail'> You can only have 2 different posts on the tag market, at a time.</h2>"; echo "[url='tagmarket.php']> Go Back[/url]"; return; } $tp = $_POST['amnt'] * $_POST['price']; mysql_query(sprintf("INSERT INTO `tagmarket` VALUES('',('%d'),('%u'),('%d'))", $_POST['amnt'], abs(@intval($userid)), abs(@intval($tp)))) or die(mysql_error()); mysql_query(sprintf("UPDATE `users` SET `HDTags` = `HDTags` - ('%d') WHERE `userid` = ('%u')", $_POST['amnt'], abs(@intval($userid)))) or die(mysql_error()); echo "<h3 class='success'> Tags added to market! </h3>"; echo "[url='tagmarket.php']> Back[/url]"; } else { $tagplural = ($ir['HDTags'] > 1 || $ir['HDTags'] == 0 ? "s" : ""); echo <<<EOF2 <h2> Adding a listing </h2> <h4 style='padding-bottom:15px;'>You have [b]{$ir['HDTags']}[/b] tag$tagplural that you can add to the market</h4> <div class='padder'> <fieldset> <legend> Add A Listing </legend> <form action='tagmarket.php?action=add' method='POST'> [list=1] [*] <label for='amnt'>[b]Tags[/b]</label> <input type='text' name='amnt' value='{$ir['HDTags']}' /> [*] <label for='price'>[b]Price Each[/b]</label> <input type='text' name='price' value='200' /> [*] <input type='submit' name='submit' value='Add To Market' /> [/list] </form> </fieldset> </div> EOF2; } } return; ?>
-
[mccode] Advanced Merit System [$10.00]
BlueDevil23 replied to Zero-Affect's topic in Paid Modifications
Re: [mccode] Advanced Merit System [$10.00] Lol @ "only" :roll: