- Joined
- Jan 5, 2008
- Messages
- 1,698
- Reaction score
- 288
Well, 3 weeks ago I had a kind of "internship" within my study.
Because we were with a team of 6 people who were more skilled than the teams before us.
We finished our assignments for 3 weeks, in 2 days.
So what did we have to do with the other 13 days.
They split us up in 2 teams.
and we had to create a text based browser game.
My team (My little Gangsters) came up with an idea to create a mafia game with a My Little Pony theme.
Well, we succeeded.
After 13 days of hard working on our code, we won.
Our Positive points;
- Gameplay
- PvP
- Security (They couldn't get into anything)
- Uniqueness
Screenshot:
Live gameplay:
You must be registered to see links
Features:
- Login/Register system (Obviously)
- Register checks by jquery and registering itself by AJAX/PHP
- Bad butt Login sound by me.
- Missions
- Fail/Succes rate calculated by level, weapons etc.
- if you fail another calculation will be run to get you in jail (more details later)
- Rewards on win.
- Energy and HP consumption (all done in the database)
- Add-able in database.
- Hookers
- They earn money for you on a time base.
- Add-able through database
- Jails
- Add-able in database
- Break out chance, also calculated by level, weapons etc.
- Payout bill, so you can pay yourself out of the jail.
- Auto level up system
- Reach max exp for your level, Level-up
- Level-Table editable in the database (more levels can be added)
- random bonus on attack/defence
- Ranking
- based on money
- based on level
- based on kills
- based on K/D Ratio
- Member list
- Full list of members
- Profile page
- editable
- custom signature.
- Change password
- self explaining
- Money transactions
- view your money transacionts
- Bought items/hookers etc
- Hooker payouts
- Mission rewards
- Transactions from other players
- Transactions to pank/account (more explanation later on)
- Items
- View the items you've bought
- equip the items for stat boost
- Messages
- Private message system, self explaining
- Hospital
- Buy HP/Energy Packs
- Buy Stat bonusses
- Sit out your hospital time
- If hp reaches 0, you will automatically go to the hospital
- Time will be calculated by level.
- Shop
- Buy Weapons/Armor
- Battle System
- Min-level 5
- Max level difference is 2 levels (Opponent must also be level 5)
- Heavy calculations for succes rate
- Heavy calculations for reward
- You earn the other persons Pollars on his account..
- Live chat
- Chat through database
- auto delete old messages after 24 hours
- Bank
- auto interest earnings every hour
- Custom password encryption
- This is decided by HARDWARE, use passwordcreator.php to create a password after a server/hardware change
Code:
function encrypt($string)
{
return hash('tiger160,3', md5(sha1(md5($string))));
}
- Secured
Code:
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
if(!empty($_POST))
{
foreach($_POST as $key=>$value)
{
if (strpos($value,'./') !== false) {
die("What are you trying to do?");
}
//xxs prevention
if(!is_numeric($value))
{
$value = htmlentities($value, ENT_QUOTES);
}
//real escape anti sql
$value = mysql_real_escape_string($value);
$_POST[$key] = $value;
}
}
}
if(isset($_GET))
{
foreach($_GET as $key=>$value)
{
if (strpos($value,'./') !== false) {
die("What are you trying to do?");
}
//xxs prevention value
if(!is_numeric($value))
{
$value = htmlentities($value, ENT_QUOTES);
}
//real escape anti sql
$value = mysql_real_escape_string($value);
$_GET[$key] = $value;
}
}
Stuff that need explanation:
- Pollars
- Your currency in cash, Pony Dollars
- Pank
- The pony bank, your money on the bank (always safe)
Set up:
1. Install a web server with PHP 5.3 or higher
2. Install a mysql server
3. Drop the files into your web server
4. Run the sql in the DOCS folder on your mysql (phpmyadmin or w/e you like)
5. Edit _func_database.php to your own info.
More editable things:
- Missions (DB)
- Hookers (DB)
- Level Table (DB)
- Items (DB)
- Characters (images)
- Jails (DB)
- Hospital Items (DB)
Source:
You must be registered to see links
password: RaGEZoNE!
Don't mind the messy code, I can code OOP, but my teammates can't code for poop. Honestly..
Documents are dutch, rest is English.
Last edited: