Jump to content
MakeWebGames

MDK666

Members
  • Posts

    268
  • Joined

  • Last visited

Everything posted by MDK666

  1. Re: [mccodes v2]New and improved inventory   thanks michael its still being edited at the moment right now its all black with red in it but i have someone makeing me new images as we speak you can see the updated on right now if u got to my site at http://thedarkone.pcriot.com im switching hosts right now so in about 2 days ill be at work again, this is all because of my domain which im useing nameservers so as you all know it needs atleast 48 hrs to update them.
  2. Re: [mccodes v2]New and improved inventory   And how many STANDARD versions of MCC have you seen this on ? sure primary, secondary, and armor are standard. I think what your trying to say POG is why didnt i think of this and do it. ANSWER is coz your too busy selling mods ;) Move over theres a new Script crew that do it for Free :) this is to pog if you really think its standard i want you to code the same one i just did without useing my mod, and give us a link to your site on if it works or not. and to illusions thanks for telling me that he said it looks standard, the only problem he has with it is that i got to it before he had a chance to code it and sell it. granted i could of sold it for about 50-70 dollars as it is now but why when the source codes to the game are free anymore and well ive used quit of bit of peoples mods also in my game. im just posting this to say repay everyone for there hard work.
  3. Re: [mccodes v2]New and improved inventory code sources for free!   http://thedarkone.pcriot.com   right now nothing unless u put a effect into the item that u make, say u put a effect on a ring called will ring with a increase of say 50 when u equip the right and dont quote me on this but it should give that use 50 extra will while it equiped, and it should remove the 50 will after he/she takes it off
  4. Re: [mccodes v2]New and improved inventory code sources for free!   not sure why thats happening, maybe you mixed the file names up when making them because i justed tested the same codes i posted and its working fine, as for the template do u know of a template thats probaly a dark and black on to use to add the right menu on my site.
  5. Re: [mccodes v2]New and improved inventory code sources for free! ok could someone help me now im trying to get a right side menu on my side with the following stats Name: $gn{$u} [{$ir['userid']}] $d Level: {$ir['level']} Turns: {$ir['turns']} Money: {$fm} Crystals: {$ir['crystals']} Diamonds: {$ir['diamonds']} TOC Credits: {$ir['credits']} [<font color=red>Emergency Logout</font>]</font> and a few others im useing shavadas template could anyone help me out on this because im confused as hell
  6. Re: [mccodes v2]New and improved inventory code sources for free! please dont double post :-P
  7. Re: [mccodes v2]New and improved inventory code sources for free! now for the last part which is the sqls here they are. sqls ALTER TABLE `users` ADD `equip_helmet` int(11) NOT NULL default '0'; ALTER TABLE `users` ADD `equip_boots` int(11) NOT NULL default '0'; ALTER TABLE `users` ADD `equip_amulet` int(11) NOT NULL default '0'; ALTER TABLE `users` ADD `equip_braclet` int(11) NOT NULL default '0'; ALTER TABLE `users` ADD `equip_ring` int(11) NOT NULL default '0'; ALTER TABLE `users` ADD `equip_special` int(11) NOT NULL default '0'; ALTER TABLE `items` ADD `boots` int(11) NOT NULL default '0'; ALTER TABLE `items` ADD `helmet` int(11) NOT NULL default '0'; ALTER TABLE `items` ADD `amulet` int(11) NOT NULL default '0'; ALTER TABLE `items` ADD `braclet` int(11) NOT NULL default '0'; ALTER TABLE `items` ADD `ring` int(11) NOT NULL default '0'; ALTER TABLE `items` ADD `special` int(11) NOT NULL default '0';
  8. Re: [mccodes v2]New and improved inventory code sources for free! equip_helmet.php   <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['helmet']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_helmet"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else { print "<h3>Equip Helmet</h3><hr /> <form action='equip_helmet.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Click Equip Helmet to equip {$r['itmname']} as your helmet, if you currently have any helmets equipped it will be removed back to your inventory. <input type='hidden' name='type' value='equip_helmet' /> <input type='submit' value='Equip Helmet' /></form>"; } $h->endpage(); ?>   equip_ring.php   <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['ring']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_ring"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else { print "<h3>Equip Ring</h3><hr /> <form action='equip_ring.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Click Equip Ring to equip {$r['itmname']} as your ring, if you currently have any rings equipped it will be removed back to your inventory. <input type='hidden' name='type' value='equip_ring' /> <input type='submit' value='Equip Ring' /></form>"; } $h->endpage(); ?>   equip_special.php   <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['special']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_special"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else { print "<h3>Equip Special Item</h3><hr /> <form action='equip_special.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Click Equip Special Item to equip {$r['itmname']} as your special items, if you currently have any special items equipped it will be removed back to your inventory. <input type='hidden' name='type' value='equip_special' /> <input type='submit' value='Equip Special Item' /></form>"; } $h->endpage(); ?>
  9. Re: [mccodes v2]New and improved inventory code sources for free! you now will need to make the following files equip_amulet.php   <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['amulet']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_amulet"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else { print "<h3>Equip Amulet</h3><hr /> <form action='equip_amulet.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Click Equip Amulet to equip {$r['itmname']} as your amulet, if you currently have any amulets equipped it will be removed back to your inventory. <input type='hidden' name='type' value='equip_amulet' /> <input type='submit' value='Equip Amulet' /></form>"; } $h->endpage(); ?>   equip_boots.php   <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['boots']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_boots"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else { print "<h3>Equip Boots</h3><hr /> <form action='equip_boots.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Click Equip Boots to equip {$r['itmname']} as your boots, if you currently have any boots equipped it will be removed back to your inventory. <input type='hidden' name='type' value='equip_boots' /> <input type='submit' value='Equip Boots' /></form>"; } $h->endpage(); ?>   equip_braclet.php   <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); $id=$db->query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1"); if($db->num_rows($id)==0) { print "Invalid item ID"; $h->endpage(); exit; } else { $r=$db->fetch_row($id); } if(!$r['braclet']) { print "This item cannot be equipped to this slot."; $h->endpage(); exit; } if($_GET['type']) { if(!in_array($_GET['type'], array("equip_braclet"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if($ir[$_GET['type']]) { item_add($userid, $ir[$_GET['type']], 1); } item_remove($userid, $r['itmid'], 1); $db->query("UPDATE users SET {$_GET['type']} = {$r['itmid']} WHERE userid={$userid}"); print "Item {$r['itmname']} equipped successfully."; } else { print "<h3>Equip Braclet</h3><hr /> <form action='equip_braclet.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Click Equip Braclet to equip {$r['itmname']} as your braclet, if you currently have any braclets equipped it will be removed back to your inventory. <input type='hidden' name='type' value='equip_braclet' /> <input type='submit' value='Equip Braclet' /></form>"; } $h->endpage(); ?>
  10. Re: [mccodes v2]New and improved inventory code sources for free! staff_items.php   <?php include "sglobals.php"; //This contains item stuffs switch($_GET['action']) { case 'newitem': new_item_form(); break; case 'newitemsub': new_item_submit(); break; case 'giveitem': give_item_form(); break; case 'giveitemsub': give_item_submit(); break; case 'killitem': kill_item_form(); break; case 'killitemsub': kill_item_submit(); break; case 'edititem': edit_item_begin(); break; case 'edititemform': edit_item_form(); break; case 'edititemsub': edit_item_sub(); break; case 'newitemtype': newitemtype(); break; default: print "Error: This script requires an action."; break; } function new_item_form() { global $db,$ir,$c; if($ir['user_level'] > 2) { die("403"); } print "<h3>Adding an item to the game</h3><form action='staff_items.php?action=newitemsub' method='post'> Item Name: <input type='text' name='itmname' value='' /> Item Desc.: <input type='text' name='itmdesc' value='' /> Item Type: ".itemtype_dropdown($c,'itmtype')." Item Buyable: <input type='checkbox' name='itmbuyable' checked='checked' /> Item Price: <input type='text' name='itmbuyprice' /> Item Sell Value: <input type='text' name='itmsellprice' /> <hr /> [b]Usage Form[/b]<hr /> [b]<u>Effect 1</u>[/b] On? <input type='radio' name='effect1on' value='1' /> Yes <input type='radio' name='effect1on' value='0' checked='checked' /> No Stat: <select name='effect1stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect1dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect1amount' value='0' /> <select name='effect1type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]<u>Effect 2</u>[/b] On? <input type='radio' name='effect2on' value='1' /> Yes <input type='radio' name='effect2on' value='0' checked='checked' /> No Stat: <select name='effect2stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect2dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect2amount' value='0' /> <select name='effect2type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]<u>Effect 3</u>[/b] On? <input type='radio' name='effect3on' value='1' /> Yes <input type='radio' name='effect3on' value='0' checked='checked' /> No Stat: <select name='effect3stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect3dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect3amount' value='0' /> <select name='effect3type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]Combat Usage[/b] Helmet Defense: <input type='text' name='helmet' value='0' /> Weapon Power: <input type='text' name='weapon' value='0' /> Armor Defense: <input type='text' name='armor' value='0' /> Boots Defense: <input type='text' name='boots' value='0' /> Amulet Power: <input type='text' name='amulet' value='0' /> Braclet Power: <input type='text' name='braclet' value='0' /> Ring Power: <input type='text' name='ring' value='0' /> Special Defense: <input type='text' name='special' value='0' /><hr /> <input type='submit' value='Add Item To Game' /></form>"; } function new_item_submit() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='admin.php?action=newitem']> Back[/url]"; $h->endpage(); exit; } $itmname=$db->escape($_POST['itmname']); $itmdesc=$db->escape($_POST['itmdesc']); $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); $helmet=abs((int) $_post['helmet']); $boots=abs((int) $_POST['boots']); $amulet=abs((int) $_POST['amulet']); $braclet=abs((int) $_POST['braclet']); $ring=abs((int) $_POST['ring']); $special=abs((int) $_POST['special']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor, $helmet, $boots, $amulet, $braclet, $ring, $special)"); print "The {$_POST['itmname']} Item was added to the game."; stafflog_add("Created item {$_POST['itmname']}"); } function give_item_form() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } print "<h3>Giving Item To User</h3> <form action='staff_items.php?action=giveitemsub' method='post'> User: ".user_dropdown($c,'user')." Item: ".item_dropdown($c,'item')." Quantity: <input type='text' name='qty' value='1' /> <input type='submit' value='Give Item' /></form>"; } function give_item_submit() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } $db->query("INSERT INTO inventory VALUES('',{$_POST['item']},{$_POST['user']},{$_POST['qty']},0,0)",$c) or die(mysql_error()); print "You gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"; stafflog_add("Gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"); } function kill_item_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Deleting Item</h3> The item will be permanently removed from the game. <form action='staff_items.php?action=killitemsub' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Kill Item' /></form>"; } function kill_item_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM items WHERE itmid={$_POST['item']}"); $db->query("DELETE FROM shopitems WHERE sitemITEMID={$_POST['item']}"); $db->query("DELETE FROM inventory WHERE inv_itemid={$_POST['item']}"); $db->query("DELETE FROM itemmarket WHERE imITEM={$_POST['item']}"); print "The {$itemi['itmname']} Item was removed from the game."; stafflog_add("Deleted item {$itemi['itmname']}"); } function edit_item_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Editing Item</h3> You can edit any aspect of this item. <form action='staff_items.php?action=edititemform' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Edit Item' /></form>"; } function edit_item_form() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); print "<h3>Editing Item</h3> <form action='staff_items.php?action=edititemsub' method='post'> <input type='hidden' name='itmid' value='{$_POST['item']}' /> Item Name: <input type='text' name='itmname' value='{$itemi['itmname']}' /> Item Desc.: <input type='text' name='itmdesc' value='{$itemi['itmdesc']}' /> Item Type: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." Item Buyable: <input type='checkbox' name='itmbuyable'"; if ($itemi['itmbuyable']) { print " checked='checked'"; } print " /> Item Price: <input type='text' name='itmbuyprice' value='{$itemi['itmbuyprice']}' /> Item Sell Value: <input type='text' name='itmsellprice' value='{$itemi['itmsellprice']}' /><hr />[b]Usage Form[/b]<hr />"; $stats=array( "energy" => "Energy", "will" => "Will", "brave" => "Brave", "hp" => "Health", "strength" => "Strength", "agility" => "Agility", "guard" => "Guard", "labour" => "Labour", "IQ" => "IQ", "hospital" => "Hospital Time", "jail" => "Jail Time", "money" => "Money", "crystals" => "Crystals", "cdays" => "Education Days Left", "bankmoney" => "Bank money", "cybermoney" => "Cyber money", "crimexp" => "Crime XP"); for($i=1;$i<=3;$i++) { if($itemi["effect".$i]) { $efx=unserialize($itemi["effect".$i]); } else { $efx=array("inc_amount" => 0); } $switch1=($itemi['effect'.$i.'_on'] > 0) ? " checked='checked'" : ""; $switch2=($itemi['effect'.$i.'_on'] > 0) ? "" : " checked='checked'"; print "[b]<u>Effect {$i}</u>[/b] On? <input type='radio' name='effect{$i}on' value='1'$switch1 /> Yes <input type='radio' name='effect{$i}on' value='0'$switch2 /> No Stat: <select name='effect{$i}stat' type='dropdown'>"; foreach($stats as $k => $v) { if($k==$efx['stat']) { print "<option value='{$k}' selected='selected'>{$v}</option>\n"; } else { print "<option value='$k'>{$v}</option>\n"; } } if($efx['dir']=="neg") { $str="<option value='pos'>Increase</option><option value='neg' selected='selected'>Decrease</option>"; } else { $str="<option value='pos' selected='selected'>Increase</option><option value='neg'>Decrease</option>"; } if($efx['inc_type']=="percent") { $str2="<option value='figure'>Value</option><option value='percent' selected='selected'>Percent</option>"; } else { $str2="<option value='figure' selected='selected'>Value</option><option value='percent'>Percent</option>"; } print "</select> Direction: <select name='effect{$i}dir' type='dropdown'>{$str} </select> Amount: <input type='text' name='effect{$i}amount' value='{$efx['inc_amount']}' /> <select name='effect{$i}type' type='dropdown'>{$str2}</select><hr />"; } print "[b]Combat Usage[/b] Weapon Power: <input type='text' name='weapon' value='{$itemi['weapon']}' /> Armor Defense: <input type='text' name='armor' value='{$itemi['armor']}' /> Helmet Defense: <input type='text' name='helmet' value='{$itemi['helmet']}' /> Boots Defense: <input type='text' name='boots' value='{$itemi['boots']}' /> Amulet Power: <input type='text' name='amulet' value='{$itemi['amulet']}' /> Braclet Power: <input type='text' name='braclet' value='{$itemi['braclet']}' /> Ring Power: <input type='text' name='ring' value='{$itemi['ring']}' /> Special Defense: <input type='text' name='special' value='{$itemi['special']}' /><hr /> <input type='submit' value='Edit Item' /></form>"; } function edit_item_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='staff_items.php?action=edititem']> Back[/url]"; $h->endpage(); exit; } $itmname=$_POST['itmname']; $itmdesc=$_POST['itmdesc']; $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); $helmet=abs((int) $_POST['helmet']); $boots=abs((int) $_POST['boots']); $amulet=abs((int) $_POST['amulet']); $braclet=abs((int) $_POST['braclet']); $ring=abs((int) $_POST['ring']); $special=abs((int) $_POST['special']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $db->query("DELETE FROM items WHERE itmid={$_POST['itmid']}",$c); $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('{$_POST['itmid']}',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor, $helmet, $boots, $amulet, $braclet, $ring, $special)"); print "The {$_POST['itmname']} Item was edited successfully."; stafflog_add("Edited item {$_POST['itmname']}"); } function newitemtype() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if($_POST['name']) { $db->query("INSERT INTO itemtypes VALUES(NULL, '{$_POST['name']}')"); print "Item Type {$_POST['name']} added."; stafflog_add("Added item type {$_POST['name']}"); } else { print "<h3>Add Item Type</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form>"; } } $h->endpage(); ?>
  11. Re: [mccodes v2]New and improved inventory code sources for free! unequip.php   <?php include "globals.php"; if(!in_array($_GET['type'], array("equip_primary", "equip_secondary", "equip_armor", "equip_helmet", "equip_boots", "equip_amulet", "equip_braclet", "equip_ring", "equip_special"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if(!$ir[$_GET['type']]) { print "You do not have anything equipped in this slot."; $h->endpage(); exit; } item_add($userid, $ir[$_GET['type']], 1); $db->query("UPDATE users SET {$_GET['type']}=0 WHERE userid={$ir['userid']}"); $names=array( "equip_primary" => "Primary Weapon", "equip_secondary" => "Secondary Weapon", "equip_armor" => "Armor", "equip_helmet" => "Helmet", "equip_boots" => "Boots", "equip_amulet" => "Amulet", "equip_braclet" => "Braclet", "equip_ring" => "Ring", "equip_special" => "Special", ); print "The item in your {$names[$_GET['type']]} slot was successfully unequiped."; $h->endpage(); ?>
  12. well everyone here it is Ive decided to release the mod for free.... there's 9 pages and 12 sqls so all you'll have to do is over right your pages that you already have... 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_braclet']}, {$ir['equip_ring']}, {$ir['equip_special']})"); print "<h3>Equipped Items</h3><hr />"; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print "<table width='75%' cellspacing='1' class='table'> <tr> <th>Helmet</th> <td>"; if($equip[$ir['equip_helmet']]['itmid']) { print $equip[$ir['equip_helmet']]['itmname']."</td><td>[url='unequip.php?type=equip_helmet']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Amulet</th> <td>"; if($equip[$ir['equip_amulet']]['itmid']) { print $equip[$ir['equip_amulet']]['itmname']."</td><td>[url='unequip.php?type=equip_amulet']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> </tr> <tr> <th>Primary Weapon</th> <td>"; if($equip[$ir['equip_primary']]['itmid']) { print $equip[$ir['equip_primary']]['itmname']."</td><td>[url='unequip.php?type=equip_primary']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Secondary Weapon</th> <td>"; if($equip[$ir['equip_secondary']]['itmid']) { print $equip[$ir['equip_secondary']]['itmname']."</td><td>[url='unequip.php?type=equip_secondary']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Braclet</th> <td>"; if($equip[$ir['equip_braclet']]['itmid']) { print $equip[$ir['equip_braclet']]['itmname']."</td><td>[url='unequip.php?type=equip_braclet']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Ring</th> <td>"; if($equip[$ir['equip_ring']]['itmid']) { print $equip[$ir['equip_ring']]['itmname']."</td><td>[url='unequip.php?type=equip_ring']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Armor</th> <td>"; if($equip[$ir['equip_armor']]['itmid']) { print $equip[$ir['equip_armor']]['itmname']."</td><td>[url='unequip.php?type=equip_armor']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Boots</th> <td>"; if($equip[$ir['equip_boots']]['itmid']) { print $equip[$ir['equip_boots']]['itmname']."</td><td>[url='unequip.php?type=equip_boots']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Special Item</th> <td>"; if($equip[$ir['equip_special']]['itmid']) { print $equip[$ir['equip_special']]['itmname']."</td><td>[url='unequip.php?type=equip_special']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> </table><hr /> <h3>Inventory</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) { print "[b]You have no items![/b]"; } else { print "[b]Your items are listed below.[/b] <table width=100% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td class=\"h\">Item</td> <td class=\"h\">Sell Value</td> <td class=\"h\">Total Sell Value</td> <td class=\"h\">Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4>[b]{$lt}[/b]</td></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } if($i['helmet']) { $i['itmname']="<font color='blue'>*</font>".$i['itmname']; } if($i['boots']) { $i['itmname']="<font color='pink'>*</font>".$i['itmname']; } if($i['amulet']) { $i['itmname']="<font color='brown'>*</font>".$i['itmname']; } if($i['braclet']) { $i['itmname']="<font color='yellow'>*</font>".$i['itmname']; } if($i['ring']) { $i['itmname']="<font color='lime'>*</font>".$i['itmname']; } if($i['special']) { $i['itmname']="<font color='darkorange'>*</font>".$i['itmname']; } print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>[[url='iteminfo.php?ID={$i[']Info[/url]]"; if($i['inv_lent'] == 0) { print" [[url='itemsend.php?ID={$i[']Send[/url]] [[url='itemsell.php?ID={$i[']Sell[/url]] [[url='imadd.php?ID={$i[']Add To Market[/url]] [[url='quantify.php?id={$i[']Merge Items[/url]] [[url='itemuse.php?ID={$i[']Use[/url]] [[url='donateitem.php?ID={$i[']Donate To Gang[/url]]"; } if($ir['gang']>0 && $gangdata['gangARMORY']==1 && $i['inv_lent']==0) { print " [[url='donateitem.php?ID={$i[']Donate To Gang[/url]]"; } if($ir['gang']>0 && $gangdata['gangARMORY']==1 && $i['inv_lent']>0) { print " [[url='giveback.php?ID={$i[']Give Back[/url]]"; } if($i['itmtypename'] == 'Food' || $i['itmtypename'] == 'Medical' || $i['itmtypename'] == 'Donator Pack') if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']Use[/url]]"; } if($i['weapon']) { print " [[url='equip_weapon.php?ID={$i[']Equip as Weapon[/url]]"; } if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']Equip as Armor[/url]]"; } if($i['helmet']) { print " [[url='equip_helmet.php?ID={$i[']Equip as Helmet[/url]]"; } if($i['boots']) { print " [[url='equip_boots.php?ID={$i[']Equip as Boots[/url]]"; } if($i['amulet']) { print " [[url='equip_amulet.php?ID={$i[']Equip as Amulet[/url]]"; } if($i['braclet']) { print " [[url='equip_braclet.php?ID={$i[']Equip as Braclet[/url]]"; } if($i['ring']) { print " [[url='equip_ring.php?ID={$i[']Equip as Ring[/url]]"; } if($i['special']) { print " [[url='equip_special.php?ID={$i[']Equip as Special Item[/url]]"; } print "</td></tr>"; } print "</table>"; print "[size="1"][b]NB:[/b] Items with a small red [/size]<font color='red'>*</font>[size="1"] next to their name can be used as weapons in combat. Items with a small green [/size]<font color='green'>*</font>[size="1"] next to their name can be used as armor in combat. Items with a small blue [/size]<font color='blue'>*</font>[size="1"] next to their name can be used as a helmet in combat. Items with a small pink [/size]<font color='pink'>*</font>[size="1"] next to their name can be used as boots in combat. Items with a small brown [/size]<font color='brown'>*</font>[size="1"] next to their name can be used as amulets in combat. Items with a small lime [/size]<font color='lime'>*</font>[size="1"] next to their name can be used as braclets in combat. Items with a small yellow [/size]<font color='yellow'>*</font>[size="1"] next to their name can be used as rings in combat. Items with a small dark orange [/size]<font color='darkorange'>*</font>[size="1"] next to their name can be used as special items in combat.[/size]"; } $h->endpage(); ?>
  13. Re: Quick please and thanks ;) lol i feel the same way man id rather them post in the forum topic on the problem there haveing with that script
  14. Re: [mccode v2] Not much of a MOD more of a great addon.. Private Messenger well thats good cuz since i just switched hosts my messenger is giveing me a problem now :cry: Warning: Cannot modify header information - headers already sent by (output started at /home/mdk666/public_html/php121/php121db.php:274) in /home/mdk666/public_html/php121/php121.php on line 108
  15. Re: [showcase] The One im not good with css and i cant make images if u want to make a theme for me then go right ahead :-P but it has to be a black one and kinda scary :-P
  16. Re: [mccode v2] Not much of a MOD more of a great addon.. Private Messenger it always usually is. :-D
  17. Re: [mccode v2] Not much of a MOD more of a great addon.. Private Messenger   yea my full sql file i had posted there are sqls that illusions had forgotten to post, so if you still have problems. leave the error code here and ill try and help you as much as possible.
  18. Re: [mccodes v2]New and improved inventory well everyone heres a updated image of what the inventory looks like, you can also try it out yourself im adding items to the game as we speak, the prices are expensive on the items because well because there items not possible to get in the game, ill be adding other types also into the game at cheaper prices, so to try it out go to :http://theone.xtreemhost.com
  19. Re: [mccodes v2]New and improved inventory   well its done and on my game, but for other ideas :) i already have about 3 more ideas in adding to the mod so yea :)) i rather not say what the other ideas are at the moment.
  20. Re: [mccodes v2]New and improved inventory   well im giving everyone a heads up on the mod im working on along with the idea if im not going to release it for free or trade it for a mod or something then i might sell it but im not excatly sure yet thats why i want feedback to see what everyone else thinks before i sell it and get no buyers and etc
  21. Re: [mccodes v2]New and improved inventory well its not useless posting this as im not finished with the mod, im currently working on it to finish it up at the moment, why would i want to post a mod thats about 50% finished, also i rather not release my scripts so people go useing them and get alot of errors
  22. Re: [mccode v2] Not much of a MOD more of a great addon.. Private Messenger heres my exact table for imbuddylist_config hopefully this works i forgot i had to edit the table some when installing it to add everything needed.   CREATE TABLE IF NOT EXISTS `imbuddylist_config` ( `config_name` varchar(255) NOT NULL default '', `defaulttheme` varchar(255) NOT NULL default '', `group_allonline_opened` int(1) NOT NULL default '1', `group_onlinebuddies_opened` int(1) NOT NULL default '1', `group_offlinebuddies_opened` int(1) NOT NULL default '0', `profile_enabled` int(1) NOT NULL default '1', `buddylist_enabled` int(1) NOT NULL default '1', `awaymsg_enabled` int(1) NOT NULL default '1', `showonline_enabled` int(1) NOT NULL default '1', `usersearch_enabled` int(1) NOT NULL default '1', `profilecomments_enabled` int(1) NOT NULL default '1', `profileavatars_enabled` int(1) NOT NULL default '1', `buddycomments_enabled` int(1) NOT NULL default '1', `offlinemessages_enabled` int(1) NOT NULL default '1', `debugmode_enabled` int(1) NOT NULL default '0', `adminscontrolusersettings` int(1) NOT NULL default '0', `chatlogsaving_enabled` int(1) NOT NULL default '1', `staffsupportsystem_enabled` int(1) NOT NULL default '1', `usersautoacceptchatrequests` int(1) NOT NULL default '0', PRIMARY KEY (`config_name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `imbuddylist_config` (`config_name`, `defaulttheme`, `group_allonline_opened`, `group_onlinebuddies_opened`, `group_offlinebuddies_opened`, `profile_enabled`, `buddylist_enabled`, `awaymsg_enabled`, `showonline_enabled`, `usersearch_enabled`, `profilecomments_enabled`, `profileavatars_enabled`, `buddycomments_enabled`, `offlinemessages_enabled`, `debugmode_enabled`, `adminscontrolusersettings`, `chatlogsaving_enabled`, `staffsupportsystem_enabled`, `usersautoacceptchatrequests`) VALUES ('imbuddylist', '', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0);
  23. Re: [mccodes v2]New and improved inventory i have the sql thats going to be inserted but im not going to release the mod information at the moment when the mod is 100% complete and finished in my eyes then i might release all information include the scripts needed, for staff, users and etc.
  24. Re: [mccodes v2]New and improved inventory   ohhhhh a reply already looky there :-D good luck on what we were talkin about illusions when i get it modded some more ill let u know.
  25. well everyone im working on a new inventory system for my game, as you all know you can only equip armor and 2 weapons, well as of right now in my game i can equip 2 weapons, armor, helmets, and boots. tomarroo morning i plan on adding rings, braclets, and amulets. sry there isnt no demo right now because i havent moved all my files and sqls to my host but here is a screen shot i have taken a few minuetes ago of the helmets, and boots, im not exactly sure right now if im going to sell it or not, but maybe i would trade it for a mod who knows ill have more information on it, when i get some feedback from everyone....
×
×
  • Create New...