-
Posts
1,150 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Events
Everything posted by Script47
-
Loan System for Bank (ideas bounced around too)
Script47 replied to Script47's topic in Requests & In Production
Thanks for the feedback, and yeah, the multi's thing will be quite important to stomp down on cheaters. Currently the amount of money being borrowed has been set to 100,000 and your idea is quite a good on about the day's old of an account. -
Loan System for Bank (ideas bounced around too)
Script47 replied to Script47's topic in Requests & In Production
Sounds like a plan, can I use it as a guide maybe? If it's okay with you? -
So for my second mod, I am thinking about making a little loan system, the things it will include (hopefully :P): 1. Simple Loan/Repay system 2. If user hasn't paid money back he will be attacked by a "hitman" reason being not paying loan on time. Not sure how exactly this will work as in how many times he will be attacked or something until debt has been settled, so ideas will be helpful and welcome :) 3. This addition has not been thought through completely yet, so the current loan limit will be set to $100,000, but if the user gets a loan lets say greater than 50000 or 75000 and pays it back and does that 4-5 times maximum loan will increase to $150,000 - 200,000 but if user fails to pay back loan the limit will decrease. So these are my ideas so far, I have started it already, tell me what you think of the idea and any possible changes or things you want to see added in to it. :)
-
Great mod dude :)
-
If anyone is currently using this, some feedback would be useful also maybe what you may like to see in the future :p
-
Completely forgot sorry lol, will add to main SQL code ;)
-
Fixed, thanks for the heads up :P
-
Hi, I have created this mod with the help of Magictallguy - who checked and revamped the code (much appreciated mate :D) and Lord Kernow - who allowed me to put this on his game Check it out here! This is my first mod and I was pleased with it, so I hope all of you like it as much as I did. So I have been apart this community for a while now and have always wanted to put something back in to it as it has given me so much, I never had the chance to until MTG pushed me and told me to get stuck in to it right away so with him helping me and LK's site I had everything I needed, so I realised that in V2 they don't have a bug report's area so I decided to start coding that, so finally It's ready and would love to hear what you all think about it, as your constructive criticism will help me If I do decide to create more mods. The php code: <?php include(__DIR__ . '/globals.php'); /* Designed and developed by Magictallguy and Script47, a team effort. The code here (named "Bug Report Centre") is provided "as is" with no warranty or gurantee of safety to existing code. Bug Report Centre has been fully tested and is found to work as intended. Bug Report Centre is released freely under the GNU License. Feel free to modify as you wish, as long as this comment block remains and remains untouched. */ ?><span style='font-size:2em;'>Spotted a bug?</span><br /><a href="breport.php?act=add">Report it here!</a><br /><br /><? if($ir['user_level'] > 1) { echo ' · <a href="breport.php?act=edit"><img src="images/bugimage.png " title="Change bug status" /></a> · <a href="breport.php?act=del"><img src="/images/deletebug.png" title="Delete bugs" /></a> ·<br /><br /> '; } $_GET['act'] = isset($_GET['act']) && ctype_alpha($_GET['act']) ? strtolower(trim($_GET['act'])) : null; switch($_GET['act']) { case 'add': addBug(); break; case 'edit': editBug(); break; case 'del': deleteBug(); break; default: bugIndex(); break; } function bugIndex() { global $db; $bugStatusBar = array( 1 => "<span style='color:#AF4035;' >Queued</span>", 2 => "<span style='color:#BAAF07;'>Pending</span>", 3 => "<span style='color:#79A888;'>Fixed</span>", 4 => "<span style='color:#555555;'>Not a Bug</span>" ); $showcurrentbugs = $db->query("SELECT * FROM `breports`"); echo '<table border="1"> <tr> <th>Basic Bug Information</th> <th>Main Error Details</th> <th>Bug Status</th> </tr>'; while($row = $db->fetch_row($showcurrentbugs)) { echo '<tr>'; echo '<td>Bug I.D: ',stripslashes(htmlentities($row['id'])),'<br /><br />Page Where Bug is Located: ',stripslashes(htmlentities($row['title'])),'<br /><br />Bug Type: ',stripslashes(htmlentities($row['bugtype'])),'</td>'; echo '<td>',stripslashes(htmlentities($row['bugdetail'])),'</td>'; echo '<td>'.$bugStatusBar[$row['bstatus']].'</td>'; echo '</tr>'; } echo '</table>'; } function addBug() { global $db, $ir, $h; if(isset($_POST['submit'])) { $_POST['title'] = isset($_POST['title']) && is_string($_POST['title']) ? trim($_POST['title']) : null; if(empty($_POST['title'])) { echo "You didn't enter a valid title"; $h->endpage(); exit; } $_POST['bugtype'] = isset($_POST['bugtype']) && is_string($_POST['bugtype']) ? trim($_POST['bugtype']) : null; if(empty($_POST['bugtype'])) { echo "You didn't enter a valid bug type"; $h->endpage(); exit; } $_POST['bugdetail'] = isset($_POST['bugdetail']) && is_string($_POST['bugdetail']) ? trim($_POST['bugdetail']) : null; if(empty($_POST['bugdetail'])) { echo "You didn't enter a valid bug detail"; $h->endpage(); exit; } $db->query(sprintf("INSERT INTO `breports` (`buser`, `title`, `bugtype`, `bugdetail`) VALUES (%u, '%s', '%s', '%s')", $ir['userid'], $db->escape($_POST['bugtitle']), $db->escape($_POST['bugtype']), $db->escape($_POST['bugdetail']))); echo 'Report processed, thank you for you time.<br /><a href="breport.php">Go Back</a>'; } else { ?><form action='breport.php?act=add' method='post'> <table class='table' width='75%' cellspacing='1'> <tr> <th width='45%'>Title</th> <td width='55%'><input type='text' name='title' /></td> </tr> <tr> <th>Type</th> <td><select name='bugtype' type='dropdown'> <option value='query'>Query Error</option> <option value='page'>Page Error</option> <option value='other'>Other</option> </select></td> </tr> <tr> <th>Details</th> <td><textarea name='bugdetail' rows='10' cols='70' placeholder='Please enter as much detail about how you got this bug; what you were doing, the exact page name (the URL), etc. The more precise you are about this bug, the faster it can be fixed'></textarea></td> </tr> <tr> <td colspan='2' class='center'><input type='submit' name='submit' value='Submit your Bug Report' /></td> </tr> </table> </form><? } } function editBug() { global $db, $ir; if($ir['user_level'] < 2) { echo "You don't have access to this"; $h->endpage(); exit; } if(!isset($_POST['submit'])) { ?><form action='breport.php?act=edit' method='post'> <table class='table' width='75%' cellspacing='1'> <tr> <th width='45%'>Which Bug</th> <td width='55%'><select name='bugID' type='dropdown'><? $select = $db->query("SELECT `id`, `title` FROM `breports` WHERE (`bstatus` NOT IN(3, 4)) ORDER BY `title` ASC"); while($row = $db->fetch_row($select)) { printf("<option value='%u'>%s</option>", $row['id'], stripslashes(htmlspecialchars($row['title']))); } ?></select></td> </tr> <tr> <th>Status</th> <td><select name='bstatus' type='dropdown'> <option value='1' selected>Queued</option> <option value='2'>Pending</option> <option value='3'>Fixed</option> <option value='4'>Not a Bug</option> </select></td> </tr> <tr> <td colspan='2' class='center'><input type='submit' name='submit' value='Submit Changes' /></td> </tr> </table> </form><? } else { $_POST['bstatus'] = isset($_POST['bstatus']) && ctype_digit($_POST['bstatus']) && in_array($_POST['bstatus'], array(1, 2, 3, 4)) ? abs(@intval($_POST['bstatus'])) : null; if(empty($_POST['bstatus'])) { echo "You didn't select a valid status"; $h->endpage(); exit; } $_POST['bugID'] = isset($_POST['bugID']) && ctype_digit($_POST['bugID']) ? abs(@intval($_POST['bugID'])) : null; if(empty($_POST['bugID'])) { echo "You didn't select a valid bug"; $h->endpage(); exit; } $select = $db->query(sprintf("SELECT `title` FROM `breports` WHERE (`id` = %u)", $_POST['bugID'])); if(!$db->num_rows($select)) { echo "That bug doesn't exist"; $h->endpage(); exit; } $db->query(sprintf("UPDATE `breports` SET `bstatus` = %u WHERE (`id` = %u)", $_POST['bstatus'], $_POST['bugID'])); stafflog_add("Updated the status of bug ID ".$_POST['bugID']." (".$db->fetch_single($select).")"); echo $db->fetch_single($select)." has been edited.<br /><a href='breport.php'>Back</a>"; } } function deleteBug() { global $db, $ir; if($ir['user_level'] < 2) { echo "You don't have access to this"; $h->endpage(); exit; } ?><h3>WARNING</h3><br />Once you delete a bug, that's it. There is no going back<br /><? if(!isset($_POST['submit'])) { ?><form action='breport.php?act=del' method='post'> <table class='table' width='75%' cellspacing='1'> <tr> <th width='45%'>Which Bug</th> <td width='55%'><select name='bugID' type='dropdown'><? $select = $db->query("SELECT `id`, `title` FROM `breports` WHERE (`bstatus` NOT IN(3, 4)) ORDER BY `title` ASC"); while($row = $db->fetch_row($select)) { printf("<option value='%u'>%s</option>", $row['id'], stripslashes(htmlspecialchars($row['title']))); } ?></select></td> </tr> <tr> <td colspan='2' class='center'><input type='submit' name='submit' value='Delete bug' /></td> </tr> </table> </form><? } else { $_POST['bugID'] = isset($_POST['bugID']) && ctype_digit($_POST['bugID']) ? abs(@intval($_POST['bugID'])) : null; if(empty($_POST['bugID'])) { echo "You didn't select a valid bug"; $h->endpage(); exit; } $select = $db->query(sprintf("SELECT `title` FROM `breports` WHERE (`id` = %u)", $_POST['bugID'])); if(!$db->num_rows($select)) { echo "That bug doesn't exist"; $h->endage(); exit; } $db->query(sprintf("DELETE FROM `breports` WHERE (`id` = %u)", $_POST['bugID'])); stafflog_add("Deleted the bug report named: ".$db->fetch_single($select)); echo $db->fetch_single($select)." has been deleted<br /><a href='breport.php'>Back</a>"; } } $h->endpage(); ?> SQL code: CREATE TABLE `breports` ( `id` INT AUTO_INCREMENT PRIMARY KEY NOT NULL, `title` VARCHAR( 25 ), `bugtype` VARCHAR( 25 ), `bugdetail` VARCHAR( 255 ), `bstatus` INT( 11 ) NOT NULL DEFAULT 1, `buser` INT( 11 ) NOT NULL DEFAULT 0 ); I would like to thank you all in advance for any feedback and hope you like this small mod, and another big thanks so Magictallguy and LK who have helped me so much (many thanks guys!) :)
-
Are you currently developing any kind of game?
Script47 replied to Dominion's topic in Question of the day
I'm making mods if that count :p -
Oh it's that wretched switch again, do it now!
-
lol you will get my vote :D but on a serious note, it is very dead now... :( Agreed, ab should take it over as he personally I feel is one admin who is on mostly.
-
Ah right, thanks, thought so as it didn't work at the begin of the week! :) Thanks anyway
-
I'm just wondering if it's just me or is it other people, but the chat doesn't work.
-
Who doesn't know Nickson?! :)
-
A render while trying some of the new features of Modo 701
Script47 replied to a_bertrand's topic in Art and Content
Yep, the wood look's a lot better, and the grass has the essence of realism. :) Great job! -
Great share thanks, very useful :)
-
First try that, if no luck then check the page script that it's showing on and see if it's there.
-
I tried it once, but never again. :)
-
Title say's it all :)
-
Yep, it is MCCodes and the person has just customised this site a lot! :)
-
You could just download it and test it? Just saying. :) http://dev.mysql.com/get/Downloads/Contrib/mysqli_converter/mysqli_converter-1.0.zip/from/pick
-
I think it is, I'm not a pro at MCCodes, but I asked a few senior's and they said yep!:)
-
Just sit down, and do your research lol then you will know exactly how much budget you require and what you need! :D
-
Yeah sure, I was honestly just wondering, it's just struck me and I was wondering if I could, thanks for the reply:)
-
I've got a simple MySQL code, which takes inputted information then put's it in to a table, I was wondering if I could do that but put the MySQL code in a different file then use the include function to call it up in my php file. If I can should I do it or is there no need?