Jump to content
MakeWebGames

Revamped Individual Player Shops Mod + Future Updates [$10]


Arson

Recommended Posts

This is a heavily revamped version of the Playershops(1.0) mod I created 3ish years ago.

This modification gives your players the ability to open their own shop, and add items from their inventory to the shop to be sold at whatever price they set.

Here is a detailed list of the features included with this mod (1.5):

Player Features

Item Searching - Screenshot 1 - Screenshot 2 - Players can search for items using the included search feature. The 20 best priced results are shown with links to purchase the item, and visit the shop that has the item in stock.

Shop Creation - Screenshot - Any player can create a shop if they have enough money. The price is set by you, the game admin.

Shop Customization - Screenshot - Shop owners can set a name, sign, and description for their shop that all visitors can see.

Shop Management - Screenshot - Shop owners can change prices or remove items in the shop. Removed items are sent back to the player's inventory.

Shop Til - Screenshot - Money received from purchases in the shop is stashed in the shop til. Shop owners must withdraw this before they can use the money.

Shop Upgrades - Screenshot - There is a limit on how many items any shop can carry at one time. Shop owners can upgrade their shops at a price decided by you, the game admin.

Shop Logs/Events - When a player purchases an item from a shop, the shop owner receives an event about the purchase, as well as an entry in the shop logs for the owner's reference.

Ability to Close Shop - Players can close their shops at any time if for some reason they wish to do so.

Staff Panel Features - Screenshot

Set Shop Creation Pricing Method and Price - You can set the pricing method to static or dynamic. If the price is set to $1,000, and the method is static, shops will cost $1,000 each time. If the method is set to dynamic, shops will cost $1,000 times the number of shops in existence. For example if there are 5 shops, then it will cost $5,000 to create a shop.

Set Shop Upgrade Pricing Method and Price - You can set the pricing method and price for this. The same rules apply for these settings as the shop creation pricing method.

Set Slots received per Upgrade - Say you want the players to be able to purchase 10 item slots at a time, change this to 10. Keep in mind that you don't want to make it too easy, or it will take the fun and reward out of having a big shop.

Minor Theme Options - This is nothing major, but it allows you (if desired) to set background colors for table headers as well as the odd and even numbered rows of results and tables within the mod. I have them set to what looks nice on the default mcv2 layout, you can change them to look nice with your game, or leave them blank to let your own game's theme take over.

Now I am sure there are lots of you wondering what makes this different from the old version besides the new staff panel. Well, I have a list for that as well!

What's New in this version:

-- Reduced mod to 3 files. playershops.php, myshop.php, staff_playershops.php

-- Refined the code to make it easier for other coders to find their way around and make any desired changes.

-- Significantly reduced database load by optimizing query structure...I pretty much rewrote every query.

-- Backwards compatibility maintained (for the most part). Those of you that have the old version should be able to upgrade just by uploading the new files and replacing the old, and changing your addtoshop.php links.

-- MANY bug fixes from the old version. This version is 100% compatible with v2, and 100% secure.

-- Changed shop item adding to account for quantities and give player

a few options for merging items if there is already one in the shop. The old version had some issues with quantifying when an item was added/removed. These have been taken care of.

I still have a few more ideas for improving this mod with future updates, and am more than happy to hear any feedback or suggestions you might have as well.

Unfortunately if you own the old version of this modification I cannot cut you any more of a deal than $10 for this update.

However, you will be happy to know that all future updates for this modification will be available for free to anyone that purchases this version (1.5).

A few things to come in the next version (2.0):

-- Staff functions for moderating shops. Ability to change names, descriptions, logos, as well as delete the shop altogether.

-- Ability to set level requirement for creating a shop.

-- Global shop logs for staff to monitor item trade. Will point out same IP transfers.

-- Goodbye HTTP Calls for shop images. Hello image upload functions.

-- Bring on the suggestions! I am always happy to improve this modification.

 

The price for this mod is $10 payable via PayPal.

To purchase, shoot me a PM. Feel free to ask any questions you may have!

Edited by Arson
Link to comment
Share on other sites

Old Mod:

print"<center><h3>{$shop['name']}</h3><br>$image<br><table align=center width=500><tr><td colspan=3>{$shop['description']}</td></tr>
<tr><th colspan=3>For Sale</th><tr>
<tr><th>Item</th><th>Price Each</th><th>-</th></tr>";
$getitems=$db->query("select * from usershopitems where shopid={$shop['id']}");
while($it=mysql_fetch_array($getitems))

