Jump to content
MakeWebGames

Mob Lords - WIP


Zettieee

Recommended Posts

Hello people!

I wanted to see how much I could do with mccodes in as litle time as possible but still make an enjoyable game!

I used the latest mccodes v2 + some custom mods provided by some friends (DJK, Sniko).

Used some ravan script features including: login, register, profiles, gym, crimes, playershops, travel.

CSS is mainly from ravan but with edits to make it more my own.

Screenshot:

[ATTACH=CONFIG]1752[/ATTACH]

The screenshot is of a very nice inventory that uses jquery tabs. (DJK's handy work!)

List of mods I've made:

Raffles: (Raffles an item/crystals/money) [Ticket prices can be in crystals, cash, items).

Boots Equipment(attack.php): Instead of using a 2nd weapon slotI made it into boots. Boots give AGI boost that works with muggings/crimes and who attacks first.

Competitions: basics; admin sets a competition to complete the most crimes, jail busts, fights won, muggins and then sets the prize for top x amount of players.

Hit List: Players can place a hit on another player for crystals or cash another player can then take the hit and carry it out. Payment sent upon other players death by the taker.

Gang Bombs: The basics work but needs more features before it gets added. Put a whole gang in hospital for 10xgang members mins.

House tax: pay tax based on your house.

Mods I was given/purshaced/found on forum:

Sniko's image useranmes: admin can set players with image names.[given a long time ago]

DJK's IP ban tool [given]

DJK's player reports[given]

DJK's 50/50 [custom jquery50/50 for money/crystals]

DJK's tabbed jquery inventory

DJK's Easter Egg (Find items)

DJK's Attack list

Daves Donation system [ purchased /special thanks]

Ticket support: Ticket support system, found and fixed up to work with v2.

Image search the streets: found + fixed.

Maybe more mods i'm totally forgetting but they are the most used.

URL: http://www.moblords.com

Test account:

Username:Mwgtest

Password: mwgpassword

Something wrong? Spelling? Grammar? Just a straight up bug? Use the in game forums or support tickets!

If it's a security issue please submit a support ticket.

Staff Abuse? If a member of staff is cheating/abusing thier powers they will be deleted. and all ill gotten gains removed.

Rules:

Common sense is required to play.

 

I'd like to know what you all think, good and the BAD. (Please take note this was made in less than 60 hours and things will be changed as time goes on)

This will be updated every time i spend some time on the game

How long has it taken? 56 hours total.

+ 5 hours fine tune!

screenshot.thumb.png.868a56c946b2c297bc30d8734bec7d3a.png

Edited by Zettieee
Link to comment
Share on other sites

To anyone who had to spend 3 hours in hospital: Sorry!

I went to bed without adding the max hospital time script from localhost.

Crimes will be changed today: less chance to fail based on your IQ/Speed/Will (For now!) EXP will be a little lower.

Attack is been changed: No more options to mug them. Online attacks will put people in hospital for max of 10mins. or 2mins * level.

Mug will be added to viewusers profiles. Mugging a user will require speed and a little bit of luck!

Voting is been removed/replaced with daily login bonus. (daily pack) 25 crystals. $55,000. 2 Jial Keys, 1 Hospital Cert.

---

Jail busts now gives exp based on the person's level you are busting!

Jail busts now cost 10 energy

Edited by Zettieee
Link to comment
Share on other sites

Ok so here is a simple mug feature for anyone who wants to use it.

Add this to global_funcs.php

function getuser($id)
{
global $db;
$res = $db->query("SELECT `username` FROM `users` WHERE `userid` = '".$id."'");
$row = $db->fetch_row($res);
return "<a href='viewuser.php?u={$id}'><span style='color:red'>".htmlentities($row['username'])."</span></a>";
}

 

mug.php

<?php

include(__DIR__.'/globals.php');

$_GET['mug'] = isset($_GET['mug']) && ctype_digit($_GET['mug']) ? abs(intval($_GET['mug'])) : null;
if(isset($_GET['mug']))
{
if(empty($_GET['mug']))
{
	echo "Invalid Choice";
	$h->endpage();
	exit;
}
if($ir['brave'] < 10)
{
	echo "Sorry but you dont have enough brave to mug someone you need 10";
	$h->endpage();
	exit;
}
if($ir['hospital'] || $ir['jail'])
{
	echo "You cant mug someone if you are in jail or hospital.";
	$h->endpage();
	exit;
}
$ucheck = $db->query("SELECT `u`.`userid`,`money`,`jail`,`hospital`,`location`,`user_level`, `us`.`agility` FROM `users` AS `u` 
INNER JOIN `userstats` AS `us` ON `u`.`userid`=`us`.`userid` WHERE `u`.`userid` = {$_GET['mug']} LIMIT 1");
if(!$db->num_rows($ucheck))
{
	echo "That user is not real.";
	$h->endpage();
	exit;
}
else 
{	
	$row = $db->fetch_row($ucheck);
	if($row['hospital'] || $row['jail']) 
	{
		echo "".getuser($_GET['mug'])." cant be mugged while in jail or hospital.";
		$h->endpage();
		exit;
	}
	if($ir['location'] != $row['location'])
	{
		echo "Sorry but this person is not in the same city as you.";
		$h->endpage();
		exit;
	}
	if(in_array($row['user_level'], array(2)))
	{
		echo "Admins are blocked from being mugged.";
		$h->endpage();
		exit;
	}
	$uchance = mt_rand(1,5); # 1 in 5 chance of success
	if($ir['agility'] > $row['agility'] && $uchance == 1)
	{
		$mugamount = round($row['money'] / 4);
		echo "You have successfully mugged ".getuser($_GET['mug'])." for ".money_formatter($mugamount)."";
		$db->query("UPDATE `users` SET `money` = `money` - '$mugamount' WHERE `userid` = {$_GET['mug']}");
		$db->query("UPDATE `users` SET `money` = `money` + '$mugamount',`brave` = `brave` - 10 WHERE `userid` = {$ir['userid']}");
		event_add($_GET['mug'], "You have been mugged by ".getuser($ir['userid'])." and stole ".money_formatter($mugamount)."");
	}
	else 
	{
		echo "You failed to mug ".getuser($_GET['mug'])."";
		event_add($_GET['mug'], "".getuser($ir['userid'])." tried to mug you but failed.");
		$db->query("UPDATE `users` SET `brave` = `brave` - 10 WHERE `userid` = {$ir['userid']}");
	}
}
}
$h->endpage();
?>

 

and last add this to the users profile mine was done around line 187 (stranded viewuser)

[<a href='mug.php?mug={$r['userid']}'>Mug User</a>]
Link to comment
Share on other sites

When testing mods, generally you'd do it on a local server until it's ready then you'd just port it over the actual game. I know this is a bit off topic but I'm sure to make it "fair" you wouldn't have that rule, an Admin is still a player. Just my opinion. In the case you were testing a feature you should create a mod which stops people attacking you while you're testing, rather than stopping people attacking you completely.

Link to comment
Share on other sites

UPDATES today:

Added Daves ajax chat mod:

Edited it to allow username images and clickable usersnames.

Advertising: Spent a little bit on paid advertising.

Fixed a bug in attack:

when you missed it will give out an error forcing you to leave attack.php.

Daily Package: Fixed a bug that allowed you to claim it 3 times.

------

Staff fixes: Editing users no longer gives them 100% energy, brave, will, hp!

Removed all magic quotes (conflicting with some of my code).

Added extra security to tag in both profiles and forums.

Fixed an old bug using x_forward.

Updates for tomorrow:

Support tickets: Add an alert when ticket has a response.

Crimes: add item rewards for higher up crimes.

Fix muggings (testing localy).

Link to comment
Share on other sites

Zettieee I don't allow mugs or attacks on my account because I haven't figured out how to get my events to pagenate. oh and I have Daves chat on my game. I can't scroll up and see previous messages. and I'd love to see username pic and have the names clickable . You are making rapid advances... awesome!

Edited by Tangled
Link to comment
Share on other sites

[ATTACH=CONFIG]1760[/ATTACH]

The image i was telling you about that cuts the chat

 

Been fixed :)

 

Fixed!

Other minor fixes:

Crimes text was using eval EDIT: secured eval. tested. Anyone feel free to test it!

removed old sprintf() from most* of the code.

Fixed forum signatures/display pics.

Edited by Zettieee
Link to comment
Share on other sites

Fixed!

Other minor fixes:

Crimes text was using eval, removed and re coded.

removed old sprintf() from most* of the code.

Fixed forum signatures/display pics.

What was the way you changed the eval in do_crime.php? I would be curious to know.

So so now that means no admin hijacking and dumping tables via do_crime :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...