Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,130
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by Magictallguy

  1. Re: Generate Password Well you've gotta hand it to Ghetto - He's very vigilant and did his research..
  2. Re: Free service Good question Zaver... and I could easily do that too :P
  3. Re: [V2] cars_mod staff_cars Hmm.. I wonder if you really did make this, or you found it somewhere else. Your english spelling is very different to "your" code... Still *if* you did make this, then well done.
  4. Re: Randomizing users   Hahaha! That's brilliant!
  5. Re: [V2] Staff Items That really has helped and yes, I was getting the same error! :P
  6. Re: cityes v2   You wouldn't happen to be Dylan would you?
  7. Re: Optimize generation   You do realise that what you are doing is a breach of the Data Protection Act? - Basically, you're breaking the law!
  8. Re: [V2] Staff Items I've updated it to what you said..Still isn't having it.. :( function kill_itemtype_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Deleting Item Type</h3> The item type will be permanently removed from the game. <form action='staff_items.php?action=killitemtypesub' method='post'> Item Type: ".itemtype_dropdown($c,'itmtype')." <input type='submit' value='Kill Item Type' /></form>"; } function kill_itemtype_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM itemtypes WHERE itmtypeid={$_POST['itmtypeid']}"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM itemtypes WHERE itmtypeid={$_POST['itmtypeid']}"); print "The item type {$itemi['itmtypename']} was removed from the game."; stafflog_add("Deleted item type {$itemi['itmtypename']}"); }
  9. Re: [V2] Staff Items Ah yea.. Right there in front of me! xD - Thanks!
  10. Re: Casino with slots [V2] Last 2
  11. Re: Casino with slots [V2] More! 7 and 7i are the same number but different styles..
  12. Re: Casino with slots [V2] Here's the images I've just made - Not perfect though....
  13. Re: Quantify Mod for V2! I retract my previous post...I had somehow misspelt $currdel with urrdel O_o
  14. Re: Quantify Mod for V2! Well it still doesn't like the code... <?php include "globals.php"; $used=array(); $q=$db->query("SELECT * FROM inventory WHERE inv_userid=$userid"); while ( $r=$db->fetch_row($q) ) { if ( ! in_array ( $r['inv_id'], $used ) ) { $currdel=array(); $used[] =$r['inv_id']; $currdel[]=$r['inv_id']; $amount=$r['inv_qty']; //grab sellers others $q2=$db->query("SELECT * FROM inventory WHERE inv_userid=$userid AND inv_itemid = {$r['inv_itemid']} AND inv_id != {$r['inv_id']}"); while ( $r2 = $db->fetch_row($q2) ) { $used[]=$r2['inv_id']; $currdel[]=$r2['inv_id']; $amount+=$r2['inv_qty']; } $db->query("DELETE FROM inventory WHERE inv_id IN(".implode(","urrdel).")"); $db->query("INSERT INTO inventory VALUES('', {$r['inv_itemid']}, $userid, $amount)"); print "$amount of item id {$r['inv_itemid']} quantified... "; } } print "[b]<font color='red'>Quantifying Done</font>[/b] <hr width=50%><center><a href=inventory.php>>Back to your Items</a> <hr width=50%>"; $h->endpage(); ?>   Error is on line 19: $db->query("DELETE FROM inventory WHERE inv_id IN(".implode(","urrdel).")");   Doesn't like that: Parse error: syntax error, unexpected T_STRING in /quantify.php on line 19
  15. Re: battlearena SQL: (Isomerisers...so I don't know why I'm posting it again..)   CREATE TABLE `battlearena` ( `batid` int(11) NOT NULL auto_increment, `p1` int(11) NOT NULL default '0', `p2` int(11) NOT NULL default '0', `p3` int(11) NOT NULL default '0', `p4` int(11) NOT NULL default '0', `p5` int(11) NOT NULL default '0', `p6` int(11) NOT NULL default '0', `p7` int(11) NOT NULL default '0', `p8` int(11) NOT NULL default '0', `p9` int(11) NOT NULL default '0', `p10` int(11) NOT NULL default '0', `lastwinner` int(11) NOT NULL default '0', PRIMARY KEY (`batid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
  16. Re: [mccode][v1]+[v2]Automatic total cost calculation in shop buy. And for those who don't understand what to do: The entire shops.php script (for v2) <?php include "globals.php"; $_GET['shop'] = abs((int) $_GET['shop']); if(!$_GET['shop']) { print "You begin looking through town and you see a few shops. "; $q=$db->query("SELECT * FROM shops WHERE shopLOCATION={$ir['location']}"); print "<table width=85% cellspacing=1 class='table'><tr style='background: gray;'><th>Shop</th><th>Description</th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>[url='shops.php?shop={$r[']{$r['shopNAME']}[/url]</td><td>{$r['shopDESCRIPTION']}</td></tr>"; } print "</table>"; } else { $sd=$db->query("SELECT * FROM shops WHERE shopID={$_GET['shop']}"); if($db->num_rows($sd)) { $shopdata=$db->fetch_row($sd); if($shopdata['shopLOCATION'] == $ir['location']) { print "Browsing items at [b]{$shopdata['shopNAME']}...[/b] <table cellspacing=1 class='table'><tr style='background: gray;'><th>Item</th><th>Description</th><th>Price</th><th>Sell Price</th><th>Buy</th></tr>"; $qtwo=$db->query("SELECT si.*,i.*,it.* FROM shopitems si LEFT JOIN items i ON si.sitemITEMID=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE si.sitemSHOP={$_GET['shop']} ORDER BY i.itmtype ASC, i.itmbuyprice ASC, i.itmname ASC"); $lt=""; ?> <script language="Javascript" type="text/javascript"> //<![CDATA[ function moneyformat(num) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); cents = num%100; num = Math.floor(num/100).toString(); if(cents<10) cents = "0" + cents; for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + '$' + num); } function tot(id,a,b) { var c=a*Math.round(b); var d=moneyformat(c); document.getElementById("res" + id).innerHTML = d; } function clearText(thefield){ if (thefield.defaultValue==thefield.value) thefield.value = "" } function returnText(thefield){ if (thefield.value=='' || thefield.value==0) thefield.value = thefield.defaultValue } //]]> </script> <?php while($r=$db->fetch_row($qtwo)) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; print "\n<tr style='background: gray;'><th colspan=5>{$lt}</th></tr>"; } $buyprice=money_formatter($r['itmbuyprice']); $sellprice=money_formatter($r['itmsellprice']); ?><tr><td><? echo $r['itmname']; ?></td><td><? echo $r['itmdesc']; ?></td><td><? echo $buyprice; ?></td><td><? echo $sellprice; ?></td><td><form action='itembuy.php?ID=<? echo $r['itmid']; ?>' name="shopbuy" method='post'> Qty: <input type='text' name='qty' value='1' onkeyup="tot(<? echo $r['itmid']; ?>,<? echo $r['itmbuyprice']; ?>,this.value);" onfocus="clearText(this);" onblur="returnText(this);" /><input type='submit' value='Buy' /></form><div id="res<? echo $r['itmid']; ?>" align="center"><? echo $buyprice; ?></div></td></tr> <? } print "</table>"; } else { print "You are trying to access a shop in another city!"; } } else { print "You are trying to access an invalid shop!"; } } $h->endpage(); ?>
  17. Re: [V1]Paper Boy Panel With New User Level[V1] For v2! Create a file called staff_newspaperpanel.php <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- Paper Boy Panel -- Created By Klikoka -- MCR For Life !! Peace -- Converted to v2 by Magictallguy -----------------------------------------------------*/ include "globals.php"; if($ir['user_level'] != 2 && $ir['user_level'] != 3 && $ir['user_level'] != 5 && $ir['user_level'] !=6) { die("You sneak, get out of here!"); } switch($_GET['action']) { case 'editnews': newspaper_form(); break; case 'subnews': newspaper_submit(); break; default: print "Error: This script requires an action."; break; } $posta=$db->real_escape_string(print_r($_POST,1)); $geta=$db->real_escape_string(print_r($_GET,1)); function newspaper_form() { global $db,$ir,$h,$userid; $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $news=$db->result($q,0,0); print "<h3>Editing Newspaper</h3><form action='staff_newspaperpanel.php?action=subnews' method='post'> <textarea rows='7' cols='35' name='newspaper'>$news</textarea> <input type='submit' value='Change' /></form>"; } function newspaper_submit() { global $db,$ir,$h,$userid; $news=$_POST['newspaper']; $db->query("UPDATE papercontent SET content='$news'"); print "Newspaper updated!"; } } $h->endpage(); ?>   Edit stafflist.php to show this (where you want it) print "[b]Paper Boy[/b] <table width=80%> <tr style='background:gray'> <th>User</th> <th>Level</th> <th>Money</th> <th>Last Seen</th> <th>Status</th> </tr>"; foreach($staff as $r) { if($r['user_level']==6) { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['level']}</td> <td>\${$r['money']}</td> <td>".date('F j, Y, g:i:s a',$r['laston'])."</td> <td>$on</td> </tr>"; } } print "</table>"; If you want that into GMT simply replace <td>".date('F j, Y, g:i:s a',$r['laston'])."</td> with <td>".date('F j, Y, g:i:s a',$r['laston'] + (6 * 60 * 60))."</td>   Add the links into the smenu.php print "> [url='staff_newspaperpanel.php?action=editnews']Edit the Newspaper[/url] ";   Now people that wasn't really hard was it?
  18. Hey people. I'm trying to create a kill itemtype function in the staff_items.php script. I've got most of it right..Up until the SELECT query.. function kill_itemtype_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); }   print "<h3>Deleting Item Type</h3> The item type will be permanently removed from the game. <form action='staff_items.php?action=killitemtypesub' method='post'> Item Type: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." <input type='submit' value='Kill Item Type' /></form>"; } function kill_itemtype_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM itemtypes WHERE itmtypeid={$_POST['itemtype']}"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM itemtypes WHERE itmtypeid={$_POST['itmtypeid']}"); print "The item type {$itemi['itmtypename']} was removed from the game."; stafflog_add("Deleted item type {$itemi['itmtypename']}"); }   Can anyone enlighten me as to why it doesn't like that please? QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Query was SELECT * FROM itemtypes WHERE itmtypeid=
  19. Re: [v1] Bar Room w/ Chat FREE Though there is a slight problem with the code. It doesn't actually show a place to submit a message - I'm too tired to fix!
  20. Re: [v1] Bar Room w/ Chat FREE Here's the fixed version (also the tables were screwed up so I fixed those too!) Oh and it's v2! <?php include "globals.php"; if(!$_GET['spend']) { print "<h2>The Bar Room</h2> Hi and welcome , what would you like?. Prices and payment options are listed below. <h3>Drink Menu</h3> <table border='1' width='90%' bordercolor='#939393'> <tr background='header.jpg'> <th>Drinks</th> <th>Price</th> <th><center>Buy</th> </tr> <tr> <td><center>Gin and Juice</td> <td><center>$1,000,000</td> <td><center>[url='barroom.php?spend=Juice']Buy[/url]</td> </tr> <tr> <td><center>Beer</td> <td><center>$5,000,000</td> <td><center>[url='barroom.php?spend=Beer']Buy[/url]</td> </tr> <tr> <td><center>Brandy</td> <td><center>$7,000,000</td><td><center>[url='barroom.php?spend=Brandy']Buy[/url]</td> </tr> <tr> <td><center>Tequila</td> <td><center>$10,000,000</td> <td><center>[url='barroom.php?spend=Tequila']Buy[/url]</td> </tr> </table> <h3>Bar Room Chatter</h3>"; //Start Shoutbox $_POST['message']=mysql_real_escape_string($_POST['message']); $_POST['message']=strip_tags($_POST['message']); $_POST['message']=htmlentities($_POST['message'], ENT_QUOTES); if($_POST['message'] != "") { $db->query("INSERT INTO shoutbox VALUES('',{$ir['userid']},'{$_POST['message']}',unix_timestamp())") or die ($db->error()); print "[i]Shout posted in shout box.[/i]"; } else { print <<<EOF <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function disableForm(theform) { if (document.all || document.getElementById) { for (i = 0; i < theform.length; i++) { var tempobj = theform.elements[i]; if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset") tempobj.disabled = true; } return true; } else { return false; } } // End --> </script> EOF; print " "; } if($_GET['spend'] == Juice) { if($ir['money'] <1000000) { print "You don't have enough money to buy a pint of beer , Get out of my PUB!"; } else { $db->query("UPDATE users SET will=will+35,energy=0,money=money-1000000 WHERE userid=$userid"); $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "<center>You payed the Bartender \$1,000,000,and then drank your juice . You feel some of your will coming back to you. [url='index.php']>Home[/url]</center>"; } } else if($_GET['spend'] == Beer) { if($ir['money'] <5000000) { print "You don't have enough money to buy a pint of beer , Get out of my PUB!"; } else { $db->query("UPDATE users SET will=will+70,energy=0,money=money-5000000 WHERE userid=$userid"); $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "<center>You payed the Bartender $5,000,000, and then drank your beer. You feel some of your will coming back to you. [url='index.php']>Home[/url]</center>"; } } else if($_GET['spend'] == Brandy) { if($ir['money'] <10000000) { print "You don't have enough money to buy a pint of beer , Get out of my PUB!"; } else { $db->query("UPDATE users SET will=will+210,energy=0,money=money-10000000 WHERE userid=$userid"); $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "<center>You payed the Bartender \$10,000,000, and then drank your Brandy. You feel some of your will coming back to you. [url='index.php']>Home[/url]</center>"; } } else if($_GET['spend'] == Tequila) { if($ir['money'] <10000000) { print "You don't have enough money to buy a pint of beer , Get out of my PUB!"; } else { $db->query("UPDATE users SET will=will-50,energy=+250,money=money-10000000 WHERE userid=$userid"); $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "<center>You payed the Bartender $10,000,000, and then drank your tequila. You feel Dizzy , Then you feel some of your energy coming back to you. [url='index.php']>Home[/url]</center>"; } } } $h->endpage(); ?>
  21. Re: [v1] Bar Room w/ Chat FREE And I am that friend! :P
  22. Re: BOUNTER hunter v2 mod This isn't a free mod...Why are you posting it here?
  23. Re: Delete Yea, like he cares...His game is gonna be pretty crap anyway... And badboy, next time you post code, can you encase it in the BBCode [ code ] tags please. I'm sick of scrolling through almost an A3 sheet!
  24. Re: Honour exchange error Though this really shouldn't here, here's my answer (and it works for me) Find all instances where it has the mny_stripfmt and delete that line.
  25. Re: [free] Staff Delete Gang Option [V2]   Just to be annoying :P function mail_send() { global $ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); $codes = array(":)", ";)", ":o",":O", ":d",":D", ":s", ":S", ":(", ":red", ":clown", ":bashful", ":x", ":green", ":|", ";(", ":]", ":horny", ":cool"); $images = array("<img src=/smilies/smiley1.gif>", "<img src=/smilies/smiley2.gif>", "<img src=/smilies/smiley3.gif>", "<img src=/smilies/smiley3.gif>", "<img src=/smilies/smiley4.gif>", "<img src=/smilies/smiley4.gif>", "<img src=/smilies/smiley5.gif>", "<img src=/smilies/smiley5.gif>", "<img src=/smilies/smiley6.gif>", "<img src=/smilies/smiley7.gif>", "<img src=/smilies/smiley8.gif>", "<img src=/smilies/smiley9.gif>", "<img src=/smilies/smiley10.gif>", "<img src=/smilies/smiley11.gif>", "<img src=/smilies/smiley12.gif>", "<img src=/smilies/smiley13.gif>", "<img src=/smilies/smiley14.gif>", "<img src=/smilies/smiley15.gif>", "<img src=/smilies/smiley16.gif>"); $newmsg = str_replace($codes, $images, $msg); $to= (int) $_POST['userid']; $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$newmsg')") print "Message sent. [url='mailbox.php']> Back[/url]";
×
×
  • Create New...