public static Item GetRandomHat() { Item hat = null; switch ( Utility.Random( 6 ) ) { case 0: hat = new SkullCap( GetRandomHue() ); break; case 1: hat = new Bandana( GetRandomHue() ); break; case 2: hat = new WideBrimHat(); break; case 3: hat = new TallStrawHat( Utility.RandomNeutralHue() ); break; case 4: hat = new StrawHat( Utility.RandomNeutralHue() ); break; case 5: hat = new TricorneHat( Utility.RandomNeutralHue() ); break; } return hat; }
public WolfMaster() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4) { SpeechHue = Utility.RandomDyedHue(); Title = "the wolf master"; Hue = Utility.RandomSkinHue(); if ( this.Female = Utility.RandomBool() ) { Body = 0x191; Name = NameList.RandomName( "female" ); AddItem( new Skirt( Utility.RandomNeutralHue() ) ); } else { Body = 0x190; Name = NameList.RandomName( "male" ); AddItem( new Skirt( Utility.RandomNeutralHue() ) ); } SetStr( 86, 100 ); SetDex( 31, 45 ); SetInt( 61, 75 ); SetDamage( 6, 11 ); SetHits( 171, 190 ); SetSkill( SkillName.MagicResist, 35.0, 47.5 ); SetSkill( SkillName.Macing, 75.0, 87.5 ); SetSkill( SkillName.Tactics, 45.0, 57.5 ); Fame = 3000; Karma = -3000; // Equip Item toArm = new LeatherChest(); toArm.LootType = LootType.Blessed; AddItem( toArm ); toArm = new LeatherLegs(); toArm.LootType = LootType.Blessed; AddItem( toArm ); toArm = new StrawHat(); toArm.LootType = LootType.Blessed; AddItem( toArm ); toArm = new GnarledStaff(); toArm.Movable = false; toArm.LootType = LootType.Blessed; AddItem( toArm ); Utility.AssignRandomHair( this ); if( Utility.RandomDouble() < 0.06 ) PackItem( new BallOfSummoning() ); }
public Earthcaller() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.15, 0.2 ) { Title = "the Earthcaller"; Hue = Utility.RandomSkinHue(); Body = 0x190; Name = NameList.RandomName( "male" ); BaseSoundID = 0; Kills = 10; ShortTermMurders = 10; Item StrawHat = new StrawHat(); StrawHat.Movable=false; StrawHat.Hue=1021; EquipItem( StrawHat ); Item Robe = new Robe(); Robe.Movable=false; Robe.Hue=1021; EquipItem( Robe ); Item Sandals = new Sandals(); Sandals.Movable=false; Sandals.Hue=1021; EquipItem( Sandals ); SetStr( 200, 220 ); SetDex( 136, 145 ); SetDamage( 10, 17 ); SetSkill( SkillName.Wrestling, 95.3, 98.8 ); SetSkill( SkillName.Tactics, 93.5, 97.0 ); SetSkill( SkillName.MagicResist, 96.6, 99.8); Fame = 12500; Karma = -12500; VirtualArmor = 50; switch( Utility.Random(125) ) { case 0: PackItem( new EnchantedWood() ); break; } PackGold( 500, 800 ); PackPotion(); PackItem( new Bandage( Utility.RandomMinMax( 5, 10 ) ) ); PackArmor( 0, 5 ); PackWeapon( 0, 5 ); PackSlayer(); if ( 0.05 > Utility.RandomDouble() ) PackItem( new Obsidian() ); }
public Commoner5() : base(AIType.AI_Melee, FightMode.None, 10, 1, 0.8, 3.0) { SetStr( 10, 30 ); SetDex( 10, 30 ); SetInt( 10, 30 ); Fame = 50; Karma = 50; SetSkill( SkillName.Fishing, 60.0, 70.0 ); SetSkill( SkillName.Cooking, 60.0, 70.0 ); SpeechHue = Utility.RandomDyedHue(); Title = string.Empty;//Commoner5.Titles[Utility.Random( 0, Titles.Length )]; Hue = Utility.RandomSkinHue(); if ( this.Female = Utility.RandomBool() ) { this.Body = 0x191; this.Name = NameList.RandomName( "female" ); Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2045, 0x204A, 0x2046 , 0x2049 ) ); hair.Hue = Utility.RandomHairHue(); hair.Layer = Layer.Hair; hair.Movable = false; AddItem( hair ); Item hat = null; switch ( Utility.Random( 5 ) )//4 hats, one empty, for no hat { case 0: hat = new FloppyHat( Utility.RandomNeutralHue() ); break; case 1: hat = new FeatheredHat( Utility.RandomNeutralHue() ); break; case 2: hat = new Bonnet(); break; case 3: hat = new Cap( Utility.RandomNeutralHue() ); break; } AddItem( hat ); Item pants = null; switch ( Utility.Random( 3 ) ) { case 0: pants = new ShortPants( GetRandomHue() ); break; case 1: pants = new LongPants( GetRandomHue() ); break; case 2: pants = new Skirt( GetRandomHue() ); break; } AddItem( pants ); Item shirt = null; switch ( Utility.Random( 7 ) ) { case 0: shirt = new Doublet( GetRandomHue() ); break; case 1: shirt = new Surcoat( GetRandomHue() ); break; case 2: shirt = new Tunic( GetRandomHue() ); break; case 3: shirt = new FancyDress( GetRandomHue() ); break; case 4: shirt = new PlainDress( GetRandomHue() ); break; case 5: shirt = new FancyShirt( GetRandomHue() ); break; case 6: shirt = new Shirt( GetRandomHue() ); break; } AddItem( shirt ); } else { this.Body = 0x190; this.Name = NameList.RandomName( "male" ); Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2048 ) ); hair.Hue = Utility.RandomHairHue(); hair.Layer = Layer.Hair; hair.Movable = false; AddItem( hair ); Item beard = new Item( Utility.RandomList( 0x0000, 0x203E, 0x203F, 0x2040, 0x2041, 0x2067, 0x2068, 0x2069 ) ); beard.Hue = hair.Hue; beard.Layer = Layer.FacialHair; beard.Movable = false; AddItem( beard ); Item hat = null; switch ( Utility.Random( 7 ) ) //6 hats, one empty, for no hat { case 0: hat = new SkullCap( GetRandomHue() ); break; case 1: hat = new Bandana( GetRandomHue() ); break; case 2: hat = new WideBrimHat(); break; case 3: hat = new TallStrawHat( Utility.RandomNeutralHue() ); break; case 4: hat = new StrawHat( Utility.RandomNeutralHue() ); break; case 5: hat = new TricorneHat( Utility.RandomNeutralHue() ); break; } AddItem( hat ); Item pants = null; switch ( Utility.Random( 2 ) ) { case 0: pants = new ShortPants( GetRandomHue() ); break; case 1: pants = new LongPants( GetRandomHue() ); break; } AddItem( pants ); Item shirt = null; switch ( Utility.Random( 5 ) ) { case 0: shirt = new Doublet( GetRandomHue() ); break; case 1: shirt = new Surcoat( GetRandomHue() ); break; case 2: shirt = new Tunic( GetRandomHue() ); break; case 3: shirt = new FancyShirt( GetRandomHue() ); break; case 4: shirt = new Shirt( GetRandomHue() ); break; } AddItem( shirt ); } Item feet = null; switch ( Utility.Random( 3 ) ) { case 0: feet = new Boots( Utility.RandomNeutralHue() ); break; case 1: feet = new Shoes( Utility.RandomNeutralHue() ); break; case 2: feet = new Sandals( Utility.RandomNeutralHue() ); break; } AddItem( feet ); Container pack = new Backpack(); pack.DropItem( new Gold( 0, 50 ) ); pack.Movable = false; AddItem( pack ); }
public override void InitOutfit() { Item item = null; if ( !Female ) { item = AddRandomHair(); item.Hue = Utility.RandomHairHue(); item = AddRandomFacialHair( item.Hue ); item = new Shirt(); item.Hue = Utility.RandomNondyedHue(); AddItem( item ); item = new LongPants(); item.Hue = Utility.RandomNondyedHue(); AddItem( item ); item = new StrawHat(); item.Hue = Utility.RandomNeutralHue(); AddItem( item ); item = Utility.RandomBool() ? (Item)new Boots() : (Item)new ThighBoots(); AddItem( item ); } else { item = AddRandomHair(); item.Hue = Utility.RandomHairHue(); item = new Shirt(); item.Hue = Utility.RandomNondyedHue(); AddItem( item ); item = new Skirt(); item.Hue = Utility.RandomNondyedHue(); AddItem( item ); item = new StrawHat(); item.Hue = Utility.RandomNeutralHue(); AddItem( item ); item = Utility.RandomBool() ? (Item)new Boots() : (Item)new ThighBoots(); AddItem( item ); } }
public Gambler() : base( AIType.AI_Melee, FightMode.None, 10, 1, 0.8, 3.0 ) { SetStr( 10, 30 ); SetDex( 10, 30 ); SetInt( 10, 30 ); Fame = 50; Karma = 50; SpeechHue = Utility.RandomDyedHue(); Title = "the gambler"; Hue = Utility.RandomSkinHue(); Blessed = true; NameHue = 0x35; if ( this.Female = Utility.RandomBool() ) { this.Body = 0x191; this.Name = NameList.RandomName( "female" ); Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2045, 0x204A, 0x2046 , 0x2049 ) ); hair.Hue = Utility.RandomHairHue(); hair.Layer = Layer.Hair; hair.Movable = false; AddItem( hair ); Item hat = null; switch ( Utility.Random( 5 ) ) { case 0: hat = new FloppyHat( Utility.RandomNeutralHue() ); break; case 1: hat = new FeatheredHat( Utility.RandomNeutralHue() ); break; case 2: hat = new Bonnet(); break; case 3: hat = new Cap( Utility.RandomNeutralHue() ); break; } AddItem( hat ); } else { this.Body = 0x190; this.Name = NameList.RandomName( "male" ); Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2048 ) ); hair.Hue = Utility.RandomHairHue(); hair.Layer = Layer.Hair; hair.Movable = false; AddItem( hair ); Item beard = new Item( Utility.RandomList( 0x0000, 0x203E, 0x203F, 0x2040, 0x2041, 0x2067, 0x2068, 0x2069 ) ); beard.Hue = hair.Hue; beard.Layer = Layer.FacialHair; beard.Movable = false; AddItem( beard ); Item hat = null; switch ( Utility.Random( 7 ) ) { case 0: hat = new SkullCap( GetRandomHue() ); break; case 1: hat = new Bandana( GetRandomHue() ); break; case 2: hat = new WideBrimHat(); break; case 3: hat = new TallStrawHat( Utility.RandomNeutralHue() ); break; case 4: hat = new StrawHat( Utility.RandomNeutralHue() ); break; case 5: hat = new TricorneHat( Utility.RandomNeutralHue() ); break; } AddItem( hat ); } AddItem( new LongPants( GetRandomHue() ) ); AddItem( new FancyShirt( GetRandomHue() ) ); AddItem( new Boots( Utility.RandomNeutralHue() ) ); AddItem( new Cloak( GetRandomHue() ) ); AddItem( new BodySash( GetRandomHue() ) ); Container pack = new Backpack(); pack.DropItem( new Gold( 5, 500 ) ); pack.Movable = false; pack.Visible = false; AddItem( pack ); //reset stats for ( int i = 0; i <= 5; ++i ) gamestats[i]=0; }
/// <summary> /// This is the function gives weaponry to players. /// </summary> private static void ArmPlayer(CTFPlayerGameData pgd) { Mobile m = pgd.Mob; if (!m.Alive) m.Resurrect(); for (int i = m.Items.Count - 1; i >= 0; --i) { Item item = (Item)m.Items[i]; if (item.Layer == Layer.OuterTorso) { item.Delete(); break; } } List<Item> armthis = new List<Item>(); if(GiveRobe) armthis.Add(new CTFRobe(pgd.Team)); Item rankedCloth = null; CTFTeam team = pgd.Team; // 21 Ranks switch (CTFData.GetRank(m)) { default: case 0: rankedCloth = new JesterHat(team.Hue); break; case 1: rankedCloth = new TallStrawHat(team.Hue); break; case 2: rankedCloth = new FloppyHat(team.Hue); break; case 3: rankedCloth = new WideBrimHat(team.Hue); break; case 4: rankedCloth = new Cap(team.Hue); break; case 5: rankedCloth = new SkullCap(team.Hue); break; case 6: rankedCloth = new FlowerGarland(team.Hue); break; case 7: rankedCloth = new StrawHat(team.Hue); break; case 8: rankedCloth = new FeatheredHat(team.Hue); break; case 9: rankedCloth = new TricorneHat(team.Hue); break; case 10: rankedCloth = new TribalMask(team.Hue); break; case 11: rankedCloth = new HornedTribalMask(team.Hue); break; case 12: rankedCloth = new BearMask(team.Hue); break; case 13: rankedCloth = new DeerMask(team.Hue); break; case 14: rankedCloth = new OrcishKinMask(team.Hue); break; case 15: rankedCloth = new SavageMask(team.Hue); break; case 16: rankedCloth = new WizardsHat(team.Hue); break; case 17: rankedCloth = new Bandana(team.Hue); break; case 18: rankedCloth = new ClothNinjaHood(team.Hue); break; case 19: rankedCloth = new Kasa(team.Hue); break; case 20: rankedCloth = new BoneHelm(); rankedCloth.Hue = team.Hue; ((BaseArmor)rankedCloth).ArmorAttributes.MageArmor = 1; break; } if (rankedCloth != null) { rankedCloth.Movable = false; armthis.Add(rankedCloth); } //Alchemy removed by Blady /* if (m.Skills[SkillName.Alchemy].Value >= (m_MinSupplySkill + 15)) //80 Alchemy req - by Blady { for (int i = 0; i < 6; i++) //Amount reduced to 6 by Blady - used to be 10 { armthis.Add(new ExplosionPotion()); armthis.Add(new GreaterHealPotion()); armthis.Add(new GreaterCurePotion()); armthis.Add(new GreaterAgilityPotion()); armthis.Add(new RefreshPotion()); armthis.Add(new GreaterStrengthPotion()); } } */ if (m.Skills[SkillName.Chivalry].Value >= m_MinSupplySkill) { BookOfChivalry book = new BookOfChivalry(); book.Content = 1023;//all spells armthis.Add(book); } if (m.Skills[SkillName.Necromancy].Value >= m_MinSupplySkill) { NecromancerSpellbook book = new NecromancerSpellbook(); book.Content = 0x1FFFF; armthis.Add(book); } if (m.Skills[SkillName.Magery].Value >= m_MinSupplySkill) { GnarledStaff gs = new GnarledStaff(); gs.Attributes.SpellChanneling = 1; gs.WeaponAttributes.MageWeapon = 20; armthis.Add(gs); Spellbook book = new Spellbook(); book.Content = ulong.MaxValue; armthis.Add(book); } if (m.Skills[SkillName.Healing].Value >= m_MinSupplySkill) armthis.Add(new Bandage(1000)); if (m.Skills[SkillName.Fencing].Value >= m_MinSupplySkill) { Spear sp = new Spear(); sp.Attributes.SpellChanneling = 1; armthis.Add(sp); ShortSpear ssp = new ShortSpear(); ssp.Attributes.SpellChanneling = 1; armthis.Add(ssp); WarFork wf = new WarFork(); wf.Attributes.SpellChanneling = 1; armthis.Add(wf); Kryss k = new Kryss(); k.Attributes.SpellChanneling = 1; armthis.Add(k); } if (m.Skills[SkillName.Swords].Value >= m_MinSupplySkill) { if (m.Skills[SkillName.Lumberjacking].Value >= m_MinSupplySkill) { ExecutionersAxe ea = new ExecutionersAxe(); ea.Attributes.SpellChanneling = 1; armthis.Add(ea); } Katana k = new Katana(); k.Attributes.SpellChanneling = 1; armthis.Add(k); Longsword ls = new Longsword(); ls.Attributes.SpellChanneling = 1; armthis.Add(ls); Cleaver c = new Cleaver(); c.Attributes.SpellChanneling = 1; armthis.Add(c); BoneHarvester bh = new BoneHarvester(); bh.Attributes.SpellChanneling = 1; armthis.Add(bh); } if (m.Skills[SkillName.Macing].Value >= m_MinSupplySkill) { WarAxe wa = new WarAxe(); wa.Attributes.SpellChanneling = 1; armthis.Add(wa); HammerPick hp = new HammerPick(); hp.Attributes.SpellChanneling = 1; armthis.Add(hp); QuarterStaff qs = new QuarterStaff(); qs.Attributes.SpellChanneling = 1; armthis.Add(qs); } if (m.Skills[SkillName.Archery].Value >= m_MinSupplySkill) { Bow b = new Bow(); b.Attributes.SpellChanneling = 1; armthis.Add(b); Crossbow xb = new Crossbow(); xb.Attributes.SpellChanneling = 1; armthis.Add(xb); CompositeBow cb = new CompositeBow(); cb.Attributes.SpellChanneling = 1; armthis.Add(cb); armthis.Add(new Arrow(150)); armthis.Add(new Bolt(150)); } if (m.Skills[SkillName.Poisoning].Value >= m_MinSupplySkill) { for (int i = 0; i < 2; i++) armthis.Add(new GreaterPoisonPotion()); } if (m.Skills[SkillName.Parry].Value >= m_MinSupplySkill) { MetalKiteShield ks = new MetalKiteShield(); ks.Attributes.SpellChanneling = 1; armthis.Add(ks); } SunnySystem.ArmPlayer(m, armthis); }
public override void InitOutfit() { Item item = null; item = AddRandomHair(); item.Hue = Utility.RandomHairHue(); item = AddRandomFacialHair( item.Hue ); item = new Shirt(); item.Hue = Utility.RandomNondyedHue(); AddItem( item ); item = new LongPants(); item.Hue = Utility.RandomNondyedHue(); AddItem( item ); item = new StrawHat(); item.Hue = Utility.RandomNeutralHue(); AddItem( item ); item = Utility.RandomBool() ? (Item)new Boots() : (Item)new ThighBoots(); AddItem( item ); item = new ShepherdsCrook(); AddItem( item ); PackGold( 15, 100 ); }
public PokerDealer() : base(AIType.AI_Vendor, FightMode.None, 10, 1, 0.8, 3.0) { m_Registry.Add(this); m_MaxPlayers = 10; DealerMode = DealerSetup.Regular; m_TotalGoldToJackpot = 0; m_TotalGoldDrained = 0; m_RoundsFinished = 0; m_PlayerAmount = 0; m_memblind = 0; #region NPC Properties SetStr(55, 100); SetDex(55, 100); SetInt(55, 100); Fame = 50; Karma = 50; SpeechHue = Utility.RandomDyedHue(); Title = "the pokerdealer"; Hue = Utility.RandomSkinHue(); NameHue = 0x35; Blessed = true; if (this.Female = Utility.RandomBool()) { this.Body = 0x191; this.Name = NameList.RandomName("female"); Item hair = new Item(Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2045, 0x204A, 0x2046, 0x2049)); hair.Hue = Utility.RandomHairHue(); hair.Layer = Layer.Hair; hair.Movable = false; AddItem(hair); Item hat = new Bonnet(); AddItem(hat); } else { this.Body = 0x190; this.Name = NameList.RandomName("male"); Item hair = new Item(Utility.RandomList(0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2048)); hair.Hue = Utility.RandomHairHue(); hair.Layer = Layer.Hair; hair.Movable = false; AddItem(hair); Item beard = new Item(Utility.RandomList(0x0000, 0x2040, 0x2041, 0x204D)); beard.Hue = hair.Hue; beard.Layer = Layer.FacialHair; beard.Movable = false; AddItem(beard); Item hat = new StrawHat(); AddItem(hat); } AddItem(new HalfApron()); AddItem(new Skirt()); AddItem(new Sandals()); AddItem(new Doublet()); Container pack = new Backpack(); pack.DropItem(new Gold(5, 500)); pack.Movable = false; pack.Visible = false; AddItem(pack); #endregion }