Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,667
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Uridium

  1. Hope this helps.. Add to global_func.php   function inv_item_dropdown($connection,$ddname="userinv",$selected=-1) { global $db,$r,$ir; $ret="<select name='$ddname' type='dropdown'>"; $q=$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=".$ir['userid'].""); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['itmname']}'"; if ($selected == $r['itmname'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['itmname']} <b>You Have ({$r['inv_qty']}) Of This Item</b></option>"; } $ret.="\n</select>"; return $ret; }   then add anywhere near top of inventory.php   print "<h3>Inventory Quick View</h3><br /> ".inv_item_dropdown($c,'userinv')."<br />";   Should list Items you have by name and Quantity
  2. Im on your game now any chance you can send me some items probably 12 of about 3 items
  3. send me link to your game addy....
  4. check in your itemuse.php and make sure that theres no mention of the items being deducted twice
  5. Kray Twins ;)
  6. if the user has 500+ items that dropdown box could become rather larger
  7. I think what he emans is restructering the staff so instead of admin being 2 it would be something else me personallid just add a new field called staff and give them names so if $ir[staff] == "Admin";
  8. $from="2"; $idtochange="userid's number" $to="new user_level number" $db->query("update users set user_level=$from where user_level=$to, userid=$idtochange");
  9. This mod will prevent users from sitting on an attack page waiting for their Energy or HP to replenish. If user doesnt finish the attack i an alloted time they themselves are sent to Hosp for wasting time...   2 updates to the user table ALTER table users ADD fighttime INT(11) NOT NULL default 0; ALTER table users ADD timeout INT(2) NOT NULL default 0; in your attack.php find $mw=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']})"); and add underneath it   if($ir['fighttime'] == 0) { mysql_query("update users set fighttime=6 where userid=$userid"); } if($ir['fighttime'] > 1) { print"<td colspan=2 align='center'><center>Your Attack Time Has ".$ir['fighttime']." Min(s) Remaining</center>"; } if($ir['fighttime'] == 1) { mysql_query("update users set timeout=1 where userid=$userid"); } if($ir['timeout'] == 1) { $time = rand(30,60); print"<br /><br /><center>Your Slowness to move meant your opponent got bored and went home<br /><br /><a href='hospital.php'>Go Home</a></center>"; mysql_query("UPDATE users SET hospital=hospital+$time,hospreason='Failed to move in an attack!' WHERE userid=$userid",$c); mysql_query("update users set fighttime=0 where userid=$userid AND userid=".$_GET['ID'].""); mysql_query("update users set timeout=0 where userid=$userid AND userid=".$_GET['ID'].""); $db->query("UPDATE users SET attacking=0 WHERE userid=$userid AND userid=".$_GET['ID'].""); $db->query("UPDATE users SET energy=energy-20 WHERE userid=$userid"); $db->query("UPDATE users SET attacking=0 WHERE userid=".$_GET['ID'].""); die(); }   Now open up hospital.php and add if($ir['timeout'] == 1) { mysql_query("update users set timeout=0, fighttime=0 where userid=$ir[userid]"); } And your done Users can no long sit and wait for things to replenish
  10. wow this is taking me back a bit first one i made was a simple edit item type http://makewebgames.io/showthread.php/25281-Edit-Item-Type-Code-Solved?highlight=edit+item+types
  11. if ($ir[character] =='Human'){ mysql_query("Select * from shops where viewer='Human'"); else print"You Not Human" }
  12. Infact the http and the target blank need to be removed as lucky mentioned they were not in the original but for some reason the forums have decided to place them there Using >>> print " [<a href=\"http://dpuse.php?ID={$i['inv_id']}\" target=\"_blank\">Use</a>]"; will give an error so use >> print " [<a href=dpuse.php?ID={$i['inv_id]}">Use</a>]";
  13. It only seems to do it when a php file has multiple line spacing ive never had problems with Notepad++ and used it for a long time but the file worked fine before i edited it UNLESS it was sent from the FTP to my comp in that state... so might be a transfer problem....
  14. example heres an example of how it pasted from notepad++ to normal notepad
  15. is anyone who is using Notepad++ having an issue where by you save a file send to FTP and you get a unexpected T_Include one line 1 Then when you paste to normal notepad the whole script is on line one instead of being spaced out ?? example:   <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php ------------------------------------------------------- -- Armory Script PLUS v1.0 -- A product of Flash Fire Gaming -- Copyright held 2006 by Cronus -----------------------------------------------------*/ include "globals.php"; if($ir[hospital]>0) die("You are in the hospital for {$ir[hospital]} minutes."); if($ir[jail]>0) die("You are in jail for {$ir[jail]} minutes."); $_GET['ID']= abs((int) $_GET['ID']); $_POST['qty']= abs((int) $_POST['qty']); if(!$_GET['ID'] || !$_POST['qty']) { print "Invalid use of file"; } else if($_POST['qty'] <= 0) { print "You have been added to the delete list for trying to cheat the game."; } else { $q=mysql_query("SELECT * FROM items WHERE itmid={$_GET['ID']}",$c); if(mysql_num_rows($q) == 0) { print "Invalid item ID"; } else { $itemd=mysql_fetch_array($q); if($ir['money'] < $itemd['itmbuyprice']*$_POST['qty']) { print "You don't have enough money to buy this item!"; $h->endpage(); exit; } if($itemd['itmbuyable'] == 0) { print "This item can't be bought!"; $h->endpage(); exit; } $price=($itemd['itmbuyprice']*$_POST['qty']); mysql_query("INSERT INTO inventory VALUES('',{$_GET['ID']},$userid,{$_POST['qty']},0);",$c); mysql_query("UPDATE users SET money=money-$price WHERE userid=$userid",$c); mysql_query("INSERT INTO itembuylogs VALUES ('', $userid, {$_GET['ID']}, $price, {$_POST['qty']}, unix_timestamp(), '{$ir['username']} bought {$_POST['qty']} {$itemd['itmname']}(s) for {$price}')", $c); print "You bought {$_POST['qty']} {$itemd['itmname']}(s) for \$$price"; } } $h->endpage(); ?>   Infact that seemed to work fine when posting on here so i'll try do a screen shot
  16. Since the launch of the new forums ive also noticed scripts going mental especially where there is a link or an image
  17. Its the same bloody principal. are you trying to make me look stupid...
  18. Yep not gonna work like that you may get the itemid or is it itmid i cant remember im sure its itmid though so for now im gonna use that to explain <img src='itemimg/{$itmid['itmid']}.jpg' size=70 width=70> <<< WILL WORK <img src='itemimg/{$itmid['itmid']}' size=70 width=70> <<< wont wont So your images can be only one format choose then stick to that format...   But have to say very nice though DamagedCity :) Yep tested it and it worked ok :)
  19. try changing mysql_query to $db->query
  20. From what ive learned about most peoples sites ive worked on the Users dbase can get rather large
  21. http://www.speedtest.net/result/1453035517.png
  22. Smokey that error just means that there are 2 Functions with the exact same name being used easiest way to find this out would be to open all the PHP files in notepad++ and do a search in all files for that name thats being declared twice if you get 2 results then you know 1 needs to be removed..
  23. I dont think its the Installer thats at fault i think a better Readme file would help people with common errors and how to eliminate them exmple when setting up via xampp and the user doesnt have a password for the dbase setup the installer wont install
  24. spud i suggest changing max-width and max-height to just width and height it dont seem to work on IE
  25. Uridium

    Help me!!!

    wow people still use 600 x 800 screen res lol
×
×
  • Create New...