
Haunted Dawg
Members-
Posts
2,933 -
Joined
-
Last visited
Never -
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Haunted Dawg
-
Re: Finding Items in the city No No No, please tell me what's wrong with that query.
-
Re: Finding Items in the city As far as i can see there is nothing wrong with that query.
-
Re: Another New Mailbox WoW The cousin crew. Ever saw the jonas brothers in action? They suck. They are 3 brothers. So hey, what you call your self's? 3 cousins? Oh wait, there is already a whine called 3 cousins. :|
-
Re: Finding Items in the city You can try this: $rand = rand(1,5); //Rand to check if he get's the item or not. if($rand == 3) //Now if it is rand 3 continue { $data = mysql_query("SELECT itmid,itmname FROM items WHERE itmbuyable=1 ORDER BY itmid rand() LIMIT 1"); //Query the item $soc = mysql_fetch_assoc($data); //Fetch variable $data $item = $soc['itmid']; //Item ID //Check if item exists and etc if(!$item) //Give false event { event_add($ir['userid'],"You thought you saw something lying on the ground while walking the city, but it was nothing."); //Event false event } else //Else give item { //Now we check if the user has already got this item. $while = mysql_query("SELECT * FROM inventory WHERE inv_userid=".$ir['userid']." AND inv_itmid=".$item); if(mysql_num_rows($while) > 0) //If he has the item just plus up the qty { mysql_query("UPDATE inventory SET inv_qty=inv_qty+1 WHERE inv_userid=".$ir['userid']." AND inv_itmid=".$item); //Plusing the QTY } else //Else insert the item { mysql_query("INSERT INTO inventory (inv_itmid,inv_userid,inv_qty) VALUES(".$item.",".$ir['userid'].",1)"); //Inserting the item } event_add($ir['userid'],"You found ".$soc['itmname']." while walking the street\'s"); //Event user that he got item name blah. } } UNTESTED!
-
[mccode v2] BRAND NEW EXPLORE Tested
Haunted Dawg replied to Modern-Empires's topic in Free Modifications
Re: BRAND NEW EXPLORE [v2] Tested And @ joel: Where is there illegal mod's? -
[mccode v2] BRAND NEW EXPLORE Tested
Haunted Dawg replied to Modern-Empires's topic in Free Modifications
Re: BRAND NEW EXPLORE [v2] Tested Nyna, my game dont use any image that is illegal. Nor does it have a single mod that is illegal. And well since mccode's is basicly freeware i could proberly say mccode's is a free source. -
[mccode v2] BRAND NEW EXPLORE Tested
Haunted Dawg replied to Modern-Empires's topic in Free Modifications
Re: BRAND NEW EXPLORE [v2] Tested OK OK! He used a friggin image. May it be illegal or not. If you think it is illegal let him get into the shit and pay for everyone else's case court's. If you want to use this but think the picture is illegal GET YOUR OWN. :lol: -
[mccode v2] My Orginization & My Production
Haunted Dawg replied to ishmell's topic in Free Modifications
Re: My Orginization & My Production (V2) If you want the above file in a better updated clean code. Here it is: <?php /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ This script was made by illes ignath (a.k.a ishmell) ~~ Please do not delete this credit. ~~ Feel free to edit the script however you may please. ~~ This is just version 1.8 and ill be sure to add more features to it over time. ~~ Thats all for now, I hope you enjoy it. ~~ Code cleaned up by kyle. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ include("globals.php"); global $db,$c,$ir, $set; echo ' <h2>Your Orginization\'s Production/Business</h2> <div align="center"> <form action="production.php" method="post"> '; if($ir['tshapiness'] <= 0) { echo 'Sorry, your troops hapiness is to low to send them out.'; $h->endpage(); exit; } echo ' [b]Production/Business:[/b] <table width="261" border="1"> <tr> <td width="123">[b]Protection Agency[/b]</td> <td width="123"></td> </tr> <tr> <td>[b]Description:[/b]</td> <td width="122">The protection agency will allow you to send out your body guards and offer punks protection for a fee. Its a great way to make money.</td> </tr> <tr> <td>[b]Bodyguards: '.$ir['bodyguards'].'[/b]</td> <td><div align="center"><input type="text" size="10" name="bodygs" value="0"></div></td> </tr> <tr> <td> </td> <td><div align="center"><input name="bodyprotect" value="Begin Protection" type="submit"></div></td> </tr> </table> '; //Settings for body guards $bodygs = $_POST['bodygs']; $bodyreward = ($bodygs * rand(8000,23000)); $bodyrand = rand(0,$bodygs); $bodyreward2 = ($bodygs * rand(13000,28000)); $bodyhapi = rand(0,3); if ($ir['tsbalance'] > 3 && $ir['tshapiness'] >= 5) { if ($ir['bodyguards'] < $bodygs) { echo 'Sorry, you dont have that many bodyguards.'; $h->endpage(); exit; } else { if ($bodygs > 100) { echo 'Sorry, but you cant have more than 100 troops sent out in productions.'; $h->endpage(); exit; } else { if ($bodygs >= 1) { mysql_query("UPDATE users SET money=money+".$bodyreward.", bodyguards=bodyguards=".$bodyrand.", tsexp=tsexp+2, tshapiness=tshappines-".$bodyhapi." WHERE userid=".$userid); echo 'You sent out your bodyguards and made yourself '.money_formatter($bodyreward2).'. Unfortunately '.$bodyrand.' bodygaurds never made it back alive.'; } } } } else { if ($ir['bodyguards'] < $bodygs) { echo 'Sorry, you dont have that many bodyguards.'; $h->endpage(); exit; } else { if ($bodygs > 100) { echo 'Sorry, but you cant have more than 100 troops sent out in productions.'; $h->endpage(); exit; } else { if ($bodygs >= 1) { mysql_query("UPDATE users SET money=money+".$bodyreward." bodyguards=bodyguards-".$bodyrand.", tsexp=tsexp+2 tshapiness=tshapiness-".$bodyhapi." WHERE userid=".$userid) or die(mysql_error()); echo 'You sent out your bodyguards and made yourself '.money_formatter($bodyreward).'. Unfortunately '.$bodyrand.' bodygaurds never made it back alive.'; } } } } echo ' <table width="261" border="1"> <tr> <td width="148">[b]Smuggling Narcotics[/b]</td> <td width="97"> </td> </tr> <tr> <td>[b]Description:[/b]</td> <td>Narcotics is huge in the area so smuggling them can get you really rich. Just send out some hustlers and they will take care of it for you.</td> </tr> <tr> <td>[b]Hustlers: '.$ir['hustlers'].'[/b]</td> <td><div align="center"><input type="text" size="10" name="hustlegs" value="0"></div></td> </tr> <tr> <td> </td> <td><div align="center"><input name="hustnar" value="Begin Smuggling" type="submit"></div></td> </tr> </table> '; //Settings for hustlers $hustlegs = $_POST['hustlegs']; $hustlereward = ($hustlegs * rand(0,5000)); $hustlereward2 = ($hustlegs * rand(3000,11000)); $hustlerand = rand(0,$hustlegs); $hustlehapi = rand(0,3); if ($ir['tsbalance'] > 3 && $ir['tshapiness'] >= 5) { if ($ir['hustlers'] < $hustlegs) { echo 'Sorry, you dont have that many hustlers.'; $h->endpage(); exit; } else { if ($hustlegs > 100) { echo 'Sorry, but you cant have more than 100 troops sent out in productions.'; $h->endpage(); exit; } else { if ($hustlegs >= 1) { mysql_query("UPDATE users SET money=money+".$hustlereward.", hustlers=hustlers-".$hustlerand.", tsexp=tsexp+2, tshapiness=tshapiness-".$hustlehapi." WHERE userid=".$userid) or die(mysql_error()); echo 'You sent out your hustlers and made yourself '.money_formatter($hustlereward2).'. Unfortunately '.$hustlerand.' hustlers never made it back alive.'; } } } } else { if ($ir['hustlers'] < $hustlegs) { echo 'Sorry, you dont have that many hustlers.'; $h->endpage(); exit; } else { if ($hustlegs > 100) { echo 'Sorry but you cant have more than 100 troops sent out in productions.'; $h->endpage(); exit; } else { if ($hustlegs >= 1) { $db->query("UPDATE users SET money=money+".$hustlereward.", huslters=hustlers-".$hustlerand.", tsexp=tsexp+2, tshapiness=tshapiness-".$hustlehapi." WHERE userid=".$userid) or die(mysql_error()); echo 'You sent out your hustlers and made yourself '.money_formatter($hustlereward).'. Unfortunately '.$hustlerand.' hustlers never made it back alive.'; } } } } echo ' <table width="261" border="1"> <tr> <td width="112">[b]Loan Shark[/b]</td> <td width="133"></td> </tr> <tr> <td>[b]Description:[/b]</td> <td>People these days are always in need of some extra cash. When the banks cant provide they will come to you. So send out some bootleggers and make some nice money.</td> </tr> <tr> <td>[b]Bootleggers: '.$ir['bootleggers'].'[/b]</td> <td><div align="center"><input type="text" size="10" name="bootlegs" value="0"></div></td> </tr> <tr> <td> </td> <td><div align="center"><input name="bootnar" value="Begin Loanshark" type="submit"></div></td> </tr> </table> '; //for bootleggers $bootlegs = $_POST['bootlegs']; $bootlereward = ($bootlegs * rand(3000,10000)); $bootlereward2 = ($bootlegs * rand(8000,15000)); $bootlerand = rand(0,$bootlegs); $bootlehapi = rand(0,3); if ($ir['tsbalance'] > 3 && $ir['tshapiness'] >= 5) { if ($ir['bootleggers'] < $bootlegs) { echo 'Sorry, you dont have that many bootleggers.'; $h->endpage(); exit; } else { if ($bootlegs > 100) { echo 'Sorry, but you cant have more than 100 troops sent out in productions.'; $h->endpage(); exit; } else { if ($bootlegs >= 1) { mysql_query("UPDATE users SET money=money+".$bootlereward.", bootleggers=bootleggers-".$bootlerand.", tsexp=tsexp+2, tshapiness=tshapiness-".$bootlehapi." WHERE userid=".$userid) or die(mysql_error()); echo 'You sent out your bootleggers and made yourself '.money_formatter($bootlereward2).'. Unfortunately '.$bootlerand.' bootleggers never made it back alive.'; } } } } else { if ($ir['bootleggers'] < $bootlegs) { echo 'Sorry, you dont have that many bootleggers.'; $h->endpage(); exit; } else { if (bootlegs > 100) { echo 'Sorry but you cant have more than 100 troops sent out in productions.'; $h->endpage(); exit; } else { if ($bootlegs >= 1) { mysql_query("UPDATE users SET money=money+".$bootlereward.", bootleggers=bootleggers-".$bootlerand.", tsexp=tsexp+2, tshapiness=tshapiness-".$bootlehapi." WHERE userid=".$userid) or die(mysql_error()); echo 'You sent out your bootleggers and made yourself '.money_formatter($bootlereward).'. Unfortunately '.$bootlerand.' bootleggers never made it back alive.'; } } } } echo ' <table width="261" border="1"> <tr> <td width="110">[b]Pimping[/b]</td> <td width="135"></td> </tr> <tr> <td>[b]Description:[/b]</td> <td>There are some needy men out there always look for some pussy. Your one of the top pimps around so start sending your whores out there to do what they do best.</td> </tr> <tr> <td>[b]Whores: '.$ir['whores'].'[/b]</td> <td><div align="center"><? print "<input type="text" size="10" name="whoregs" value="0"></div></td> </tr> <tr> <td> </td> <td><div align="center"><input name="whonar" value="Begin Pimping" type="submit"></div></td> </tr> </table> '; //Settings for whores $whoregs = $_POST['whoregs']; $whorereward = ($whoregs * rand(0,1000)); $whorereward2 = ($whoregs * rand(0,5000)); $whorerand = rand(0,$whoregs); $whorehapi = rand(0,3); if ($ir['tsbalance'] > 3 && $ir['tshapiness'] >= 5) { if ($ir['whores'] < $whoregs) { echo 'Sorry, you dont have that many whores.'; $h->endpage(); exit; } else { if ($whoregs > 100) { echo 'Sorry, but you cant have more than 100 troops sent out in productions.'; $h->endpage(); exit; } else { if ($whoregs >= 1) { $db->query("UPDATE users SET money=money+".$whorereward.", whores=whores-".$whorerand.", tsexp=tsexp+2, tshapiness=tshapiness-".$whorehapi." WHERE userid=".$userid); echo 'You sent out your whores and made yourself '.money_formatter($whorereward2).'. Unfortunately '.$whorerand.' whores never made it back alive.'; } } } } else { if ($ir['whores'] < $whoregs) { echo 'Sorry, you dont have that many whores.'; $h->endpage(); exit; } else { if ($whoregs > 100) { echo 'Sorry but you cant have more than 100 troops sent out in productions.'; $h->endpage(); exit; } else { if ($whoregs >= 1) { $db->query("UPDATE users SET money=money+".$whorereward.", whores=whores-".$whorerand.", tsexp=tsexp+2, tshapiness=tshapiness-".$whorehapi." WHERE userid=".$userid); echo 'You sent out your whores and made yourself '.money_formatter($whorereward2).'. Unfortunately '.$whorerand.' whores never made it back alive.'; } } } } echo ' </form> </div>'; $h->endpage(); ?> Enjoy something readable. -
Re: Hello My name is Mafia You asked for forgiveness 3 time's in one message. Come on qivux, you got to forgive him. :lol:
-
Re: Hello My name is Mafia Nice welcome luke.
-
Re: Staff Applications [FREE] I read over the code just the first bit, noticed the SQL 2 Is wrong. INSERT INTO `settings` ( `conf_id` , `conf_name` , `conf_value` ) VALUES ( 'NULL', 'stafflock', 'Locked' ); Use that rather.
-
Re: [V2] Pollution It was not a addon, it was recoded lol.
-
please can someone change from html to php
Haunted Dawg replied to Tylor's topic in Other Programming
Re: please can someone change from html to php HeHe tezza you asked me that yesterday. Plus, some browser's do need to keep the " in the javascript. So all i use is echo ' when i want to display a ' i use \'. -
Re: [V2] Pollution I coded this in this little box so check for bug's. In cron five min's add: $r_p = rand(1,2); if($r_p == 1) { mysql_query("UPDATE users SET polluted=1"); } In explore add: if($ir['polluted'] == 1) { echo 'The city is polluted, and can\'t be accessed at this moment. [url="explore.php?clean"]Click here to get unpolluted.[/url]'; $h->endpage(); exit; } Now add this under include "globals.php"; in explore.php: if(isset($_GET['clean'])) { $price = 200; //Edited for the price to get unpullted. mysql_query("UPDATE users SET money=money-".$price." WHERE userid=".$ir['userid']); echo 'You may now enter the city. [url="explore.php"]Enter City[/url]'; $h->endpage(); exit; } Now run this query: ALTER TABLE users ADD polluted INT(11) NOT NULL DEFAULT '0';
-
Re: $_POST Help Needed Easily can do that. $answers = array ( 1 => "Blah" ); $questions = array ( 1 => "What is blah?" ); $count = count($questions); if($_POST['answer'] == $_SESSION['answer']) { echo 'You got it correct.'; $h->endpage(); exit; } else { $r = rand(1,$count); $_SESSION['answer'] = $answers[$r]; echo ' The question is: '.$questions[$r].' <form action="'.$_SERVER['PHP_SELF'].'" method="post"> Answer: <input type="text" name="answer"> <input type="submit" value="Answer!"> </form>'; $h->endpage(); exit; } You will need to change some values there.
-
Re: 8 Lines to secure your site from known sql injections. Ok nyna, i dont pretend to offer my service's for free, but i do charge a small fee to secure mainly all file's. I have been putting my time into making code efficient & recoded. I charge $50 to secure all the file's. BUT! i replace mainly the file's i have coded wich could be sql exploited. That's mainly all the file's in mccode's, if there is edit's on the php file's, i recode the file to fit your website. So, people can bitch about what ever they want, but i WONT! offer my secure file's for free for sure.
-
Re: code line help I used this way on my ptc to stop the some script's from outsider's. I also used this to stop people from going to the config.php as many people were looking for it at some point. Another way is if some one find's a way to exploit your game in uploading a file such as a file that will connect to config.php and then fetch data from it this can be used. For example: in config.php: if(!defined('Config_Connect')) { die("Your not allowed to be here"); } else { $_CONFIG = array(.....); } Then in register.php, globals.php, fpass.php, login.php You add define("Config_Connect"); It's just another way to secure some script's from outsider's.
-
Re: Phpmyadmin Never know. Then again, why would he want to drop the database in any case?
-
Re: What computer have you got? http://img.deremate.com.ar/user/images/ ... 854740.jpg
-
Re: code line help A simple search can help you with that... <?php define("CONSTANT", "Hello world."); echo CONSTANT; // outputs "Hello world." echo Constant; // outputs "Constant" and issues a notice. define("GREETING", "Hello you.", true); echo GREETING; // outputs "Hello you." echo Greeting; // outputs "Hello you." ?> Taken from http://www.php.net/define
-
Re: What computer have you got? I only get that if i try refreshing the image.
-
Re: 8 Lines to secure your site from known sql injections. A little code i just made, you may try use it and test it, add on to it im not sure if it work's as i have not tested it. Add this code in header.php under the function userdata(): /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Writen on Tuesday 30th September 11:48 UK Time -- Auther: Kyle Bradley Mulder ** To secure incoming data in mccodes ** Valid: [url="http://www.website.com/test.php?action=bash&ID=1"]http://www.website.com/test.php?action=bash&ID=1[/url] ** Invalid: [url="http://www.website.com/test.php?action=bash&ID=1"]http://www.website.com/test.php?action=bash&ID=1[/url] union all select 1,1,1,-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ function clean_data($data) { global $h; if($data == is_numeric($data)) //Check if is numeric the $data { $auto = 1; //Set auto = 1 to secure if numbers } else { $auto = 2; //Set auto = 2 to secure if NOT numbers } if($auto == 1) { $return_valid = abs(@intval($data)); //Secure numbers and return } else if($auto == 2) { $return_valid = htmlspecialchars($data); //Secure letters and return } return $return_valid; //Return the $return_valid object } $array_secure_places = array_merge($_GET,$_POST); while($secure = current($array_secure_places)) { $secure_key = key($array_secure_places); $_POST[$secure_key] == clean_data($_POST[$secure_key]); $_GET[$secure_key] == clean_data($_GET[$secure_key]); next($array_secure_places); }
-
Re: What computer have you got? Nice computer you got there, i plan to build up my sony vaio when i got cash. http://www.itreviews.co.uk/graphics/nor ... e/h486.jpg
-
What computer have you got and specification's? HP Pavilion laptop http://www.shinyshiny.tv/HP%20Pavilion%20dv2600.jpg 80 GB Hard Drive 1 GB DDR2 Ram Built in webcam Built in microphone 1.66 GHz single core Direct X 9.0 To find out your specifications: Start => Run => dxdiag