
John1
Members-
Posts
42 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by John1
-
Re: Free Loan Shark System yes this mod should also have a cron andto add to users investments
-
Re: Free Loan Shark System my bad thanks zbirc3
-
Re: Free Loan Shark System no sure if anyone else worked out this but if u are getting a message when trying to withdraw the max loan replace your loanshark.php with this one <?php session_start(); require "globals.php"; switch($_GET['action']) { case 'borrow': borrow_money_start(); break; case 'borrowed': borrow_money(); break; case 'repay': repay_money_start(); break; case 'repayed': repay_money(); break; case 'invest': invest_money(); break; case 'invested': invested_money(); break; default: loanshark_main(); break; } function loanshark_main() { global $ir,$c,$userid,$h; $maxloan=$ir['level']*50000; echo "<h2>Loan Shark</h2> You currently have a loan of \${$ir['loan']} The max you can loan is \$$maxloan - [url='loanshark.php?action=borrow']Loan Money[/url] - [url='loanshark.php?action=repay']Repay Loan[/url] - [url='loanshark.php?action=invest']Invest Money[/url] "; } function borrow_money_start() { global $ir,$c,$userid,$h; $maxloan=$ir['level']*50000; echo "The max amount you can borrow is \$$maxloan You currently have a loan of \${$ir['loan']} <form action='loanshark.php?action=borrowed' method='post'> Ammount: <input type=text value='$maxloan' name=borrowed> <input type=submit value='Borrow'>"; } function borrow_money() { global $ir,$c,$userid,$h; $maxloan=$ir['level']*50000; $loan=$ir['loan']; if ($loan == $maxloan) { die("You have already taken out the max loan possible you must pay it back before you can loan more > [url='loanshark.php?action=repay']Repay[/url]"); } if ($_POST['borrowed'] >= $maxloan+1) { die("You are trying to loan more then your max loan > [url='loanshark.php?action=borrow']Back[/url]"); } mysql_query("UPDATE users SET loan=loan+{$_POST['borrowed']} WHERE userid=$userid",$c); mysql_query("UPDATE users SET money=money+{$_POST['borrowed']} WHERE userid=$userid",$c); echo"You Borrowed from the loan shark > [url='loanshark.php']Back[/url]"; } function repay_money_start() { global $ir,$c,$userid,$h; echo"You have a loan of \${$ir['loan']} <form action='loanshark.php?action=repayed' method='post'> Ammount: <input type=text value='{$ir['loan']}' name=repayed> <input type=submit value='Repay'>"; } function repay_money() { global $ir,$c,$userid,$h; if($ir['loan'] <= 0) { die("You are trying to payback more then u have to > [url='loanshark.php']Back[/url]"); } mysql_query("UPDATE users SET loan=loan-{$_POST['repayed']} WHERE userid=$userid",$c); mysql_query("UPDATE users SET money=money-{$_POST['repayed']} WHERE userid=$userid",$c); echo"You repayed the loan shark > [url='loanshark.php']Back[/url]"; } function invest_money() { global $ir,$c,$userid,$h; echo"Here you can invest money on the spot and watch your money sink or float its simple you state the ammount you wish to invest in the box below and click Invest You have [b]{$ir['investments']}[/b] daily invest statment's left <form action='loanshark.php?action=invested' method='post'> Ammount: \$<input type=text name=invest> <input type=submit value='Invest'> "; } function invested_money() { global $ir,$c,$userid,$h; if ($ir['investments'] < 1) { die("You have used up all your daily investments > [url='loanshark.php?action=invest']Back[/url]"); } if(rand(1,100) <= 50) { $gainedmoney=(int) rand(1,30); print "<font color=green>[b]Result: You hand over {$_POST['invest']} to the old man at the counter One week later you get a phone call its the old man he explains that your investment has payed off You invested ${$_POST['invest']} and ended up making \$$gainedmoney extra.</font>[/b] You have [b]{$ir['investments']}[/b] daily invest statment's left > [url='loanshark.php?action=invest']Try Again[/url]"; mysql_query("UPDATE users SET investments=investments-1",$c); mysql_query("UPDATE users SET money=money+$gainedmoney WHERE userid=$userid",$c); } else { if ($ir['investments'] < 1) { die("You have used up all your daily investments > [url='loanshark.php?action=invest']Back[/url]"); } $lostmoney=(int) rand(1,10); mysql_query("UPDATE users SET money=money-$lostmoney WHERE userid=$userid", $c); echo"<font color=red>[b]Result: You invested \${$_POST['invest']} and lost \$$lostmoney out of your overall investment. One week later you get a phone call its the old man he explains that your investment has failed </font>[/b] You have [b]{$ir['investments']}[/b] daily invest statment's left > [url='loanshark.php?action=invest']Try Again[/url] "; mysql_query("UPDATE users SET investments=investments-1",$c); } } $h->endpage(); ?>
-
Re: Free Loan Shark System can someone make a log for this as im not to great with making logs and i don't have the time to code that often
-
Re: [V2]Jail Attack[V2] Not Tested this is just copied off the original attack system, but changed to allow you to attck players in jail
-
Re: V2 battle tent error <?php include "globals.php"; print "<h3>Battle Tent</h3> [b]Welcome to the battle tent! Here you can challenge NPCs for money.[/b] <table width=100% cellspacing=1 class='table'><tr style='background: gray; '><th>Bot Name</th><th>Level</th><th>Times Owned</th><th>Ready To Be Challenged?</th><th>Location</th><th>Money Won</th><th>Challenge</th></tr>"; $q=$db->query("SELECT cb.*,u.*,c.npcid,cy.cityname FROM challengebots cb LEFT JOIN users u ON cb.cb_npcid=u.userid LEFT JOIN challengesbeaten c ON c.npcid=u.userid AND c.userid=$userid LEFT JOIN cities cy ON u.location=cy.cityid"); while($r=$db->fetch_row($q)) { $earn=$r['cb_money']; $v=($r{'user_level'} = 0); $q=$db->query("SELECT count(*) FROM challengesbeaten WHERE npcid=$v"); $times=$db->fetch_single($q); print "<tr><td>{$r['username']}</td><td>{$r['level']}</td><td>$times</td><td>"; if($r['hp'] >= $r['maxhp']/2 and $r['location']==$ir['location'] and !$ir['hospital'] and !$ir['jail'] and !$r['hospital'] and !$r['jail']) { print "<font color=green>Yes</font>"; } else { print "<font color=red>No</font>"; } print "</td><td>{$r['cityname']}</td><td>$earn</td><td>"; if($r['npcid']) { print "[i]Already[/i]"; } else { print "[url='attack.php?ID={$r[']Challenge[/url]"; } print "</td></tr>"; } print "</table>"; $h->endpage(); ?> try that
-
Re: [FREE][CRYSTAL GYM] works a treat and u can also make it so u can train iq
-
Re: [LITE][FREE] Bank ur bank doesn't let u withdrawl
-
Re: [mccode] Annoucement Mod add mine [email protected]
-
Re: [mccode] Annoucement Mod it says ur offline
-
Re: [mccode] Annoucement Mod i added u on msn
-
Re: [mccode] Annoucement Mod oh thanks alot
-
Re: [mccode] Annoucement Mod could some one help me out :? i am using lite and with the code for making the "announcements (1)" thing appear i don't have the same format as u Announcements and thats the only thing related to announcements
-
is ther any good free webhodt sites with cpanel 11 and cron jobs
John1 replied to Ekidd's topic in General Discussion
Re: is ther any good free webhodt sites with cpanel 11 and cron jobs it's ok for a game i have my game running on it http://www.real-criminals.srhost.info -
is ther any good free webhodt sites with cpanel 11 and cron jobs
John1 replied to Ekidd's topic in General Discussion
Re: is ther any good free webhodt sites with cpanel 11 and cron jobs Hey mate i have a free web hoster that has cpanel 11 and it supposrts cron jobs all u need to do is make 10 non spam posts on there forum to get it and then request and then await for approval and away u go start ur game or wat ever u want to do the website is http://www.stonerocket.net/freehost.php