New Mod:

	?>

<table align="center" style="width: 80%; margin-top: 25px;">
	<tr style="background-color: <?php echo $table_header_bg; ?>;">	
		<th colspan="3"><?php echo $shop['name']; ?></th>
	</tr>
	<tr>
		<td style="padding-left: 5px; text-align:center;" colspan="3"><?php echo $image; ?></td>
	</tr>
	<tr>
		<td style="padding-left: 5px; text-align:center;" colspan="3"><?php echo $shop['description']; ?></td>
	</tr>
	<tr style="background-color: <?php echo $table_header2_bg; ?>;">
		<th colspan="3">For Sale</th>
	</tr>
	<tr style="background-color: <?php echo $table_header2_bg; ?>;">
		<th width="45%">Item</th>
		<th width="40%">Price Each</th>
		<th width="15%">Buy</th>
	</tr>

<?php

$getitems = $db->query("SELECT `id`,`itemid`,`quantity`,`price` FROM `usershopitems` WHERE `shopid`='{$shop['id']}'");

	while($it=mysql_fetch_array($getitems))

 

Hopefully that shows the improvements in the coding style.

Link to comment
Share on other sites

In case anyone is wondering...

Yes, this is an updated version of the playershops mod currently available from Cronus' MccodeMods.com.

Once I manage to get a hold of Cronus this new version will be available through his website.

Link to comment
Share on other sites

  • 3 weeks later...

well for me i love the new mod as i had the old one installed in my game. I have to say this one feels a lot better to me. My players love it ,they was quick to point out a bug found and you was quick to fix it.

very well done and nicely made buddy. I have only had it for a few days now but the users have nothing but nice things to say about it , there happy and that makes me happy.

Link to comment
Share on other sites

I just bought this the other day but havent looked into it much so hopefully its more secure than the last one. I found out the hard way that it wasnt up to snuff on simple security that I even missed. I had a guy come in and tear those player shops up but needless to say im excited to install this one

Link to comment
Share on other sites

I just bought this the other day but havent looked into it much so hopefully its more secure than the last one. I found out the hard way that it wasnt up to snuff on simple security that I even missed. I had a guy come in and tear those player shops up but needless to say im excited to install this one

Please shoot me a PM with a way to get ahold of you. Preferably via MSN messenger.

I fixed a few bugs as DeatH_RiderR said, and I need to get you the updated files asap.

The MccodeMods.com files are already updated so no worries for those of you that haven't yet purchased the mod.

Link to comment
Share on other sites

  • 3 weeks later...

Hello

I have purchased the following mod.

I have a problem that needs fixing with the updated Mod

When i place an item for sale for say $5000 when i purchase it then check my sales till it tells me i have Balance

$1215868

But checking it seems to be getting the figure from my games cash as these to amounts are the same.

Please check

Thanks

Link to comment
Share on other sites

Its not giving any errors.

To see what is happening place an item in your shop and purchase yourself.

Then check your till to see your shop total it will not match its much higher that it should be.

I hope i have explained this correctly,

Cheers

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...
  • 4 weeks later...

Getting the following error when going to:

staff_playershops.php

A critical error has occurred, and page execution has stopped. Below are the details:

PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, object given (2)

When I don't comment out the code in my mainmenu the entire game throws the following error:

A critical error has occurred, and page execution has stopped. Below are the details:

PHP Warning: mysql_num_rows() expects parameter 1 to be resource, object given (2)

Thats for mainmenu.php

Sounds like the queries are whats ****ing it up? What does this need to be changed to for it to work?

PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, object given (2) There's another one for

playershops.php?action=search

Edited by Joe
Link to comment
Share on other sites

Getting the following error when going to:

staff_playershops.php

A critical error has occurred, and page execution has stopped. Below are the details:

PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, object given (2)

When I don't comment out the code in my mainmenu the entire game throws the following error:

A critical error has occurred, and page execution has stopped. Below are the details:

PHP Warning: mysql_num_rows() expects parameter 1 to be resource, object given (2)

Thats for mainmenu.php

Sounds like the queries are whats ****ing it up? What does this need to be changed to for it to work?

PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, object given (2) There's another one for

playershops.php?action=search

 

at the end of the query after "); and just before the ; put:

OR DIE(MYSQL_ERROR())

AND LET US KNOW THE OUTCOME

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...