Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 09-28-2005, 06:21 PM   #1 (permalink)
Forum Expert
 
Join Date: Sep 2005
Location: Indiana
Age: 27
Posts: 257
Send a message via AIM to Marine_3038 Send a message via MSN to Marine_3038 Send a message via Yahoo to Marine_3038
Default NPC's

How do you edit what NPC's sell? My mage NPC's our not selling all 64 scrolls so I need to fix that, plus I'd like a few NPC's to sell some speical stuff as well. What file do I edit?
Marine_3038 is offline   Reply With Quote
Old 09-28-2005, 06:26 PM   #2 (permalink)
Forum Expert
 
Packer898's Avatar
 
Join Date: Dec 2004
Location: Tulsa, Oklahoma
Age: 35
Posts: 2,378
Send a message via ICQ to Packer898 Send a message via MSN to Packer898
Default

SBInfo. Look in your RunUO\Scripts\Mobiles\Vendors\SBInfo
Packer898 is offline   Reply With Quote
Old 09-28-2005, 06:38 PM   #3 (permalink)
Forum Expert
 
Join Date: Sep 2005
Location: Indiana
Age: 27
Posts: 257
Send a message via AIM to Marine_3038 Send a message via MSN to Marine_3038 Send a message via Yahoo to Marine_3038
Default

Ok I found it but does anyone have the code to add to the vendors so the mages sell everything for a full spell bokk?
Marine_3038 is offline   Reply With Quote
Old 09-28-2005, 07:38 PM   #4 (permalink)
Forum Expert
 
Johabius's Avatar
 
Join Date: Dec 2004
Location: Kansas, USA
Age: 38
Posts: 4,964
Send a message via ICQ to Johabius Send a message via Yahoo to Johabius
Default

First off, are you sure you want to make it that easy for your players to get a full spell book? I personally would like players to have to work for things. But if you are looking for a NPC vendor that you can customize on the fly to sell certain things check out something called Custom Vendors On The Fly, pretty much ignore the version in the archives, because there is an updated (I think) version in the Custom Script releases forum.
Johabius is offline   Reply With Quote
Old 09-28-2005, 07:46 PM   #5 (permalink)
Forum Expert
 
Packer898's Avatar
 
Join Date: Dec 2004
Location: Tulsa, Oklahoma
Age: 35
Posts: 2,378
Send a message via ICQ to Packer898 Send a message via MSN to Packer898
Default

Custom vendors on the Fly is not that great of a program. Learn how to edit the SBInfo instead of a having to use a custom script...

Look ar SBMage.cs...
Code:
				Type[] types = Loot.RegularScrollTypes;

				for ( int i = 0; i < types.Length; ++i )
					Add( types[i], 6 + ((i / 8) * 5) );
Packer898 is offline   Reply With Quote
Old 09-28-2005, 07:54 PM   #6 (permalink)
Forum Expert
 
Johabius's Avatar
 
Join Date: Dec 2004
Location: Kansas, USA
Age: 38
Posts: 4,964
Send a message via ICQ to Johabius Send a message via Yahoo to Johabius
Default

It may not be that great of a script, but it works, and it works well for small shards with a small staff that are just starting out in C#, yes if you are really wanting to run a good shard, and have high expectations of what the shard will be in the future, then by all means learn how to do something without having to rely on other people to do the work for you.
*edit* and just for the record, I learned how to edit my SB info, so anyone can do it...I was just pointing out an alternative.
Johabius is offline   Reply With Quote
Old 09-28-2005, 08:28 PM   #7 (permalink)
Forum Expert
 
Packer898's Avatar
 
Join Date: Dec 2004
Location: Tulsa, Oklahoma
Age: 35
Posts: 2,378
Send a message via ICQ to Packer898 Send a message via MSN to Packer898
Default

I wasnt downing your suggestion by any means. I have used Custom vendors etc.. as well. The problem I found with it is that it was buggy as hell. Sometimes the items would weight 10000stones etc... Didnt leave a great taste in my mouth so I learned to edit sbinfo.cs or make new SBWhatever.cs for custom vendors.
Packer898 is offline   Reply With Quote
Old 09-28-2005, 08:36 PM   #8 (permalink)
Forum Expert
 
