-
Posts
2,657 -
Joined
-
Last visited
-
Days Won
74
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
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
-
Anyone been watching the re-runs of Monk
-
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>"; } }
-
Check the drop down in global_func.php to see if the ID matches that of the ID on the yourgang.php file
-
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.
-
Bare with me Apoc it was a while ago i or someone else fixed this problem
-
-
Imagine a dropdown that just lists Quantity and items you have and thats about it
-
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......
-
Cheers SRB :)
-
cheers matey :)
-
If Elvis Presley posts next remind me to quit playing this game ;)
-
mccode-v2 [EDUCATION MOD] Totally Re-worked with many additional Options.
Uridium replied to Uridium's topic in Free Modifications
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 -
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
-
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
-
Im on your game now any chance you can send me some items probably 12 of about 3 items
-
send me link to your game addy....
-
check in your itemuse.php and make sure that theres no mention of the items being deducted twice
-
if the user has 500+ items that dropdown box could become rather larger
-
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";
-
$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");
-
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
-
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