-
Posts
2,657 -
Joined
-
Last visited
-
Days Won
74
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
Re: [MOD] House Images have you tried the staff_houses.php from my orig post ? on Zeros script overwrite with this one on line 127 $query = sprintf("UPDATE `users` SET money=money+'%.0f', maxwill = %u WHERE userid IN(".implode(', ', %u).")", $old['hPRICE'], 100, $ids); I cant even see the code to select so im going to have to quote it... change line 127 for this one all ZEROS mistake was adding "%.0f" have changed it to '%.0f'
-
Re: Car Mod Im on your site will chat with you on there
-
Re: Car Mod If its a paid mod we cant really touch it. But if its a freebie mod we may be able to help. I regd on your site and got this message when going to the tune.php page Tuning Shop -------------------------------------------------------------------------------- > Back To Garage -------------------------------------------------------------------------------- Invalid Usage Now Invalid usage could mean that that its calling for an ID example tune.php?id=1 and 1 being the CAR in question. So i would add some CARS to the list and try again
-
Re: [MOD] House Images Just noticed that on the staff_houses ive called some routines {$ir['hsepic']} where as on the other scripts ive called it {$ir['hsepics']} for some silly reason, so if your using this make sure the rest of the script for that routine is the same either with the s or without it Bare in mind if you change it to not having the (s) at the end you will also need to alter the SQL ALTER TABLE houses ADD `hsepics` VARCHAR(255) NOT NULL or ALTER TABLE houses ADD `hsepic` VARCHAR(255) NOT NULL
-
I found a tourney script which was discontinued in 2002 yep its old and it only runs off php4 but i've given it a rebirth i sent an email to the script writer who Hasnt replied back to me for a few weeks. The only reason im trying to give it a new lease of life is because its cram packed full of decent features that i feel would be good for. Tournaments against other MORPG sites. and your own site the system allows you to create Tournaments not only for you own webiste but you can introduce other websites to join in the fun. Bit like a Global Battle Ladder. However im having a few issues converting the php4 to work on php5 mainly the dbase isnt updating when i try to add tournaments. Ive redone the installer and fixed a lot of bugs. and im getting hash errors. So if anyone could help me out id be appreciative Ive managed to get rid of a great deal of errors from the script by redoing the php files and converting them into TPL. However the downside to this is that it needs its own Cache folder so it will now need to be installed seperatly from your MCC preferably on s sub-domain. Ive also added to the installer so it CHMODS the needed files. to save you from doing it.. Still having issues with Cookies as its not storing them... and its annoying the hell outta me having to login to each page.
-
Re: Delete My post Please!!!!!!!! well to be honest nobody on here is an expert coder infact nobody on the net is an expert coders simply.. theres no such thing what you dont know today about php you'll know tomorrow so its a game of swings and roundabouts. So quit whining woman and get the post put back up or i will have to bitch slap ya lol
-
Re: [MOD] House Images Cheers ZERO worst thing about adding scripts on here is trying to remember what you did whilst making it work. I think im doing too many tasks at once lol I appreciate your help though Thank You :)
-
Add images to your index page and estate.php so people can view before they buy. Overwrite staff_houses.php with this one <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains shop stuffs switch($_GET['action']) { case "addhouse": addhouse(); break; case "edithouse": edithouse(); break; case "delhouse": delhouse(); break; default: print "Error: This script requires an action."; break; } function addhouse() { global $db, $ir, $c, $h, $userid; $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $name=$_POST['name']; if($price and $will and $name) { $q=$db->query("SELECT * FROM houses WHERE hWILL={$will}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $db->query("INSERT INTO houses VALUES(NULL, '$name', '$price', '$will', '$hsepic')"); print "House {$name} added to the game."; print "House Image {$hsepic} was added to database."; stafflog_add("Created House $name"); } else { print "<h3>Add House</h3><hr /> <form action='staff_houses.php?action=addhouse' method='post'> Name: <input type='text' name='name' /> Price: <input type='text' name='price' /> Max Will: <input type='text' name='will' /> [b]Item Pics[/b] <input type='text' name='hsepic' value='{$ir['hsepic']}' /><hr /> <input type='submit' value='Add House' /></form>"; } } function edithouse() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $q=$db->query("SELECT * FROM houses WHERE hWILL={$will} AND hID!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $name=$_POST['name']; $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['id']}"); $old=$db->fetch_row($q); if($old['hWILL'] == 100 && $old['hWILL'] != $will) { die("Sorry, this house's will bar cannot be edited."); } $db->query("UPDATE houses SET hWILL=$will, hPRICE=$price, hNAME='$name' WHERE hID={$_POST['id']}"); $db->query("UPDATE users SET maxwill=$will WHERE maxwill={$old['hWILL']}"); $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "House $name was edited successfully."; stafflog_add("Edited house $name"); break; case "1": $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['house']}"); $old=$db->fetch_row($q); print "<h3>Editing a House</h3><hr /> <form action='staff_houses.php?action=edithouse' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['house']}' /> Name: <input type='text' name='name' value='{$old['hNAME']}' /> Price: <input type='text' name='price' value='{$old['hPRICE']}' /> Max Will: <input type='text' name='will' value='{$old['hWILL']}' /> [b]Item Pics[/b] <input type='text' name='hsepic' value='{$ir['hsepic']}' /><hr /> <input type='submit' value='Edit House' /></form>"; break; default: print "<h3>Editing a House</h3><hr /> <form action='staff_houses.php?action=edithouse' method='post'> <input type='hidden' name='step' value='1' /> House: ".house_dropdown($c, "house")." <input type='submit' value='Edit House' /></form>"; break; } } function delhouse() { global $db,$ir,$c,$h,$userid; if($_POST['house']) { $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['house']}"); $old=$db->fetch_row($q); if($old['hWILL']==100) { die("This house cannot be deleted."); } $q2=$db->query("SELECT * FROM users WHERE maxwill={$old['hWILL']}"); $ids=array(); while($r=$db->fetch_row($q2)) { $ids[]=$r['userid']; } if(count($ids)) { $db->query("UPDATE users SET money=money+{$old['hPRICE']}, maxwill=100 WHERE userid IN(".implode(', ', $ids).")"); } $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); $db->query("DELETE FROM houses WHERE hID={$old['hID']}"); print "House {$old['hNAME']} deleted."; stafflog_add("Deleted house {$old['hNAME']}"); } else { print "<h3>Delete House</h3><hr /> Deleting a house is permanent - be sure. Any users that are currently on the house you delete will be returned to the first house, and their money will be refunded.<form action='staff_houses.php?action=delhouse' method='post'> House: ".house_dropdown($c, "house")." <input type='submit' value='Delete House' /></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! [url='staff_users.php?action=reportsview']> Back[/url]"; } $h->endpage(); ?> now call this one uploadhsepix.php <?php /*----------------------------------------------------- -- Isomerizer -- Copyright held 2007-2008 ? Isomerizer.com -- uploadpic.php -----------------------------------------------------*/ require("sglobals.php"); if(empty($_FILES['imagefile'])) { echo ' Upload an House Image: <form name="imageuploader" method="post" action="'.$_SERVER['PHP_SELF'].'" 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; /*Basic security procedures*/ if(!$_SERVER['REQUEST_METHOD'] == "POST" || !isset($_SERVER['HTTP_USER_AGENT'])){ echo 'Hack Attempt!'; $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; } } } /*What extensions can be used?*/ $valid = array('image/gif', 'image/png', 'image/pjpeg','image/jpeg', 'image/jpg'); /*If the extension isnt allowed...*/ if(!in_array($_FILES['imagefile']['type'], $valid)) { $type = strrchr($_FILES['imagefile']['name'], '.'); echo 'This file type '.$type.' is not allowed. [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Check image size*/ if ($_FILES['imagefile']['size'] > $maxsize) { echo 'Image to large [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $check = ''.$_FILES['imagefile']['tmp_name'].''; /*Check for .exe files*/ if (is_executable($check) || !is_file($check)) { echo 'The file '.$_FILES['imagefile']['name'].' seems to be harmful to the server [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; @unlink($check); $h->endpage(); exit; } /*Now to create the correct image using php*/ if ($_FILES['imagefile']['type']=="image/jpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'hsepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/png") { $create = @ImageCreateFromPNG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagepng($create, 'hsepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/jpg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'hsepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/gif") { $create = @ImageCreateFromGIF(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagegif($create, 'hsepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/pjpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'hsepics/'.$_FILES['imagefile']['name'].''); } /*Destroy the php image*/ @unlink(''.$_FILES['imagefile']['tmp_name'].''); @ImageDestroy($create); /*If php could not create the image*/ if (!$create) { echo 'The image you are trying to upload seems to be corrupt please try again! [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $path = 'hsepics/'; $pic = $_FILES['imagefile']['name']; $picture = $path.$pic; $oldpic = $ir['hsepics']; /*Check to see if its already uploaded*/ if ($picture == $oldpic) { echo ' Image already uploaded![url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Delete previous image to save space*/ $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']; /*Information for user*/ echo 'Old Image Location: '.$oldpic.' New Image Location: '.$picture.' Image Uploaded <u>Info:</u> Image Name: '.$datad.' Image Size: '.$dataa.' bytes Type: '.$datab.' [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; /*Check DB*/ $check = mysql_query( sprintf("SELECT COUNT(*) FROM `houses` WHERE `hsepics` = '%s'", mysql_real_escape_string($picture))); $checks = mysql_fetch_array($check); if ($checks['cnt'] > 0) { echo 'Please use another image name [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Update DB*/ mysql_query( sprintf("UPDATE `houses` SET `hsepics` = '%s' WHERE `hsepics` = %u", mysql_real_escape_string($picture), $userid)); } $h->endpage(); exit; ?> Now open smenu.php Under the HOUSES catagory add > [url='uploadhsepix.php']Upload House Pic[/url] ow open index.php and add this line where you want your pic to be displayed.. [b]Property:</center>[/b] {$ir['hNAME']} <center>[img=hsepics/{$ir[]</center>"; Now overwrite estate.php with this one which also allows you to sell your house <?php include "globals.php"; $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=$db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np=$db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np=$db->fetch_row($npq); if($ir['maxwill'] == 100) { print "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); print "You sold your {$np['hNAME']} and went back to your shed."; } } else { print "<center>Your current property: <font color=blue>[b]{$mp['hNAME']}[/b]</font> The houses you can buy are listed below. Click a house to buy it. "; print "[url='estate.php?sellhouse']Sell Your House[/url] "; if($ir['willmax'] > 100) { } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print " <table cellspacing=2 class='table'><tr style='background:gray;'><th>House</th><th>House Price</th><th>House Will</th><th>Image</th><th>Buy?</th></tr>"; $hq=mysql_query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC",$c); while($r=$db->fetch_row($hq)) { print "<tr><td>{$r['hNAME']}</a></td><td>\$$t".money_formatter($r['hPRICE'],'')."</td> <td>{$r['hWILL']}</td> <td>[img=hsepics/{$r[]</td> <td><a href='estate.php?property={$r['hID']}'>Buy</tr>"; } print "</table>"; } } $h->endpage(); if($ir['married']) { die("You cannot manage your estate agent while your being married!"); } ?> Now create a folder on your ftp called hsepics and add a new table to your database under houses.. ALTER TABLE houses ADD `hsepics` VARCHAR(255) NOT NULL And thats it
-
Re: Delete My post Please!!!!!!!! MrGI why do you want your post deleting ? if we were to delete all the posts on here that have been RE-Modded from another mod there wouldnt be many posts on this Forum for Freebies. Your idea is original and could be helpful to others.. Put it back up matey. All my Mods are re-mods of others and they havent been taken down..
-
Re: Build Car {v2} and {v1} MRGI find these in your script else { if($_GET['spend'] == '1') Starting from the top you need to renumber them from 1 - 9 so your final piece would be else { if($_GET['spend'] == '9')
-
[mccode v2] BRAND NEW EXPLORE Tested
Uridium replied to Modern-Empires's topic in Free Modifications
Re: BRAND NEW EXPLORE [v2] Tested A friend kindly loaned me some webspace so i could show you how my original version worked.. some links are just ALT text and others will open up graphics for a more indepth description of the area.. hover over items 1 30 and any parking to reveal graphics.. DEMO http://www.slave-traders.net/exploring.html -
for the Purposes of this mod i'll be using Zero-Effects Register.php page this is only a very small mod Zero already has the ability to stop users reging with small names i just added so they dont exceed massive reg name.. open up zero=effects register.php find these lines... } if(strlen($_POST['username']) < 4) { die("Sorry, the username is too short. >[url='register.php']Back[/url]"); and just under them add these } if(strlen($_POST['username']) > 12) { die("Sorry, the username exceeds 12 characters. >[url='register.php']Back[/url]"); you can obviously alter the 12 to anything i suppose 16 character would suffice.. You can also do the same for users that want to rename themselves after registering open up preferences.php find function do_name_change() { global $db,$ir,$c,$userid,$h; and underneath add if(strlen($_POST['newname']) < 4) { die("Sorry, the username is too short. >[url='preferences.php?action=namechange']Back[/url]"); } if(strlen($_POST['newname']) > 12) { die("Sorry, the username exceeds 12 characters. >[url='preferences.php?action=namechange']Back[/url]"); }
-
To those that may not know my host decided to shut down my website and has now gone into hiding also closing down his own hosting company.. The reason for my apology is because most of the scripts i have done on here had images attached for screenshot purposes and also images that were needed for some of my mods. I am doing my utmost to get back what ive lost which some of it is still in the depths of my hard drive so im having to scour 2000gig to find images that are missing and zip files so i can re-upload them to a new host. Please bear with me whilst i do this i promise to return all my posts to how they were before my host went mental on me. Thanks for reading Illusions.. PS sorry iof this is in the wrong place but i wanted it here so people could find it quicker..
-
[mccode v2] BRAND NEW EXPLORE Tested
Uridium replied to Modern-Empires's topic in Free Modifications
Re: BRAND NEW EXPLORE [v2] Tested Nice to see someone actually followed this image explore map up. After i did the one for my site it became clear is was more of a burden than a help. Although colourful and graphical and seemed like a good idea at the time. It soon became clear that it was quicker to alter text rather than co-ordinating grid refs all the time So i kinda dropped the Project. But still say its good to see it being put to some use for others :) -
[mccode v2] Updated From Snikos' Pollution Mod :D
Uridium replied to Zytraw's topic in Free Modifications
Re: V2 Updated From Snikos' Pollution Mod :D im 5 just starting big school beat that ;) -
Re: Tutorial: v1 - v2 Conversion Just a quick note for V2. You dont always have to change mysql_fetch_array to $db->fetch_row.. As this can also lead to you having page errors However the $db->query is often found next to a SELECT FROM or INSERT INTO or UPDATE or DELETE prompt where as the fetch_row is more commonly placed after a SELECT FROM query $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$_GET['wepid']}"); $r1=$db->fetch_row($qo); and num_rows are more likely to be found near a Call from the mysql that has an ORDER BY statement..
-
Re: please can someone change from html to php I actually had a play with this script yesterday couldnt understand though why the LOGIN pic was seperate from the background image. You have your MAP with coords so why not just use that for all the links even the login button the text needed to be White as its on a black background but over all i would have just left the links as html. make the text white take a screen shot of the entire new jpg with login sections as well then just map it out...
-
Re: Supernatural? Heres my theory rgarding ghosts.. People say they can walk through walls.. MY THEORY Maybe when they were alive the house in which they lived had a door there and over the years the house has been modernised and the door sealed up.. But to the ghost that would still be a door because thats all it knew it as. Ghosts Caught on Camera.. they only see spectral globes. MY THEORY This could be anything auto flash too close to a lighter object creating feed back or even the flash reflected from behind the camera.. UFOs are we alone. MY THEORY The Answer to that one is YES we are experts say that UFO's are more Advanced than our development would ever be and that they have a UFO from the rockwell sighting. Well if this is so why hasnt our development in flight and industry Improved if we now know what they know... POLTERGIESTS every house has a past and every old house has a problem.. MY THEORY Until the launch of the Movie Poltergiest back in the 80s there was never any real commitment to discuss Poltergeist activity then after the movie a whole load of new speculations started and the world went bang in the dark mental.
-
Re: top 8 Tv shows ever 1 Only Fools And Horses 2 Never Mind The Buzzcocks 3 Father Ted 4 Simpsons 5 Two Pints of Lager and a packet of crisps 6 QI 7 The Office 8 Friends 9 Steptoe and son 10 Catherine tate Show. I hate soaps so i aint listing any. my GF watches them all the time i keep telling her she will never get to see the end of the damn things coz they will still be going when everyone on this forum are dead..
-
Re: Battletent Fix I never really saw the point in the BattleTent script. You beat up a low level NPC hmm ok then you get your ass whooped by a player thats even lower than the NPC so i couldt see the point to it.
-
[mccode] Flash Clock suitable for all MCC versions [RE-UPLOADED]
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] Flash Clock suitable for all MCC versions [RE-UPLOADED] I agree by i hate flash, but i would not even call it nice, tbh, the colors are all wrong, and i did not hear music, but why would you want music o n a clock ? :s now maybe input a alarm system into it and it could be alot better but i agree with hating flash it takes 2 long to load and is just boring after awhile I actually agree with you all. and im the one that coded it but its free its quick to install and if they dont wanna use it, thats entirely up to the user... But it hasnt been done and like everyone keeps saying on here if its not been done its original so thats my original bit for MCC ;) -
[mccode] Flash Clock suitable for all MCC versions [RE-UPLOADED]
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] Flash Clock suitable for all MCC versions Big Thankyou to Annonymous who doesnt wish to be named for letting me use their site to RE-host the flashclock file.. Cheers matey cant thank you enough.. :) www.brutalimpact.net/clocktest.zip -
[mccode] Flash Clock suitable for all MCC versions [RE-UPLOADED]
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] Flash Clock suitable for all MCC versions Guys im sorry about this but my HOST has decided to suspend my site due to it sending out SPAM EMAILS even though he hasnt sent me any proff of any emails being sent or even tried to point me to the right script that was sending it. He decided to just shut the site down. I can only Appologise to everyone i am doing work for and that your coding was on my site for testing but at the moment i cane even access my site to test anything... I am very annoyed and peed off about this and i am tryng my hardest to get the site back online.. I really think he has closed the site down coz either hes ready to close his hosting packages or that he is a complete and utter pillock. -
Re: Login [Free] I gotta say the login and reg page of Zeros stand proud on my site never had the need to change any Notices even if people keep asking me is my name ZERO in the game lol
-
Re: Warning Ouch i'll take note of this.. Ive been given access to peoples Cpanel on here and FTP to fix things for them. but im sure they can say that when i have completed my task to help ive passed back the cpanel and Contents in a safe working order..... However due to the above I wont be accessing anyore peoples Cpanel or FTP until there is a fix or resolve to the hacking.. Sorry guys but its piece of mind for me and probably more for you..