Jump to content
MakeWebGames

Razor42

Members
  • Posts

    863
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Razor42

  1. I'd reccomend Peter to anyone, I have bought 2 designs from Peter now and his work is amazing, he takes your every little idea and creates the perfect template for you, he also keeps you updated through the making and will change anything that you need and will get the templates done in good time also. His work is deffinatly worth the money in my opinion and I wouldn't go to anyone else!.
  2. Haha sorry :P
  3. Non, they all flew away.
  4. Hi there MWG, I got bored so thought i'd make a little change too V2s education system! What has changed? Nothing major. Just that players now have to be a required level to do a course. This required level can be set by the Game owner when adding the course in the staff menu. Firstly run this into phpmyadmin: ALTER TABLE `courses` ADD `crLEVEL` INT(11) default'0'   Secondly Replace education.php with: <?php /* This is free work of Razor42! Do not try to re-sell this! */ include "globals.php"; print "<h3>Schooling</h3>"; if($ir['course'] > 0) { $cd=$db->query("SELECT * FROM courses WHERE crID={$ir['course']}"); $coud=$db->fetch_row($cd); print "You are currently doing the {$coud['crNAME']}, you have {$ir['cdays']} days remaining."; } else { if($_GET['cstart']) { $_GET['cstart'] = abs((int) $_GET['cstart']); //Verify. $cd=$db->query("SELECT * FROM courses WHERE crID={$_GET['cstart']}"); if($db->num_rows($cd) == 0) { print "You are trying to start a non-existant course!"; } else { $coud=$db->fetch_row($cd); $cdo=$db->query("SELECT * FROM coursesdone WHERE userid=$userid AND courseid={$_GET['cstart']}"); if($ir['money'] < $coud['crCOST']) { print "You don't have enough money to start this course."; $h->endpage(); exit; } if($ir['level'] < $coud['crLEVEL']) { print "Your don't have the required level to start this course."; $h->endpage(); exit; } if($db->num_rows($cdo) > 0) { print "You have already done this course."; $h->endpage(); exit; } $db->query("UPDATE users SET course={$_GET['cstart']},cdays={$coud['crDAYS']},money=money-{$coud['crCOST']} WHERE userid=$userid"); print "You have started the {$coud['crNAME']}, it will take {$coud['crDAYS']} days to complete."; } } else { //list courses print "Here is a list of available courses."; $q=$db->query("SELECT * FROM courses"); print "<br /><table width=75% cellspacing=1 class='table'><tr style='background:gray;'><th>Course</th><th>Description</th><th>Cost</th><th>Level</th><th>Take</th></tr>"; while($r=$db->fetch_row($q)) { $cdo=$db->query("SELECT * FROM coursesdone WHERE userid=$userid AND courseid={$r['crID']}"); if($db->num_rows($cdo)) { $do="<i>Done</i>"; } else { $do="<a href='education.php?cstart={$r['crID']}'>Take</a>"; } print "<tr><td>{$r['crNAME']}</td><td>{$r['crDESC']}</td><td>\${$r['crCOST']}</td><td>{$r['crLEVEL']}</td><td>$do</td></tr>"; } print "</table>"; } } $h->endpage(); ?>   Finally replace staff_courses.php with: <?php /* This is free work of Razor42! Do not try to re-sell this! */ include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains course stuffs switch($_GET['action']) { case "addcourse": addcourse(); break; case "editcourse": editcourse(); break; case "delcourse": delcourse(); break; default: print "Error: This script requires an action."; break; } function addcourse() { global $db, $ir, $c, $h, $userid; $cost=abs((int) $_POST['cost']); $energy=abs((int) $_POST['energy']); $days=abs((int) $_POST['days']); $str=abs((int) $_POST['str']); $agil=abs((int) $_POST['agil']); $gua=abs((int) $_POST['gua']); $lab=abs((int) $_POST['lab']); $iq=abs((int) $_POST['iq']); $lvl=abs((int) $_POST['level']); if($_POST['name'] && $_POST['desc'] && $cost && $days) { $db->query("INSERT INTO courses VALUES(NULL, '{$_POST['name']}', '{$_POST['desc']}', '$cost', '$energy', '$days', '$str', '$gua', '$lab', '$agil', '$iq', '$lvl')"); print "Course {$_POST['name']} added."; stafflog_add("Added course {$_POST['name']}"); } else { print "<h3>Add Course</h3><hr /> <form action='staff_courses.php?action=addcourse' method='post'> Name: <input type='text' name='name' /><br /> Description: <input type='text' name='desc' /><br /> Required Level: <input type='text' name='level' /><br /> Cost (Money): <input type='text' name='cost' /><br /> Cost (Energy): <input type='text' name='energy' /><br /> Length (Days): <input type='text' name='days' /><br /> Strength Gain: <input type='text' name='str' /><br /> Agility Gain: <input type='text' name='agil' /><br /> Guard Gain: <input type='text' name='gua' /><br /> Labour Gain: <input type='text' name='lab' /><br /> IQ Gain: <input type='text' name='iq' /><br /> <input type='submit' value='Add Course' /></form>"; } } function editcourse() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $cost=abs((int) $_POST['cost']); $energy=abs((int) $_POST['energy']); $days=abs((int) $_POST['days']); $str=abs((int) $_POST['str']); $agil=abs((int) $_POST['agil']); $gua=abs((int) $_POST['gua']); $lab=abs((int) $_POST['lab']); $iq=abs((int) $_POST['iq']); $lvl=abs((int) $_POST['level']); $name=$_POST['name']; $db->query("UPDATE courses SET crNAME='$name', crDESC='{$_POST['desc']}', crCOST=$cost, crENERGY=$energy, crDAYS=$days, crSTR=$str, crGUARD=$gua, crLABOUR=$lab, crAGIL=$agil, crIQ=$iq, crLEVEL=$lvl WHERE crID={$_POST['id']}"); print "Course $name was edited successfully."; stafflog_add("Edited course $name"); break; case "1": $q=$db->query("SELECT * FROM courses WHERE crID={$_POST['course']}"); $old=$db->fetch_row($q); print "<h3>Editing a Course</h3><hr /> <form action='staff_courses.php?action=editcourse' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['course']}' /> Name: <input type='text' name='name' value='{$old['crNAME']}' /><br /> Description: <input type='text' name='desc' value='{$old['crDESC']}' /><br /> Required Level: <input type='text' name='level' value='{$old['crLEVEL']}' /><br /> Cost (Money): <input type='text' name='cost' value='{$old['crCOST']}' /><br /> Cost (Energy): <input type='text' name='energy' value='{$old['crENERGY']}' /><br /> Length (Days): <input type='text' name='days' value='{$old['crDAYS']}' /><br /> Strength Gain: <input type='text' name='str' value='{$old['crSTR']}' /><br /> Agility Gain: <input type='text' name='agil' value='{$old['crAGIL']}' /><br /> Guard Gain: <input type='text' name='gua' value='{$old['crGUARD']}' /><br /> Labour Gain: <input type='text' name='lab' value='{$old['crLABOUR']}' /><br /> IQ Gain: <input type='text' name='iq' value='{$old['crIQ']}' /><br /> <input type='submit' value='Edit Course' /></form>"; break; default: print "<h3>Editing a Course</h3><hr /> <form action='staff_courses.php?action=editcourse' method='post'> <input type='hidden' name='step' value='1' /> Course: ".course_dropdown($c, "course")."<br /> <input type='submit' value='Edit Course' /></form>"; break; } } function delcourse() { global $db,$ir,$c,$h,$userid; if($_POST['course']) { $q=$db->query("SELECT * FROM courses WHERE crID={$_POST['course']}"); $old=$db->fetch_row($q); $db->query("UPDATE users SET course=0, cdays=0 WHERE course={$_POST['course']}"); $db->query("DELETE FROM courses WHERE crID={$_POST['course']}"); print "Course {$old['crNAME']} deleted."; stafflog_add("Deleted course {$old['crNAME']}"); } else { print "<h3>Deleting a Course</h3><hr /> <form action='staff_courses.php?action=delcourse' method='post'> Course: ".course_dropdown($c, "course")."<br /> <input type='submit' value='Delete Course' /></form>"; } } function report_clear() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_GET['ID'] = abs((int) $_GET['ID']); stafflog_add("Cleared player report ID {$_GET['ID']}"); $db->query("DELETE FROM preports WHERE prID={$_GET['ID']}"); print "Report cleared and deleted!<br /> <a href='staff_users.php?action=reportsview'>> Back</a>"; } $h->endpage(); ?>   Hope you all like it :) Have tested and does work perfect for me but if you get any errors please tell me and I will fix them for you :) Thanks' razor42
  5. Use google
  6. Use google Look around tutorials, anything you don't understand after that i'd be more than happy to help you out where I can, keeping in mind I am still a learner myself.
  7. No need to really debate wether I'll find out if its fake or not? Trying to do something good for people so why post negative feedback?
  8. As I said I am going to be releasing better versions, this is the first thing iv created and will be improving it and the reason for only 5 is because players would just be able to invest unlimited amounts and get rich easy, but I will be adding investments with win and losses soon so that will be removed. Thanks for the screenshots Raven and glad you like it :)
  9. Remember if your going to apply you must have a valid licence with proof of this licence and the licence will be checked :)
  10. No? where does it say i'll need cpanel access?
  11. He didn't exactly give you greif, he asked a valid question, one many people would have wondered when seeing this post.
  12. Hi there MWG, I am offering free work to one mccodes V2 game owner! What this free work will offer? -One free mccodes mod! -Skills in PHP, MySql, HTML & CSS! What you require to recieve this free work? - Proof of a valid Mccodes V2 licence! - A creative mod idea. - A mod I can actually create, I am a learner and I am offering this work for learning purposes! What I get out of this? -Its a learning experience. -To help build my reputation and portfolio. -To give something to the community. Post below your ideas and I will select which project I am going to undertake on the date 05/08/2012! Thanks for your time, Razor42!
  13. Hmm, Hasn't come through? http://makewebgames.io/showthread.php/42103-Simple-banking-System-with-Loans-amp-Investmenst! also theres the finished product :)
  14. Thank you newttster :) I am going to improve this system in time, firstly going to improve the free version then create a paid version with similar ideas that what you have said, not quite the same though :)
  15. No sorry, if someone could add one for me that would be nice?
  16. Hey there MWG, This is my first mod! <B>What this mod does?</B> It basically allows players to make loans and investments. Players will be able to invest money. When they invest money there money will be doubled. Players will only be able to make 5 investments in their "life time". Also players will be able to get loans. Players will have to repay there loans with %25 interest on top of what they have loaned!. I have tested this mod and there are no errors or bugs! If someone could please secure this mod then that would be great :) Also don't be harsh upon my coding, as I say this is the first mod I have ever created and I have only been learning to code for around 2/3 weeks now. :) So here we go. First we must run these into our database! ALTER TABLE `users` ADD `investments` INT(11) default'0'; ALTER TABLE `users` ADD `moneyowed` INT(11) default'0';   Then you need to replace your bank.php file with... <?php // //This is free work of Razor42! //Do not try to re-sell this! // include "globals.php"; print "<h3>Bank</h3>"; if($ir['bankmoney']>-1) switch($_GET['action']) { case "deposit": deposit(); break; case "invest": invest(); break; case "withdraw": withdraw(); break; case "getloan": getloan(); break; case "repayloan": repayloan(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>49999) { print "Congratulations, you bought a bank account for \$50,000!<br /> <a href='bank.php'>Start using my account</a>"; $db->query("UPDATE users SET money=money-50000,bankmoney=0 WHERE userid=$userid"); } else { print "You do not have enough money to open an account. <a href='explore.php'>Back to town...</a>"; } } else { print "Open a bank account today, just \$50,000!<br /> <a href='bank.php?buy'>> Yes, sign me up!</a>"; } } function index() { global $db, $ir,$c,$userid,$h; print "\n<b>You currently have \${$ir['bankmoney']} in the bank.</b><br /> At the end of each day, your bank balance will go up by 2%.<br /> <table border='1' width='75%' cellspacing=2 cellpadding=5 class='table'> <tr> <td width='25%'><b>Deposit Money</b><br /> It will cost you 15% of the money you deposit, rounded up. The maximum fee is \$3,000.<form action='bank.php?action=deposit' method='post'> Amount: <input type='text' name='deposit' value='{$ir['money']}' /><br /> <input type='submit' value='Deposit' /></form></td> <td> <b>Withdraw Money</b><br /> There is no fee on withdrawals.<form action='bank.php?action=withdraw' method='post'> Amount: <input type='text' name='withdraw' value='{$ir['bankmoney']}' /><br /> <input type='submit' value='Withdraw' /></form></td><td> <b>Invest Money</b><br /> You may invest money. <br /> Investing will earn you double the money you invested.<br /> You can only make 5 investments.<br /> The maximum investment is $5,000,000.<form action='bank.php?action=invest' method='post'> Amount: <input type='text' name='invest' value='{$ir['bankmoney']}' /><br /> <input type='submit' value='Invest' /></form></td><td> <b>Get A loan</b><br /> Here you can get a loan from the bank.<br /> The maximum loan you can take out is $1,000,000.<br /> You have to pay back your loan with 25% interest.<form action='bank.php?action=getloan' method='post'> Amount: <input type ='text' name='getloan' value='{$ir['bankmoney']}' /><br /> <input type='submit' value='get a loan' /></form></td><td> <b>Repay your loan</b><br/> Here you can repay your loans.<br/> You currently have a loan of \$".number_format($ir['moneyowed']).".<form action='bank.php?action=repayloan' method='post'> <input type='text' name='repayloan' value'{$ir['money']}' /><br /> <input type='submit' value='repay loan' /></tr> </table>"; //Invest starts on 61!!! } 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."; } else { $fee=ceil($_POST['deposit']*15/100); if($fee > 3000) { $fee=3000; } $gain=$_POST['deposit']-$fee; $ir['bankmoney']+=$gain; $db->query("UPDATE users SET bankmoney=bankmoney+$gain, money=money-{$_POST['deposit']} where userid=$userid"); print "You hand over \${$_POST['deposit']} to be deposited, <br /> after the fee is taken (\$$fee), \$$gain is added to your account. <br /> <b>You now have \${$ir['bankmoney']} in the bank.</b><br /> <a href='bank.php'>> Back</a>"; //line 76. $_POST['deposit] is the amount deposited. //line 78. $ir['bankmoney'] gets players bank money info from db. } } 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."; } else //if not.... { $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, <br /> the banking lady grudgingly hands it over. <br /> <b>You now have \${$ir['bankmoney']} in the bank.</b><br /> <a href='bank.php'>> Back</a>"; } } function invest() { global $db,$ir,$c,$userid,$h; $_POST['invest']=abs((int) $_POST['invest']); if($_POST['invest'] > $ir['bankmoney']) { print "You do not have enough banked money to invest this amount."; } elseif($_POST['invest'] > 1000000) { print "You are trying to invest more than you are allowed."; } elseif($_POST['invest'] < 0) { print "Sorry, but you can't invest a negative amount."; } elseif($ir['investments'] > 5) { print "Sorry you have exceeded the maximum number of investments"; } else { $profit=ceil($_POST['invest']*2); $ir['bankmoney']+=$profit; $db-> query("UPDATE users SET investments=investments +1 where userid=$userid"); $db-> query("UPDATE users SET bankmoney=bankmoney-{$_POST['invest']}, bankmoney=bankmoney+$profit where userid=$userid"); print "you have invested \${$_POST['invest']}. The money made from this investment is $$profit. </b><br /> <b>You now have \${$ir['bankmoney']} in your bank.</b><br /> <a href='bank.php'>> Back</a>"; } } function getloan() { global $db,$ir,$c,$userid,$h; $_POST['getloan']=abs((int) $_POST['getloan']); if ($_POST['getloan'] > 5000000) { print "Sorry you are trying to loan more than you are allowed"; } elseif ($ir['moneyowed'] > 0) { print "You currently owe the bank \${$ir['moneyowed']}, You will be unable to make another loan until this one is paid off."; } else { $ir['bankmoney']+=($_POST['getloan']); $db-> query("UPDATE users SET bankmoney=bankmoney+{$_POST['getloan']} where userid=$userid"); $moneyowed=($_POST['getloan'])+($_POST['getloan'])*0.25; $db-> query("UPDATE users SET moneyowed=moneyowed+$moneyowed where userid=$userid"); print "You have loaned \${$_POST['getloan']} from the bank.<br /> <b>You now owe the bank \$$moneyowed.</b><br /> <b>You now have \${$ir['bankmoney']} in your bank.</b><br /> <a href='bank.php'>> back</a>"; } } function repayloan() { global $db,$ir,$c,$userid,$h; if ($ir['moneyowed'] < 0) { print "You currently don't owe the bank money."; } elseif (($_POST['repayloan']) > ($ir['moneyowed'])) { print "You are trying to repay more than you actually owe."; } elseif (($_POST['repayloan']) > ($ir['money'])) { print "You don't have enough money to repay this amount"; } else { $ir['moneyowed']-=($_POST['repayloan']); $db-> query("UPDATE users SET moneyowed=moneyowed-{$_POST['repayloan']} where userid=$userid"); $db-> query("UPDATE users SET money=money-{$_POST['repayloan']} where userid=$userid"); if ($ir['moneyowed'] > 0) { print "You have paid \${$_POST['repayloan']} towards your loan, you now owe the bank \${$ir['moneyowed']} <a href='bank.php'>> Back</a>"; } elseif (($_POST['repayloan']) == ($ir['moneyowed'])) { print "you have payed you loan off, you no longer owe the bank money.<br /> <a href='bank.php'>> Back</a>"; } } } $h->endpage(); ?>   Hope you all like it :) Please don't be harsh upon my coding this is my first mod and was created as a stepping stone in my learning. If someone could secure this I would be greatful :) Also you may notice I didn't add the JQuery Accordoin menu, this was simply because I couldn't get it sorted properly and was struggling to do it. I will try add the menu at a later date though. Also look out for the paid banking system coming such which will be much more advanced than this one. Thanks, Razor42
  17. Loans now done, Now working on the looks of the mod and seeing if i'm able to add a accordoin table.
  18. I'm finding it quite easy to work with to be honest and yes I shall add you on MSN and give you more detail upon the project on there.
  19. Investments now 100% coded! Moving onto the loan system now
  20. Yes they do give a daily interest.   Sounds like a nice idea, something I may look into :) and thank you.
  21. For this version no, but maybe in the future I will create a paid version where it could affect the financial economy but I feel I have more learning ahead of me to be able to do that yet.
  22. Yes, sounds interested, I think it has real potential, hope it goes well, I deffinatley will watching how this project goes.
  23. Sounds nice, will players be able to interactive with one an other?
  24. I am currently coding my first ever project! I have decided to re-code the current V2 banking system adding new features to it and also giving it a better design. The current ideas I have to add to the banking system are Loans & Investments. Currently the investments are 90% coded, just a slight problem with the limits within the amount of investments a player can make but should be sorted soon and also Loans are around 20% coded. Also im going too add a Jquery accordion menu to the bank to help improve the looks of the bank. I was just wondering if you had any other ideas that I could apply to the bank? This system may take me a while to code as I'v said it is my first ever thing I have coded so I am still learning along the way. This modification will be realsed for free once I have fully coded and tested with no bugs. Thanks, Razor42
×
×
  • Create New...