Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,657
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Uridium

  1. 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
  2. Anyone been watching the re-runs of Monk
  3. Uridium

    Quick logo

    Nicely done Dave ;)
  4. 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>"; } }
  5. Check the drop down in global_func.php to see if the ID matches that of the ID on the yourgang.php file
  6. 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.
  7. Bare with me Apoc it was a while ago i or someone else fixed this problem
  8. image drop down image
  9. Imagine a dropdown that just lists Quantity and items you have and thats about it
  10. 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......
  11. Cheers SRB :)
  12. cheers matey :)
  13. If Elvis Presley posts next remind me to quit playing this game ;)
  14. I did rebuild this to do this a lot more you can see the new version in action at http://www.magical-myth.com under Academy
  15. Someone requested this from another post and as its free i'll post my working copy here also... open up global_func.php and add   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)) { if (!$i) { $bg = "#818181"; $i = 1; } else { $bg = "#626262"; $i = 0; } $ret.="\n<option style='background:$bg;'"; if ($selected == $r['itmname'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.="<i>{$r['itmname']} You Have ({$r['inv_qty']}) Of This Item</i></option>"; } $ret.="\n</select>"; return $ret; }   Now open a file you want the quick inventory view to be seen by the user and add   print "<h3>Inventory Quick View</h3><br /> ".inv_item_dropdown($c,'userinv')."<br />";   This is only a quick view dropdown for items user has gained
  16. 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
  17. Im on your game now any chance you can send me some items probably 12 of about 3 items
  18. send me link to your game addy....
  19. check in your itemuse.php and make sure that theres no mention of the items being deducted twice
  20. Kray Twins ;)
  21. if the user has 500+ items that dropdown box could become rather larger
  22. 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";
  23. $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");
  24. 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
  25. 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
×
×
  • Create New...