public override void OnDoubleClick(Mobile from) { if (!IsChildOf(from.Backpack)) { // The item must be in your backpack to use it. from.SendLocalizedMessage(1060640); } else if (from.NextSkillTime > DateTime.Now) { // You must wait a few seconds before you can use that item. from.SendLocalizedMessage(1070772); } else { SkillHandlers.Hiding.CombatOverride = true; if (from.UseSkill(SkillName.Hiding)) { from.FixedParticles(0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot); from.PlaySound(0x22F); Consume(); } SkillHandlers.Hiding.CombatOverride = false; } }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { // The item must be in your backpack to use it. from.SendLocalizedMessage( 1060640 ); } else if ( from.NextSkillTime > DateTime.Now ) { // You must wait a few seconds before you can use that item. from.SendLocalizedMessage( 1070772 ); } else if ( from.Stam < 20 ) { from.SendMessage( "You don't have enough stamina to do that." ); } else { SkillHandlers.Hiding.CombatOverride = true; if ( from.UseSkill( SkillName.Hiding ) ) { from.Stam -= 20; // Effects nicked from the GM hide/unhide command Effects.SendLocationEffect( new Point3D( from.X + 1, from.Y, from.Z + 4 ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X + 1, from.Y, from.Z ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X + 1, from.Y, from.Z - 4 ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X, from.Y + 1, from.Z + 4 ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X, from.Y + 1, from.Z ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X, from.Y + 1, from.Z - 4 ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X + 1, from.Y + 1, from.Z + 11 ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X + 1, from.Y + 1, from.Z + 7 ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X + 1, from.Y + 1, from.Z + 3 ), from.Map, 0x3728, 13 ); Effects.SendLocationEffect( new Point3D( from.X + 1, from.Y + 1, from.Z - 1 ), from.Map, 0x3728, 13 ); from.PlaySound( 0x22F ); Consume(); } SkillHandlers.Hiding.CombatOverride = false; } }
public override void OnDoubleClick( Mobile from ) { if ( !IsChildOf( from.Backpack ) ) { // The item must be in your backpack to use it. from.SendLocalizedMessage( 1060640 ); } else if ( from.Skills.ExoticWeaponry.Value < 50.0 ) { // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. from.SendLocalizedMessage( 1063013, "50\tExoticWeaponry" ); } else if ( from.NextSkillTime > DateTime.Now ) { // You must wait a few seconds before you can use that item. from.SendLocalizedMessage( 1070772 ); } else if ( from.Mana < 10 ) { // You don't have enough mana to do that. from.SendLocalizedMessage( 1049456 ); } else { SkillHandlers.Hiding.CombatOverride = true; if ( from.UseSkill( SkillName.Hiding ) ) { from.Mana -= 10; from.FixedParticles( 0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot ); from.PlaySound( 0x22F ); Consume(); } SkillHandlers.Hiding.CombatOverride = false; } }