public static TimeSpan OnUse( Mobile m ) { m.RevealingAction(); if ( m.CheckSkill( SkillName.SpiritSpeak, 0, 100 ) ) { if ( !m.CanHearGhosts ) { Timer t = new SpiritSpeakTimer( m ); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if ( secs < 15 ) secs = 15; t.Delay = TimeSpan.FromSeconds( secs );//15seconds to 3 minutes t.Start(); m.CanHearGhosts = true; } m.PlaySound( 0x24A ); m.SendLocalizedMessage( 502444 );//You contact the neitherworld. } else { m.SendLocalizedMessage( 502443 );//You fail to contact the neitherworld. m.CanHearGhosts = false; } return TimeSpan.FromSeconds( 1.0 ); }
public static TimeSpan OnUse(Mobile m) { m.RevealingAction(); if (m.CheckSkill(SkillName.SpiritSpeak, 0, 100)) { if (!m.CanHearGhosts) { Timer t = new SpiritSpeakTimer(m); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if (secs < 15) { secs = 15; } t.Delay = TimeSpan.FromSeconds(secs); //15seconds to 3 minutes t.Start(); m.CanHearGhosts = true; } m.PlaySound(0x24A); m.SendLocalizedMessage(502444); //You contact the neitherworld. } else { m.SendLocalizedMessage(502443); //You fail to contact the neitherworld. m.CanHearGhosts = false; } return(TimeSpan.FromSeconds(1.0)); }
public static TimeSpan OnUse( Mobile m ) { m.RevealingAction(); Timer t = m_Table[m] as Timer; if ( t != null && t.Running ) t.Stop(); if ( m.CheckSkill( SkillName.SpiritSpeak, 0, 100 ) ) { if ( t == null ) m_Table[m] = t = new SpiritSpeakTimer( m ); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if ( secs < 10 ) secs = 10; t.Delay = TimeSpan.FromSeconds( secs );//15 seconds to 3 minutes t.Start(); m.CanHearGhosts = true; m.PlaySound( 0x24A ); m.SendLocalizedMessage( 502444 );//You contact the neitherworld. } else { m_Table.Remove( m ); m.SendLocalizedMessage( 502443 );//You fail to contact the neitherworld. m.CanHearGhosts = false; } return TimeSpan.FromSeconds( 10.0 ); }
public static TimeSpan OnUse(Mobile m) { m.RevealingAction(); Timer t = m_Table[m] as Timer; if (t != null && t.Running) { t.Stop(); } if (m.CheckSkill(SkillName.SpiritSpeak, 0, 100)) { if (t == null) { m_Table[m] = t = new SpiritSpeakTimer(m); } double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if (secs < 10) { secs = 10; } t.Delay = TimeSpan.FromSeconds(secs);//15 seconds to 3 minutes t.Start(); m.CanHearGhosts = true; IPooledEnumerable eable = m.Map.GetMobilesInRange(m.Location, Core.GlobalMaxUpdateRange); // find all the dead people we can see in range and send them foreach (Mobile g in eable) { if (!g.Alive && m.CanSee(g) && Utility.InUpdateRange(m.Location, g.Location)) { m.Send(new MobileIncoming(m, g)); } } eable.Free(); m.PlaySound(0x24A); m.SendLocalizedMessage(502444);//You contact the neitherworld. } else { m_Table.Remove(m); m.SendLocalizedMessage(502443);//You fail to contact the neitherworld. m.CanHearGhosts = false; } return(TimeSpan.FromSeconds(10.0)); }
public static TimeSpan OnUse(Mobile m) { if (Core.AOS) { Spell spell = new SpiritSpeakSpell(m); spell.Cast(); if (spell.IsCasting) { return(TimeSpan.FromSeconds(5.0)); } return(TimeSpan.Zero); } m.RevealingAction(); if (m.CheckSkill(SkillName.SpiritSpeak, 0, 100)) { if (!m.CanHearGhosts) { Timer t = new SpiritSpeakTimer(m); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if (secs < 15) { secs = 15; } t.Delay = TimeSpan.FromSeconds(secs); //15seconds to 3 minutes t.Start(); m.CanHearGhosts = true; } m.PlaySound(0x24A); m.SendAsciiMessage("You contact the netherworld."); //You contact the neitherworld. } else { m.SendAsciiMessage("You fail to contact the netherworld."); //You fail to contact the neitherworld. m.CanHearGhosts = false; } return(TimeSpan.FromSeconds(10.0)); }
public static TimeSpan OnUse( Mobile m ) { EventSink.InvokeSkillUsed(new SkillUsedEventArgs(m, m.Skills[SkillName.SpiritSpeak])); if( Core.AOS ) { Spell spell = new SpiritSpeakSpell(m); spell.Cast(); if( spell.IsCasting ) return TimeSpan.FromSeconds(5.0); return TimeSpan.Zero; } m.RevealingAction(); if( m.CheckSkill(SkillName.SpiritSpeak, 0, 100) ) { if( !m.CanHearGhosts ) { Timer t = new SpiritSpeakTimer(m); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if( secs < 15 ) secs = 15; t.Delay = TimeSpan.FromSeconds(secs);//15seconds to 3 minutes t.Start(); m.CanHearGhosts = true; } m.PlaySound(0x24A); m.SendLocalizedMessage(502444);//You contact the neitherworld. } else { m.SendLocalizedMessage(502443);//You fail to contact the neitherworld. m.CanHearGhosts = false; } return TimeSpan.FromSeconds(1.0); }
public static TimeSpan OnUse(Mobile m) { // Move spirit check section above AOS test so it applies whether AOS is on or not if (m.CheckSkill(SkillName.SpiritSpeak, 0, 100)) { if (!m.CanHearGhosts) { Timer t = new SpiritSpeakTimer(m); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 45; if (secs < 15) { secs = 15; } t.Delay = TimeSpan.FromSeconds(secs); //15 seconds to 3 minutes t.Start(); m.CanHearGhosts = true; } m.PlaySound(0x24A); m.SendLocalizedMessage(502444); //You contact the neitherworld. } else { m.SendLocalizedMessage(502443); //You fail to contact the neitherworld. m.CanHearGhosts = false; } if (Core.AOS) { Spell spell = new SpiritSpeakSpell(m); spell.Cast(); if (spell.IsCasting) { return(TimeSpan.FromSeconds(5.0)); } return(TimeSpan.Zero); } m.RevealingAction(); return(TimeSpan.FromSeconds(1.0)); }
public static TimeSpan OnUse(Mobile m) { m.RevealingAction(); Timer t = m_Table[m] as Timer; if (t != null && t.Running) t.Stop(); if (m.CheckSkill(SkillName.SpiritSpeak, 0, 100)) { if (t == null) m_Table[m] = t = new SpiritSpeakTimer(m); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if (secs < 10) secs = 10; t.Delay = TimeSpan.FromSeconds(secs);//15 seconds to 3 minutes t.Start(); m.CanHearGhosts = true; IPooledEnumerable eable = m.Map.GetMobilesInRange(m.Location, Core.GlobalMaxUpdateRange); // find all the dead people we can see in range and send them foreach (Mobile g in eable) { if (!g.Alive && m.CanSee(g) && Utility.InUpdateRange(m.Location, g.Location)) m.Send(new MobileIncoming(m, g)); } eable.Free(); m.PlaySound(0x24A); m.SendLocalizedMessage(502444);//You contact the neitherworld. } else { m_Table.Remove(m); m.SendLocalizedMessage(502443);//You fail to contact the neitherworld. m.CanHearGhosts = false; } return TimeSpan.FromSeconds(10.0); }
public static TimeSpan OnUse(Mobile m) { m.RevealingAction(); Timer t = m_Table[m] as Timer; if (t != null && t.Running) { t.Stop(); } if (m.CheckSkill(SkillName.SpiritSpeak, 0, 100)) { if (t == null) { m_Table[m] = t = new SpiritSpeakTimer(m); } double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if (secs < 10) { secs = 10; } t.Delay = TimeSpan.FromSeconds(secs); //15 seconds to 3 minutes t.Start(); m.CanHearGhosts = true; m.PlaySound(0x24A); m.SendLocalizedMessage(502444); //You contact the neitherworld. } else { m_Table.Remove(m); m.SendLocalizedMessage(502443); //You fail to contact the neitherworld. m.CanHearGhosts = false; } return(TimeSpan.FromSeconds(10.0)); }
public static TimeSpan OnUse(Mobile from) { from.RevealingAction(); from.NextSkillTime = Core.TickCount + (int)(SkillCooldown.SpiritSpeakCooldown * 1000); if (from.CheckSkill(SkillName.SpiritSpeak, 0, 120, 1.0)) { if (!from.CanHearGhosts) { Timer t = new SpiritSpeakTimer(from); double secs = from.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if (secs < 15) { secs = 15; } t.Delay = TimeSpan.FromSeconds(secs); //15seconds to 3 minutes t.Start(); from.CanHearGhosts = true; } from.PlaySound(0x24A); from.SendLocalizedMessage(502444); //You contact the neitherworld. } else { from.SendLocalizedMessage(502443); //You fail to contact the neitherworld. from.CanHearGhosts = false; } return(TimeSpan.FromSeconds(1.0)); }
public static TimeSpan OnUse(Mobile m) { if (m is TeiravonMobile) { TeiravonMobile tav = m as TeiravonMobile; if (tav.IsPaladin() || tav.IsCleric() || tav.IsDarkCleric()) { GivePrayer(tav); return(TimeSpan.FromSeconds(10.0)); } else { Spell spell = new SpiritSpeakSpell(m); spell.Cast(); if (spell.IsCasting) { return(TimeSpan.FromSeconds(5.0)); } return(TimeSpan.Zero); } } else { Spell spell = new SpiritSpeakSpell(m); spell.Cast(); if (spell.IsCasting) { return(TimeSpan.FromSeconds(5.0)); } return(TimeSpan.Zero); } m.RevealingAction(); if (m.CheckSkill(SkillName.SpiritSpeak, 0, 100)) { if (!m.CanHearGhosts) { Timer t = new SpiritSpeakTimer(m); double secs = m.Skills[SkillName.SpiritSpeak].Base / 50; secs *= 90; if (secs < 15) { secs = 15; } t.Delay = TimeSpan.FromSeconds(secs); //15seconds to 3 minutes t.Start(); m.CanHearGhosts = true; } m.PlaySound(0x24A); m.SendLocalizedMessage(502444); //You contact the neitherworld. } else { m.SendLocalizedMessage(502443); //You fail to contact the neitherworld. m.CanHearGhosts = false; } return(TimeSpan.FromSeconds(1.0)); }