RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO SVN] Hawkins' Vendor Auction and Mall 2.0

Hawkins

Sorceror
[RunUO SVN] Hawkins' Vendor Auction and Mall 2.0

View attachment 16852VAM 2.0 - Hawkins' Vendor, Auction and Mall System 2.0

Credit:
First I would like to thank those from the RunUO community, especially Lord GreyWolf, Soteric, Jeff, Vorspire and others, for without their help directly and indirectly, I can hardly finish this project.

Introduction:

- Mall
Mall no longer links to house such that you, the shard owner, can set up your vendor mall anywhere as you wish. You can setup your mall surrouding Britain Bank, and you can establish your black markets deep inside the dungeons.

- Vendors
There are 3 types of staff setup walking vendors and 1 stationed player run vendor. The walking vendors will not go away but wandering inside the mall region.

a) Commissioned Vendor
They are enhanced version of Player Vendors, setup and run by players. They can be set to basing on sales commissions instead of a daily charge. They bill a percentage on every sales transaction. Players no longer need to worry about the dismissal of their vendors due to the lack of fund, this is true especially in less crowded shards.

Commissioned vendors are fully functioning when in Malls. When bringing home, they function the same except that auction/biding will not be possible, as auction and biding is allowed only in malls.

Since they are inherited from Player Vendor, you can treat them as traditional Player Vendors, and to place items to their backpacks to sell them in the classical way.

b) Wandering Trader
They are vendors selling bidable items. They are only walking inside the defined mall region and will not wander away. They are owner setup vendors selling unique items allowing players to place bids.

c) Pet Seller
Although all 4 types of vendors are capable of selling pets, pet sellers are more specialized in that they show off the selling pets when players are around. That is, they are actually selling your pets.

d) Restockable Vendor
They sell non-unique items with their inventory automatically refilled, more or less like the usual NPC vendors. The difference is that, the shard owners/game masters in game can dynamically place items and pets for them to sell.

- Auction
Players can place bids or bargain back on selling items and pets.


Pre-requisite:
You need to install Callandor2k's RunUO with Mondain's Legacy. Coz it's the version this development is based off.

Installation:
- unrar the package and place it to your Custom folder
- to merge the "distro" scripts
- start server

There are only 2 distro files you need to change, and only slide changes are made in the 2 scripts
1. PlayerVendor.cs
2. Snooping.cs

