Jump to content
MakeWebGames

CraigF

Members
  • Posts

    597
  • Joined

  • Last visited

    Never

Everything posted by CraigF

  1. Re: [v1]Refill Users thankyou, as i am using it until my crons are fixed lol
  2. This mod will make it so that in your admin.php you can automatically refill your users with their energy, brave, will and health. This is useful if you can not get your crons working yet because you dont know how or if you want to reward your players or maybe some sort of bug! please give me +1 if you like it or use it! (i put the mysql_query's seperate at the end because then people can easily add or remove them!) post these case's: case 'refill': fill_all(); break; case 'refillsub': fill_all_send(); break;   add this link: [[url='admin.php?action=refill']Refill Users[/url]]   find: add before function fill_all() { global $ir,$c,$h,$userid; print "Refill Users This will refill: -Energy to max -Will to max -Brave to max -Health to max "; print " [[b][url='admin.php?action=refillsub']FILL[/url][/b]]"; } function fill_all_send() { global $ir,$c,$h,$userid; mysql_query("UPDATE users SET will=maxwill",$c); mysql_query("UPDATE users SET energy=maxenergy",$c); mysql_query("UPDATE users SET brave=maxbrave",$c); mysql_query("UPDATE users SET health=maxhealth",$c); print "Your users have been refilled! [url='admin.php']> Back[/url]"; }   Thats it, may be useful to some of you may not be. Please dont say "Oh thats aload of crap" because thats your opinion, its easy to code and took 2minutes.
  3. CraigF

    Right

    Re: Right how am i annoying, and i do contribute things useful, i am not a great coder so you cant expect me to contribute something very amazingly useful! what have you posted useful?
  4. Re: [TGM] Custom Hospital Message [TGM] Im sure cronus wont mind lol, its not exactly like someone will pay more then $5 for it, but im going to give him a +1 because he has given it a go and contributed alot to CE
  5. Re: Anyone want to make a game? nope, got my own computer :) mum doesnt stop me going on it, and i am 15 on the 27th, and i started my GCSE's 1year early as my school is gay like that so i am doing my exams now and a few next year i believe. im going to be in the "Thomas Deacon Academy"
  6. Guys and Girls, i have looked at my rep and i have -106, taht must be a record! WHY do i have that much! I do nothing wrong, i dont know what i have done, i had like atleast 3/4 of that from tittlemouse and someone else i cant rememebr who but can everyone just say what i have done wrong as i dont think its fair that people will look at that and think im a bad guy when i do my best to help and i dont go around begging etc! Thanks
  7. Re: Anyone want to make a game? haha ok
  8. Re: Anyone want to make a game? well in your post where your selling your game you say you are going to be doing your exams and dont want to run a game and get out of PHP but now your saying you want to make a new one?
  9. Re: Best Freebies noone is going to give an mod worth £5+ ($10+) but the few lines of code or even few pages of code, it doesnt matter how big it is, they can still sometimes be good addons, you dont HAVE to add it, like the mining mod R!der gave away, that is a great add on and wasnt too hard to code! oxidations mods are some of my fave
  10. Re: [TGM] Custom Hospital Message [TGM] yeah no offence Cronus, its a good idea but needs 2 things: 1. Lower price 2. A way to make it so they cant post things like: "John seen Marks cock and fainted"
  11. Re: [v1][FREE] Gang Welcome Message   are you saying you got it working? as i had it working with no errors from the start
  12. Re: Grrr Crons :x ok i will reply with the email
  13. Re: Grrr Crons :x   i dont use msn thanks though
  14. Re: [v1][FREE] Gang Welcome Message it works for v1, are you trying for lite or v2? and thanks mate
  15. Re: Grrr Crons :x Thanks mate, what else could it be instead of curl?
  16. Re: Grrr Crons :x i have that but it doesnt work, so maybe its something to do with my actual crons, in my crons folder there is a mysql.php, its exactly the same as my actual mysql.php. is it meant to be?
  17. Well, i need my crons working and it confuses me lol. i will not give out my cpanel details so dont ask! Can anyone give a print screen showing how theirs is done so i know how to do it? all i need is a print screen Thanks! -Kraig
  18. Re: !FREE ****Buy Items with Crystals****** FREE!   and in itemcbuy.php That didnt work for me it kept coming as crystals so i changed it you can just do if($r['itm_place'] == "cash") { $lang="money" } else { $lang="crystals"; } mysql_query("UPDATE `users` SET `$lang` = `$lang` - '$price' WHERE `userid` = '$userid'",$c);   i dont get the need in a whole new script for a few lines of code :|
  19. Re: !FREE ****Buy Items with Crystals****** FREE! yeah but i was in a hurry and i thought i will give it first before i leave, and i JUST missed the bus lol!! :(
  20. Re: Givin V2 licence to someone so you GIVE him your $300 codes?
  21. Re: Why you code? well i code if i have NOTHING else to do or if i see something i need/want that i can make or if someone requests something i can make for free or easy, but otherwise i dont really do much coding, im not crap at it though ;)
  22. Re: !FREE ****Buy Items with Crystals****** FREE! open shops.php, replace with: <?php /*----------------------------------------------------- -- Fallen-Lands v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $_GET['shop'] = abs((int) $_GET['shop']); if(!$_GET['shop']) { print "You begin looking through town and you see a few shops. "; $q=mysql_query("SELECT * FROM shops WHERE shopLOCATION={$ir['location']}",$c); print "<table width=85%><tr style='background: gray;'><th>Shop</th><th>Description</th></tr>"; while($r=mysql_fetch_array($q)) { print "<tr><td>[url='shops.php?shop={$r[']{$r['shopNAME']}[/url]</td><td>{$r['shopDESCRIPTION']}</td></tr>"; } print "</table>"; } else { $sd=mysql_query("SELECT * FROM shops WHERE shopID={$_GET['shop']}",$c); if(mysql_num_rows($sd)) { $shopdata=mysql_fetch_array($sd); if($shopdata['shopLOCATION'] == $ir['location']) { print "Browsing items at [b]{$shopdata['shopNAME']}...[/b] <table><tr style='background: gray;'><th>Item</th><th>Description</th><th>Price</th><th>Sell Price</th><th>Buy</th></tr>"; $qtwo=mysql_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",$c) or die(mysql_error()); $lt=""; while($r=mysql_fetch_array($qtwo)) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; print "\n<tr style='background: gray;'><th colspan=5>{$lt}</th></tr>"; } if($r["itm_place"] == "cash") { $gross="\$".number_format($r['itmbuyprice']); $sellgross="\$".number_format($r['itmsellprice']); } else { $gross=number_format($r['itmbuyprice'])." credits"; $sellgross=number_format($r['itmsellprice'])." credits"; } print "\n<tr><td>{$r['itmname']}</td><td>{$r['itmdesc']}</td><td>$gross</td><td>$sellgross</td><td>"; if($r["itm_place"] == "cash") print "<form action='itembuy.php?ID={$r['itmid']}' method='post'>Qty: <input type='text' name='qty' value='1' /><input type='submit' value='Buy' /></form>"; else print "<form action='itemcbuy.php?ID={$r['itmid']}' method='post'>Qty: <input type='text' name='qty' value='1' /><input type='submit' value='Buy' /></form>"; print "</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(); ?>   replace itembuy.php with: <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $_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']});",$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(); ?>   new file called itemcbuy.php. <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $_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['crystals'] < $itemd['itmbuyprice']*$_POST['qty']) { print "You don't have enough crystals 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']});",$c); mysql_query("UPDATE users SET crystals=crystals-$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(); ?>
  23. Re: Itemsend this should be your whole itemsend.php for v1 <?php /*----------------------------------------------------- -- Fallen-Lands v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); //itemsend if($_GET['qty'] && $_GET['user']) { $id=mysql_query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1",$c); if(mysql_num_rows($id)==0) { print "Invalid item ID"; } else { $r=mysql_fetch_array($id); $m=mysql_query("SELECT * FROM users WHERE userid={$_GET['user']} LIMIT 1",$c); if($_GET['qty'] > $r['inv_qty']) { print "You are trying to send more than you have!"; } else if( $_GET['qty'] <= 0) { print "You know, I'm not dumb, j00 cheating hacker."; } else if(mysql_num_rows($m) == 0) { print "You are trying to send to an invalid user!"; } else { $rm=mysql_fetch_array($m); //are we sending it all if($_GET['qty'] == $r['inv_qty']) { //just give them possession of the item mysql_query("UPDATE inventory SET inv_userid={$_GET['user']} WHERE inv_id={$_GET['ID']} LIMIT 1",$c); } else { //create seperate mysql_query("INSERT INTO inventory VALUES ('','{$r['inv_itemid']}',{$_GET['user']},{$_GET['qty']});",$c); mysql_query("UPDATE inventory SET inv_qty=inv_qty-{$_GET['qty']} WHERE inv_id={$_GET['ID']} LIMIT 1;",$c); } print "You sent {$_GET['qty']} {$r['itmname']}(s) to {$rm['username']}"; event_add($_GET['user'],"You received {$_GET['qty']} {$r['itmname']}(s) from [url='viewuser.php?u=$userid']{$ir['username']}[/url]",$c); mysql_query("INSERT INTO itemxferlogs VALUES('',$userid,{$_GET['user']},{$r['itmid']},{$_GET['qty']},unix_timestamp())",$c); } } } else if($_GET['ID']) { $id=mysql_query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1",$c); if(mysql_num_rows($id)==0) { print "Invalid item ID"; } else { $r=mysql_fetch_array($id); print "[b]Enter who you want to send {$r['itmname']} to and how many you want to send. You have {$r['inv_qty']} to send.[/b] <form action='itemsend.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' />User ID: <input type='text' name='user' value='' /> Quantity: <input type='text' name='qty' value='' /> <input type='submit' value='Send Items (no prompt so be sure!' /></form>"; } } else { print "Invalid use of file."; } $h->endpage(); ?>
  24. Re: Pages! ARRRGH! nope i can not find that
  25. Re: Pages! ARRRGH! nope thats fine lol
×
×
  • Create New...