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 2.0 RC1] Vendor Item Fix 2.0/1.0

iamjedi

Wanderer
Vendor Item Fix 2.0/1.0

This script took literally no creative input whatsoever, and therefor no credit can be given to me for anything whatsoever, but here is an issue I have seen MANY run into.

"I can not change the amount of items sold on this vendor!"

"How do I restock to 999 of an item?!?!"

And this problem is consistant from 1.0 to 2.0 as well.

The asnwer? You can't... not without editing this line in your GenericBuy.cs file:

Code:
public GenericBuyInfo( string name, Type type, int price, int amount, int itemID, int hue, object[] args )
		{
			amount = 20;

This fix comments out the amount = 20; line.

You can do it by hand, it's somewhere near line 256. Or you can download this modified file. Have fun, and stop complaining ;)
 

Attachments

  • GenericBuy.cs
    7.4 KB · Views: 198

Pyro-Tech

Knight
i would like to know how to do the whole "restock depending on how much is left of current stock" thing..


if vendor sells out of an item, orders double
If vendor sells most, orders a little more
If vendor sells half, keeps
if vendor sells less than half, orders less,
if vendor doesn't sell any, drops by alot or whatever

and any item could sell between 1 and 999 depending on how much keeps getting bought

i remember reading it being put in or planned or something....but never saw it :(
 

iamjedi

Wanderer
I believe a form of this system was/is implimented. Or at least the sells out/orders double part. And I believe it begins with the amount stated in the SBInfo. To be honest though, I don't know the 100% of it. If you find that code, you can do a simple check to the amount left over / amount in SBInfo to determine what you want to restock to. Let me see if I can find some code for you...
 
I havent looked into this in 2.0 but I do remember a problem concerning vendors during 1.0 that caused item display to be incorrect. Some of you may know what I am talking about. It would make it so all deeds looked the same on a vendor you couldnt tell what you were getting until you had bought it. This was caused I believe by a patch EA released during SE? at any rate has it been corrected in this version or has anyone figured out a way to correct that?
 

iamjedi

Wanderer
Midnightdragon said:
I havent looked into this in 2.0 but I do remember a problem concerning vendors during 1.0 that caused item display to be incorrect. Some of you may know what I am talking about. It would make it so all deeds looked the same on a vendor you couldnt tell what you were getting until you had bought it. This was caused I believe by a patch EA released during SE? at any rate has it been corrected in this version or has anyone figured out a way to correct that?

Ouch. I haven't heard that one, though I'm sure that at least this fix won't trigger something like that. It sounds like a GenericBuy() method situation...
 

Pyro-Tech

Knight
Midnightdragon said:
I havent looked into this in 2.0 but I do remember a problem concerning vendors during 1.0 that caused item display to be incorrect. Some of you may know what I am talking about. It would make it so all deeds looked the same on a vendor you couldnt tell what you were getting until you had bought it. This was caused I believe by a patch EA released during SE? at any rate has it been corrected in this version or has anyone figured out a way to correct that?

yeah, that was broken when 1.0 RC0 or RC1 was released.....it has since been fixed by custom patches by RUO members, and also fixed in the core itself since a 1.0.0 was released, and now definatly with 2.0
 
the only other major problem right now with the vendors is it ignors the names you put in for items - it will only use the name that is specified in the actual item script - or if none specified - then a ciloc(sp) number (ouch - hate those)

so if you want a deed or some other item to show its proper name in there - then have to set it to that in the script fro the item istsel i.e. name = "this items name" in thisitem.ca :)

------
as for the restocking of different amounts - it is shortly after the line being fixed here is
it has a big comment blcok says how they modified it from osi's

basicaly right now it is set - if it sells out - double the amount to be sold - up to 999
if it is from 1/2 sold to all sold - leave the same (probaly a good nukber it thinks)

and is less than 1/2 sold then cut the amount inhalf to be restocked - lowest being 20
(this also messes with the fact of just having 10 items being listed lol)

you can mod this area to change it to be if at 3/4, 1/2 and 1/4 sold to do different amounts

or comment it all out and just leave the last line of amount = max items normaly sold - and the value will never change - always will be the same on every restock
 

iamjedi

Wanderer
I agree, it's odd I think, though, that 1.0 didn't even pull it from a Name property in the constructor. Cliloc only. Bummer.
 
Top