Instruction:
  1. Find a suitable location to setup your mall, then type [manager to spawn the mall manager
  2. Single click on the manager to open the Mall Setup menu, then choose to mark your Mall region. When the region areas are marked, the walking vendors can be spawned and they will only walk inside the region
  3. Place the vendor tiles. To make sure the stationed vendors can stand on the spots, you can use the Setup menu to target yourself to generate the tiles in your standing positions
  4. Spawn the walking vendors, that is, the Wandering Traders, Pet Sellers and Restockable vendors
  5. Add selling items and pets to these staff setup venodrs, that is, the Wandering Traders, Pet Sellers and Restockable vendors
  6. Players can now purchase the commissioned vendor deeds and auction account books from the mall manager. They (players) can run their commissioned vendors in the mall or in their own houses ( disadvantage of home-stay vendors is that bids are not allowed. Bids are only allowed for vendors inside a mall )


Package de-installation/removal:
- delete all vendors in mall
- delete the manager
- type [Save to save the shard, which will force a proper after deletion clean-up
- then type [SaveStone to go to the Mall Save Stone which is used to store auction records and etc., and [remove it
- shut down the server and remove the package

Package:
It is better to download the most updated copy from CodePlex,
http://vendorauctionmall.codeplex.com/


( 17-May-2009 ).( 21-May-2009 ).( 30-May-2009 ).( 14-Jun-2009 ).( 30-Jun-2009 )
 

Attachments

  • VendorAuctionMall20.rar
    80.1 KB · Views: 254

Hawkins

Sorceror
Updates:

[21-May-2009]
- enhanced the Bidding features, added a Staff Bid Ledger for staff to manage bid approval for staff setup vendors
- corrected some bugs, including the commission calculation and charging
- added region control such that whether spell "Mark" is allowed can be set by staff's [props on the manager
.
.
[28-May-2009]
More uptodate files are kept in CodePlex, here,

http://vendorauctionmall.codeplex.com/

Release Notes
Hawkins' Vendor Auction and Mall System 2.0 Revision 11

Bugfix:
- corrected pet seller showtime issues
- corrected a bug in StaffBidLedger causing null reference error
- corrected a bug in RestockableVendor and items can be removed properly
- Stackable items added to Restockable vendor will have a quantity of 1
- Restockable vendors now can sell 60000 stackable items and 999 non-stackable items


New features:
- Restockable vendors can be set to sell stackable items in bulk up to 60000 in quantity. They are now called Bulk Orderers.

To do so, just [props a Restocker and set 'IsBulk' to true. When 'IsBulk' is set to 'true', stock refilling will no longer increase or reduce the max quantity by half.

[30-May-2009]
Release Notes

Release: Revision 12
CodePlex Build: 17332


Bugfix
- bug of HoldGold deserialization is fixed, such that vendor commission is reduced correctly after each server re-start
- bug of Pet Seller sending already sold pets to Internal map is fixed, such that during the road shows sold pets will be handled correctly
- road show pets after server re-start are handled more properly

New Features
- other than the "Mark" spell, both "Teleport" and "Recall" spells can be disabled from being casting inside a vendor mall


[14-Jun-2009]
Release: Revision 15
CodePlex Build: 20805

Bugfix
- distro file "BaseVendor.cs" is updated such that multiple currency purchase using classical vendor buying gump will handle the currencies correctly
- corrected a bug where pets on show purchased are with invulnerable status
- pets in forms of humans ( such as evo mercenary ) will not use the pet's own hue as shopitem, such that the displayed hue will not be 'black' in color

[30-Jun-2009]
Release: Revision 16
CodePlex Build: 22715

Bugfix
- Petseller didn't handle currency sales correctly, it always gives Gold to the owner instead of the correct currency ( fixed )
- Petseller didn't charge commission for hired pet sales ( fixed )
- Bidding may cause server crash when multiple players are competing for the same item ( fixed )
- Only the bid with highest amount placed can be approved ( after fixing, any bid can be approved )
- When Gold is used as currency, the owner is billed instead of the bider (fixed)
- Commissioned Vendor didn't dismiss properly ( fixed )

Improvement
- Mall tiles are automatically added on commissioned vendor dismissal ( can be set in CommissionedVendor.cs )
- Useless "Buy" and "Sell" context menu options are removed from wandering traders and pet sellers
- Commissioned vendor's backpack can be disabled from being displayed to buyers ( option set in CommissionedVendor.cs )
.
.
.

----
A vendor mall is quickly setup in Ankh Dungeon of Ilshenar, the vendors are dancing with the critters, while the guards are busy killing them.

View attachment 16778


Here, you can view the classic buy gump, the new graphical buy gump and the true item itself side by side at the same time. You can place bids, view detailed pet info and manage your own items by just a single click.

View attachment 16779


While the pet seller starts a road show to demostrate his selling pet, I am viewing the detailed pet info which will dynamically extend to FS:ATS or Xanthos Evo System ( or other pet systems easily ) if you have them installed, detail info such as Level, Max Level, Generation, Ep, Stage and etc.

Moreover, do you notice any difference between the first screen shot and the third? The vendor tiles are totally different. It's because by a single click, you can change the vendor tiles inside the mall to any tiles of your favor. :eek:

View attachment 16780


Both tiles and their color hues can be setup and applied to the whole mall. And single click on vendors, manager or items will bring up the corresponding context menu. Here, "Offer" = to place a bid, or to display all items which are under auction.

View attachment 16783


Click the item will bring up the context menu, choose "Offer" will display the bidding info, such as currently who have placed bids on the item, and their prices offered. On the other hand, your own account book will show all the bids you have placed. Moreover, if you are the owner of the auction items, you will be informed of the last active bid right after your login the game.

Notice that in the screen shot, currency has been set to Daat99Tokens instead of Gold. And everytime when you enter the mall region, random UO music will be played. ;)

View attachment 16784
 

Attachments

  • anhk manager.jpg
    anhk manager.jpg
    174.2 KB · Views: 357
  • buy menu.jpg
    buy menu.jpg
    245.2 KB · Views: 326
  • road show.jpg
    road show.jpg
    280.4 KB · Views: 249
  • tile and hue.jpg
    tile and hue.jpg
    206.7 KB · Views: 229
  • bid menu.jpg
    bid menu.jpg
    224.4 KB · Views: 218
the auction vendors, are they for staff to use only or for players to use also for selling items?

do they have a date/time set up for when auction ends?
do they auto remove from banks or what ever? and auto give to player?
and what happens if player does not have funds, etc?
also how extensive of testing have you done with the auctioning?
 

Hawkins

Sorceror
Lord_Greywolf;800808 said:
the auction vendors, are they for staff to use only or for players to use also for selling items?

Commissioned vendor - for players
Wandering traders, Restockable vendors - for staff
Petsellers - for both, players can 'hire' them to sell their pets

do they have a date/time set up for when auction ends?

Yes, by default it is set to 12 days which is changable by staff in game using [props

do they auto remove from banks or what ever? and auto give to player?
Multiple currency, from backpack and bank. If currency is gold, bankcheck in bankbox will also be used.

As for bids, items will be delivered to players' backpack or bankbox, pets will be stabled if there's enough slot.

and what happens if player does not have funds, etc?

Message will show up saying that he/she has not enough fund. Owners will actively 'approve' the winning bid.

also how extensive of testing have you done with the auctioning?

Basically 95% up, all left however may crash. :D

I will keep testing thou.
 
Quote:
Originally Posted by Lord_Greywolf
the auction vendors, are they for staff to use only or for players to use also for selling items?

Commissioned vendor - for players
Wandering traders, Restockable vendors - for staff
Petsellers - for both, players can 'hire' them to sell their pets

still did not say if auction ones can be used by players???
from below answers looks like they can, but not sure

look forward to using parts of this for sure (all ready have mall vandors for players, but auction and commission sounds great :) )
 

Hawkins

Sorceror
Lord_Greywolf;800810 said:
still did not say if auction ones can be used by players???
from below answers looks like they can, but not sure

look forward to using parts of this for sure (all ready have mall vandors for players, but auction and commission sounds great :) )

Players can click on a selling item to place a bid, the first player who places a bid onto an item will 'start' the auction automatically. Other players may choose the menu 'Offer' to view all items which an auction has been started and thus join the auction. Any player who is the owner of a commissioned vendor can place the first bid onto his own items to start the 'auction'.

Hope that answers your question, and apology for my poor English. :eek:
 
ok so the commisioned vendors can also hold auctions then, or it is started through them anyways

you may want to include a list of how to do all this stuff in detail lol
 

Hawkins

Sorceror
Lord_Greywolf;800852 said:
ok so the commisioned vendors can also hold auctions then, or it is started through them anyways

you may want to include a list of how to do all this stuff in detail lol

Yep, I didn't mention it well. Actually all auctions/bids are started by players, no matter the items are in the staff setup Wandering Traders, Pet Sellers or the player run Commissioned Vendors.

And yes, I am going to prepare a detailed user guide, perhaps after the frist round reported bugs or suggested improvements are done. :D
 

mikeymaze

Wanderer
Here is the Errors i get
Code:
Errors:
 + VendorAuctionMall/Mobiles/CommissionedVendor.cs:
    CS0506: Line 346: 'Server.Mobiles.CommissionedVendor.Dismiss(Server.Mobile)'
: cannot override inherited member 'Server.Mobiles.PlayerVendor.Dismiss(Server.M
obile)' because it is not marked virtual, abstract, or override
 

Hawkins

Sorceror
mikeymaze;800893 said:
Here is the Errors i get
Code:
Errors:
 + VendorAuctionMall/Mobiles/CommissionedVendor.cs:
    CS0506: Line 346: 'Server.Mobiles.CommissionedVendor.Dismiss(Server.Mobile)'
: cannot override inherited member 'Server.Mobiles.PlayerVendor.Dismiss(Server.M
obile)' because it is not marked virtual, abstract, or override

Yep, you need to first merge the changes in PlayerVendor.cs and Snooping.cs. :)