Johabius's Avatar
 
Join Date: Dec 2004
Location: Kansas, USA
Age: 38
Posts: 4,964
Send a message via ICQ to Johabius Send a message via Yahoo to Johabius
Default

Yeah I know what you mean...I just use my custom vendor to sell a couple things, so I haven't run into the weight problem yet...but yeah even my buddy Jeebus, knows how to fiddle with his SBinfo, so it's not that hard to do
*edit* best thing to do in any case is to start fiddling around with the scripts and if you break it, post the scripts and the errors, and someone will be able to help you out, but make sure to post in the correct area
Johabius is offline   Reply With Quote
Old 09-28-2005, 09:51 PM   #9 (permalink)
Forum Expert
 
Join Date: Sep 2005
Location: Indiana
Age: 27
Posts: 257
Send a message via AIM to Marine_3038 Send a message via MSN to Marine_3038 Send a message via Yahoo to Marine_3038
Default

Look can i get the code or not? I'm not into the idea of vendors flying through the air.
Marine_3038 is offline   Reply With Quote
Old 09-28-2005, 11:11 PM   #10 (permalink)
Forum Expert
 
Tannis's Avatar
 
Join Date: Feb 2004
Age: 27
Posts: 2,047
Default

Vendors on the fly just makes it so you can edit it without having to restart, and mess with code (I think). I'm positive it has nothing to do with them going through the air. I don't think many people will give you the code, sorry to say. You honestly should try it yourself first and see if it works. Then if you get errors, and want help with them, people will be more than willing to help you since you helped yourself first. If you look in the SB scripts, it shows how the vendor sells it's items. For instance:
Code:
Add( new AnimalBuyInfo( 1, typeof( Eagle ), 402, 10, 5, 0 ) );
This is from the SBAnimalTrainer script. You can see that it is selling an eagle. There are 4 numbers. 402 is the price. 10 is the amount the vendor will keep in stock. 5 is the bodyvalue (this is so you can see a picture of an eagle next to it on the sell list) and I'm not sure what 0 is, it may be the hue. So, now that you know what the numbers do, try adding your own lines. For instance (and this is ONLY a for instance, NOT tested code)
Code:
Add( new GenericBuyInfo( 1, typeof( EarthquakeScroll ), Price Here, Amount to sell here, ItemID here, 0 ) );
Tannis is offline   Reply With Quote
Old 09-28-2005, 11:16 PM   #11 (permalink)
Forum Expert
 
Packer898's Avatar
 
Join Date: Dec 2004
Location: Tulsa, Oklahoma
Age: 35
Posts: 2,378
Send a message via ICQ to Packer898 Send a message via MSN to Packer898
Default

Quote:
Originally Posted by Marine_3038
Look can i get the code or not? I'm not into the idea of vendors flying through the air.
Wow... You are getting help. You have been told two different ways to do what you want. Either lookup the Custom script suggested or get to hopping on editing the SBMage.cs yourself. Either way you are extremely rude and I think I will now place you on my Ignore list. You need to remember no one here HAS to help you jerk.
Packer898 is offline   Reply With Quote
Old 09-30-2005, 01:40 AM   #12 (permalink)
Forum Expert
 
Join Date: Sep 2005
Location: Indiana
Age: 27
Posts: 257
Send a message via AIM to Marine_3038 Send a message via MSN to Marine_3038 Send a message via Yahoo to Marine_3038
Default

Honestly it helps if you get showed correctly the first time. Getting the code would be better than making mistake, messing the shard up for players and then having to wait a year on a person to answer what you did wroung correctly. Much fast to get the code posted. An packer your a ass, I hope when I get everything I need, I never end up being a jerk like you!
Marine_3038 is offline   Reply With Quote
Old 09-30-2005, 02:17 AM   #13 (permalink)
Forum Expert
 
Tannis's Avatar
 
Join Date: Feb 2004
Age: 27
Posts: 2,047
Default

