Jump to content
xisto Community

Variablez

Members
  • Content Count

    86
  • Joined

  • Last visited

Everything posted by Variablez

  1. Hey all! In this tutorial, I will show you how to make your very own McCodes Drug Corner! NOTE THIS IS NOT MY WORK!: Okay so make a new page on your site and call it "DRUGS.PHP" DRUGS.PHP: <?php/*------------------------------------------------------- Blown City-- A product of GoldenZero.Net-- Copyright held 2007 by GoldenZero-- E-mail: joshisthebest1ca[AT]msn[DOT]com-----------------------------------------------------*/include "globals.php";$_GET['ID']= abs((int) $_GET['ID']);print "<h2>{$set['game_name']} Drug Corner</h2>";switch($_GET['action']){case "buy":buy();break;default:index();break;}function index(){global $db;print "<br>You walk along the {$set['game_name']} streets and see a bunch of people hanging out in a corner near the shops, you walk over to see the guy in charge, he asks you if you need any drugs, you tell him your interested and he shows you.<br><br><table class='table' border='0' width='60%'><tr><th>Dealer</th><th>Drug Name</th><th>Price</th><th>Drugs Left</th><th>Buy</th></tr>";$drugies=$db->query("SELECT * FROM drugs");while($drugies=$db->fetch_row($$drugies)){print "<tr><td>{$drugies['dNAME']}</td><td>{$drugies['dDRUG']}</td><td>\${$drugies['dPRICE']}</td>";if($drugies['dQTY'] == 0){$qty="None!";}else{$qty="{$drugies['dQTY']}";}print "<td>{$qty}</td><td><a href='drugs.php?action=buy&ID={$drugies['dID']}'>Buy</a></td></tr>";}print "</table>";}function buy(){global $db,$userid,$ir;print "<h4>Buying Drug</h4>";$_GET['ID']= abs((int) $_GET['ID']);if(!$_GET['ID']){print "Not buying a drug??";}if(!$_GET['ID']){print "Invalid use of file";}$aq=$db->query("SELECT * FROM drugs WHERE dID={$_GET['ID']}");if($db->num_rows($aq) == 0){print "Invalid drug ID";}$drugies=$db->query("SELECT * FROM drugs WHERE dID={$_GET['ID']}");$drugies=$db->fetch_row($$drugies);$price=$drugies['dPRICE'];$will=$drugies['will'];$energy=$drugies['energy'];$brave=$drugies['brave'];$hp=$drugies['health'];if($drugies['dQTY'] == 0){die("{$drugies['dNAME']} is out of {$drugies['dDRUG']}!");}if($ir['money'] < $price){die("You dont have enough money to buy {$drugies['dDRUG']} off {$drugies['dNAME']}!");}$db->query("UPDATE users SET money=money-$price,energy=energy+{$energy},brave=brave+{$brave},hp=hp+{$hp},will=will+{$will} WHERE userid=$userid");$db->query("UPDATE users SET will=maxwill WHERE will > maxwill");$db->query("UPDATE users SET energy=maxenergy WHERE energy > maxenergy");$db->query("UPDATE users SET brave=maxbrave WHERE brave > maxbrave");$db->query("UPDATE users SET hp=maxhp WHERE hp > maxhp");$db->query("UPDATE drugs SET dQTY=dQTY-1 WHERE dID={$drugies['dID']}");echo str_replace('$name', $drugies['dNAME'], $drugies['dEFFECT']); print "<br><br><a href='drugs.php'>Back</a>";}$h->endpage();?> Now you have done that, we must get down to the SQL bit, this is an important bit because it includes ALL of the data! MY SQL BIT: Open up PHP MY ADMIN and run this query: CREATE TABLE `drugs` ( `dID` int(11) NOT NULL auto_increment, `dNAME` varchar(255) NOT NULL default 'Some Guy', `dSEX` varchar(3) NOT NULL default 'him', `dDRUG` varchar(255) NOT NULL default 'Some Drug', `dEFFECT` text NOT NULL, `energy` int(11) NOT NULL default '0', `will` int(11) NOT NULL default '0', `brave` int(11) NOT NULL default '0', `health` int(11) NOT NULL default '0', `dPRICE` int(11) NOT NULL default '0', `dQTY` int(11) NOT NULL default '0', `dOD` int(11) NOT NULL default '0', PRIMARY KEY (`dID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; INSERT INTO `drugs` VALUES (1, 'Josh', 'him', 'Weed', 'You light up the weed with your lighter and start taking big puffs, you pass it to $name and pass back and forth for a few minutes then you walk home. While walking home you feel all happy and braver, all you want to do is do some illegal activity.', 10, 10, 2, 10, 100, "CHANGE THIS NUMBER TO WHAT AMOUNT YOU WANT", 0); INSERT INTO `drugs` VALUES (2, 'John', 'him', 'Hash', 'You start lighting up the hash in your hash pipe with your lighter and start taking big puffs, you pass it to $name and pass back and forth for a few minutes then you walk home. While walking home you feel all happy and braver, all you want to do is do some illegal activity.', 20, 20, 4, 20, 200, "CHANGE THIS NUMBER TO WHAT AMOUNT YOU WANT", 0); INSERT INTO `drugs` VALUES (3, 'Jay', 'him', 'Shrooms', 'You start eating the shrooms with $name, you start seeings some crazy stuff in the alleys so you tell $name your going to head home, befor you left you ate the rest of the shrooms. While walking home you feel all happy and braver, all you want to do is do some illegal activity.', 30, 30, 6, 30, 300, "CHANGE THIS NUMBER TO WHAT AMOUNT YOU WANT", 0); Note the bit where it says change this number to the amount you want, change it to something reasonably big because they dont update... Thanks, Hope you enjoyed and good luck Notice from jhaslip: Code tags added. Use them when you post code snippets, especially snippets that are not written by yourself, as per the Xisto readme
  2. Hey all I downloaded a new mod! Here is how to install it: First page (main page) is here: upload that and call the file "carnival.php" Then you must do the same with another file though: copy and paste and make a file called carnigames.php. Then open PHP My Admin and run this query: alter table users add `tickets` int(11) NOT NULL default '0'; and then you must add the link of "Carnival.Php" to the Explore file. Thanks for reading, hope you like it!
  3. Im so confused! I dont know where to add the code for: $username=$_POST['username'];$username=str_replace(array("<", ">"), array("<", ">"), $username);$q=mysql_query("SELECT * FROM users WHERE username='{$username}'",$c);$ipcheak=mysql_query("SELECT * FROM `users` WHERE lastip='$ip'",$c);if(mysql_num_rows($ipcheak)){die("Someone is already using this computer's address for London Wars! Please contact Variablez and ask him to make you an account if you need to!");} one ip per acount mod on this page: <?phpinclude "config.php";global $_CONFIG;define("MONO_ON", 1);require "class/class_db_{$_CONFIG['driver']}.php";$db=new database;$db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']);$db->connect();$c=$db->connection_id;$set=array();$settq=$db->query("SELECT * FROM settings");while($r=$db->fetch_row($settq)){$set[$r['conf_name']]=$r['conf_value'];}//thx to [url=http://http://www.phpit.net/rg-erdr.php?_rpo=t; for valid_emailfunction valid_email($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; and theres more but i think its somwhere in there? any idea? any help please? Notice from rvalkass: Code needs to be in code tags. Also moved to the PHP section of the forums.
  4. I find that all netgear routers are good, but they have poor popularity and many sites that edit your router and require router editing, dont support it. In this case, I would suggest that you use a D-Link router, they have a very sleek design with 2 arials on their router on many models. They also have good support with sites that require router changing and have great support! They also can reach speeds of 54.00 MBPS easily and without a doubt, hardly ever break down. But I suggest buying it direct from store as if you buy it with an internet package, yeah sure its free, but the model will most definatly suck at speed and have a horrible design! So overveiw is that a good deign D-Link router to get! Also, the D-Link models also stick upon walls with the correct equiptment and expertiese! Thanks for reading my post!
  5. Spores good, I quite like it to be honest, very good graphics and good sound
  6. Woah! That many people scammed with anti virus software! Appaling! I have used many in my life but I didnt know that so many where viruses! Its also hard to believe that they are fake because they have 5 stars from users and good comments and also good genuine names and are on sites like download.com etc. but to make one fake to hack people is just childish. I mean 30 million victims have experianced this trauma, who knows what they might have had on their pc, babies photos, work documents, anything private, all that is gona due to 1 stinking virus antivirus fake software.... this should be stopped and we should have better scanners to tell us and also genuine people who actually say the truth! Thats just a waste of time and effort. I spit on the people who made them fake virus scanners!
  7. Awesome! I love them games too! They look very realistic but you need a High End PC or LAPTOP in order to play them... its really cool! Good Topic Evolix
  8. Hey im trying to add a file to my My SQL Database, Any idea how I can do this? Any help would be appriciated. Thanks!
  9. Okay, thanks Evolix, ill try that in a sec and will reply shortly!
  10. I've skipped class, especially boring Maths! Well only maths! I remember once, there was a class going for assembly while my math class was on, so I followed them and sat through the whole boring lecture and then I followed back and went to my next class, it was like clockwork, it was so cool lol, and in the end, none of the teachers even spotted me and didnt say nothing to me. I felt i had achived somthing. W00T
  11. My best dream was somthing like 2 am, but anyways, I was a hijacker, somone like Niko bellic or CJ from the GTA series! I was walking along the streets killing people and doing anything randomly, I was taking cars, robbing planes and shooting in the air like mad! It made me feel great and free smashing and doing everything all over the place!Then I saw one of those At-400's from san andreas, and I robbed it with all the passengers in it. And for some reason when i opened the doors so the passengers flew out, I did... WTH i thought! I was plummeting to the ground and just as soon as im about to hit the ground..."BRING BRING!!!"My phone alarm comes on!Lol very funny but one of my best dreams!Thanks for reading!!
  12. My favourite movie is The Simpsons Movie of course! I love it its so funny, one of the best episodes i've seen!
  13. This has happened to me too! Its extremely annoying having to reinstall all of your favourite programs on your program and sometimes takes all of your spare time. I wish we could have some EASY backup software, put it on a disk quickly and done instead of having to do it all again then forgetting somthing then installing then forgetting then installing etc.. it takes time and then you remember another and another and by the end your so tired of it you stop.
  14. Hey all, I was trying to install my McCodes game I bought recently, but every time I try to install it, I get this error: Any help on how I can fix this? Anything is appriciated. Thanks all!
  15. Ha! Sounds funny, I wonder what the lady would have heard too! Ha that must have been quite fun blowing up your phone... ahh good one mate
  16. I remember revising! It is so boring and so like old school... but it was still good for you!
  17. Freehostia has been one of the best hosts I have used in my computing life... this is because they have good features, even though they have a bad sub domain name, It still is quite good. I have had no problems with it but then again, I havent used it to the full of its ability. cPanel is okay on it and customer support I havent tried. But this is still quite a good host.
  18. 000Webhost really sucked when I used it! It used to be my previous host, a while ago, it had poor service, slow uploading time, and very poor customer service. It was almost like it was an old site not ran by anybody! They usually put adverts on and the admin would check your site like 3 hours after you made it to make sure its safe. If it isnt, they shut it with out warning and dont listen to reason. They also do web inspections every couple weeks, mentioned earlier, this isnt good either, they stop your site and try peeking into it! Who knows what you might have on it thats private!
  19. God forbid I die anytime soon, but if I were to die, I would choose it as me going on a plane and crashing into a mountain, I wouldnt want the sea or heart attack,more pain.
  20. I love my parents and im glad their here with me now, both of them. Yeah sure somtimes they bicker and shout, but thats the circle of life, somtimes they bicker sometimes they both love each other and get along. Im glad I have 2 parents and I think we should all respect that.
  21. Hey all, I think that Google's new browser, CHROME isn't too good, its more of a prototype for me, it doesnt allow me to veiw anything, all I get is some stinking error that doesnt even say why, it just says "Oops! Google Chrome has failed, click okay to retry" and the same thing everytime. It has an okay layout but still it isn't good. I am using vista but I have an xp as well, it works on that so out of all I would say roughly 5/10
  22. I too think it was handled badly. Terrorist are just bad, its radical and they should really bomb inocent people.
  23. Hey I applied for a Hosting account and it says I was meant to get permission from an admin and said dont click back or refresh... any help here?Processing.. Please wait!. Do not hit RELOAD or BACK..Username Validated.Connecting to Database...Database Connection Established.Validating username and password..Username Validated.Checking permissions..Permission granted.Preparing data for Creating Account..You are suppposed to get approved for Hosting by ADMINISTRATORs.You are suppposed to get approved for Hosting by ADMINISTRATORs.bwadminVariablez90.205.0.56
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.