Such an error occurs when you compile the package without first merging the above 2 scripts in the "distro" folder with your existing scripts.


the 2 modifications made in PlayerVendor.cs
PHP:
#region Vendor Auction and Mall System
public Timer DailyPayTimer
{
	get{ return m_PayTimer; }
	set{ m_PayTimer = value; }
}
#endregion

PHP:
#region Vendor Auction and Mall System
//		public void Dismiss( Mobile from )
public virtual void Dismiss( Mobile from )
#endregion


And the 1 modification in Snooping.cs

PHP:
#region Vendor Auction and Mall System
IHardsellable hs = cont.RootParent as IHardsellable;

if ( hs != null && hs.ShopItems != null && hs.ShopItems.Count > 0 && from.InRange( cont.GetWorldLocation(), 6 ) )
{
	cont.DisplayTo( from );
	return;
}
#endregion
 

rusmixx

Wanderer
Error

Code:
[COLOR="Red"]Errors:
 + Mobiles/VendorManager.cs:
    CS0117: Line 2535: 'Server.Mobiles.BaseCreature' does not contain a definiti
on for 'Allured'[/COLOR]
 

Hawkins

Sorceror
rusmixx;800909 said:
Error

Code:
[COLOR="Red"]Errors:
 + Mobiles/VendorManager.cs:
    CS0117: Line 2535: 'Server.Mobiles.BaseCreature' does not contain a definiti
