
fbiss
Members-
Posts
148 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by fbiss
-
Re: [Free] [v1] Profile Image Uploader Thats a old version of this mod.. the mod in the Isomerizer's first post is the newest updated version
-
Re: exp_needed or something!? do you have v2?
-
Re: exp_needed or something!? there is no exp_needed in the users table. in v2, this is defined in the global_func.php: $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2);
-
Re: i wonder if anyone can help ? level 100+ buy a car if($ir['level'] < 100 ) { print "You need to be at least level 100 before you can buy a car"; $h->endpage(); exit; } location to buy pets (change the 2 to the city id of medevil zone): if($ir['location'] != '2') { print "You must be in the medevil zone location to buy a pet"; $h->endpage(); exit; }
-
Anyone know if using the LEAST() function would speed up the 5 mins cron time? since it would reduce the number of querys? from: $query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave "; $query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave"; $query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp"; $query4="UPDATE users SET hp=maxhp WHERE hp>maxhp"; $db->query($query); $db->query($query2); $db->query($query3); $db->query($query4); to: $query="UPDATE users SET brave=LEAST((brave+((maxbrave/10)+0.5)),maxbrave) WHERE brave<maxbrave "; $query2="UPDATE users SET hp=LEAST((hp+(maxhp/3)),maxhp) WHERE hp<maxhp"; $db->query($query); $db->query($query2);
-
[V2] Reward the active. - Punish the inactive.
fbiss replied to Ragnar's topic in Free Modifications
Re: [V2] Reward the active. - Punish the inactive. I didn't say they wheren't good mods, because they are. :-) I was just showing a differnt way to do this for those who didnt want to add another field to users. I have had the no interest after 5 days on my beta game for a couple weeks now using the unix timestamp, so i know it works. I was just wondering if anybody had any experiences where using the timestamp was a bad idea. I'm wondering if doing the extra calculation will slow the cron down at all if you have a large user base. -
[V2] Reward the active. - Punish the inactive.
fbiss replied to Ragnar's topic in Free Modifications
Re: [V2] Reward the active. - Punish the inactive. instead of adding the daysinactive field to the users table, and modifying your authenticate.php couldn't you use the already excisting laston field? for example 5 days $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0 AND laston>unix_timestamp()-432000"); does anyone know any downsides to using this method instead? -
Re: customizing part of attack v2 problem I think this might be what you are trying to do $strtest = $odata['strength'] * .75; $agilitytest = $ir['agility'] > $odata['agility'] * 100; $guardtest = $odata['guard'] * .75; if ($youdata['strength'] > $strtest) { print "you passed the strength test "; if ($ir['agility'] > $agilitytest) { print "you passed the agility test "; if ($youdata['guard'] > $guardtest) { $mydamage = $odata['hp']; print "You Instantly killed them "; } } }
-
[mccode] Reset your users without deleating them
fbiss replied to Redeye's topic in Free Modifications
Re: [v1 & v2]Reset your users without deleating them Why you using so many querys? you can shrink that to 3 querys for example for users you can do something like: mysql_query("UPDATE users SET money=100000,level=1,exp=0,crystals=100,job=0,location=1", $c) or die(mysql_error()); etc. -
Re: Monorail This should work for ya $eon = mysql_fetch_array($db->query("SELECT * FROM cities WHERE cityid = '{$ir['location']}'")); echo "{$eon['cityname']}";
-
Re: Flash Login [$20] And you also possibly block users with computers or mobile devices that have flash disabled.
-
Re: OC Crimes exactly, if you want something differnt you have to change that.
-
Re: OC Crimes It should be in your hourly cron
-
Re: Bank.php thats actually becauce u took the Query out to update your bank from -1 to 0, so really you still dont have a account. try this <?php include "globals.php"; print "<h3>Bank</h3>"; if($ir['bankmoney']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { print "Congratulations, you opened your free bank account! [url='bank.php']Start using my account[/url]"; $db->query("UPDATE users SET bankmoney=0 WHERE userid=$userid"); } else { print "Open a free bank account today! [url='bank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $db, $ir,$c,$userid,$h; print "\n[b]You currently have \${$ir['bankmoney']} in the bank.[/b] At the end of each day, your bank balance will go up by 2%. <table width='100%' cellspacing=1 class='table'> <tr> <td width='50%'>[b]Deposit Money[/b] 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']}' /> <input type='submit' value='Deposit' /></form></td> <td> [b]Withdraw Money[/b] There is no fee on withdrawals.<form action='bank.php?action=withdraw' method='post'> Amount: <input type='text' name='withdraw' value='{$ir['bankmoney']}' /> <input type='submit' value='Withdraw' /></form></td> </tr> </table>"; } function deposit() { global $db,$ir,$c,$userid,$h; $check = ( strpos($_POST[' deposit'],'<script>') || strpos($_POST['deposit'],'<script/>') || strrchr($_POST['deposit'],'>') || strrchr($_POST['deposit'],'<') || strrchr($_POST['deposit'],'{') || strrchr($_POST['deposit'],'}') || strrchr($_POST['deposit'],'/') || strrchr($_POST['deposit'],'<?') || strrchr($_POST['deposit'],';')); if($check===true){ $message = htmlentities($_POST['deposit'], ENT_QUOTES); event_add(1, "{$ir['username']} [$userid] Possibly Tried SQL Injecting Thebr /> [b]message post error/b> Message:- $deposit",$c); die (" <h4> PAGE ERROR -- Illeagal Entry! </h4> You`re Input Contains An Illegal String, A Copy Of What You Entered Has Been Sent To Admin For Evaluation. Please Start Again And Only Enter Valid Characters.... Thank you. [url='bank.php'] Back [/url]"); $h->endpage(); exit; } $_POST['deposit']=abs($_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, after the fee is taken (\$$fee), \$$gain is added to your account. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } function withdraw() { global $db,$ir,$c,$userid,$h; $check = ( strpos($_POST[' withdraw'],'<script>') || strpos($_POST['withdraw'],'<script/>') || strrchr($_POST['withdraw'],'>') || strrchr($_POST['withdraw'],'<') || strrchr($_POST['withdraw'],'{') || strrchr($_POST['withdraw'],'}') || strrchr($_POST['withdraw'],'/') || strrchr($_POST['withdraw'],'<?') || strrchr($_POST['withdraw'],';')); if($check===true){ $message = htmlentities($_POST['withdraw'], ENT_QUOTES); event_add(1, "{$ir['username']} [$userid] Possibly Tried SQL Injecting There /> [b]message post error/b> Message:- $withdraw",$c); die (" <h4> PAGE ERROR -- Illeagal Entry! </h4> You`re Input Contains An Illegal String, A Copy Of What You Entered Has Been Sent To Admin For Evaluation. Please Start Again And Only Enter Valid Characters.... Thank you. [url='bank.php'] Back [/url]"); $h->endpage(); exit; } $_POST['withdraw']=abs($_POST['withdraw']); if($_POST['withdraw'] > $ir['bankmoney']) { print "You do not have enough banked money to withdraw this amount."; } else { $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 bank lady happily gives you the money. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } $h->endpage(); ?>
-
Re: Bank.php *updated code below
-
Re: item market Answer can be found by doing a search http://criminalexistence.com/ceforums/h ... 031#p68031
-
Re: Which Programming Language are You?
-
Re: [Free] [v1] Profile Image Uploader Hey Isomerizer , I maybe wrong, but I think there is another issue Image Uploader as a whole. It looks like if user Fred uploads a image called MyImage.jpg And say the next day Joe comes along a MyImage.jpg file (different image, same name) It will overwrite Fred's picture.
-
Re: [Free] [v1] Profile Image Uploader V2 version , not hard to convert.. but im sure someone will eventually ask <?php /*----------------------------------------------------- -- Isomerizer -- Copyright held 2007-2008 Isomerizer -- uploadpic.php -----------------------------------------------------*/ include "globals.php"; if(empty($_FILES['imagefile'])) { echo ' Upload an Profile Image: <form name="imageuploader" method="post" action="uploadpic.php" enctype="multipart/form-data"> [i]Path of Image:[/i] <input type="file" name="imagefile"> <input type="submit" name="Submit" value="Upload Image"> </form> (Max 10000 file bytes , Must be file extention gif, jpg, jpeg, png, bmp....) (Images are resized to 150 x 150) '; } else { //Edit below for max fb size of the pic $maxsize=1000000; if(!$_SERVER['REQUEST_METHOD'] == "POST"){ echo "Bad Bunny!"; $h->endpage(); exit; } if(!isset($_SERVER['HTTP_USER_AGENT'])){ echo "Go away!"; $h->endpage(); exit; } $headerinject = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:"); foreach($_POST as $k => $v){ foreach($headerinject as $v2){ if(strpos($v, $v2) !== false){ logBadRequest(); header("HTTP/1.0 403 Forbidden"); exit; } } } if ($_FILES['imagefile']['size'] > $maxsize) { echo "Image to large <a href=uploadpic.php>Back</a>"; $h->endpage(); exit; } if ($_FILES['imagefile']['type'] == "image/gif" || "image/jpeg" || "images/jpeg" || "images/png" || "images/bmp"){ copy ($_FILES['imagefile']['tmp_name'], "profilepics/".$_FILES['imagefile']['name']) or die ("Could not copy, Make sure you have profilepics on your FTP"); $path='profilepics/'; $pic=$_FILES['imagefile']['name']; $picture=$path.$pic; $oldpic=$ir['display_pic']; $newpic=$picture; if ($newpic==$oldpic) { echo " Image already uploaded!"; exit; } $delete=@unlink($oldpic); if ($delete) { echo "Previous image deleted from system... "; } if (!$delete) { echo "No Previous image to be deleted... "; } $dataa=$_FILES['imagefile']['size']; $datab=$_FILES['imagefile']['type']; $datad=$_FILES['imagefile']['name']; echo "Old Image Location: $oldpic "; echo "New Image Location: $newpic "; echo "Image Uploaded"; echo " <u>Info:</u> Image Name: $datad Image Size: $dataa bytes Type: $datab"; echo " <a href=uploadpic.php>Back</a>"; $fileplace=mysql_real_escape_string($_FILES['imagefile']['name']); $db->query("UPDATE users SET display_pic='profilepics/$fileplace' WHERE userid=$userid",$c); } else { echo " "; echo "Could Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].") "; echo "Must be an image file extention gif, jpg, jpeg, png, bmp...."; echo " <a href=uploadpic.php>Back</a>"; } } $h->endpage(); ?>
-
Re: [Free] [v1] Profile Image Uploader Hey Iso In your newly updated first topic change: (Images are resized to 150 x 150) '; else { to (Images are resized to 150 x 150) '; } else { thanks for the mod
-
Re: Full Crimes Commited dont forget to change print "Showing the 20 users with the highest amount of crystals
-
Re: Need help.. Got hacked? why not remove the installer script? :-o
-
Re: [V2] Staff_cities Help I had this same problem, But i found the problem with mine. I changed this: (notice the missing ' next to minlevel ) Minimum Level: <input type='text' name=minlevel' value='{$old['cityminlevel']}' /> to: Minimum Level: <input type='text' name='minlevel' value='{$old['cityminlevel']}' />
-
Re: New Here and beta Game Screen Shot Thanks Yea .. i have been working on the game for about a month now.
-
Re: New Here and beta Game Screen Shot Top post modified to include another screen shot.