Jump to content
MakeWebGames

Absolute Zero

Members
  • Posts

    303
  • Joined

  • Last visited

    Never

Everything posted by Absolute Zero

  1. Re: throw an object at the top poster I throw a yellow snowball 8-)
  2. Re: [v1][FREE] DONATION PACKS TO ITEMS So use that to give the item in this case donator pack to the user.
  3. Re: Random Banner On Login.php only 23 lines in the code given, please post all of your login.php
  4. Re: Guess the next poster not quite scarlet?
  5. Re: In game forums for sale Thanks for the response! But I was wondering if seanybob himself could answer, so I know for 100%.
  6. Re: Supernatural?   Of course faith is not fact, hence called faith.
  7. Re: [v1][FREE] DONATION PACKS TO ITEMS   In V1 theres something in admin panel called "give item to user".
  8. Re: Investment Mod Oxi has made an investment mod, but not this one. Anyone else please help?
  9. Re: Here Some Joke lawl? lol? lmao? I don't know what to think!
  10. Re: 3 Word Game but also smelled
  11. Re: Guess the next poster jesse
  12. Re: If you could be me for a day If I were you, I would try to make all these faces: :-D :-) :-( :-o :? 8-) :lol: :x :-P :oops: :cry: :evil: :roll: :wink: :| :mrgreen:
  13. Re: Supernatural? I believe in God/Jesus. Not mostly because they are supernatural, because of the message they convey. Love, peace and faith. :-)
  14. My friend was creating an investment.php mod for my game and stumbled upon an error which he could not find, thats why I'm posting! 8-) The problem is when you withdraw/deposit it does not calculate anything! Below is what he has made, so if anyone would be kind enough to help solve the problem: Investment.php   <?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,0); $h->menuarea(); print "Investment Bank"; if($ir['bankmoney']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>49999) { print "Congratulations, you bought a bank account for \$50,000! [url='investment.php']»[b]Start using my account[/b][/url]"; mysql_query("UPDATE users SET money=money-50000,bankmoney=0 WHERE userid=$userid"); } else { print "You do not have enough money to open an account. [url='explore.php']»[b]Back[/b][/url]"; } } else { print "Open a bank account today, just \$50,000! [url='investment.php?buy']»[b]Yes, sign me up![/b][/url]"; } } function index() { global $db, $ir,$c,$userid,$h; echo ""; print "\n[b]You currently have \${$ir['bankmoney']} in the bank.[/b]"; if($ir['wait']>0) {echo "[i]You have [b]{$ir['wait']} days[/b] left before you gain your interest![/i]";} else {echo "[i]How many days would you like your money to sit?[/i] -----Select----- None 3Day 4% Week 10% 3Week 32% Month 45% ";} echo "[b]Deposit Money[/b] » It will cost 15% of the money you deposit » The max taken out will be $3000 Amount: [b]Withdraw Money[/b] » There is no fee on withdrawals. Amount: "; } function deposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } elseif($long = "select") { echo "You need to set how long you want to store the money for interest."; } { $intmoney=ceil($_POST['deposit']); $fee=ceil($_POST['deposit']*15/100); $long=$_POST['long']; if($fee > 3000) {$fee=3000;} if($long == day3) {$wait = '3'; $interest = '($intmoney*.01)+$intmoney';} elseif($long == 'week') {$wait = '7';$interest = '($intmoney*.03)+$intmoney';} elseif($long == 'week3') {$wait = '21';$interest = '($intmoney*.11)+$intmoney';} else {$wait = '31';$interest = '($intmoney*.15)+$intmoney';} $gain=$_POST['deposit']-$fee; $ir['bankmoney']+=$gain; mysql_query("UPDATE users SET bankmoney=bankmoney+$gain, money=money-{$_POST['deposit']}, wait=wait+$wait WHERE interest=$interest userid=$userid"); print "You hand over \${$_POST['deposit']} to be deposited, after the fee is taken (\$$fee), \$$gain is added to your account. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='investment.php']>[b]Back[/b][/url]"; } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['bankmoney']) { print "You do not have enough banked money to withdraw this amount."; } if($wait = '-1') { $gain=$_POST['withdraw']; $ir['bankmoney']-=$gain; $db->query("UPDATE users SET bankmoney=bankmoney-$gain, money=money+$gain where userid=$userid"); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='investment.php']» Back[/url]"; } else { echo "[b]Banker: You only have [b]{$ir['wait']} days[/b] left before you get interest![/b]"; echo "[i]Are you sure you still want to withdrawl?[/i]"; echo " "; } if($_GET['action'] == 'yes') { $gain=$_POST['withdraw']; $ir['bankmoney']-=$gain; mysql_query("UPDATE users SET bankmoney=bankmoney-$gain, money=money+$gain, wait=-1 where userid=$userid"); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='investment.php']»[b]Back[/b][/url]"; } } $h->endpage(); ?>   Daysold.php   <?php require "mysql.php"; global $c; mysql_query("UPDATE users SET wait=wait-1 WHERE wait>0"); if($ir['wait'] = 0) { mysql_query("UPDATE users SET bankmoney=bankmoney+{$ir['interest']} WHERE bankmoney>0"); mysql_query("UPDATE users SET wait=wait-1 WHERE bankmoney>0"); } mysql_query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0",$c); mysql_query("UPDATE users SET daysold=daysold+1",$c); mysql_query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0",$c); mysql_query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0",$c); mysql_query("UPDATE users SET cdays=cdays-1 WHERE course > 0",$c); mysql_query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0",$c); mysql_query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0",$c); $q=mysql_query("SELECT * FROM users WHERE cdays=0 AND course > 0",$c); while($r=mysql_fetch_array($q)) { $cd=mysql_query("SELECT * FROM courses WHERE crID={$r['course']}",$c); $coud=mysql_fetch_array($cd); $userid=$r['userid']; mysql_query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})",$c); $upd=""; $ev=""; if($coud['crSTR'] > 0) { $upd.=",us.strength=us.strength+{$coud['crSTR']}"; $ev.=", {$coud['crSTR']} strength"; } if($coud['crGUARD'] > 0) { $upd.=",us.guard=us.guard+{$coud['crGUARD']}"; $ev.=", {$coud['crGUARD']} guard"; } if($coud['crLABOUR'] > 0) { $upd.=",us.labour=us.labour+{$coud['crLABOUR']}"; $ev.=", {$coud['crLABOUR']} labour"; } if($coud['crAGIL'] > 0) { $upd.=",us.agility=us.agility+{$coud['crAGIL']}"; $ev.=", {$coud['crAGIL']} agility"; } if($coud['crIQ'] > 0) { $upd.=",us.IQ=us.IQ+{$coud['crIQ']}"; $ev.=", {$coud['crIQ']} IQ"; } $ev=substr($ev,1); if ($upd) { mysql_query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid",$c) or die(mysql_error()." "."UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid"); } mysql_query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')",$c); } mysql_query("UPDATE users SET course=0 WHERE cdays=0",$c); mysql_query("TRUNCATE TABLE votes;",$c); ?>   Also he added in users table.   interest (int) 11 default 0 wait (int) 11 default -1   Hopefully with that information you can help me/my friend with this problem! Thanks!
  15. Re: [mccode] Annoucement Mod   In proper grammar please!
  16. Re: throw an object at the top poster Throws a man eating kitten! :x
  17. Re: If you could be me for a day I would buy everything I want with your investment money and ship it to me :D
  18. Re: Counting (nr game) 1548
  19. Re: Guess the next poster Tears :D
  20. Re: In game forums for sale Looks great, very well done mod seanybob but I have question's to ask. Is all user input sanitized? Is it SQL injectable? Thanks in advance! Also thank you micheal for posting your forums.
  21. Re: [mccode] Annoucement Mod Thanks for the mod, using it and it works great! :wink:
  22. Re: [Free] [v1] Jail If anyone has fix for 10k bust, I'd be thankful if you posted it. Thanks!
  23. Re: [mccode] Register Page   Well, maybe you should purchase a login? First impressions are everything...oh and gameplay.
  24. Re: DP Items No I don't have V2 but.... Find the file that you can credit the user with donator packs, should be in admin panel in V1. Not sure what it is in V2, but you get my point.
  25. Re: DP Items In admin.php 8-)
×
×
  • Create New...