Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,701
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by Uridium

  1. This small mod will allow staff to decide which Links to show in inventory usually only SEND or EQUIP are hidden if you dont have items that do either so your left with SEND, ADD TO MARKET, or AUCTION, SELL which are always shown to the user but supposing we dont want RARE items to be sent to a user or added to the market. so heres how open up inventory.php find..   echo "</td><td>\${$i['itmsellprice']}</td><td>"; echo "$".($i['itmsellprice']*$i['inv_qty']); echo "</td><td>[<a href='iteminfo.php?ID={$i['itmid']}'>Info</a>] [<a href='itemsend.php?ID={$i['inv_id']}'>Send</a>] [<a href='itemsell.php?ID={$i['inv_id']}'>Sell</a>] [<a href='imadd.php?ID={$i['inv_id']}'>Add To Market</a>]";   and replace with   print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>{$lt}</td></td>"; print "</td><td>[<a href='iteminfo.php?ID={$i['itmid']}'><small>Info</small></a>]"; /* test for link action */ if($i['showsend'] == 1) { print " [<a href='itemsend.php?ID={$i['inv_id']}'><small>Send</small></a>]"; } else { print""; } if($i['showmarket'] == 1) { print " [<a href='itemmarket.php?page=Add&Item={$i['inv_itemid']}'><small>Market</small></a>]"; } else { print""; } if($i['showauction'] == 1) { print " [<a href='auctionadd.php?ID={$i['inv_id']}'><small>Auction's</small></a>]"; } else { print""; }   Ive just added 3 cut off switches showauction, showend and showmarket if you have more then just keep adding to it.. Now open up staff_items.php where you create your new item find <b>Usage Form</b> and above it add   <hr /> <b>Usage Links: From here you can Switch on or off links visible for this item</b><hr /> <b>Show Send Link</b> <input type='radio' name='showsend' value='1' /> Yes <input type='radio' name='showsend' value='0' checked='checked' /> No<br /> <b>Show Market Link</b> <input type='radio' name='showmarket' value='1' /> Yes <input type='radio' name='showmarket' value='0' checked='checked' /> No<br /> <b>Show Auction Link</b> <input type='radio' name='showauction' value='1' /> Yes <input type='radio' name='showauction' value='0' checked='checked' /> No<br /> <b>Show Give To Clan Link</b> <input type='radio' name='showgiveclan' value='1' /> Yes <input type='radio' name='showgiveclan' value='0' checked='checked' /> No<br /> <hr />   now goto the INSERT INTO part and add this (ONLY IF YOU HAVENT MODIFIED YOUR COPY)   $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['showsend']}','{$_POST['showmarket']}','{$_POST['showauction']}','{$_POST['showgiveclan']}','{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)");   Now for the EDIT ITEM part add   Item Sell Value: <input type='text' name='itmsellprice' value='{$itemi['itmsellprice']}' /> <hr /> <b>Usage Links: From here you can Switch on or off links visible for this item</b><hr /> <b>Show Send Link</b> <input type='text' name='showsend' value='{$itemi['showsend']}' style=\"width:25px;\" maxlength=\"1\"/> Yes = 1 OR No = 0 <br /> <b>Show Market Link</b> <input type='text' name='showmarket' value='{$itemi['showmarket']}' style=\"width:25px;\" maxlength=\"1\"/> Yes = 1 OR No = 0<br /> <b>Show Auction Link</b> <input type='text' name='showauction' value='{$itemi['showauction']}' style=\"width:25px;\" maxlength=\"1\"/> Yes = 1 OR No = 0<br /> <b>Show Give To Clan Link</b> <input type='text' name='showgiveclan' value='{$itemi['showgiveclan']}' style=\"width:25px;\" maxlength=\"1\"/> Yes = 1 OR No = 0<br /> <hr />   before USAGE FORM and the UPDATE is   $m=$db->query("INSERT INTO items VALUES('{$_POST['itmid']}',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['showsend']}','{$_POST['showmarket']}','{$_POST['showauction']}','{$_POST['showgiveclan']}', '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)");   and add the new SQLS to phpmyadmin ALTER TABLE items ADD showsend TINYINT(2) NOT NULL DEFAULT 0; ALTER TABLE items ADD showauction TINYINT(2) NOT NULL DEFAULT 0; ALTER TABLE items ADD showmarket TINYINT(2) NOT NULL DEFAULT 0; ALTER TABLE items ADD showgiveclan TINYINT(2) NOT NULL DEFAULT 0;   and your done
  2. if its V2 look in your config.php file for the key then look in installer.php at bottom for how to set them up
  3. Im not sure wether to delete this post or keep it, its that damn clown its so charming ;)
  4. One concern about this script does it still allow users to evade URL attacks IE by just changing URL name to say index.php and getting out of fight
  5. I was working on a Friends site and was kind annoyed at how all Items on any MCC inventory where laid out so heres what i created for him.. The two images below can be hidden and show in inventory thus creating less space also Links can be setup when creating and item to allow it Not to be sold or given to users if its a rare item or any item that you dont want users to have..
  6. My main reason for this when i had a site was the HTACCESS file remove it to pc delete off site if site works fine thats your problem if not send it back to site
  7. Too be honest I made this ages ago and cant really remember what I amended or added I dont currently have a backup either due to a Hard drive crash which i lost ALL of my work. The only exsisting work i have is what is on magical-myth.com but that is a paid mod....
  8. or $rr=$db->query("SELECT * FROM referals WHERE refREFER='".$r[userid]."'");
  9. is this for mccodes or another engine
  10. on your users dbase do you have the mentioned of marriage or spouse ? and does it give the ID of the person whos married
  11. Seasons 1 - 8 Showing on Veetle >> http://veetle.com/v/4e0bf2a697db9
  12. Ive had a crack at Unity and the other program called Autodesk but couldnt get my head round it...
  13. I have to sy MONK is probably one of if not probably the best detectiion programmes ive seen. Tony Shaloub plays the Character with excellence Ive got the Entire series on me comp which i watch regular.. More info on monk can be found on Wikipedia for those not familiar with the character.. http://en.wikipedia.org/wiki/Monk_(TV_series)
  14. I still think his first nurse was a better actress she only appeared in series 1,2,3 then some dopey cow took over who couldnt act
  15. Anyone been watching the re-runs of Monk
  16. Uridium

    Quick logo

    Nicely done Dave ;)
  17. on yourgang.php replace the function gang_staff_surrender with this one...   function gang_staff_surrender() { global $db,$ir,$c,$userid,$gangdata; if(!isset($_POST['subm'])) { print "<form action='yourgang.php?action=staff&act2=surrender' method='post'> Choose who to surrender to.<br /> <input type='hidden' name='subm' value='submit' /> Gang: <select name='war' type='dropdown'>"; $wq=$db->query("SELECT * FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}",$c); while($r=mysql_fetch_array($wq)) { if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $d=date('F j, Y, g:i:s a',$r['warTIME']); $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f],$c); $them=mysql_fetch_array($ggq); print "<option value='{$r['warID']}'>{$them['gangNAME']}</option>"; } print "</select><br /> Message: <input type='text' name='msg' /><br /> <input type='submit' value='Surrender' /></form><br/><br/>> <a href='yourgang.php?action=staff'>Back</a>"; } else { $_POST['war'] = abs((int) $_POST['war']); $wq=$db->query("SELECT * FROM gangwars where warID={$_POST['war']}",$c); $r=mysql_fetch_array($wq); if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $db->query("INSERT INTO surrenders VALUES('',{$_POST['war']},{$ir['gang']},".$r[$f].",'{$_POST['msg']}')",$c); $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f],$c); $them=mysql_fetch_array($ggq); $event=str_replace("'","''","<a href='gangs.php?action=view&ID={$ir['gang']}'>{$gangdata['gangNAME']}</a> have asked to surrender the war against <a href='gangs.php?action=view&ID={$them['gangID']}'>{$them['gangNAME']}</a>"); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',".$r[$f].",unix_timestamp(),'$event')",$c); print "You have asked to surrender.<br/><br/>> <a href='yourgang.php?action=staff'>Back</a>"; } }
  18. Check the drop down in global_func.php to see if the ID matches that of the ID on the yourgang.php file
  19. Peta one concern about MCCodes as a game emgine is its use of 1 minute crons does your hosting package allow these and if so to what extent.
  20. Bare with me Apoc it was a while ago i or someone else fixed this problem
  21. image drop down image
  22. Imagine a dropdown that just lists Quantity and items you have and thats about it
  23. Someone had the sme problem turned out it was an Explorer problem will have to look it up and see if i cant remember the fix i or someone made for it......
  24. Cheers SRB :)
  25. cheers matey :)
×
×
  • Create New...