Jump to content
MakeWebGames

pavalache

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

pavalache's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: Inventory revamp How'd you know that? :roll: I am allowed to post this, ask pog if you don't believe me. Otherwise, +1 for you mate, long way to 1k posts tho.
  2. Re: Inventory revamp yea don't worry, he actually recoded this for me.
  3. Re: Inventory revamp It was just a joke, on the same note... didn't know you're a celebrity here that deserves to be answered, thought you're just the forum police :-D man im sure POG wouldn't mind, he's a nice guy. peace
  4. Re: Inventory revamp My lawyer is still negotiating with his.
  5. Here's an inventory recoded %99 by POG1. You need MDK666's inventory mod installed (http://criminalexistence.com/ceforums/i ... ic=26757.0) altho you can strip the unneeded code and make it the default inventory. the css:   div#equippedItems { width:600px;margin:20px auto;padding:0; } div#equippedItems ul { list-style-type:none;margin:0; } div#equippedItems ul li { float:left;margin:3px 5px;width:100px; } .clearThis{clear:both}   inventory.php   <?php include "globals.php"; $q = $db->query("SELECT * FROM items WHERE itmid IN(".$ir['equip_primary'].", ".$ir['equip_secondary'].", ".$ir['equip_armor'].", ".$ir['equip_helmet'].", ".$ir['equip_boots'].", ".$ir['equip_amulet'].", ".$ir['equip_bracelet'].", ".$ir['equip_ring'].", ".$ir['equip_special']."); "); // // Create an 2D array for the items while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } // // Create an array to use in the loop $types = array('primary','secondary','armor','helmet','boots','ring','bracelet','amulet','special'); echo '<h3><span style="text-decoration: none; font-size: 16px; font-weight: 600">Equipped Items</span></h3>', '<div id="equippedItems">'. '<ul>'; // loop through the $types array and print the info for($i; $i < count($types); $i += 1) { $t = $ir['equip_'.$types[$i]]; echo '[*]'. '<div style="border:2px solid #333333;">'. '<span style="color:#00FF00; margin-top:10px;">'.$types[$i].'</span> '. '[img=itmpics/'.(($equip[$t]['itmpic']) ? $equip[$t]['itmpic'] : 'noitem.jpg').']'. ' '. '<span style="font-size: xx-small;">[[url="unequip.php?type=equip_'.$types[$i].'"]Unequip[/url]]</span> '. '<span style="color:#58ACFA;font-size: xx-small;">'.$equip[$t]['itmname'].'</span>'. '</p>'. '</div>'. ''; } echo '[/list]'. '<br class="clearThis" />'. '</div>'. '<h3Inventory</h3>'. '<hr />'; $inv=$db->query("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={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { echo '[b]You have no items![/b]'; } else { echo '[b]Your items are listed below.[/b] '. '<table width="100%" class="table10" border="0" cellspacing="1">'. '<tr>'. '<td class="h">Item Image</td>'. '<td class="h">Sell Value</td>'. '<td class="h">Total Sell Value</td>'. '<td class="h">Item Name</td>'. '<td class="h">Actions</td>'. '</tr>'; $lt=""; // // Main loop to add the items to the table // while($i=$db->fetch_row($inv)) { // adds the row across the table with the item type name if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; echo '<tr><td colspan="5"><font color="red">'.$lt.'</font></td></tr>'; } echo '<tr>'. '<td>[img=itmpics/'.$i['itmpic'].'] '. (($i['inv_qty'] > 1)?' x'.$i['inv_qty']:false). '</td>'. '<td>'. money_formatter($i['itmsellprice']). '</td>'. '<td>'. money_formatter($i['itmsellprice']*$i['inv_qty']). '</td>'. '<td>'.$i['itmname'].'</td>'. '<td>'. '| [url="iteminfo.php?ID='.$i['itmid'].'"]Info[/url] '. '| [url="itemsend.php?ID='.$i['inv_id'].'"]Send[/url] '. '| [url="itemsell.php?ID='.$i['inv_id'].'"]Sell[/url] '. '| [url="imadd.php?ID='.$i['inv_id'].'"]Add To Market[/url] |'; $usershop=$db->query(sprintf("select * from usershops where userid = %u;",$userid)); if(mysql_num_rows($usershop)!=0) { echo ' | [url="addtoshop.php?ID='.$i['inv_id'].'"] Put in Shop[/url] '; } if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { echo ' [url="itemuse.php?ID='.$i['inv_id'].'"]Use[/url] | '; } if($i['weapon']) { echo ' - [url="equip_weapon.php?ID='.$i['inv_id'].'"]Equip as Weapon[/url] -'; } if($i['armor']) { echo ' - [url="equip_armor.php?ID='.$i['inv_id'].'"]Equip as Armor[/url] -'; } if($i['helmet']) { echo ' - [url="equip_helmet.php?ID='.$i['inv_id'].'"]Equip as Helmet[/url] -'; } if($i['boots']) { echo ' - [url="equip_boots.php?ID='.$i['inv_id'].'"]Equip as Boots[/url] -'; } if($i['amulet']) { echo ' - [url="equip_amulet.php?ID='.$i['inv_id'].'"]Equip as Amulet[/url] -'; } if($i['bracelet']) { echo ' - [url="equip_bracelet.php?ID='.$i['inv_id'].'"]Equip as Bracelet[/url] -'; } if($i['ring']) { echo ' - [url="equip_ring.php?ID='.$i['inv_id'].'"]Equip as Ring[/url] -'; } if($i['special']) { echo ' - [url="equip_special.php?ID='.$i['inv_id'].'"]Equip as Special Item[/url] -'; } } } echo '</table>'. '<small>[b]Note:[/b]'. 'Some items are not what they appear to be.'; ?>
  6. Re: [NEED Help][MCCODES V2] Item Pic Mod here, use this shops code with pic before everything else, maybe this is what you're looking for.   <?php include "globals.php"; $_GET['shop'] = abs((int) $_GET['shop']); if(!$_GET['shop']) { print "You begin looking through town and you see a few shops. "; $q=$db->query("SELECT * FROM shops WHERE shopLOCATION={$ir['location']}"); print "<table width=85% cellspacing=1 class='table'><tr style='background: gray;'><th>Shop</th><th>Description</th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>[url='shops.php?shop={$r[']{$r['shopNAME']}[/url]</td><td><font color='#BDBDBD'>{$r['shopDESCRIPTION']}</font></td></tr>"; } print "</table>"; } else { $sd=$db->query("SELECT * FROM shops WHERE shopID={$_GET['shop']}"); if($db->num_rows($sd)) { $shopdata=$db->fetch_row($sd); if($shopdata['shopLOCATION'] == $ir['location']) { print "Browsing the [b]{$shopdata['shopNAME']}[/b]... <table cellspacing=1 class='table'><tr style='background: gray;'><th>Image</th><th>Item</th><th>Info</th><th>Price</th><th>Sell Price</th><th>Buy</th></tr>"; $qtwo=$db->query("SELECT si.*,i.*,it.* FROM shopitems si LEFT JOIN items i ON si.sitemITEMID=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE si.sitemSHOP={$_GET['shop']} ORDER BY i.itmtype ASC, i.itmbuyprice ASC, i.itmname ASC"); $lt=""; while($r=$db->fetch_row($qtwo)) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; print "\n<tr style='background: gray;'><th colspan=6>{$lt}</th></tr>"; } print "\n<tr><td>[img=itmpics/{$r[]</td><td>{$r['itmname']}</td><td>{$r['itmdesc']}</td><td>\${$r['itmbuyprice']}</td><td>\${$r['itmsellprice']}</td><td><form action='itembuy.php?ID={$r['itmid']}' method='post'>Qty: <input type='text' size='3' name='qty' value='1' /><input type='submit' value='Buy' /></form></td></tr>"; } print "</table>"; } else { print "You are trying to access a shop in another city!"; } } else { print "You are trying to access an invalid shop!"; } } $h->endpage(); ?>
  7. Re: addtoshop error, please help. Thanks, problem fixed. +1 :mrgreen:
  8. Re: addtoshop error, please help. anything i should change here?
  9. Hello again, here's my problem with addtoshop.php mccodes2. Most of the time when i try to add the same item twice for the same price i get this error: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where id=159' at line 1 Query was update usershopitems set quantity=quantity+ where id=159   Changing the prices eliminates the problem. thanks!
  10. Re: forum error +1, thanks bro.
  11. Guys, another error i can't fix. When trying to move a topic to another thread i get this(mccodes v2): Fatal error: Call to a member function query() on a non-object in /home/gamedb/public_html/forums.php on line 646   Line 646: $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}");   $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $topic=$db->fetch_row($q); $q2=$db->query("SELECT * FROM forum_forums WHERE ff_id={$_POST['forum']}"); $forum=$db->fetch_row($q2); $db->query("UPDATE forum_topics SET ft_forum_id={$_POST['forum']} WHERE ft_id={$_GET['topic']}"); $db->query("UPDATE forum_posts SET fp_forum_id={$_POST['forum']} WHERE fp_topic_id={$_GET['topic']}"); print "Topic moved... ";
  12. Re: High-Low game, need a lil help please. if you hide the card the dealer shows... there's a 50/50 chance. if you limit the bets even more you've got yourself with a finger killer. everybody will click the bet key all they long till their fingers hurt without winning much and ruining the economy...thats what i think:P
  13. Re: High-Low game, need a lil help please. thanks PHP Scene, that did the trick, was using v2. +1 when i can. Cheers!
  14. Re: High-Low game, need a lil help please. Thanks Joel, that fixed the problem. +1 Now i get Fatal error: Call to a member function query() on a non-object in /home/gamedb/public_html/highlow.php on line 116   116: $db->query("UPDATE users SET money=$lose WHERE userid=$userid", $c); care to help again?:)
  15. I have the high-low mod from this topic: http://criminalexistence.com/ceforums/index.php?topic=15283.0   After i bet i get this error: Fatal error: Call to a member function mysql_real_escape_string() on a non-object in /home/gamedb/public_html/highlow.php on line 71   line 71: $amount=$db->mysql_real_escape_string($_POST['amount']);   Whats wrong? tried both mysql_real_escape_string and real_escape_string and im out of ideas..pls help a noob, thx!
×
×
  • Create New...