CODE |
using System; using Server.Mobiles; using Server; namespace Server.Items { public class OzzysMysteryWeapon : BaseSword { public override int InitMinHits{ get{ return 0; } } public override int InitMaxHits{ get{ return 0; } } public override int AosMinDamage{ get{ return 100; } } public override int AosMaxDamage{ get{ return 150; } } public override int AosSpeed{ get{ return 48; } } public override int DefMaxRange{ get{return 3; } } public override int DefHitSound{ get{ return 0x237; } } public override int DefMissSound{ get{ return 0x23A; } } [Constructable] public OzzysMysteryWeapon() : base( 0x13FF ) { Weight = 0; Name = "Ozzy's Mystery Weapon"; Hue = 0; AccuracyLevel = WeaponAccuracyLevel.Supremely; DurabilityLevel = WeaponDurabilityLevel.Indestructible; DamageLevel = WeaponDamageLevel.Vanq; Quality = WeaponQuality.Exceptional; Attributes.AttackChance = 100; Attributes.WeaponDamage = 20; Attributes.Luck = 200; Attributes.RegenMana = 50; Attributes.RegenHits = 50; Attributes.RegenStam = 50; Attributes.BonusDex = 20; Attributes.BonusStr = 45; Attributes.BonusInt = 20; Attributes.SpellChanneling = 1; WeaponAttributes.HitLeechMana = 100; WeaponAttributes.HitLeechHits = 100; WeaponAttributes.HitLeechStam = 100; WeaponAttributes.HitHarm = 100; WeaponAttributes.HitLowerAttack = 100; WeaponAttributes.HitLowerDefend = 100; WeaponAttributes.HitDispel = 100; WeaponAttributes.HitFireball = 100; WeaponAttributes.HitLightning = 100; LootType = LootType.Blessed; } public override void GetProperties(ObjectPropertyList list) { list.Add(Name); } public override bool HandlesOnSpeech { get { return Parent is PlayerMobile; } } public override void OnSpeech(SpeechEventArgs e) { if (e.Speech == "change hue" && e.Mobile == Parent ) { Hue = Utility.Random(2, 1200); } } public override bool OnEquip( Mobile from ) { from.Skills[SkillName.Swords].Base += 20.0; from.Skills[SkillName.Tactics].Base += 20.0; return base.OnEquip(from); } public override void OnRemoved( object parent ) { if ( parent is Mobile ) { Mobile m = (Mobile)parent; m.Skills[SkillName.Swords].Base -= 20.0; m.Skills[SkillName.Tactics].Base -= 20.0; } base.OnRemoved( parent ); } public override void GetDamageTypes( Mobile weilder, out int phys, out int fire, out int cold, out int pois, out int nrgy ) { phys = 0; nrgy = 100; pois = 100; fire = 100; cold = 100; } public override void OnDoubleClick( Mobile m ) { if( Parent != m ) { m.SendMessage( "You must be holding the weapon to use it!" ); } else { if ( ItemID == 0x13FF )//katana { m.SendMessage( "You The Look of The Weapon" ); m.PlaySound( 0x57 ); ItemID = 0x1401;//kryss } else if ( ItemID == 0x1401 )//kryss { m.SendMessage( "You The Look of The Weapon" ); m.PlaySound( 0x57 ); ItemID = 0x143D;//hammer pick } else if ( ItemID == 0x143D )//hammer pick { m.SendMessage( "You The Look of The Weapon" ); m.PlaySound( 0x57 ); ItemID = 0x1405;//warfork } else if ( ItemID == 0x1405 )//warfork { m.SendMessage( "You The Look of The Weapon" ); m.PlaySound( 0x57 ); ItemID = 0x13FB;//large battle axe } else if ( ItemID == 0x13FB )//large battle axe { m.SendMessage( "You The Look of The Weapon" ); m.PlaySound( 0x57 ); ItemID = 0x13FF;//katana } } } public OzzysMysteryWeapon( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); } public override void Deserialize(GenericReader reader) { base.Deserialize( reader ); int version = reader.ReadInt(); } } } |
CODE |
public override void OnDoubleClick( Mobile m ) { m.SendMessage( "You The Look of The Weapon" ); m.PlaySound( 0x57 ); this.Delete(); m.AddItem(new OzzysMysteryKatana()); } |
CODE |
public override void OnSpeech(SpeechEventArgs e) { if (e.Speech == "change hue" && e.Mobile == Parent ) { Hue = Utility.Random(2, 1200); } else if (e.Speech == "change weapon" && e.Mobile == Parent ) { if ( ItemID == 0x13FF )//katana { Mobile m = (Mobile)parent; m.SendMessage( "You Change Weapons" ); m.PlaySound( 0x57 ); this.Delete(); m.EquipItem(new OzzysMysteryHammerPick()); } } } [CODE] The error comes in at this part. |