private static void MageSpell4_OnCommand(CommandEventArgs e) { TeiravonMobile m_Player = (TeiravonMobile)e.Mobile; if (m_Player.IsMage() && !m_Player.IsNecromancer()) { if (m_Player.Paralyzed || m_Player.Frozen) { m_Player.SendMessage("You cannot cast a spell while frozen."); } else { if (m_Player.Mana >= 125) { MageAOEEffect(m_Player); } else { m_Player.SendMessage("You must have 125 mana to cast this!"); } } } else { m_Player.SendMessage("Only Elemental Mages can use this command"); } }
private static void MageSpell2_OnCommand(CommandEventArgs e) { TeiravonMobile m_Player = (TeiravonMobile)e.Mobile; if (m_Player.IsMage() && !m_Player.IsNecromancer()) { if (m_Player.Paralyzed || m_Player.Frozen) { m_Player.SendMessage("You cannot cast a spell while frozen."); } else { if (m_Player.Mana >= 5 + (5 * (int)(m_Player.PlayerLevel / 3))) { m_Player.Target = new MageSpell2Target(m_Player); } else { m_Player.SendMessage("You must have {0} mana to cast this!", 5 + (5 * (int)(m_Player.PlayerLevel / 3))); } } } else { m_Player.SendMessage("Only Elemental Mages can use this command"); } }
private static void MageSpell1_OnCommand(CommandEventArgs e) { TeiravonMobile m_Player = (TeiravonMobile)e.Mobile; if (!MGSPA.Contains(m_Player)) { if (m_Player.IsMage() && !m_Player.IsNecromancer()) { if (m_Player.Paralyzed || m_Player.Frozen) { m_Player.SendMessage("You cannot cast a spell while frozen."); } else { if (m_Player.Mana >= 30) { m_Player.Target = new MageSpell1Target(m_Player); } else { m_Player.SendMessage("You must have 30 mana to cast this!"); } } } else { m_Player.SendMessage("Only Elemental Mages can use this command"); } } else { m_Player.SendMessage("You must wait before using this abilitiy again."); } }
public override bool CanEquip(Mobile from) { if (from is TeiravonMobile) { TeiravonMobile m_Player = (TeiravonMobile)from; if (!m_Player.IsMage()) { from.SendMessage("Only mages can use that."); return(false); } } return(base.CanEquip(from)); }
public override void OnDoubleClick(Mobile from) { if (from is TeiravonMobile) { TeiravonMobile player = (TeiravonMobile)from; if (player.IsMage() && !player.IsNecromancer()) { player.SendGump(new BOEGump(player)); } else { player.SendMessage("Only Elemental Mages can use this."); } } }
public override void OnDoubleClick(Mobile from) { if (from is TeiravonMobile) { TeiravonMobile m_Player = (TeiravonMobile)from; if (!m_Player.IsMage()) { from.SendMessage("Only mages can use that."); } else { from.Target = new MageGemTarget(this, m_Player); } } }
private static void ImbueWand_OnCommand(CommandEventArgs e) { TeiravonMobile m_Player = (TeiravonMobile)e.Mobile; if (!m_Player.IsMage()) { return; } if (m_Player.Mana < m_Player.ManaMax) { m_Player.SendMessage("You must be fully rested to do this!"); return; } m_Player.Target = new WandTarget(); m_Player.SendMessage("Target an empty wand..."); }
private static void MageSpell3_OnCommand(CommandEventArgs e) { TeiravonMobile m_Player = (TeiravonMobile)e.Mobile; if (m_Player.IsMage() && !m_Player.IsNecromancer()) { if (m_Player.Paralyzed || m_Player.Frozen) { m_Player.SendMessage("You cannot cast a spell while frozen."); } else { if (m_Player.Mana >= 10 * (int)(m_Player.PlayerLevel / 2)) { if (m_Player.OBody == 0) { if (!m_Player.Mounted) { EleTransform(m_Player); } else { m_Player.SendMessage("You cannot cast this while mounted."); } } else { m_Player.SendMessage("You are already transformed!"); } } else { m_Player.SendMessage("You must have {0} mana to cast this!", 10 * (int)(m_Player.PlayerLevel / 2)); } } } else { m_Player.SendMessage("Only Elemental Mages can use this command"); } }
public override void OnCast() { if (CheckSequence()) { if (Caster is TeiravonMobile) { TeiravonMobile tm_caster = (TeiravonMobile)Caster; if (tm_caster.IsMage()) { tm_caster.FixedParticles(0x375A, 9, 20, 5027, EffectLayer.Waist); tm_caster.PlaySound(0x1F7); int bonus = tm_caster.PlayerLevel * 5; /* * double spelllength = (tm_caster.Skills[SkillName.Magery].Value / 10) + 5.0; * tm_caster.AddSkillMod( new TimedSkillMod( SkillName.MagicResist, true, bonus, TimeSpan.FromMinutes( spelllength ) ) ); * new InternalTimer( Caster ).Start(); */ tm_caster.VirtualArmorMod = (int)GetAosDamage(bonus, 2, 10); string shield = tm_caster.VirtualArmorMod.ToString(); tm_caster.LocalOverheadMessage(MessageType.Emote, 90, true, shield); } else { ArrayList targets = new ArrayList(); Map map = Caster.Map; if (map != null) { IPooledEnumerable eable = map.GetMobilesInRange(Caster.Location, 4); foreach (Mobile m in eable) { if (Caster.CanBeBeneficial(m, false)) { targets.Add(m); } } eable.Free(); } Party party = Party.Get(Caster); for (int i = 0; i < targets.Count; ++i) { Mobile m = (Mobile)targets[i]; if (m == Caster || (party != null && party.Contains(m))) { if (!Spells.Fourth.ArchProtectionSpell.Registry.ContainsKey(m)) { Caster.DoBeneficial(m); m.PlaySound(0x1E9); m.FixedParticles(0x375A, 9, 20, 5016, EffectLayer.Waist); Spells.Fourth.ArchProtectionSpell.Registry.Add(m, 1); } } } } } } }
public static Chart CompileStatChart() { /* * PieChart chart = new PieChart( "Stat Distribution", "graphs_strdexint_distrib", true ); * * ChartItem strItem = new ChartItem( "Strength", 0 ); * ChartItem dexItem = new ChartItem( "Dexterity", 0 ); * ChartItem intItem = new ChartItem( "Intelligence", 0 ); * * foreach ( Mobile mob in World.Mobiles.Values ) * { * if ( mob.RawStatTotal == mob.StatCap && mob is PlayerMobile ) * { * strItem.Value += mob.RawStr; * dexItem.Value += mob.RawDex; * intItem.Value += mob.RawInt; * } * } * * chart.Items.Add( strItem ); * chart.Items.Add( dexItem ); * chart.Items.Add( intItem ); */ PieChart chart = new PieChart("Class Distribution", "graphs_class_distrib", true); ChartItem fightItem = new ChartItem("Fighters", 0); ChartItem rogueItem = new ChartItem("Rogues", 0); ChartItem mageItem = new ChartItem("Mages", 0); ChartItem clericItem = new ChartItem("Clerics", 0); ChartItem rangerItem = new ChartItem("Rangers", 0); ChartItem druidItem = new ChartItem("Druids", 0); ChartItem barbItem = new ChartItem("Barbarians", 0); ChartItem crafterItem = new ChartItem("Crafters", 0); ChartItem advItem = new ChartItem("Advanced", 0); foreach (Mobile mob in World.Mobiles.Values) { if (mob != null && mob is TeiravonMobile) { TeiravonMobile tav = mob as TeiravonMobile; Account acct = (Account)tav.Account; if ((acct.LastLogin + TimeSpan.FromDays(90.0)) < DateTime.Now) { continue; } if (tav.IsFighter() || tav.IsCavalier() || tav.IsMonk()) { fightItem.Value++; } else if (tav.IsThief() || tav.IsAssassin() || tav.IsBard()) { rogueItem.Value++; } else if (tav.IsMage()) { mageItem.Value++; } else if (tav.IsCleric() || tav.IsDarkCleric()) { clericItem.Value++; } else if (tav.IsArcher() || tav.IsMageSlayer() || tav.IsRanger()) { rangerItem.Value++; } else if (tav.IsForester() || tav.IsShapeshifter()) { druidItem.Value++; } else if (tav.IsBerserker() || tav.IsDragoon()) { barbItem.Value++; } else if (tav.IsCrafter()) { crafterItem.Value++; } else { advItem.Value++; } } } chart.Items.Add(fightItem); chart.Items.Add(rogueItem); chart.Items.Add(mageItem); chart.Items.Add(clericItem); chart.Items.Add(rangerItem); chart.Items.Add(druidItem); chart.Items.Add(barbItem); chart.Items.Add(crafterItem); chart.Items.Add(advItem); return(chart); }