public static void CloneMe_OnCommand(CommandEventArgs e) { BaseCreature m = new BaseCreature(AIType.AI_None, FightMode.None, 10, 1, 0.2, 0.4); m.InitStats(10, 10, 10); m.SetSkill(SkillName.Cooking, 65, 88); m.SetSkill(SkillName.Snooping, 65, 88); m.SetSkill(SkillName.Stealing, 65, 88); if (m.Female = Utility.RandomBool()) { m.Body = 0x1A6; m.Name = NameList.RandomName("female"); } else { m.Body = 0x1A4; m.Name = NameList.RandomName("male"); } e.Mobile.Hidden = true; m.Dex = e.Mobile.Dex; m.Int = e.Mobile.Int; m.Str = e.Mobile.Str; m.Fame = e.Mobile.Fame; m.Karma = e.Mobile.Karma; m.NameHue = e.Mobile.NameHue; m.SpeechHue = e.Mobile.SpeechHue; m.Criminal = e.Mobile.Criminal; m.Name = e.Mobile.Name; m.Title = e.Mobile.Title; m.Female = e.Mobile.Female; m.Body = e.Mobile.Body; m.Hue = e.Mobile.Hue; m.Hits = e.Mobile.HitsMax; m.Mana = e.Mobile.ManaMax; m.Stam = e.Mobile.StamMax; m.BodyMod = e.Mobile.Body; m.Map = e.Mobile.Map; m.Location = e.Mobile.Location; m.Direction = e.Mobile.Direction; m.HairItemID = e.Mobile.HairItemID; m.FacialHairItemID = e.Mobile.FacialHairItemID; m.HairHue = e.Mobile.HairHue; m.FacialHairHue = e.Mobile.FacialHairHue; for (int i = 0; i < e.Mobile.Skills.Length; i++) m.Skills[i].Base = e.Mobile.Skills[i].Base; ArrayList items = new ArrayList(e.Mobile.Items); for (int i = 0; i < items.Count; i++) { Item item = (Item)items[i]; //my favorite line of code, ever. if (((item != null) && (item.Parent == e.Mobile) && (item != e.Mobile.Backpack))) { Type t = item.GetType(); ConstructorInfo c = t.GetConstructor(Type.EmptyTypes); if (c != null) { try { object o = c.Invoke(null); if (o != null && o is Item) { Item newItem = (Item)o; CopyProperties(newItem, item); item.OnAfterDuped(newItem); newItem.Parent = null; m.AddItem(newItem); } } catch { } } } } }
public void SizeUpCrewMember(BaseCreature bc, bool evil, int link, Mobile captain, string toss) { MorphingTime.RemoveMyClothes((Mobile)bc); if (bc.Backpack != null) { List <Item> belongings = new List <Item>(); foreach (Item i in bc.Backpack.Items) { belongings.Add(i); } foreach (Item stuff in belongings) { stuff.Delete(); } } bc.AI = AIType.AI_Archer; bc.FightMode = FightMode.Evil; bc.Karma = 1500; bc.Name = "a sailor"; if (evil) { bc.FightMode = FightMode.Closest; bc.Karma = -1500; bc.Name = "a pirate"; if (captain is PirateCult) { bc.Name = "a follower"; } } bc.SetStr(96, 120); bc.SetDex(81, 105); bc.SetInt(36, 60); bc.SetHits(58, 72); SetDamage(10, 23); bc.SetDamageType(ResistanceType.Physical, 100); bc.SetResistance(ResistanceType.Physical, 35, 50); bc.SetResistance(ResistanceType.Fire, 10, 30); bc.SetResistance(ResistanceType.Cold, 10, 30); bc.SetResistance(ResistanceType.Poison, 10, 30); bc.SetResistance(ResistanceType.Energy, 10, 30); bc.SetSkill(SkillName.Archery, 66.0, 97.5); bc.SetSkill(SkillName.MagicResist, 25.0, 47.5); bc.SetSkill(SkillName.Tactics, 65.0, 87.5); bc.SetSkill(SkillName.Wrestling, 66.0, 97.5); bc.Fame = 1500; bc.VirtualArmor = 32; bc.Title = null; bc.EmoteHue = link; if (toss == "stones") { MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Stones"; bc.AddItem(gloves); } else if (toss == "stars") { MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Stars"; bc.AddItem(gloves); } else if (toss == "axes") { MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Axes"; bc.AddItem(gloves); } else if (toss == "daggers") { MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Daggers"; bc.AddItem(gloves); } else if (toss == "darts") { MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Darts"; bc.AddItem(gloves); } else if (toss == "spear") { MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Spear"; bc.AddItem(gloves); } else if (toss == "boulder") { MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Boulder"; bc.AddItem(gloves); } else if (toss == "bones") { MonsterGloves gloves = new MonsterGloves(); gloves.ThrowType = "Bones"; bc.AddItem(gloves); } else if (toss == "arrows") { bc.AddItem(new Bow()); } else if (toss == "crossbow") { bc.AddItem(new Crossbow()); } else if (toss == "harpoon") { bc.AddItem(new Harpoon()); } else if (toss == "fire") { WizardStaff staff = new WizardStaff(); staff.AosElementDamages.Fire = 75; staff.damageType = 1; bc.AddItem(staff); } else if (toss == "cold") { WizardStaff staff = new WizardStaff(); staff.AosElementDamages.Cold = 75; staff.damageType = 2; bc.AddItem(staff); } else if (toss == "energy") { WizardStaff staff = new WizardStaff(); staff.AosElementDamages.Energy = 75; staff.damageType = 3; bc.AddItem(staff); } else if (toss == "poison") { WizardStaff staff = new WizardStaff(); staff.AosElementDamages.Poison = 75; staff.damageType = 4; bc.AddItem(staff); } else if (toss == "bolt") { WizardStaff staff = new WizardStaff(); staff.damageType = 0; bc.AddItem(staff); } DressUpCrewMember(bc, captain); bc.NameColor(); bc.MoveToWorld(captain.Location, captain.Map); }
public void DressSailor(BaseCreature bc) { switch (Utility.Random(3)) { case 0: bc.AddItem(new FancyShirt()); break; case 1: bc.AddItem(new Doublet()); break; case 2: bc.AddItem(new Shirt()); break; } switch (Utility.Random(4)) { case 0: bc.AddItem(new Shoes()); break; case 1: bc.AddItem(new Boots()); break; case 2: bc.AddItem(new ElvenBoots()); break; case 3: bc.AddItem(new ThighBoots()); break; } if (bc.Female) { switch (Utility.Random(6)) { case 0: bc.AddItem(new ShortPants()); break; case 1: case 2: bc.AddItem(new Kilt()); break; case 3: case 4: case 5: bc.AddItem(new Skirt()); break; } } else { switch (Utility.Random(2)) { case 0: bc.AddItem(new LongPants()); break; case 1: bc.AddItem(new ShortPants()); break; } } if (bc is SailorElf || bc is SailorMerchant) { bc.AddItem(new TricorneHat()); } else if (Utility.RandomBool()) { bc.AddItem(new SkullCap()); bc.HairItemID = 0; } else { bc.AddItem(new Bandana()); } MorphingTime.SailorMyClothes(bc); }
public void DressGuards(BaseCreature bc, Mobile captain) { int clothColor = 0; int helmType = 0; int cloakColor = 0; if (captain.Title == "of the Whisper Guard") { clothColor = 0x96D; helmType = 0x140E; cloakColor = 0x972; } else if (captain.Title == "of the Glacial Guard") { clothColor = 0xB70; helmType = 0x1412; cloakColor = 0xB7A; } else if (captain.Title == "of the Springvale Guard") { clothColor = 0x595; helmType = 0x140E; cloakColor = 0x593; } else if (captain.Title == "of the Elidor Guard") { clothColor = 0x665; helmType = 0x1412; cloakColor = 0x664; } else if (captain.Title == "of the Islegem Guard") { clothColor = 0x7D1; helmType = 0x140E; cloakColor = 0x7D6; } else if (captain.Title == "of the Greensky Guard") { clothColor = 0x7D7; helmType = 0x1412; cloakColor = 0x7DA; } else if (captain.Title == "of the Dusk Guard") { clothColor = 0x601; helmType = 0x140E; cloakColor = 0x600; } else if (captain.Title == "of the Starguide Guard") { clothColor = 0x751; helmType = 0x1412; cloakColor = 0x758; } else if (captain.Title == "of the Portshine Guard") { clothColor = 0x847; helmType = 0x140E; cloakColor = 0x851; } else if (captain.Title == "of the Lodoria Guard") { clothColor = 0x6E4; helmType = 0x1412; cloakColor = 0x6E7; } else if (captain.Title == "of the Devil Guard") { clothColor = 0x430; helmType = 0x140E; cloakColor = 0; } else if (captain.Title == "of the Moon Guard") { clothColor = 0x8AF; helmType = 0x1412; cloakColor = 0x972; } else if (captain.Title == "of the Grey Guard") { clothColor = 0; helmType = 0x140E; cloakColor = 0x763; } else if (captain.Title == "of the Montor Guard") { clothColor = 0x96F; helmType = 0x1412; cloakColor = 0x529; } else if (captain.Title == "of the Fawn Guard") { clothColor = 0x59D; helmType = 0x140E; cloakColor = 0x59C; } else if (captain.Title == "of the Yew Guard") { clothColor = 0x83C; helmType = 0x1412; cloakColor = 0x850; } else if (captain.Title == "of the Iceclad Guard") { clothColor = 0x482; helmType = 0x140E; cloakColor = 0x47E; } else if (captain.Title == "of the Britain Guard") { clothColor = 0x9C4; helmType = 0x140E; cloakColor = 0x845; } else if (captain.Title == "of the Renika Guard") { clothColor = 0xA5D; helmType = 0x140E; cloakColor = 0x96D; } else if (captain.Title == "of the Kuldara Guard") { clothColor = 0x965; helmType = 0x140E; cloakColor = 0x845; } else if (captain.Title == "of the Cimmeran Guard") { clothColor = 0x978; helmType = 0; cloakColor = 0x973; } else if (captain.Title == "of the Barako Guard") { clothColor = 0x515; helmType = 0x2645; cloakColor = 0x58D; } else if (captain.Title == "of the Kurak Guard") { clothColor = 0x515; helmType = 0x140E; cloakColor = 0x59D; } Item arms = new PlateArms(); Item tunic = new PlateChest(); Item legs = new PlateLegs(); Item neck = new PlateGorget(); Item hand = new PlateGloves(); Item foot = new Boots( ); if (captain.Title == "of the Cimmeran Guard") { tunic.ItemID = 0x5652; tunic.Name = "tunic"; if (bc.Female) { tunic.ItemID = 0x563E; Utility.AssignRandomHair(bc); } else { Utility.AssignRandomHair(bc); FacialHairItemID = Utility.RandomList(0, 8254, 8255, 8256, 8257, 8267, 8268, 8269); } bc.HairHue = 0x455; bc.FacialHairHue = 0x455; arms.ItemID = 22093; arms.Name = "sleeves"; legs.ItemID = 7176; legs.Name = "skirt"; neck.ItemID = 0x5650; neck.Name = "amulet"; hand.ItemID = 0x564E; hand.Name = "gloves"; foot.ItemID = 5901; foot.Name = "sandals"; } bc.AddItem(tunic); bc.AddItem(arms); bc.AddItem(legs); bc.AddItem(neck); bc.AddItem(hand); bc.AddItem(foot); if (helmType > 0) { PlateHelm helm = new PlateHelm(); helm.ItemID = helmType; helm.Name = "helm"; bc.AddItem(helm); } MorphingTime.ColorMyClothes(bc, clothColor); if (bc is BasePirate) { Cloak cloak = new Cloak(); cloak.Hue = cloakColor; bc.AddItem(cloak); } }
public void DressUpCrewMember(BaseCreature bc, Mobile captain) { if (captain is PirateDrow) { bc.AddItem(new ElvenBoots(0x6F8)); Item armor = new LeatherChest(); armor.Hue = 0x6F8; bc.AddItem(armor); bc.AddItem(new FancyShirt(0)); switch (Utility.Random(2)) { case 0: bc.AddItem(new LongPants(0xBB4)); break; case 1: bc.AddItem(new ShortPants(0xBB4)); break; } switch (Utility.Random(2)) { case 0: bc.AddItem(new Bandana(0x846)); break; case 1: bc.AddItem(new SkullCap(0x846)); break; } } else if (captain is PirateMen) { bc.AddItem(new ElvenBoots(0x83A)); Item armor = new LeatherChest(); armor.Hue = 0x83A; bc.AddItem(armor); bc.AddItem(new FancyShirt(0)); switch (Utility.Random(2)) { case 0: bc.AddItem(new LongPants(0xBB4)); break; case 1: bc.AddItem(new ShortPants(0xBB4)); break; } switch (Utility.Random(2)) { case 0: bc.AddItem(new Bandana(0x846)); break; case 1: bc.AddItem(new SkullCap(0x846)); break; } } else if (captain is PirateNatives) { bc.Hue = 743; bc.HairHue = 0x96C; if (bc.Female) { Item cloth9 = new FemaleLeatherChest(); cloth9.Hue = 773; cloth9.Name = "Native Tunic"; bc.AddItem(cloth9); } Item cloth1 = new SavageArms(); cloth1.Hue = 773; cloth1.Name = "Native Guantlets"; bc.AddItem(cloth1); Item cloth2 = new SavageLegs(); cloth2.Hue = 773; cloth2.Name = "Native Leggings"; bc.AddItem(cloth2); Item cloth3 = new TribalMask(); cloth3.Hue = 773; cloth3.Name = "Native Tribal Mask"; bc.AddItem(cloth3); Item cloth4 = new LeatherSkirt(); cloth4.Hue = 773; cloth4.Name = "Native Skirt"; cloth4.Layer = Layer.Waist; bc.AddItem(cloth4); } else if (captain is PirateCult) { bc.AddItem(new Robe(0)); switch (Utility.RandomMinMax(0, 2)) { case 0: bc.AddItem(new ClothCowl()); break; case 1: bc.AddItem(new ClothHood()); break; case 2: bc.AddItem(new FancyHood()); break; } MorphingTime.ColorMyClothes(bc, captain.SpeechHue); bc.AddItem(new ElvenBoots(0x83A)); if (bc.FindItemOnLayer(Layer.OneHanded) != null) { Item hand = bc.FindItemOnLayer(Layer.OneHanded); hand.ItemID = 0x13C6; hand.Name = "gloves"; hand.MoveToWorld(captain.Location, captain.Map); bc.AddItem(hand); } if (bc.FindItemOnLayer(Layer.TwoHanded) != null) { Item hand = bc.FindItemOnLayer(Layer.TwoHanded); hand.ItemID = 0x13C6; hand.Name = "gloves"; hand.MoveToWorld(captain.Location, captain.Map); bc.AddItem(hand); } } else if (captain is SailorGuards || captain is SailorElfGuards || captain is SailorOrkGuards) { DressGuards(bc, captain); if (captain is SailorElfGuards) { bc.HairHue = Utility.RandomHairHue(); bc.Hue = Utility.RandomSkinColor(); } } else if (captain is SailorMerchant || captain is SailorElf) { DressSailor(bc); if (captain is SailorElf) { bc.HairHue = Utility.RandomHairHue(); bc.Hue = Utility.RandomSkinColor(); } if (bc.FindItemOnLayer(Layer.OneHanded) != null) { Item hand = bc.FindItemOnLayer(Layer.OneHanded); if (hand is MonsterGloves) { hand.ItemID = 0x1087; hand.Hue = 0; hand.Name = "earrings"; hand.MoveToWorld(captain.Location, captain.Map); bc.AddItem(hand); } } } }
private void EquipItems(BaseCreature bc) { bc.AddItem(new RingmailChest()); bc.AddItem(new RingmailLegs()); bc.AddItem(new RingmailArms()); bc.AddItem(new RingmailGloves()); bc.AddItem(new PlateGorget()); bc.AddItem(new LeatherCap()); switch (Utility.Random(4)) { case 0: bc.AddItem(new Halberd()); break; case 1: bc.AddItem(new Longsword()); break; case 2: bc.AddItem(new VikingSword()); break; case 3: bc.AddItem(new Broadsword()); break; } if (bc.FindItemOnLayer(Layer.TwoHanded) == null) { switch (Utility.Random(4)) { case 0: bc.AddItem(new BronzeShield()); break; case 1: bc.AddItem(new MetalKiteShield()); break; case 2: bc.AddItem(new HeaterShield()); break; case 3: bc.AddItem(new WoodenKiteShield()); break; } } switch (Utility.Random(3)) { case 0: case 1: bc.AddItem(new Boots()); break; case 2: bc.AddItem(new ThighBoots()); break; } if (Utility.RandomBool()) { bc.AddItem(new Cloak(Utility.RandomDyedHue())); } }