The main purpose of this site is to be a learning/support tool. There are some people who will just throw code at whoever asks for it, and there are others that would rather you learned something from what you're trying to do. You won't mess up your shard so to speak, but you might get errors from time to time. I bet even the best programmers on here get errors, and they work through them. If you actually took a look in the script you were trying to modify, it does plainly show how to make a vendor sell another item. You might not understand what the numbers are for, but if you did some research, you would figure it out. That's how probably 75% of the people here got their start. So yes, it may be faster if someone just tosses pieces of script at your head, but you'll never understand what it does if you don't try it yourself. I showed you exactly what to do, that should be enough to go on.
Tannis is offline   Reply With Quote
Old 09-30-2005, 04:11 PM   #14 (permalink)
Forum Expert
 
Join Date: Nov 2003
Posts: 561
Default

Tannis and Packer both gave you solutions, what is the problem?

Also, I do hope you test out all your scripts on a test server before dumping them on your live server.

take a look at sbmage.cs. look where the code adds Loot.RegularScrollTypes to the buy menu. Look for a variable called 'circle'. How many spell circles does your SBMage sell by default? How much more assistance do you need?


Quote:
Originally Posted by Marine_3038
Honestly it helps if you get showed correctly the first time. Getting the code would be better than making mistake, messing the shard up for players and then having to wait a year on a person to answer what you did wroung correctly. Much fast to get the code posted. An packer your a ass, I hope when I get everything I need, I never end up being a jerk like you!
ssalter is offline   Reply With Quote
Old 09-30-2005, 07:55 PM   #15 (permalink)
Forum Newbie
 
Join Date: May 2005
Location: Ohio
Age: 18
Posts: 94
Send a message via ICQ to Makoro Shimoro Send a message via AIM to Makoro Shimoro
Default

Quote:
Originally Posted by Marine_3038
How do you edit what NPC's sell? My mage NPC's our not selling all 64 scrolls so I need to fix that, plus I'd like a few NPC's to sell some speical stuff as well. What file do I edit?

And you said I was a nub
Makoro Shimoro is offline   Reply With Quote
Old 09-30-2005, 09:58 PM   #16 (permalink)
Forum Expert
 
Join Date: Feb 2004
Age: 27
Posts: 1,834
Default

Quote:
Originally Posted by Makoro Shimoro
And you said I was a nub
*pours some cold water on the thread*
Kamuflaro is offline   Reply With Quote
Old 10-01-2005, 02:00 AM   #17 (permalink)
Forum Expert
 
Join Date: Sep 2005
Location: Indiana
Age: 27
Posts: 257
Send a message via AIM to Marine_3038 Send a message via MSN to Marine_3038 Send a message via Yahoo to Marine_3038
Default

I don't have a test shard, I only have a live shard. Thats why its import to get the right code.
Marine_3038 is offline   Reply With Quote
Old 10-01-2005, 02:18 AM   #18 (permalink)
Forum Expert
 
Packer898's Avatar
 
Join Date: Dec 2004
Location: Tulsa, Oklahoma
Age: 35
Posts: 2,378
Send a message via ICQ to Packer898 Send a message via MSN to Packer898
Default

Make a copy of your "public shard" and simply edit serverlist.cs and change the ip to 127.0.0.1 then use that as a test shard. That way you can make changes and make sure everything works before adding it to a live shard. Never EVER add untested scripts to a live shard or youll risk wiping the entire thing.
Packer898 is offline   Reply With Quote
Old 12-14-2005, 08:46 AM   #19 (permalink)
Newbie
 
Join Date: Nov 2005
Age: 43
Posts: 33
Default

This is not complicated at all. I played around with it and here's what I found out as far as mage vendors go.

the lines

Code:
				Type[] types = Loot.RegularScrollTypes;

				int circles = 5;
This is all that needs changed

int circles = 5;

Below that line the rest of the function defins what those circles are. If you change that 5 to an 8 the mage vendor will spawn every scroll. If you leave it set to the default of 3 then only the first 3 circles will spawn.

Getting a vendor to spawn with a full spellbook is where it gets difficult since the actual definition for the full spellbook is not anywhere near this file.

Oh and the file I edited is C:\RunUO 1.0\Scripts\Mobiles\Vendors\SBInfo\SBMage.cs on my machine. Your actual path may differ but that's the file to change.

Hope this makes life a little easier for you.

UOXumer out.
UOXumer is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5