Jump to content
MakeWebGames

CraigF

Members
  • Posts

    597
  • Joined

  • Last visited

    Never

Everything posted by CraigF

  1. Re: [mccode] Send Crystals me? i wasnt $hot!
  2. CraigF

    WTF

    Re: WTF ive added a friend, it comes the same :( its all fine up to ID 18+
  3. CraigF

    WTF

    OMG, upto userid 17 it was fine but now if i go on anyone with the id 18+ the viewuser is screwed, i get these errors un the profile: Referals: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fallen/public_html/viewuser.php on line 90 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fallen/public_html/viewuser.php on line 94 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fallen/public_html/viewuser.php on line 95 and they dont have an ID in it. its just THEIRNAME [] line 90-96 Referals: "; $rr=mysql_query("SELECT * FROM referals WHERE refREFER={$r['userid']}",$c); mysql_num_rows($rr); $q_y=mysql_query("SELECT * FROM friendslist WHERE fl_ADDED={$r['userid']}",$c); $q_z=mysql_query("SELECT * FROM blacklist WHERE bl_ADDED={$r['userid']}",$c); print " Friends: ".mysql_num_rows($q_y)." Enemies: ".mysql_num_rows($q_z)."
  4. Re: [LITE][FREE] Bank it sucks when you want to code but really cant be bothered!
  5. Re: Send Crystals FREE!!   $hot and DaKing ??? None existant ?? lol they used to be
  6. Re: [LITE][FREE] Bank lol no thats ok, its not v1, i have v1 (LEGAL) and it probably looks the same as i have read the bank codes and i must of just had it in my mind when coding it but no its not v1
  7. Re: [LITE][FREE] Bank :s that is for LITE lol, its not the v1 bank, its my one i just made, has a little bit like 2% of it from v1 codes
  8. Basicly, it was asked for so here is a basic LITE bank, :)   SQL ALTER TABLE `users` ADD `bankmoney` INT( 11 ) NOT NULL DEFAULT '0';   bankcron.php (to run every day) <?php require "mysql.php"; global $c; mysql_query("UPDATE users SET bankmoney=bankmoney+(bankmoney*2/100) where bankmoney>0",$c); ?>   bank.php <?php /*----------------------------------------------------- -- Forgotten-Lands v1.0 BETA -- A product of KrAiG -- Do not send or sell to anyone else -- Please keep this text here -----------------------------------------------------*/ 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } function index() { global $ir,$c,$userid,$h; print "Bank Welcome to the bank, let me check your account, please wait a second... Ok, you currently have: \${$ir['bankmoney']}. Your bank type gives you 2% interest a day added to your balance! </pre> <table width="75%" border="2">[b]Deposit[/b] Amount: [b]Withdraw Money[/b] Amount: </table>";<br>}<br>function deposit()<br>{<br>global $ir,$c,$userid,$h;<br>$_POST['deposit']=abs((int) $_POST['deposit']);<br>if($_POST['deposit'] > $ir['money'])<br>{<br>print "You do not have enough to deposit this amount.";<br>}<br>else<br>{<br>$dep=$_POST['deposit'];<br>$ir['bankmoney']+=$dep;<br>mysql_query("UPDATE users SET bankmoney=bankmoney+$dep, money=money-{$_POST['deposit']} where userid=$userid",$c);<br>print "You slide \${$_POST['deposit']} under the counter.<br><br>Bill the banker takes your money and stores it.<br><br>He gives you a receipt that reads:<br><br>[i]'\$$dep has been added to your account.<br><br>You now have \${$ir['bankmoney']} in the bank.<br><br><br>Thankyou for using our service<br><br>Your banker for today was Bill Joans'[/i]<br>[url='bank.php']> Back[/url]";<br>}<br>}<br>function withdraw()<br>{<br>global $ir,$c,$userid,$h;<br>$_POST['withdraw']=abs((int) $_POST['withdraw']);<br>if($_POST['withdraw'] > $ir['bankmoney'])<br>{<br>print "You do not have enough in the bank to withdraw this amount.";<br>}<br>else<br>{<br><br>$with=$_POST['withdraw'];<br>$ir['bankmoney']-=$with;<br>mysql_query("UPDATE users SET bankmoney=bankmoney-$with, money=money+$gain where userid=$userid",$c);<br>print "You ask to withdraw \$$with, <br><br>Banker Bill took typed on the computer and took out some cash from the till.<br><br>He gives you a receipt that reads:<br><br>[i]'\$$with has been taken from your account.<br><br>You now have \${$ir['bankmoney']} in the bank.<br><br><br>Thankyou for using our service<br><br>Your banker for today was Bill Joans'[/i]<br>[url='bank.php']> Back[/url]";<br>}<br>}<br>$h->endpage();<br>?&g
  9. Re: [TGM] User Comments [TGM] can this not be made by editing the mail codes, so that people basicly "mail" you and it shows on your profile and you or staff can delete it, its basicly the same really. but its worth the $10
  10. Re: [LITE][FREE] Job fixed it,i was offline i wasnt too slow! :)
  11. Re: [LITE][FREE] Job   like i said its a VERY basic, most basic you will ever see job mod! xD
  12. Re: [LITE][FREE] Job yeah i copied the jobpay.php cron from v1 but then deleted most of it because it wouldnt work with my crappy LITE one ;) so i must of left that bit, like i said my head is full today!
  13. Jesse asked for a simple, jobs mode for LITE, so here it is, didnt take too long to do, it is untested as i do not have a LITE game to test it on, so post if there are any errors, its easy and there is only one job, but really jesse only asked for a bit of code that would give a set bit of money, thats easy but i want people to earn it by getting a well payed job ;) SO POST THE BUGS AND I WILL TRY AND FIX THEM IF THERE ARE ANY!! add this sql: ALTER TABLE `users` ADD `job` INT( 11 ) NOT NULL DEFAULT '0'   Add this code: job.php <?php /*----------------------------------------------------- -- Forgotten-Lands v1.0 BETA -- A product of KrAiG -- Do not send or sell to anyone else -- Please keep this text here -----------------------------------------------------*/ 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); $ir['exp_needed']=($ir['level']+1)*($ir['level']+1)*($ir['level']+1); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); if($ir['job']>0) { switch($_GET['action']) { case 'getjob': get_the_job(); break; default: job_index(); break; } } function job_index() { global $ir,$c,$userid,$h; print "Welcome To The Job Center"; print "There is one job avaliable right now and it envolves streets and cleaning, but atleast you get to drive a street cleaning vehicle! "; print "The job entitles you to: \$1000 a day 2 Strength a day 5 Labour a day 2 Guard a day "; print "So, if you want the job i will call Clean Street INC now and tell them Taking the job? [[url='job.php?action=getjob']YES[/url]] [[url='index.php']NO[/url]]"; function get_the_job() { global $ir,$c,$userid,$h; print "Ok, Congratulations, you have the job, i will phone them now, you start Today! "; print "Make sure you have a change of clothes, cleaners get alot of strange and, well, disgusting stuff thrown at them! "; mysql_query("UPDATE users SET job=1 WHERE userid=$userid;",$c); } else { print "You are already working as a street cleaner, you will recieve: \$1000 a day 2 Strength a day 5 Labour a day 2 Guard a day So stop slacking and get back to work! [url='index.php']BACK[/url]"; } $h->endpage(); ?>   and this cron for every 24 hours: jobpay.php <?php require "mysql.php"; global $c; mysql_query("UPDATE users u WHERE job > 0"; mysql_query("UPDATE userstats SET strength=strength+2, labour=labour+5, guard=guard+2, money=money+1000 WHERE job>0",$c) ?>   REMEMBER TO POST ANY BUGS There you go i fixed it
  14. Re: How To Do V1 Crons ( Hope This Will Help )   do we put all that in the command box or just: curl http://game-name/fedupdate.php and make the 0 0 * * * when to do it
  15. CraigF

    Right

    Re: Right   huh? lol you have confused me
  16. CraigF

    Right

    Re: Right i am not going to give you a reaction to your constant digging at me, i dont see what i have done so really stop trying to get at me!
  17. Re: Best Freebies   Thanks... :-D haha that is quiet alright, they are cool and useful
  18. CraigF

    Right

    Re: Right ive had -1 and i wasnt on all day yesterday just about
  19. CraigF

    Right

    Re: Right   lol! exactly! People make errors and blame it on you! its the noobs!   See, they cant code and think it must be easy so if you make a little bug they get annoyed!
  20. Re: [v1]Refill Users haha thanks :) Lol i meant not taht much its just to keep them happy a bit more :)   Cheers :D
  21. CraigF

    Right

    Re: Right and repeat it!
  22. CraigF

    Right

    Re: Right exactly its not fair lol
  23. CraigF

    Right

    Re: Right cheers =]
  24. Re: [v1]Refill Users thanks :)
  25. CraigF

    Right

    Re: Right i wasnt having a go at you but still, i was just wondering how i am annoying so i can change
×
×
  • Create New...