on for 'Allured'[/COLOR]

Yep, that's something from Erica. It might not be in the SVN itself, but rather in either MalGanis' ML or somehow Callandor2k's RunUO package, off which my development is based.

So in case you don't the have "Allured" defined, you may make the following change in VendorManager.cs, line 2535,

from:
PHP:
if ( pet.Deleted || pet.IsDeadPet || pet.Summoned || pet.Allured || !pet.Controlled || !( pet.ControlMaster == from ) )
	return;

and change to:
PHP:
if ( pet.Deleted || pet.IsDeadPet || pet.Summoned || !pet.Controlled || !( pet.ControlMaster == from ) )
	return;

that is, with "|| pet.Allured" removed from the line.
 

rusmixx

Wanderer
Server Crash

Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2959.20979
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 18.05.2009 12:40:08
Mobiles: 2418
Items: 99897
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Mobiles.Maintenance.OnStarted()
   at Server.EventSink.InvokeServerStarted()
   at Server.Core.Main(String[] args)

Clients:
- Count: 0
 

Hawkins

Sorceror
The most critical bug I found by far is in CommissionedVendor.cs, the last code line of the file,

Code:
if ( !cv.Deleted && cv.IsComm && cv.CommRate > 0 && cv.CommRate <= 100 && cv.LastHold > cv.HoldGold )
{
	int left = cv.HoldGold - cv.LastHold;
	int comm = (int)( left * cv.CommRate / 100 );

	cv.HoldGold -= comm;
	[COLOR="Red"]cv.LastHold = cv.HoldGold;[/COLOR]
}


without adding the highted line, the commission calculation is wrong, HoldGold will be reduced time and again. :D
 

Hawkins

Sorceror
rusmixx;800912 said:
Server Crash

Code:
Server Crash Report
===================

RunUO Version 2.0, Build 2959.20979
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 18.05.2009 12:40:08
Mobiles: 2418
Items: 99897
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.Mobiles.Maintenance.OnStarted()
   at Server.EventSink.InvokeServerStarted()
   at Server.Core.Main(String[] args)

Clients:
- Count: 0

Seems to be an empty array is encountered. Would you please help to crash it in debug mode? coz i just need to know the line number causing the crash.

Thanks so much.
 

Hawkins

Sorceror
rusmixx;800916 said:
Here is a screen made

Still, there's no line number info. I will try to simulate this when I am home. The OnStarted() method contains only several lines. Unless the "if ( list == null" is removed, it doesn't seem that it will cause any error on start up. But I will try to reproduce it.
 

mikeymaze

Wanderer
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.Maintenance.OnStarted() in c:\ Server2\Server\Scripts\VendorAuctionMall\Misc\Maintenance.cs:line 92
at Server.EventSink.InvokeServerStarted()
at Server.Core.Main(String[] args)
 

Hawkins

Sorceror
mikeymaze;800939 said:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.Maintenance.OnStarted() in c:\ Server2\Server\Scripts\VendorAuctionMall\Misc\Maintenance.cs:line 92
at Server.EventSink.InvokeServerStarted()
at Server.Core.Main(String[] args)

Ok, I failed to reproduce this error, using serveral versions of RunUO, including a fresh one compiled by VS C# 2008. So I suppose this is a timing issue ( your pc is too fast?:p? ).

I've figured out a better way to spawn this 'SaveStone', that is, to spawn it when the first manager is created. I am going to launch a new update very soon, together with other issues fixed ( such as the commission deduction logic and timer ).

Yet if you wish to continue to try out the package at the moment, you can comment out or remove line 92 in Maintenance.cs, and manually generate the 'SaveStone' anywhere as you wish by typing the command [add SaveStone in game.

Thanks so much for your help. :D

Sincerely
 
Top