
Undergroundcity
Members-
Posts
34 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Undergroundcity
-
Are you exited about the new engine? Only about 7 more hours :) How long have you been waiting?
-
Re: New! Player report [FREE] well at least get a different theme so your game doesn't look like another crappy mccoded game. What about the report feature you made? it is good coding but the rules are a copy and paste of torn city.
-
Re: New! Player report [FREE] Dude, I mean your real game http://www.murder-city.com/ That is an exact copy of Monocountry.
-
Re: New! Player report [FREE] How much more can you copy? Your game is a copy of MonoCountry and the rules are a copy of the Torn City rules, honestly do your own damn work.
-
Re: [Any Mccode] Disallow Username There is really no difference.... an array is just a simple way to store varaibles.
-
This is a very small and simple mod I just put together. You can disallow usernames. It is perfect if you want to reserve a name, or block swears. First, edit register.php and add: $banned = username At the top of the page. Then, add: else if ($_POST['username'] = ['$banned']) print "This username is not allowed. exit;" Under: print "The passwords did not match, go back and try again."; } Keep adding the variables to ban more usernames. As I said this is a very simple mod so please don't leave annoying posts ;)
-
Re: [V2] Help Nedded You either changede the table name on creategang.php and scewed it up, or edited the tables in phpmyadmin.
-
Re: No attacking level 1 I do too. Alot of people are level 1 and don't even play.
-
Re: Hospital/Jail Count stuck there called crons.. and I sugguest you use them.
-
Re: mccode v2 help How do you need a coder if all your files are right in front of you?
-
Re: Hey There Yeah me too. If you want to make another one just add another rank to your dbdata.sql file. Or search before you post crap.
-
Re: No attacking people in Fed. first of all, this is not the place to put mods. Second, this script is very simple to make and someone with almost no coding skills could simpley make this. else if($odata['fedjail'] > 0) { print "some message"; $h->endpage(); exit; } Diffucult......
-
Re: [Mccodes V2} Bar Mod I will just change the query. Sorry for the errors, I was in a rush.
-
I know this script is very similer to alot of others, but I made this myself. Here is a simple mod where a user can go to the bar and get drinks etc. They gain will or end up in the hospital. NOTE: MOD NOT TESTED. Create a file named bar.php: <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } if(!$_GET['spend']) { print "<h2>Game Name Bar</h2> Welcome to your game name bar. We have a varity of drinks items here, which increases your will. Below is a list of items. <h3>Destory your Liver</h3> <table border='1' width='90%' bordercolor='#939393'><tr background='header.jpg'><th>Beverage</th><th>Number</th><th>Type</th><th>Price</th><th><center>Info</th></tr><tr> <td><center>Margarita</td><td><center>1</td><td><center>Beverage</td><td><center>$2,000</td><td><center>[url='bar.php?spend=Margarita']Great Stuff. Too much will taste like crap. [/url]</td></tr><tr> <td><center>Vermouth</td><td><center>2</td><td><center>Bevarage</td><td><center>$6,000</td><td><center>[url='bar.php?spend=Vermouth']Nice wine. Bitter flavor.[/url]</td></tr><tr> <td><center>Jamican Rum</td><td><center>3</td><td><center>Bevarage</td><td><center>$10,000</td><td><center>[url='bar.php?spend=rum']This is what you find on the streets.[/url]</td></tr><tr> <td><center>Vodka</td><td><center>4</td><td><center>Bevarage</td><td><center>$14,000</td><td><center>[url='bar.php?spend=vodka']What you sneak in to your family Christmas Party.[/url]</td></tr></table>"; } else { if($_GET['spend'] == 'Mararita') { if($ir['money'] <2000) { print "You don't have enough money to buy a Margarita!"; } else { mysql_query("UPDATE users SET brave=brave+2,energy=0,money=money-2000 WHERE userid=$userid",$c); mysql_query("UPDATE users SET will=maxbrave WHERE brave > maxbrave",$c); You buy a Margarita for $2,000 take out the olive and chug it down. After it you feel a little dissy and decide to sit down. Your friends roll you to your side and you proceed to vomit. <br / > You gained some will back! [url='bar.php']>Back to the Bar[/url]</center>"; } } else if($_GET['spend'] == 'Vermouth') { if($ir['money'] <6000) { print "You don't have enough money to buy a Vermouth!"; } else { mysql_query("UPDATE users SET will=0,energy=energy-100,hospital=hospital=10,hospital=100,hospreason='Was posined by Vermouth',money=money-6000 WHERE userid=$userid",$c); You buy a Vermouth for 6,00, And drink it slowly. You wake up in a hospital bed. full of ice, you see a note taped to a phone saying Call 911 or else you will die. After you make the call you passout again. Your doctors confirm that you had alchol poisining and you got your stomach pumped.. [url='hospital.php']>Hospital[/url]</center>"; } } else if($_GET['spend'] == 'Rum') { if($ir['money'] <1000) { print "You don't have enough money to buy Jamican Rum!"; } else { mysql_query("UPDATE users SET will=will+1,energy=0,money=money-10000 WHERE userid=$userid",$c); mysql_query("UPDATE users SET will=maxwill WHERE will > maxwill",$c); You buy a bottle of Jamican Rum and sip it down. Soon, you finish it and throw the bottle out. <br / > You gain some will! [url='bar.php']>Back to the Bar[/url]</center>"; } } else if($_GET['spend'] == 'Vodka') { if($ir['money'] <14000) { print "You don't have enough money to buy some Vodka!"; } else { mysql_query("UPDATE users SET will=will+3,energy=0,money=money-1000 WHERE userid=$userid",$c); mysql_query("UPDATE users SET will=maxwill WHERE will > maxwill",$c); You buy a Vodka for 14,000, and sip the disgausting taste down. Damn, your stomach hurts <br / > You decide to go home and you gained some will! [url='bar.php']>Back to the Bar[/url]</center>"; } } } $h->endpage(); ?> And add to explore.php: [url="www.gamename.com/bar.php"]The Bar[/url]
-
McCodes ban users from your game Here is a little script to ban users from your game. You can simply edit the file to ban Ip's and choose the site it redricts to if your IP is banned. It is a javascript code, so any MCcodes will do. You may add this to the game homepage, and header.php Note: I didn't fully create this script <script type="text/javascript"> ///McCodes ban users from your game. You may edit this script to add ip's, the site your user will be sent to if banned etc. Enjoy!/// //Enter list of banned ips, each separated with a comma: var bannedips=["76.119.215.161"] var ip = '' var handleips=bannedips.join("|") handleips=new RegExp(handleips, "i") if (ip.search(handleips)!=-1){ alert("You are banned from Your Game Name. Mail [email][email protected][/email] for support") window.location.replace("http://www.yourgame.com/banned.php") } </script> Enjoy!
-
[mccode] Invade house script
Undergroundcity replied to Undergroundcity's topic in Free Modifications
Re: Mccodes 1 and 2 - Invade house script Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting '}' in /www/blah/r/a/g/blahblah/htdocs/invade.php on line 57 -
[MCcodes All] Staff Members cannot be attacked.
Undergroundcity replied to Undergroundcity's topic in Free Modifications
Re: [MCcodes All] Staff Members cannot be attacked. Thats exactly what I am saying. It gets annoying when your trying to test the game, fix bugs, etc and random people attack you. -
[MCcodes All] Staff Members cannot be attacked.
Undergroundcity posted a topic in Free Modifications
This a a very simple mod.. To not allow ANY staff members to be attacked, open up attack.php add: else if ($r['userid'] < 1) { print "You can't attack a staff member. IDIOT! [url='index.php']Back[/url]"; $h->endpage(); exit; } under else if ($youdata['location'] != $odata['location']) { print "You can only attack someone in the same location!"; $h->endpage(); exit; } THIS IS NOT TESTED. I AM NOT 100% SURE IF IT WORKS. -
Right now this script is currently in beta, you can only get experience but I will add it so you can get items/money. This may have some bugs. NOT TESTED. <?php session_start(); if (file_exists('globals.php')) { require('. /globals.php'); } include "global_func.php"; require "mysql.php"; if($ir['energy'] < 10) { die("You need at least 10 energy to invade a home. You only have {$ir['energy']} energy. "); } if($ir['jail']) { die("You cannot invade a House while in jail."); } if($ir['hospital']) { die("You cannot invade a House while in hospital."); } if($_GET['ID'] == $userid) { die("You idiot, you own your house!"); } $_GET['ID']=abs((int) $_GET['ID']); $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}")); if(!$r['userid']) { die("Sorry, this user does not exist."); } $mult=$r['level']*$r['level']; $chance=min(($ir['crimexp']/$mult)*50+1, 95); if(rand(1,100) < $chance) { $gain=$r['level']*5; print "You successfully invaded {$r['username']} Home, and gained some experience! > [url='jail.php']Back[/url]"; $db->query("UPDATE users SET crimexp=crimexp+{$gain} WHERE userid=$userid"); $db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] invaded your house! Click [url='invade.php?ID={$userid}']here[/url] To do the same thing to them. ", $c); } else { print "When you were knocking down {$r['username']}'s house you were caught by a police officer and taken to jail. > [url='jail.php']Go to Jail[/url]"; $time=min($mult, 40); $db->query("UPDATE users SET jail=$time, jail_reason='Caught trying to invade the Home of {$r['username']}' WHERE userid=$userid"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] was arrested trying to invade your home.", $c); } $h->endpage(); ?>
-
Right now this script is currently in beta. There is still alot of bugs, and I will add it so you can steal money/items but now you can only get experiance. ?php session_start(); if (file_exists('globals.php')) { require('. /globals.php'); } include "global_func.php"; require "mysql.php"; if($ir['energy'] < 10) { die("You need at least 10 energy to invade a home. You only have {$ir['energy']} energy. "); } if($ir['jail']) { die("You cannot invade a House while in jail."); } if($ir['hospital']) { die("You cannot invade a House while in hospital."); } if($_GET['ID'] == $userid) { die("You idiot, you own your house!"); } $_GET['ID']=abs((int) $_GET['ID']); $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}")); if(!$r['userid']) { die("Sorry, this user does not exist."); } $mult=$r['level']*$r['level']; $chance=min(($ir['crimexp']/$mult)*50+1, 95); if(rand(1,100) < $chance) { $gain=$r['level']*5; print "You successfully invaded {$r['username']} Home, and gained some experience! > [url='jail.php']Back[/url]"; $db->query("UPDATE users SET crimexp=crimexp+{$gain} WHERE userid=$userid"); $db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] invaded your house! Click [url='invade.php?ID={$userid}']here[/url] To do the same thing to them. ", $c); } else { print "When you were knocking down {$r['username']}'s house you were caught by a police officer and taken to jail. > [url='jail.php']Go to Jail[/url]"; $time=min($mult, 40); $db->query("UPDATE users SET jail=$time, jail_reason='Caught trying to invade the Home of {$r['username']}' WHERE userid=$userid"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] was arrested trying to invade your home.", $c); } $h->endpage(); ?> Added code tags -- Tezza`
-
Wow, I started a little over a year ago. I started off with Torn City (obviously) and then I started to play other games. I then seemed intrested in creating a game, and I found Mccodes. I was stupid at this at first (didn't know how setup mysql :wink: and then I found CE.
-
Does anyone have a code to delete all phpmyadmin tables?
-
Re: Need Help Thanks for the help.
-
Re: Need Help Im not looking for a custom site, im looking for a simple php site.
-
I'm tired of mccodes. Im devolping my own gaming engine. Has anyone got a website which has php tutorials, (not w3schools)?