v0.0.1-Alpha (#42)
This commit is contained in:
parent
d30f93c454
commit
a36796c2c1
3552 changed files with 2476 additions and 15223 deletions
80
Projects/Scripts/Mobiles/Townfolk/Merchant.cs
Normal file
80
Projects/Scripts/Mobiles/Townfolk/Merchant.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Merchant : BaseEscortable
|
||||
{
|
||||
[Constructible]
|
||||
public Merchant()
|
||||
{
|
||||
Title = "the merchant";
|
||||
SetSkill(SkillName.ItemID, 55.0, 78.0);
|
||||
SetSkill(SkillName.ArmsLore, 55, 78);
|
||||
}
|
||||
|
||||
public Merchant(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CanTeach => true;
|
||||
public override bool ClickTitle => false; // Do not display 'the merchant' when single-clicking
|
||||
|
||||
private static int GetRandomHue()
|
||||
{
|
||||
switch (Utility.Random(6))
|
||||
{
|
||||
default:
|
||||
case 0: return 0;
|
||||
case 1: return Utility.RandomBlueHue();
|
||||
case 2: return Utility.RandomGreenHue();
|
||||
case 3: return Utility.RandomRedHue();
|
||||
case 4: return Utility.RandomYellowHue();
|
||||
case 5: return Utility.RandomNeutralHue();
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
if (Female)
|
||||
AddItem(new PlainDress());
|
||||
else
|
||||
AddItem(new Shirt(GetRandomHue()));
|
||||
|
||||
int lowHue = GetRandomHue();
|
||||
|
||||
AddItem(new ThighBoots());
|
||||
|
||||
if (Female)
|
||||
AddItem(new FancyDress(lowHue));
|
||||
else
|
||||
AddItem(new FancyShirt(lowHue));
|
||||
AddItem(new LongPants(lowHue));
|
||||
|
||||
if (!Female)
|
||||
AddItem(new BodySash(lowHue));
|
||||
|
||||
|
||||
//if ( !Female )
|
||||
//AddItem( new Longsword() );
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
PackGold(200, 250);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue