Jump to content
MakeWebGames

Mystical

Members
  • Posts

    266
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mystical

  1. This is the formula. ((WILL*0.8)/2.5)+(LEVEL/4) ---------------------------- ((WILL*0.8)/2.5) This formula decides how the user's will affects their crimes success rate. Lets show a few examples. Example 1a. ((WILL*0.7)/17) User's will: 100 You start by running the functions in the parentheses. So it would end up being: ((70)/17) After that you just run the formula 70/17 Which Equals: 4.1176470588235294117647058823529 So using that formula on a user with 100 will would give them a 4.1176470588235294117647058823529% chance of the user succeeding. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example 2a. ((WILL*0.4)/39) User's will: 531 You start by running the functions in the parentheses. So it would end up being: ((212.4)/39) After that you just run the formula 212.4/39 Which Equals: 5.4461538461538461538461538461538 So using that formula on a user with 531 will would give them a 5.4461538461538461538461538461538% chance of the user succeeding. ----------------------------- (LEVEL/4) This pretty much explains itself. This formula decides how the user's level affects a user's chance of succeeding a crime. Lets show a few more examples. Example 1b. (LEVEL/21) User's level: 51 Basically all you would be doing is: 51/21 So just run the formula which equals: 2.4285714285714285714285714285714 So if this was the only formula the user would have a 2.4285714285714285714285714285714% chance of succeeding. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example 2b. (LEVEL/54) User's level: 98 As the other formula goes: 98/54 So that would equal: 1.8148148148148148148148148148148 If that was the only formula the user would have a 1.8148148148148148148148148148148% chance of succeeding. ----------------------------- Now we combine the formulas... ----------------------------- Formula 1 Example 1a+example 1b 4.1176470588235294117647058823529+2.4285714285714285714285714285714=6.546218487394957983193277310923 So by combining the 2 formulas with each-other the chance of succeeding the crime is 6.546218487394957983193277310923%. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formula 2 Example 2a+example 2b 4.1176470588235294117647058823529+1.8148148148148148148148148148148=5.932461873638344226579520697166 So by combining the 2 formulas with each-other the chance of succeeding the crime is 5.932461873638344226579520697166%.     Please note : You can also use html codes in crime texts , initial , success failure etc eg : If you want result to show in red use that color code with text in the result form.
  2. After the police officer behind the desk quits laughing he will probably ask you what the hell is css. I had to...... Sorry.
  3. $70.00 from me Peter. Nice template!
  4. Already contacted my webhost and they say it is not a problem with the server.... All permissions are correct also. I also have a test site on another server and it is the same way which leads me to believe it is a problem somewhere in the script itself. Anyone else have any ideas?
  5. Permission to file is set at 644 and there is no directory to display pics as they are externally hosted. File in question.   <?php include_once "globals.php"; switch($_GET['action']) { case 'sexchange2': do_sex_change(); break; case 'sexchange': conf_sex_change(); break; case 'passchange2': do_pass_change(); break; case 'passchange': pass_change(); break; case 'namechange2': do_name_change(); break; case 'namechange': name_change(); break; case 'picchange2': do_pic_change(); break; case 'picchange': pic_change(); break; case 'forumchange2': do_forum_change(); break; case 'forumchange': forum_change(); break; default: prefs_home(); break; } function prefs_home() { global $db,$ir,$c,$userid,$h; echo " <h3>Preferences</h3> <a href='preferences.php?action=sexchange'>Sex Change</a><br /> <a href='preferences.php?action=passchange'>Password Change</a><br /> <a href='preferences.php?action=namechange'>Name Change</a><br /> <a href='preferences.php?action=picchange'>Display Pic Change</a><br /> <a href='preferences.php?action=forumchange'>Forum Info Change</a><br /> "; } function conf_sex_change() { global $ir,$c,$userid,$h; if($ir['gender'] == "Male") { $g="Female"; } else { $g="Male"; } echo " Are you sure you want to become a $g? <br /> <a href='preferences.php?action=sexchange2'>Yes</a> | <a href='preferences.php'>No</a> "; } function do_sex_change() { global $db,$ir,$c,$userid,$h; $g = ($ir['gender'] == "Female")?'Male':'Female'; $db->query("UPDATE `users` SET `gender` = '$g' WHERE `userid` = $userid"); echo " Success, you are now $g!<br /> <a href='preferences.php'>Back</a> "; } function pass_change() { global $ir,$c,$userid,$h; echo " <h3>Password Change</h3> <form action='preferences.php?action=passchange2' method='post'> Current Password: <input type='password' name='oldpw' /><br /> New Password: <input type='password' name='newpw' /><br /> Confirm: <input type='password' name='newpw2' /><br /> <input type='submit' value='Change PW' /> </form> "; } function do_pass_change() { global $db,$ir,$c,$userid,$h; if ( md5($_POST['oldpw']) != $ir['userpass'] ) { echo " The current password you entered was wrong.<br /> <a href='preferences.php?action=passchange'>> Back</a> "; } else if ( $_POST['newpw'] !== $_POST['newpw2'] ) { echo "The new passwords you entered did not match!<br /> <a href='preferences.php?action=passchange'>> Back</a>"; } else { $db->query('UPDATE `users` SET `userpass` = "'.md5($_POST['newpw']).'" WHERE `userid` = '.$userid); echo "Password changed!<br />&gt <a href='preferences.php'>Go Back</a>"; } } function name_change() { global $ir,$c,$userid,$h; echo " <h3>Name Change</h3> Please note that you still use the same name to login, this procedure simply changes the name that is displayed. <form action='preferences.php?action=namechange2' method='post'> New Name: <input type='text' name='newname' /> <br /> <input type='submit' value='Change Name' /> </form> "; } function do_name_change() { global $db,$ir,$c,$userid,$h; $_POST['newname'] = ( isset($_POST['newname']) && is_string($_POST['newname']) ) ? $_POST['newname'] : '' ; if ( empty($_POST['newname']) ) { echo ' You did not enter a new username.<br /> > <a href="preferences.php?action=namechange">Back</a> '; die($h->endpage()); } elseif ( ((strlen($_POST['newname'])>32)OR(strlen($_POST['newname'])<3)) ) { echo ' Usernames can only be a max of 32 characters or a min of 3 characters.<br /> > <a href="preferences.php?action=namechange">Back</a> '; die($h->endpage()); } if ( !preg_match("/^[a-z0-9_]+([\\s]{1}[a-z0-9_]|[a-z0-9_])+$/i", $_POST['newname']) ) { echo ' Your username can only consist of Numbers, Letters, underscores and spaces.<br /> > <a href="preferences.php?action=namechange">Back</a> '; die($h->endpage()); } if ( empty($_POST['newname']) ) { echo ' You did not enter a new name.<br /> > <a href="preferences.php?action=namechange">Back</a> '; } else { $check_ex = $db->query('SELECT `userid` FROM `users` WHERE `username` = "'.$_POST['newname'].'"'); if ( $db->num_rows($check_ex) > 0 ) { echo ' This username is already in use.<br /> > <a href="">Back</a> '; die($h->endpage()); } $_POST['newname'] = addslashes(htmlentities($_POST['newname'], ENT_QUOTES)); $db->query("UPDATE `users` SET `username`='{$_POST['newname']}' WHERE `userid` = $userid"); echo "Username changed!"; } } function pic_change() { global $ir,$c,$userid,$h; echo " <h3>Pic Change</h3> Please note that this must be externally hosted, <a href='http://www.photobucket.com'>Photobucket</a> is our recommendation. <br /> Any images that are not 150x150 will be automatically resized <form action='preferences.php?action=picchange2' method='post'> New Pic: <input type='text' name='newpic' value='{$ir['display_pic']}' /> <br /> <input type='submit' value='Change Picture' /> </form> "; } function do_pic_change() { global $db,$ir,$c,$userid,$h; $_POST['newpic'] = ( isset($_POST['newpic']) && is_string($_POST['newpic']) ) ? $_POST['newpic'] : '' ; if ( empty($_POST['newpic']) ) { echo ' You did not enter a new pic.<br /> > <a href="preferences.php?action=picchange">Back</a> '; } else { $image = (@getimagesize($_POST['newpic'])); if ( !is_array($image) ) { echo 'Invalid Image.<br />> <a href="preferences.php?action=picchange">Go Back</a>'; die($h->endpage()); } echo $_POST['newpic'].'<br />'; $db->query('UPDATE `users` SET `display_pic` = "'.$_POST['newpic'].'" WHERE `userid` = '.$userid); echo 'Pic changed!<br />> <a href="index.php">Go Home</a>'; } } function forum_change() { global $ir,$c,$userid,$h; echo " <h3>Forum Info Change</h3> Please note that the avatar must be externally hosted, <a href='http://www.photobucket.com'>Photobucket</a> is our recommendation. <br /> Any avatars that are not 150x150 will be automatically resized <form action='preferences.php?action=forumchange2' method='post'> Avatar: <input type='text' name='forums_avatar' value='{$ir['forums_avatar']}' /> <br /> Signature (you may use BBcode): <textarea rows=10 cols=50 name='forums_signature'>{$ir['forums_signature']}</textarea> <br /> <input type='submit' value='Change Info' /> </form> "; } function do_forum_change() { global $db,$ir,$c,$userid,$h; $_POST['forums_avatar'] = ( isset($_POST['forums_avatar']) && is_string($_POST['forums_avatar']) ) ? $_POST['forums_avatar'] : '' ; $image = (@getimagesize($_POST['forums_avatar'])); $_POST['forums_signature'] = strip_tags($db->escape($_POST['forums_signature'])); if ( !is_array($image) ) { echo 'Invalid Image.<br />> <a href="preferences.php?action=forumchange">Go Back</a>'; die($h->endpage()); } if ( strlen($_POST['forums_signature']) > 250 ) { echo 'You may only have a forums signature consisting of 250 characters or less.<br />> <a href="preferences.php?action=forumchange">Go Back</a>'; die($h->endpage()); } $db->query("UPDATE `users` SET `forums_avatar` = '{$_POST['forums_avatar']}', `forums_signature` = '{$_POST['forums_signature']}' WHERE `userid` = $userid"); echo 'Forum Info changed!<br />> <a href="index.php">Go Home</a>'; } $h->endpage(); ?>
  6. Something in preferences.php is not working. v2.03 I did a fresh install and when I try to change the user display pic I get this error. Forbidden You don't have permission to access /preferences.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Not an htaccess problem either. The same for forum display pic.... Any help would be appreciated. Been here all morning trying to figure it out with no luck.
  7. Don't do it! It is rpgbunny and it is total crap. More bugs than a Texas hooker.
  8. Thanks for the input Dave. Much appreciated.
  9. Is this chat room software worth 5 dollars? http://www.tufat.com/s_flash_chat_chatroom.htm Looks kind of nice but how hard do you think it would be to integrate into an mccodes game? Keeping in mind that I suck at this coding stuff...
  10. Trying to learn but I am an old dude and this stuff spins my head like a freekin owl. Any help would be appreciated and you can exclude the link to php school as I already have it.... I am trying to learn but I gotta say it is slow going. Here is the code. <?php include("config.php"); mysql_connect('localhost',$_CONFIG['username'],$_CONFIG['password']); mysql_select_db($_CONFIG['database']); if($_POST['email']) { $_POST['email'] = htmlentities($_POST['email']); $_POST['username'] = htmlentities($_POST['username']); if($_GET['username']) { $search_users = mysql_query("SELECT * FROM users WHERE login_name='".$_POST['username']."'") or die(mysql_error()); if(mysql_num_rows($search_users) == 0) { echo 'There is no user\'s with that login name.'; exit; } } $search_email = mysql_query ("SELECT * FROM users WHERE email='".$_POST['email']."'") or die(mysql_error()); if(mysql_num_rows($search_email) == 0) { echo 'No user\'s with this email.'; exit; } $password = rand(10000,20000); $fetch_data = mysql_fetch_assoc($search_email); $username = $fetch_data['username']; $body = "Mob Corruption Password Reset\n\nYour password is: ".$password."\nYour login name is: ".$fetch_data['login_name']."\n\nPlease login at http://www.yourdomain.com. Enjoy\n\nYour's sincerly Mob Corruption Staff."; $subject = "Your Forgotten Password"; $email = $fetch_data['email']; $from = "From: Mob Corruption <[email protected]>"; mail($email, $subject, $body, $from); mysql_query("UPDATE users SET userpass='".md5($password)."' WHERE login_name='".$_POST['username']."' AND email='".$_POST['email']."'") or die(mysql_error()); echo '<body style="color: rgb(0, 0, 0); background-color: rgb(153, 153, 153);" alink="#000099" link="#000099" vlink="#990099"> <div style="text-align: center;"><br> <br> <br> <br> <br> <big style="color: rgb(51, 255, 51);"><big><big><big><span style="font-weight: bold;">Success!</span></big></big></big></big><br> <br> <br> <big><big><span style="font-weight: bold;">Your new password has been sent! Please be sure to check your spam box also.</span></big><br style="font-weight: bold;"> <span style="color: rgb(255, 0, 0);font-weight: bold;"><br> <big>Dont forget to change your password on the preferences page after you log in!</big></span><br style="font-weight: bold;"> </big><br> <br> <br> <br> </div> </body> '; exit; } echo '<body style="color: rgb(0, 0, 0); background-color: rgb(153, 153, 153);" alink="#000099" link="#000099" vlink="#990099"> <div style="text-align: center;"><br> <br> <br> <big><big><big><b>So...You Forgot Your Password?</b></big></big></big> <br /> <br /> <img src="images/scratchhead.gif"/><br /><br /> Good thing this pissed off little yellow dude is here!<br /><br /> <big><big><span style="font-weight: bold;">Mob Corruption Password Reset</span></big></big><br><br> (Formerly known as : I forgot my damn password can you send me a new one?)<br> <br> <span style="font-weight: bold;">Enter the e-mail address you signed up with and your login name and we will send you a new one</span><br> <span style="color: rgb(204, 0, 0);font-weight: bold;"><br> Be sure to change your password on the preferences page after you log in!</span><br> <br> <form action="?act=FPass" method="post"><span style="font-weight: bold;"> Email: </span><input name="email" type="text"> <span style="font-weight: bold;">Login Name:</span> <input name="username" type="text"><br> <br> <input value="Submit" type="submit"> </form> </div> </body> '; ?>
  11. XBLGT : MooseChops Play : Call of Duty Black Ops Call of Duty MW2 Call of Duty MW Call of Duty WAW Homefront Halo Reach Beta testing Gears of War 3 All Battlefield games and a bunch of others.
  12. Checked it out. Left in about 2 minutes. That blue dude at the bottom is scary bro. No offense intended but not much to keep anyone interested for more than a minute or two. Needs a story and some sort of an explanation of what it is your supposed to be doing. I felt like a hamster on a wheel going round and round with no where to go.
  13. Wee Librarian or one legged hooker
  14. I see a lot of posts on here that say if you use too many different types of fonts on one web page you are considered a newb. I do not understand that statement at all. I have visited a ton of other games and some use the same font for everything. Myself personally, I think using the same font on every page is boring as hell. Not that I am knocking any ones site because I am not. Where on the internet does it say that if you use several different fonts on a web site make you a newb? I can't find it. Wouldn't that be personal preference? I myself use a bunch of different fonts on my site that is in development and to me it looks really nice with a bunch of different fonts. It sure makes it a lot less same old same old with every page looking the same. Would like to hear other peoples input on this subject. Now I am going to put on my flak jacket and my helmet and wait for replies...
  15. Worked like a charm! Thanks a bunch for showing me how to fix it. Appreciated. rulerofzu told me that but I dont know a whole lot about this stuff yet. I am just starting to learn. Thanks again.
  16.   Still cant figure it out because your talking to a moron when it comes to coding. I also found another error in the same file. When you go to staff list clicking on the links secretary assistant or member will get you this message: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Query was SELECT `userid` FROM `users` WHERE `userid` =
  17. I noticed this error too but unfortunately your fix does not work. I still get the same error Error: This script requires an action. Any other idea on how to fix this error? I did do a test by changing the two functions with the old ones in v2.0.2c and it worked like a charm but kind of defeats the purpose of the added security in v 2.0.3.
  18. That is exactly what the link looks like <a href='staff_special.php?action=userlevelform'>Adjust User Level</a><br />. When I change those functions to the old version in 2.0.2c it works like a charm so it must be something in the way the one of the two functions are coded in the new version 2.0.3.
  19. Site looks good. Only one thing is bothering me... You spelled archive wrong. Looking forward to seeing your site completed.
  20. Here is the part in question and thanks! function userlevel() { global $db,$ir,$c,$h,$userid; $_GET['level'] = ( isset($_GET['level'])&&in_array($_POST['level'], array(1,2,3,4,5)) )?abs(intval($_GET['level'])):1; $_GET['ID'] = ( isset($_GET['ID'])&&is_numeric($_GET['ID']) )?abs(intval($_GET['ID'])):''; $d = $db->query('SELECT `userid` FROM `users` WHERE `userid` = '.$_POST['ID']); if ( $db->num_rows($d) == 0 ) { echo 'Invalid user.<br />> <a href="staff_special.php?action=userlevelform">Go Home</a>'; die($h->endpage()); } $db->query("UPDATE `users` SET `user_level` = {$_GET['level']} WHERE `userid` = {$_GET['ID']}"); stafflog_add('Adjusted user ID '.$_GET['ID'].'\'s staff status.'); echo 'User\'s level adjusted.<br />> <a href="staff.php">Go Home</a>'; die($h->endpage()); } function userlevelform() { global $db,$ir,$c,$h,$userid; echo " <h3>User Level Adjust</h3> <form action='staff_special.php?action=userlevel' method='get'> User: ".user_dropdown($c,'ID')." <br /> User Level: <br /> <input type='radio' name='level' value='1' /> Member <br /> <input type='radio' name='level' value='2' /> Admin <br /> <input type='radio' name='level' value='3' /> Secretary <br /> <input type='radio' name='level' value='4' /> IRC Op <br /> <input type='radio' name='level' value='5' /> Assistant <br /> <input type='submit' value='Adjust' /> </form>
  21. I found this pretty nice slideshow that I am going to use for my screenshots. Just wondering if anyone would like me to upload the files so who ever wants to use it can. It is pretty simple to set up and it looks kind of nice. If anyone is interested let me know and I will add it to this post. The screen shot of what it looks like follows but be warned it is a screenshot of my brothel and such with a half naked chick.... http://tinypic.com/r/2qvtjyf/7 Files added. I added both a zip file or a winrar file. Both files are identical. I just added both because some people don't have winzip and some people don't have winrar. All you have to do is upload the entire folder to your website and link to the html file in the folder. You will also need to create your own screenshots and replace mine inside the thumbnails folder and the photos folder. I used screengrab for my screenshots...a firefox addon. You can also put your own text that comes up when the pic is displayed like the text that is at the bottom of the pic in my screenshot by altering the text inside the html file for each pic you add. Enjoy. Both files are the same. http://hotfile.com/dl/114402834/4727b50/screenshots.rar.html http://hotfile.com/dl/114402945/e8d5391/screenshots.zip.html
  22. You could also just add a menu at the top like this.......
  23. A sticky thread with all the reported bugs and fixes for v2.0.3. It would probably be useful. Just a thought.
  24. There is an error in staff_special.php for v2.0.3. When I try to update a users level I get this message. Error: This script requires an action. I saw Illusions fix in another thread but after I added the fix I still get the exact same error. Any help would be appreciated.
  25. I did not change permissions. They are all the same. I even emptied my .htaccess file just in case but it still does not work. I get the same error. Scratch that! You were correct! My htaccess file was to blame. I just forgot to clear my cache before I tried it again. Thanks for showing me the way. Appreciated.
×
×
  • Create New...