
BlueDevil23
Members-
Posts
328 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by BlueDevil23
-
(MCCODES) V2 Layout For Sale $100 is starting bid
BlueDevil23 replied to doinkinator's topic in Paid Modifications
Re: (MCCODES) V2 Layout For Sale $100 is starting bid Okay, I was being a little too generous, but it's worth more than $10 :P -
(MCCODES) V2 Layout For Sale $100 is starting bid
BlueDevil23 replied to doinkinator's topic in Paid Modifications
Re: (MCCODES) V2 Layout For Sale $100 is starting bid xD On topic: doinkinator, I feel its a fair price, especially if it's unique. Don't sell yourself short, just because it's the norm around here. -
Re: Zebra Styled Tables It's funny how all the work it takes to zebra stripe tables in PHP or JS, will simply come down to: tr:nth-child(even) { background-color: #000; } tr:nth-child(odd) { background-color: #FFF; } ..once all major browsers support CSS3 (or at least the nth-child attribute) EDIT: So you did figure it out? Thought I would throw out there, how I have mine set up... $zebracolors = array('#FFF', '#000'); while($r=mysql_fetch_array($q)) { $zebra = current($zebracolors); next($zebracolors); (current($zebracolors) === FALSE ? reset($zebracolors) : FALSE); echo "<tr style='background-color:{$zebra};'>"; //rest of userlist loop... } With this method you can use as many colors as you would like, to stripe your table with. Hope it's helpful to someone :)
-
Re: [mccode v2] Estate Recode Jeez lol Code updated. That should do it.
-
Re: [mccode v2] Estate Recode Oh.. didn't realize the prices were so huge. I see the problem now. Give me a min. EDIT: original code updated, give that a try.
-
Re: [mccode v2] Estate Recode What's wrong with it ?
-
Re: [mccode v2] Inventory Recode Ok checked, and yeah it would have to be with your iteminfo.php. Though, I don't see what your talking about, because the iteminfo.php looks fine here. Maybe a screenshot? I'll try and help ya out :) http://i463.photobucket.com/albums/qq354/Albenski/iteminfo.jpg here is a screen shot of how my items shift to 1 side any clue why That looks like an issue with the template. Looks like a <tr> tag wasn't closed. I would check the thread where that template is, and see if anyone else has had this issue.
-
Re: [mccode v2] Estate Recode Just what I've posted, plus a gym.
-
Re: [mccode v2] Estate Recode Code Updated. Sorry bout' that Strats, I accidentally put number_format(abs(@intval($np['hNAME']))) when it was supposed to be number_format(abs(@intval($np['hPRICE']))) .. yet it was being cast to an integer, so thats why it simply showed as 0.
-
The usual, but I added the option to either show the houses as a list(like the original) or in a table. Not sure why I did this... lol.. but I did. Guess I figured some might like the original look of the list. <?php require_once "globals.php"; echo <<<EOFS1 <style type="text/css"> .success { color: green; } .fail { color: red; } table { text-align: center; } #housing th { border: thin solid; } #housing td { border: thin dotted; } </style> EOFS1; $housesConfig = array('DEFAULTHouse' => 'Shed', 'DEFAULTHouseMaxWill' => 100, 'listingStyle' => 'LIST'); // Make sure to change these to your // default house's name, and that house's // Options for listingStyle // will. // are LIST or TABLE $currentHouse = sprintf("SELECT `hNAME`, `hWill` FROM `houses` WHERE (`hWILL` = %d)", $ir['maxwill']); $mpq = mysql_query($currentHouse); if($mpq === FALSE) { echo "".mysql_error().""; } $mp = $db->fetch_row($mpq); $_GET['property']= (!empty($_GET['property']) && ctype_digit($_GET['property']) && isset($_GET['property']) ? abs(@intval($_GET['property'])) : FALSE); $_GET['sellhouse'] = (!empty($_GET['sellhouse']) && ctype_digit($_GET['sellhouse']) && isset($_GET['sellhouse']) ? $_GET['sellhouse'] : FALSE); if($_GET['property']) { $getProperties = sprintf("SELECT `hWILL`, `hNAME`, `hPRICE` FROM `houses` WHERE (`hID` = %d)", $_GET['property']); $npq = mysql_query($getProperties); if($npq === FALSE) { echo "".mysql_error().""; } $np = $db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { echo "<h3 class='fail'> You cannot go backwards in houses! </h3>"; } else if ($np['hPRICE'] > $ir['money']) { printf("<h3 class='fail'> You do not have enough money to buy the %s </h3>", $np['hNAME']); } else { $updateHouses = sprintf("UPDATE `users` SET `money` = `money` - %d, `will` = 0, `maxwill` = %d WHERE (`userid` = %u)", abs($np['hPRICE']), abs($np['hWILL']), abs(@intval($userid))); mysql_query($updateHouses); printf("<h3 class='success'> Congrats, you bought the %s for \$%d!", stripslashes($np['hNAME']), abs($np['hPRICE'])); } } else if ($_GET['sellhouse']) { $getProperties = sprintf("SELECT `hPRICE`, `hNAME` FROM `houses` WHERE (`hWILL` = %d)", abs(@intval($ir['maxwill']))); $npq = mysql_query($getProperties); if($npq === FALSE) { echo "".mysql_error().""; } $np = $db->fetch_row($npq); if($ir['maxwill'] == $housesConfig['DEFAULTHouseMaxWill']) { echo "You already live in the lowest property!"; } else { $beginnerHouse = sprintf("UPDATE `users` SET `money` = `money` + %d,`will` = 0, `maxwill` = %d WHERE (`userid` = %u)", abs($np['hPRICE']), $housesConfig['DEFAULTHouseMaxWill'], abs(@intval($userid))); $do_beginnerHouse = mysql_query($beginnerHouse); if($do_beginnerHouse === FALSE) { echo "".mysql_error().""; } printf("<h3 class='success'> You sold your %s and went back to your %s </h3>", stripslashes($np['hNAME']), $housesConfig['DEFAULTHouse']); } } else { printf("<h4 style='padding-bottom:25px;'> Your current property is <span style='font-weight:bold;'> %s </span>", stripslashes($mp['hNAME'])); echo "<h5 style='padding-bottom:10px;'> The houses you can buy are listed below. Click a house to buy it </h5>"; $sellHouse = ($ir['maxwill'] > $housesConfig['DEFAULTHouseMaxWill'] ? "[url='estate.php?sellhouse=1'] Sell Your House [/url]" : FALSE); if(isset($sellHouse)) { echo $sellHouse; } $houseList = sprintf("SELECT `hID`, `hNAME`, `hPRICE`, `hWILL` FROM `houses` WHERE (`hWILL` > %d) ORDER BY `hWILL` ASC", abs(@intval($ir['maxwill']))); $hq = $db->query($houseList); if($hq === FALSE) { echo "".mysql_error().""; } if($housesConfig['listingStyle'] == 'LIST' || strlen($housesConfig['listingStyle']) < 1 || !in_array($housesConfig['listingStyle'], array('LIST', 'TABLE'))) { $styles = array('style' => array("<ul stlye='list-style-type:none;line-height:2em;'>", "[/list]"), 'stylechild' => array("[*]", ""), 'styleseperator' => array("<span style='padding-left:25px;padding-right:25px;'>", "</span>")); } else { $styles = array('style' => array("<table style='width:75%;border-spacing:1;' id='housing'>", "</table>"), 'trow' => array("<tr>", "</tr>"), 'stylechild' => array("<td>", "</td>")); } echo $styles['style'][0]; if($housesConfig['listingStyle'] == 'TABLE') { echo "<tr>"; echo "<th> House Name </th>"; echo "<th> House Price </th>"; echo "<th> House Will </th>"; echo "</tr>"; } while($r = $db->fetch_row($hq)) { echo $styles['stylechild'][0]; printf("[url='estate.php?property=%d'] %s [/url]", $r['hID'], stripslashes($r['hNAME'])); if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][0]; } if(isset($styles['styleseperator'][0])) { echo $styles['styleseperator'][0]; } printf("Cost: \$%d", abs($r['hPRICE'])); if(isset($styles['styleseperator'][1])) { echo $styles['styleseperator'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][0]; } printf("Will Bar: %d", abs($r['hWILL'])); echo $styles['stylechild'][1]; if(isset($styles['trow'][1])) { echo $styles['trow'][1]; } } echo $styles['style'][1]; } $h->endpage(); ?>
-
Re: [mccode v2] Inventory Recode Ok checked, and yeah it would have to be with your iteminfo.php. Though, I don't see what your talking about, because the iteminfo.php looks fine here. Maybe a screenshot? I'll try and help ya out :)
-
Re: [mccode v2] Inventory Recode Nope, more like a case of me doing this in a web development class in school, so I wasn't all that concentrated :P. I only secured the queries, didn't attempt to optimize them. Sorry bout' that, I'll fine tune it for ya guys when I get a chance. :)
-
Re: [mccode v2] Inventory Recode I would have to see for myself, so drop a PM with your game link and a demo account, if you will. Though it's more than likely your iteminfo.php(or whatever it's called), though I could be wrong :)
-
Re: [mccode v2] Weather Gym [$1.00] The first email says what has been updated. The second email actually has the mod attached, since I forgot, the first time, to attach the files xD. A clean install, besides the SQLs (Ifalreadyinstalled.txt), is recommended.
-
Re: [mccode v2] Weather Gym [$1.00] This was done in Update 3, and you could see it in the monorail, since Update 2 :)
-
Re: [mccode v2] Weather Gym [$1.00] Thanks :) Update 3, resent to all buyers, a small bug was found.
-
Re: Events Recode Code updated.
-
Re: [mccode v2] Weather Gym [$1.00] Anyone who owns this mod, has received Update 3. ghost313, and Neji_Hyuuga, the fully updated script was also sent to you, sorry for the wait. Update 3: Overall updated code. A fresh install is recommended. Players are now able to see the current weather while in the gym. This option (along with stat ranks), can be turned off and on, in wegym.config.php Endpage function re-enabled in monorail.php
-
Re: Events Recode Original code updated, all known bugs are fixed, including the one Strats posted, which was caused by the first anyhow. :) Sorry bout' that guys, I should of tested it more.
-
Re: [mccode v2] Inventory Recode Thanks Miniman. Although I don't even use MCC for a game, lots of others here do, so these are useful to them. Maybe when I fully recode all the files, I'll use it for a game, but, until then... no.. lol
-
Mainly a code update, but a slight visual update too... <?php require_once "globals.php"; echo <<<EOFS1 <style type="text/css"> .wepdivider { padding-right: 15px; } #equipped { list-style-type: none; line-height: 2em; padding-bottom: 30px; } .invheader { padding-bottom: 15px; } #inv { width:100%; text-align: center; border-spacing: 1; padding: 0 5px 15px 5px; } #inv th { border: thin solid; } #inv td { border: thin dotted; } #inv #weptype { border: thin dashed; } </style> EOFS1; $getWeps = sprintf("SELECT * FROM items WHERE itmid IN(%d, %d, %d)", $ir['equip_primary'], $ir['equip_secondary'], $ir['equip_armor']); $q = mysql_query($getWeps); if($q === FALSE) { echo "".mysql_error.""; } echo "<h3 class='invheader' style='padding-top:5px;'> Equipped Items </h3>"; while($r = $db->fetch_row($q)) { $equip[$r['itmid']] = $r; } echo "<ul id='equipped'>"; echo "[*]"; echo "<span class='wepdivider'> Primary Weapon </span>"; $primewep = ($equip[$ir['equip_primary']]['itmid'] ? "<span class='wepdivider'> {$equip[$ir['equip_primary']]['itmname']} </span> [url='unequip.php?type=equip_primary'] Unequip Item [/url]" : "No Primary Weapon equipped"); printf("%s", $primewep); echo ""; echo "[*]"; echo "<span class='wepdivider'> Secondary Weapoon </span>"; $secondwep = ($equip[$ir['equip_secondary']]['itmid'] ? "<span class='wepdivider'> {$equip[$ir['equip_secondary']]['itmname']} </span> [url='unequip.php?type=equip_secondary'] Unequip Item [/url]" : "No Secondary Weapon equipped"); printf("%s", $secondwep); echo ""; echo "[*]"; echo "<span class='wepdivider'> Armor </span>"; $armor = ($equip[$ir['equip_armor']]['itmid'] ? "<span class='wepdivider'> {$equip[$ir['equip_armor']]['itmname']} </span> [url='unequip.php?type=equip_armor'] Unequip Item [/url]" : "No Armor equipped"); printf("%s", $armor); echo ""; echo "[/list]"; echo "<h2 class='invheader'> Inventory </h2>"; $getInv = sprintf("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid= %u ORDER BY i.itmtype ASC, i.itmname ASC", abs(@intval($userid))); $inv = mysql_query($getInv); if($getInv === FALSE) { echo "".mysql_error.""; } if ($db->num_rows($inv) == 0) { echo "<span style='font-weight:bold;'> You have no items! </span>"; } else { echo <<<EOF1 <h4 style="padding-bottom: 10px;"> Your items are listed below </h4> <table id="inv"> <tr> <th> Item </th> <th> Sell Value </th> <th> Total Sell Value </th> <th> Links </th> </tr> EOF1; $lt = ""; while($i=$db->fetch_row($inv)) { if($lt != $i['itmtypename']) { $lt = $i['itmtypename']; echo "<tr>"; echo "<td colspan='4' id='weptype'> <span style='font-weight:bold;'> {$lt} </span> </td>"; echo "</tr>"; } if($i['weapon']) $i['itmname'] = sprintf("<span style='color:red;'> * </span> %s", $i['itmname']); if($i['armor']) $i['itmname']= sprintf("<span style='color:green;'> * </span> %s", $i['itmname']); echo "<tr>"; echo "<td> {$i['itmname']}"; if ($i['inv_qty'] > 1) echo " x{$i['inv_qty']}"; echo "</td>"; printf("<td> \$%d </td>", $i['itmsellprice']); echo "<td>"; echo "$".($i['itmsellprice']*$i['inv_qty']); echo "</td>"; echo "<td>"; echo "[[url='iteminfo.php?ID={$i['] Info [/url]] "; echo "[[url='itemsend.php?ID={$i['] Send [/url]] "; echo "[[url='itemsell.php?ID={$i['] Sell [/url]] "; echo "[[url='imadd.php?ID={$i['] Add To Market [/url]]"; if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) echo " [[url='itemuse.php?ID={$i['] Use [/url]]"; if($i['weapon']) echo " [[url='equip_weapon.php?ID={$i['] Equip as Weapon [/url]]"; if($i['armor']) echo " [[url='equip_armor.php?ID={$i['] Equip as Armor [/url]]"; echo "</td>"; echo "</tr>"; } echo "</table>"; echo "<h5> Items with a small red <span style='color:red;'> * </span> next to their name, can be used as weapons in combat. </h5>"; echo "<h5> Items with a small green <span style='color:green;'> * </span> next to their name, can be used as armor in combat.</h5>"; } $h->endpage(); ?> Hope y'all enjoy these recodes, as I'm slowly recoding MCC, and might as well let others get use out of them also. :)
-
[MCCODES ALL] IE8 Fix for visual Errors
BlueDevil23 replied to Uridium's topic in Free Modifications
Re: [MCCODES ALL] IE8 Fix for visual Errors It's worth noting, an ideal solution would be to use valid, clean, semantic XHTML and CSS, paired with a Strict Doctype, to get the best results, in all Grade A browsers, including IE 8. But for most people, that need a quick fix, to get the IE 7 look back again, this will work. Good find illusions :) -
Re: Events Recode My bad. Code updated, to fix this issue.
-
Re: Events Recode Thanks Emphesis :)
-
Nothing special added.. just better code, than original, more security, and clean, semantic XHTML... <?php require_once "globals.php"; echo <<<EOFS1 <style type="text/css"> .success { color: green; } .fail { color: red; } table { text-align: center; } </style> EOFS1; $_GET['delete'] = (!empty($_GET['delete']) && ctype_digit($_GET['delete']) && isset($_GET['delete']) ? abs(@intval($_GET['delete'])) : FALSE); $_GET['delall'] = (!empty($_GET['delall']) && ctype_digit($_GET['delall']) && isset($_GET['delall']) ? abs(@intval($_GET['delall'])) : FALSE); $_GET['delall2'] = (!empty($_GET['delall2']) && ctype_digit($_GET['delall2']) && isset($_GET['delall2']) ? abs(@intval($_GET['delall2'])) : FALSE); if($_GET['delete']) { $deleteEvent = sprintf("DELETE FROM `events` WHERE `evID` = %d AND `evUSER` = %u", $_GET['delete'], abs(@intval($userid))); $do_deleteEvent = mysql_query($deleteEvent); if($do_deleteEvent === FALSE) { echo "".mysql_error().""; } echo "<h3 class='success'> Event Deleted </h3>"; } if($_GET['delall']) { echo "<h4>This will delete all your events</h4>"; echo "<h4>There is <span style='font-weight:bold;'> NO </span> undo, so be sure</h4>"; echo "<ul style='list-style-type:none;line-height:2em;'>"; echo "[*] [url='events.php?delall2=1'] Yes, delete all my events [/url] "; echo "[*] [url='events.php']No, go back[/url] "; echo "[/list]"; $h->endpage(); exit; } if($_GET['delall2']) { $getEventnum = sprintf("SELECT * FROM `events` WHERE `evUSER` = %u", abs(@intval($userid))); $do_getEventnum = mysql_query($getEventnum); if($do_getEventnum === FALSE) { echo "".mysql_error().""; } $am = $db->num_rows($do_getEventnum); $deleteAll = sprintf("DELETE FROM `events` WHERE `evUSER` = %u", abs(@intval($userid))); $do_deleteAll = mysql_query($deleteAll); printf("<h3 class='success' style='padding-bottom:10px;'> All <span style='font-weight:bold;'> %d </span> events you had, were deleted. </h3>", $am); echo "[url='events.php']Back[/url]"; $h->endpage(); exit; } echo "<h2 style='padding-bottom:15px;'> Latest Events </h2>"; echo "[url='events.php?delall=1'] Delete All Events [/url]"; $selectEvents = sprintf("SELECT * FROM `events` WHERE `evUSER` = %u ORDER BY `evTIME` DESC LIMIT 10;", abs(@intval($userid))); $q = mysql_query($selectEvents); if($q === FALSE) { echo "".mysql_error().""; } echo "<table style='width:75%;border-spacing:1;padding-top:10px;'>"; echo "<tr>"; echo "<th>Time</th>"; echo "<th>Event</th>"; echo "<th>Links</th>"; echo "</tr>"; while($r = $db->fetch_row($q)) { echo "<tr>"; echo "<td>".date('F j Y, g:i:s a',$r['evTIME']); $new = (!$r['evREAD'] ? "<span style='padding-left: 15px;font-weight:bold;color:red;'> NEW </span>" : FALSE); echo $new; echo "</td>"; printf("<td> %s </td>", $r['evTEXT']); printf("<td> [url='events.php?delete=%d']Delete[/url] </td>", abs(@intval($r['evID']))); echo "</tr>"; } echo "</table>"; if($ir['new_events'] > 0) { $eventRead = sprintf("UPDATE `events` SET `evREAD` = 1 WHERE `evUSER` = %u", abs(@intval($userid))); $do_eventRead = mysql_query($eventRead); if($do_eventRead === FALSE) { echo "".mysql_error().""; } $newEvents = sprintf("UPDATE `users` SET `new_events` = 0 WHERE `userid` = %u", abs(@intval($userid))); $do_newEvents = mysql_query($newEvents); if($do_newEvents === FALSE) { echo "".mysql_error().""; } } $h->endpage(); ?>