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!

ii.

Sorceror
Black Sandals HELP!

I want the jewelers to have black sandals so what would i do to equip them with black sandals?:mad:
 

TheN

Wanderer
Look in some other scripts that add items to a creature (such as most if not all humanoid monsters and vendors) and attempt to duplicate in the Jeweler's script using Black Sandals. Once you try that, we can help you if you encounter problems.
 

daat99

Moderator
Staff member
ii. said:
I tried that and had a problem it said expected { line 0, column 0, four times
You need to post the full code (in code tags) and the full error if you want to get real help.
Untill you post both all I can say is that you did it wrong.
 

ii.

Sorceror
get{ return Utility.() ? VendorShoeType.Sandals : VendorShoeType.Shoes; }
ok i think i got it just what do i add after Utility.???
 

TMSTKSBK

Lord
When we say "full code", we mean the entire script. We're sticklers for this sort of thing.

i.e.

say:

"[code ] *scriptgoes here* [/code ]" (no spaces in the code tag)

And we can help you.

Secondly, try to follow the pattern of the other scripts. If sandals have a constructor that accepts a hue, it'll make your life easier. If it doesn't, you're going to need to script some black sandals.
 

ii.

Sorceror
using System;
using System.Collections;
using Server;

namespace Server.Mobiles
{
public class Jeweler : BaseVendor
{
private ArrayList m_SBInfos = new ArrayList();
protected override ArrayList SBInfos{ get { return m_SBInfos; } }

[Constructable]
public Jeweler() : base( "the jeweler" )
{
SetSkill( SkillName.ItemID, 64.0, 100.0 );

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;
}
}
}

public override void InitSBInfo()
{
m_SBInfos.Add( new SBJewel() );
}

public Jeweler( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );

writer.Write( (int) 0 ); // version
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );

int version = reader.ReadInt();
}
}
}
thats my jeweler.cs right there
 

ii.

Sorceror
Im just wondering why would i edit SB thet determines what they sell isnt it? i want them to wear the sandals so it can be like the good ole days on OSI :{
*dreams of old osi*
 

bacaw

Sorceror
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:
switch ( Utility.Random( 1 ) ) 
{ 
case 0:
{
Item sandals = new Sandals();
sandals.Hue = 1;
EquipItem( sandals );
break;
}
}
should work for ya
 

bacaw

Sorceror
bzk90 said:
*sigh* and hes learned nothing

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.
 

TMSTKSBK

Lord
no...he's saying the dude that asked the question hasn't learned anything.

If he couldn't figure that out on his own, he won't "get it" by you just telling him ;)
 

bacaw

Sorceror
TMSTKSBK said:
no...he's saying the dude that asked the question hasn't learned anything.

If he couldn't figure that out on his own, he won't "get it" by you just telling him ;)


i know i learned this way, yet, then again we are all different.
 

bzk90

Lord
and judging by your post history on runuo we can easily see that it is to early in your scripting career for you to consider yourself educated in runuo scripting, so your comment realy isnt valid

anyways lets try to stay on topic please
 

daat99

Moderator
Staff member
bacaw said:
i know i learned this way, yet, then again we are all different.
I learned that way too, it doesn't make it right.
I know that if I spent the time on reading more tutorials when I started then I would've had a lot less problems and questions.
90% of the people don't read the code you gave them, they just copy\paste it directly into the script even if it's absolutly isn't going to compile they'll try to compile it and run back and yell "Your code doesn't work, can someone else help me?"
Someone actually said that to me once when I told him to do this:
Code:
if mobile is player //or something similar
   sendmessage(you player)
Now tell me, did he even tried to read the code?

bzk90 said:
and judging by your post history on runuo we can easily see that it is to early in your scripting career for you to consider yourself educated in runuo scripting, so your comment realy isnt valid

anyways lets try to stay on topic please
Please don't go there.
 

bacaw

Sorceror
daat99 said:
I learned that way too, it doesn't make it right.
I know that if I spent the time on reading more tutorials when I started then I would've had a lot less problems and questions.
90% of the people don't read the code you gave them, they just copy\paste it directly into the script even if it's absolutly isn't going to compile they'll try to compile it and run back and yell "Your code doesn't work, can someone else help me?"
Someone actually said that to me once when I told him to do this:
Code:
if mobile is player //or something similar
   sendmessage(you player)
Now tell me, did he even tried to read the code?

Just read ur post in the Dragon Egg one as well (googlebite) i suppose ill only give them the general idea rather then code from now on, cuz there are a lot of people who post same qestions multiple times.

and bzk90 i only been scripting a couple months but i figured its nice of me to help someone out every now and then even if i go about it wrong
 

daat99

Moderator
Staff member
bacaw said:
Just read ur post in the Dragon Egg one as well (googlebite) i suppose ill only give them the general idea rather then code from now on, cuz there are a lot of people who post same qestions multiple times.
That's what I think is best to do :)
Give them all the info they need to find the answer in c# tutorials.
Tell them what things are called in c# so they could learn how to work with those things.
If a person will know what a property is and how to change it then he won't need to ask how to change stuff 90% of the stuff that people ask.
Most of the "scripting" people do is just changing a property here and maybe add an if statement to a method there.
Giving them the if statement they need to check if the killer is player or telling them how to change a mobile name doesn't teach them how to use if statements or how to change properties.
I saw it happens tons of times and I'm not that vet around here, only 9 months...

bacaw said:
i only been scripting a couple months but i figured its nice of me to help someone out every now and then even if i go about it wrong
You were right on this 1 too.
I was only scripting for 3 months before I started to try to help out people.
I didn't knew much (I still don't) but I tried anyway and I learned a lot just from helping people solve their problems.
 

bacaw

Sorceror
daat99 said:
You were right on this 1 too.
I was only scripting for 3 months before I started to try to help out people.
I didn't knew much (I still don't) but I tried anyway and I learned a lot just from helping people solve their problems.

Yah sure (still dont know much) lol ya always seem to know the answer in every thread ive read :D

and id say ive learned more helping the few people i have and reading what people have done then actually scripting a code myself
 

daat99

Moderator
Staff member
bacaw said:
Yah sure (still dont know much) lol ya always seem to know the answer in every thread ive read :D

and id say ive learned more helping the few people i have and reading what people have done then actually scripting a code myself
Well that's because I don't post on threads that I can't help or that someone else already did.
Trust me I have tons of c# questions myself, they just not fit in this forum because they aren't RunUO related ;)

P.S.
Every good programmer in this forums that talked to me via icq or pm knows that ;)
Some of them that helped me are:
Phantom, XxSP1DERxX, UOT, ArteGordon, awakelands, jjarmis (no longer among RunUO members :( ), SirSly, Lucid and some more that I don't remember off hand.
All of them answered some questions that I had at some point, I still have a lot to learn ;)
 
Top