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!

Black Sandals HELP!

Thraxus

Sorceror
bacaw said:
I know where ur coming from with this, but i think that one is pretty self explanatory how i got that, in the switch i set the "random" to 1 and added 1 case so it would ALWAYS be that one case.
Keeping the switch function is pointless. If there's only one possible outcome, just take out the switch/case entirely. I could see inexperienced scripters reading this thread and assuming that the switch/case needed to be there, since nobody has pointed out otherwise yet. :p
 

ii.

Sorceror
I think the topic was black sandals irl :{ and the only reason his code doesnt work is because it doesnt understand the item "Sandals" which has been my error for awhile now kthx:{
 

daat99

Moderator
Staff member
ii. said:
I think the topic was black sandals irl :{ and the only reason his code doesnt work is because it doesnt understand the item "Sandals" which has been my error for awhile now kthx:{
You still didn't used
Code:
 tags when you posted the script and I didn't saw [b]any[/b] errors whatsoever.
We can't help you without both the script and the errors (most of us won't help if it isn't in code tags but not everybody).
 

TMSTKSBK

Lord
if you just want the jeweler to *wear* black sandals:

change this:
Code:
switch ( Utility.Random( 4 ) ) 
{ 
case 0:
{
Item sandals = new Sandals();
sandals.Hue = Utility.RandomBirdHue;
EquipItem( sandals );
break;
}
case 1:
{
Item shoes = new Shoes();
shoes.Hue = 0;
EquipItem( shoes );
break;
}
case 3:
{
Item sandals = new Sandals();
sandals.Hue = 1;
EquipItem( sandals );
break;
}
}
}

To this:

Code:
Item sandals = new Sandals();
sandals.Hue = 1;
EquipItem( sandals );

Now I'm going to ask that you tell me what I did.
 

ii.

Sorceror
Code:
The nametype or namespace name "Sandals" could not be found (ara your missing a using directive or assembly reference?)

Thats the error i keep getting everytime :{{{{{
[e cry
 

daat99

Moderator
Staff member
ii. said:
Code:
The nametype or namespace name "Sandals" could not be found (ara your missing a using directive or assembly reference?)

Thats the error i keep getting everytime :{{{{{
[e cry
The Sandals is probably part of the Items namespace.
Try to add using for the Item namespace at the top of the script (look at other scripts that add items to mobiles to see what you missing).
 

ii.

Sorceror
I looked at the other scripts and it had
Code:
using System;
using System.Collections;
using Server;

namespace Server.Mobiles
{

which is what the jeweler has. But i also look at the tailors shoes and how its setup and it looks like this
Code:
get{ return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes; }
so how would i make that black sandals?
 

daat99

Moderator
Staff member
ii. said:
Well no errors but the sandals dont show up on the vendor
If I remember right then the vendor cloths are getting overrided in the BaseVendor.cs so you'll have to add a check that that if it's your jewler then don't override the shoes.
 

daat99

Moderator
Staff member
ii. said:
im not that good a scripter can yah tell me where and how to add that :{
in basevendor.cs
No, I told you what you need to do, now it's up to you to look into how to do it.
Use google for c# tutorials and if statements in c#, that should get you all the information you need to do what you want.
We're here to help you learn not to do it for you.
 

bzk90

Lord
then you give up what your trying to do and never run a runuo server again

if you cant put up the effort to do some research on google and read a few tutorialson C# then you dont need to be scripting and you dont need to be running a server

you were told how to do it, no ones going to hand over the code all fixed and proper YOU have to do it, and if you cant then thats your problem
 

daat99

Moderator
Staff member
ii. said:
well if i dont know how to do it then what am i supposed to do im not a scripter
I told you exactly what you need to look for.
If you don't want to learn then you're at the wrong place.
This forum is to help people learn not to give them the code so their scripts will work.
If you still don't want to learn then you should realy try asking in a forum that give people that codes they want (I know such a forum exist but don't ask where, I won't tell you) or you can subscribe and make it a subscruber request..
Let me know if you decide that you want to learn.
 

ArteGordon

Wanderer
daat99 said:
If I remember right then the vendor cloths are getting overrided in the BaseVendor.cs so you'll have to add a check that that if it's your jewler then don't override the shoes.
daat is correct. vendor outfits are automatically set up in basevendor. All you need to do to configure those outfits is to add overrides like this to your custom vendor script. Look at something like weaponsmith.cs for an example

Code:
		public override VendorShoeType ShoeType
		{
			get{ return VendorShoeType.Sandals; } [color=red] <----- this will set the shoe type[/color]
		}

		public override int GetShoeHue()
		{
			return 1; [color=red]<------ this will set the shoe color[/color]
		}
 
Top