public void MakePike(Mobile from) { Pike weapon = new Pike(); weapon.NewCrafting = true; weapon.QualityDamage = m_Hilt.GetDamageBonus() / 2 + m_Blade.Damage; weapon.QualitySpeed = m_Hilt.GetSpeedBonus() / 2 + m_Blade.Speed; weapon.QualityAccuracy = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Attack; weapon.QualityDefense = m_Hilt.GetHitChanceBonus() / 2 + m_Blade.Defense; weapon.Resource = m_Blade.Resource; int quality = (int)(m_Blade.Durability * 0.25 + m_Hilt.MaxHitPoints * 0.75); weapon.MaxHitPoints = quality; weapon.HitPoints = quality; weapon.Crafter = from; weapon.CraftersOriginalName = from.Name; quality = (int)(m_Blade.Quality * 0.7 + ((int)m_Hilt.Quality * 50) * 0.3); if (quality == 500) weapon.Quality = WeaponQuality.Legendary; if (quality < 500) weapon.Quality = WeaponQuality.Masterwork; if (quality < 450) weapon.Quality = WeaponQuality.Illustrious; if (quality < 400) weapon.Quality = WeaponQuality.Extraordinary; if (quality < 350) weapon.Quality = WeaponQuality.Remarkable; if (quality < 300) weapon.Quality = WeaponQuality.Exceptional; if (quality < 250) weapon.Quality = WeaponQuality.Superior; if (quality < 200) weapon.Quality = WeaponQuality.Regular; if (quality < 150) weapon.Quality = WeaponQuality.Inferior; if (quality < 100) weapon.Quality = WeaponQuality.Low; if (quality < 50) weapon.Quality = WeaponQuality.Poor; weapon.BetaNerf = true; weapon.InvalidateProperties(); from.AddToBackpack(weapon); weapon.AddItem(m_Blade); weapon.AddItem(m_Hilt); }
public VampireKnight() : base(AIType.AI_Stealth, FightMode.Closest, 10, 1, 0.2, 0.4) { if ( Female = Utility.RandomBool() ) { Body = 0x191; Name = NameList.RandomName( "female" ); } else { Body = 0x190; Name = NameList.RandomName( "male" ); } Hue = 1150; BaseSoundID = 0x4B0; SetStr( 100, 105 ); SetDex( 128, 131 ); SetInt( 60, 62 ); SetHits( 220, 230 ); SetDamage( 15, 22 ); SetDamageType( ResistanceType.Physical, 50 ); SetDamageType( ResistanceType.Cold, 50 ); SetResistance( ResistanceType.Physical, 44 ); SetResistance( ResistanceType.Fire, -10 ); SetResistance( ResistanceType.Cold, 35 ); SetResistance( ResistanceType.Poison, 35 ); SetResistance( ResistanceType.Energy, 35 ); SetSkill( SkillName.SpiritSpeak, 100.0 ); SetSkill( SkillName.Necromancy, 50.0 ); SetSkill( SkillName.Focus, 90.1, 100.0 ); SetSkill( SkillName.MagicResist, 100.0 ); SetSkill( SkillName.Tactics, 105.0 ); SetSkill( SkillName.Anatomy, 105.0 ); SetSkill( SkillName.Macing, 100.1, 120.0 ); SetSkill( SkillName.Fencing, 100.1, 120.0 ); SetSkill( SkillName.Parry, 100.0 ); Fame = 9000; Karma = -14000; VirtualArmor = 5; AddItem( new LeatherChest() ); AddItem( new LeatherLegs() ); AddItem( new LeatherArms() ); AddItem( new LeatherCap() ); AddItem( new LeatherGloves() ); AddItem( new LeatherGorget() ); switch ( Utility.Random( 6 )) { case 0: { Maul bozdugan = new Maul(); bozdugan.Movable = false; bozdugan.WeaponAttributes.HitLeechHits = 100; AddItem( bozdugan ); AddItem( new WoodenKiteShield() ); break; } case 1: { Mace chuk = new Mace(); chuk.Movable = false; chuk.WeaponAttributes.HitLeechHits = 100; AddItem( chuk ); AddItem( new WoodenKiteShield() ); break; } case 2: { BladedStaff bstaff = new BladedStaff(); bstaff.Movable = false; bstaff.WeaponAttributes.HitLeechHits = 100; AddItem( bstaff ); break; } case 3: { Spear kopie = new Spear(); kopie.Movable = false; kopie.WeaponAttributes.HitLeechHits = 100; AddItem( kopie ); break; } case 4: { Pike pika = new Pike(); pika.Movable = false; pika.WeaponAttributes.HitLeechHits = 100; AddItem( pika ); break; } case 5: { Longsword mech = new Longsword(); mech.Movable = false; mech.WeaponAttributes.HitLeechHits = 100; AddItem( mech ); AddItem( new WoodenKiteShield() ); break; } } Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) ); hair.Hue = Utility.RandomNondyedHue(); hair.Layer = Layer.Hair; AddItem( hair ); BaseMount horse = new SkeletalMount(); horse.Rider = this; horse.Hue = 1; horse.Team = this.Team; }
public override void OnResponse( NetState state, RelayInfo info ) //Function for GumpButtonType.Reply Buttons { Mobile from = state.Mobile; PlayerMobile pm = from as PlayerMobile; PlayerModule module = pm.PlayerModule; m_cost = 50;//MOD COST OF WEAPON HERE!! Item wep = from.FindItemOnLayer( Layer.FirstValid ); Item weps = from.FindItemOnLayer( Layer.TwoHanded ); Container pack = from.Backpack; if ( wep !=null ) pack.TryDropItem( from, wep, false ); if ( weps !=null ) pack.TryDropItem( from, weps, false ); switch ( info.ButtonID ) { case 0: //Cancel { from.SendMessage( "You decide against spending your skill points." ); //from.SendGump( new LevelGump( from ) ); break; } case 1: //Katana { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Katana kat = new Katana(); ( ( Item )kat ).Name = "Katana [Level Item]"; kat.Identified = true;//Prevents others from being used in the upgrading! kat.LootType = LootType.Blessed; from.EquipItem( kat ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 2: //Broad Sword { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Broadsword bs = new Broadsword(); bs.Identified = true; bs.Name = "Broadsword"; bs.LootType = LootType.Blessed; from.EquipItem( bs ); from.SendMessage( 102, "You chose a Broadsword" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 3: //Scimitar { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Scimitar sc = new Scimitar(); sc.Identified = true; sc.Name = "Scimitar"; sc.LootType = LootType.Blessed; from.EquipItem( sc ); from.SendMessage( 102, "You chose a Scimitar" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 4: //Viking sword { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; VikingSword vs = new VikingSword(); vs.Identified = true; vs.Name = "Vikingsword"; vs.LootType = LootType.Blessed; from.EquipItem( vs ); from.SendMessage( 102, "You chose a Viking Sword" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 5: //Halberd { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Halberd hb = new Halberd(); hb.Identified = true; hb.Name = "Halberd"; hb.LootType = LootType.Blessed; from.EquipItem( hb ); from.SendMessage( 102, "You chose a Halberd" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 6: //Bardiche { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Bardiche bd = new Bardiche(); bd.Identified = true; bd.Name = "Bardiche"; bd.LootType = LootType.Blessed; from.EquipItem( bd ); from.SendMessage( 102, "You chose a Bardiche" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 7: //Double Axe { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; DoubleAxe da = new DoubleAxe(); da.Identified = true; da.Name = "Double Axe"; da.LootType = LootType.Blessed; from.EquipItem( da ); from.SendMessage( 102, "You chose a Double Axe" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 8: //Large Battle Axe { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; LargeBattleAxe lba = new LargeBattleAxe(); lba.Identified = true; lba.Name = "Large Battle Axe"; lba.LootType = LootType.Blessed; from.EquipItem( lba ); from.SendMessage( 102, "You chose a Large Battle Axe" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 9: //Axe { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Axe a = new Axe(); a.Identified = true; a.Name = "Axe"; a.LootType = LootType.Blessed; from.EquipItem( a ); from.SendMessage( 102, "You chose an Axe" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 10: //Kryss { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Kryss k = new Kryss(); k.Identified = true; k.Name = "Kryss"; k.LootType = LootType.Blessed; from.EquipItem( k ); from.SendMessage( 102, "You chose a Kryss" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 11: //War Fork { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; WarFork wf = new WarFork(); wf.Identified = true; wf.Name = "War Fork"; wf.LootType = LootType.Blessed; from.EquipItem( wf ); from.SendMessage( 102, "You chose a War Fork" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 12: //Dagger { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Dagger d = new Dagger(); d.Identified = true; d.Name = "Dagger"; d.LootType = LootType.Blessed; from.EquipItem( d ); from.SendMessage( 102, "You chose a Dagger" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 13: //Pike { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Pike p = new Pike(); p.Identified = true; p.Name = "Pike"; p.LootType = LootType.Blessed; from.EquipItem( p ); from.SendMessage( 102, "You chose a Pike" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 14: //Short Spear { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; ShortSpear ss = new ShortSpear(); ss.Identified = true; ss.Name = "Short Spear"; ss.LootType = LootType.Blessed; from.EquipItem( ss ); from.SendMessage( 102, "You chose a Short Spear" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 15: //Long Spear { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Spear ls = new Spear(); ls.Identified = true; ls.Name = "Long Spear"; ls.LootType = LootType.Blessed; from.EquipItem( ls ); from.SendMessage( 102, "You chose a Long Spear" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 16: //Pitchfork { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Pitchfork p = new Pitchfork(); p.Identified = true; p.Name = "Pitchfork"; p.LootType = LootType.Blessed; from.EquipItem( p ); from.SendMessage( 102, "You chose a Pitchfork" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 17: //lance { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Lance l = new Lance(); l.Identified = true; l.Name = "Lance"; l.LootType = LootType.Blessed; from.EquipItem( l ); from.SendMessage( 102, "You chose a Lance" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 18: //Sai's { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Sai s = new Sai(); s.Identified = true; s.Name = "Sai"; s.LootType = LootType.Blessed; from.EquipItem( s ); from.SendMessage( 102, "You chose Sai's" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 19: //War Mace { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; WarMace wm = new WarMace(); wm.Identified = true; wm.Name = "War Mace"; wm.LootType = LootType.Blessed; from.EquipItem( wm ); from.SendMessage( 102, "You chose a War Mace" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 20: //War Hammer { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; WarHammer wh = new WarHammer(); wh.Identified = true; wh.Name = "War Hammer"; wh.LootType = LootType.Blessed; from.EquipItem( wh ); from.SendMessage( 102, "You chose a War Hammer" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 21: //Maul { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Maul w = new Maul(); w.Identified = true; w.Name = "Maul"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Maul" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 22: //Club { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Club w = new Club(); w.Identified = true; w.Name = "Club"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Club" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 23: //Q Staff { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; QuarterStaff w = new QuarterStaff(); w.Identified = true; w.Name = "Quarter Staff"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Quarter Staff" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 24: //G Staff { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; GnarledStaff w = new GnarledStaff(); w.Identified = true; w.Name = "Gnarled Staff"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Gnarled Staff" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 25: //B Staff { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; BlackStaff w = new BlackStaff(); w.Identified = true; w.Name = "BlackStaff"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Black Staff" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 26: //Hammer Pick { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; HammerPick w = new HammerPick(); w.Identified = true; w.Name = "Hammer Pick"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Hammer Pick" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 27: //War Axe { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; WarAxe w = new WarAxe(); w.Identified = true; w.Name = "War Axe"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a War Axe" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 28: //Bow { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Bow w = new Bow(); w.Identified = true; w.Name = "Bow"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Bow" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 29: //Composite Bow { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; CompositeBow w = new CompositeBow(); w.Identified = true; w.Name = "Composite Bow"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Composite Bow" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 30: //Crossbow { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Crossbow w = new Crossbow(); w.Identified = true; w.Name = "Crossbow"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Crossbow" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 31: //Heavy Crossbow { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; HeavyCrossbow w = new HeavyCrossbow(); w.Identified = true; w.Name = "Heavy Crossbow"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Heavy Crossbow" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 32: //Repeating Crossbow { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; RepeatingCrossbow w = new RepeatingCrossbow(); w.Identified = true; w.Name = "Repeating Crossbow"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Repeating Crossbow" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } case 33: //Yumi { if ( module.SkillPts < m_cost ) from.SendMessage( 37, "Not enough skill points!" ); else { module.SkillPts -= m_cost; Yumi w = new Yumi(); w.Identified = true; w.Name = "Yumi"; w.LootType = LootType.Blessed; from.EquipItem( w ); from.SendMessage( 102, "You chose a Yumi" ); } from.SendGump( new WepUpgradeGump( from ) ); break; } } }
public VampireFighter() : base(AIType.AI_Stealth, FightMode.Closest, 10, 1, 0.2, 0.4) { if ( Female = Utility.RandomBool() ) { Body = 0x191; Name = NameList.RandomName( "female" ); } else { Body = 0x190; Name = NameList.RandomName( "male" ); } Hue = 1150; BaseSoundID = 0x4B0; SetStr( 100, 105 ); SetDex( 128, 131 ); SetInt( 60, 62 ); SetHits( 218, 225 ); SetDamage( 15, 22 ); SetDamageType( ResistanceType.Physical, 50 ); SetDamageType( ResistanceType.Cold, 50 ); SetResistance( ResistanceType.Physical, 40 ); SetResistance( ResistanceType.Fire, -10 ); SetResistance( ResistanceType.Cold, 35 ); SetResistance( ResistanceType.Poison, 35 ); SetResistance( ResistanceType.Energy, 35 ); SetSkill( SkillName.SpiritSpeak, 100.0 ); SetSkill( SkillName.Necromancy, 50.0 ); SetSkill( SkillName.Focus, 90.1, 100.0 ); SetSkill( SkillName.MagicResist, 100.1, 102.0 ); SetSkill( SkillName.Tactics, 100.0 ); SetSkill( SkillName.Anatomy, 100.0 ); SetSkill( SkillName.Swords, 100.1, 120.0 ); SetSkill( SkillName.Fencing, 100.1, 120.0 ); SetSkill( SkillName.Parry, 100.0 ); Fame = 9000; Karma = -14000; VirtualArmor = 5; AddItem( new LeatherChest() ); AddItem( new LeatherLegs() ); AddItem( new LeatherArms() ); AddItem( new LeatherCap() ); AddItem( new LeatherGloves() ); AddItem( new LeatherGorget() ); switch ( Utility.Random( 5 )) { case 0: { WarFork fork = new WarFork(); fork.Movable = false; fork.WeaponAttributes.HitLeechHits = 100; AddItem( fork ); AddItem( new WoodenKiteShield() ); break; } case 1: { Scythe kosa = new Scythe(); kosa.Movable = false; kosa.WeaponAttributes.HitLeechHits = 100; AddItem( kosa ); break; } case 2: { BoneHarvester surp = new BoneHarvester(); surp.Movable = false; surp.WeaponAttributes.HitLeechHits = 100; AddItem( surp ); AddItem( new WoodenKiteShield() ); break; } case 3: { Spear kopie = new Spear(); kopie.Movable = false; kopie.WeaponAttributes.HitLeechHits = 100; AddItem( kopie ); break; } case 4: { Pike pika = new Pike(); pika.Movable = false; pika.WeaponAttributes.HitLeechHits = 100; AddItem( pika ); break; } } Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) ); hair.Hue = Utility.RandomNondyedHue(); hair.Layer = Layer.Hair; AddItem( hair ); }