public override void OnDoubleClick(Mobile from) { //STARTMOD: Teiravon if (!from.CanBeginAction(typeof(BattleNet))) { from.SendMessage("You cannot do this yet."); } if (from is TeiravonMobile) { TeiravonMobile m_Player = (TeiravonMobile)from; if ((m_Player.IsShapeshifter() || m_Player.IsForester()) && (m_Player.Shapeshifted || m_Player.IsShifted())) { m_Player.SendMessage("You cannot use nets while shapeshifted."); return; } } if (IsChildOf(from.Backpack)) { from.SendMessage("Who is your target?"); from.BeginTarget(-1, true, TargetFlags.None, new TargetCallback(OnTarget)); } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } }
//[Constructable] public CustomShapeshifterWeapon(int type, string name, int hue, TeiravonMobile Shifter) : base(0x2644) { int index = type; int ShifterLevel = Shifter.PlayerLevel; if (!Shifter.IsShapeshifter()) { ShifterLevel = (ShifterLevel / 2); } Weight = 0.0; Movable = false; if (name != null) { Name = name + "'s Limb"; } else { Name = "Animal Limb"; } Resource = CraftResource.None; Hue = 1; LootType = LootType.Newbied; Layer = Layer.TwoHanded; ItemID = (int)(TAVShiftUtilities.ShiftInfo.Table[index].WeapID); Primary = (WeaponAbility)(TAVShiftUtilities.ShiftInfo.Table[index].PrimaryAbility); Secondary = (WeaponAbility)(TAVShiftUtilities.ShiftInfo.Table[index].PrimaryAbility); PoisonCharges = 9999; Poison = Poison.GetPoison(ShifterLevel / 5); Attributes.WeaponSpeed = (int)(TAVShiftUtilities.ShiftInfo.Table[index].SpeedScale * (ShifterLevel * 2)); MinDamage = 8 + (int)(TAVShiftUtilities.ShiftInfo.Table[index].DamageScale * ShifterLevel); MaxDamage = 11 + (int)(TAVShiftUtilities.ShiftInfo.Table[index].DamageScale * ShifterLevel); if (index == 1) { SkillBonuses.Skill_1_Name = SkillName.Tracking; SkillBonuses.Skill_1_Value = 5 * ShifterLevel; } if (index == 7) { SkillBonuses.Skill_1_Name = SkillName.Stealth; SkillBonuses.Skill_1_Value = 5 * ShifterLevel; } if (index == 8) { SkillBonuses.Skill_1_Name = SkillName.Poisoning; SkillBonuses.Skill_1_Value = 5 * ShifterLevel; } }
//[Constructable] public CustomShapeshifterArmor(int type, string name, int hue, TeiravonMobile Shifter) : base(0x13DB) { int index = type; int ShifterLevel = Shifter.PlayerLevel; if (!Shifter.IsShapeshifter()) { ShifterLevel = (ShifterLevel / 2); } Weight = 0.0; Movable = false; Hue = hue; LootType = LootType.Newbied; if (name != null) { Name = name + "'s Hide"; } else { Name = "Animal Hide"; } PhysicalBonus = (int)(Utility.RandomMinMax(18, 21) + TAVShiftUtilities.ShiftInfo.Table[index].ArmorScale) + (int)(1.5 * ShifterLevel); ColdBonus = (int)(Utility.RandomMinMax(18, 21) + TAVShiftUtilities.ShiftInfo.Table[index].ArmorScale) + (int)(1.5 * ShifterLevel); EnergyBonus = (int)(Utility.RandomMinMax(18, 21) + TAVShiftUtilities.ShiftInfo.Table[index].ArmorScale) + (int)(1.5 * ShifterLevel); PoisonBonus = (int)(Utility.RandomMinMax(18, 21) + TAVShiftUtilities.ShiftInfo.Table[index].ArmorScale) + (int)(1.5 * ShifterLevel); FireBonus = (int)(Utility.RandomMinMax(18, 21) + TAVShiftUtilities.ShiftInfo.Table[index].ArmorScale) + (int)(1.5 * ShifterLevel); Attributes.BonusStr = (int)(TAVShiftUtilities.ShiftInfo.Table[index].StrScale * ShifterLevel); Attributes.BonusDex = (int)(TAVShiftUtilities.ShiftInfo.Table[index].DexScale * ShifterLevel); Attributes.BonusInt = (int)(TAVShiftUtilities.ShiftInfo.Table[index].IntScale * ShifterLevel); Attributes.BonusHits = (int)(TAVShiftUtilities.ShiftInfo.Table[index].HpScale * ShifterLevel); Attributes.BonusStam = (int)(TAVShiftUtilities.ShiftInfo.Table[index].StamScale * ShifterLevel); Attributes.BonusMana = (int)(TAVShiftUtilities.ShiftInfo.Table[index].ManaScale * ShifterLevel); Attributes.RegenHits = (int)(TAVShiftUtilities.ShiftInfo.Table[index].HpRegen * ShifterLevel); Attributes.RegenStam = (int)(TAVShiftUtilities.ShiftInfo.Table[index].StamRegen * ShifterLevel); Attributes.RegenMana = (int)(TAVShiftUtilities.ShiftInfo.Table[index].ManaRegen * ShifterLevel); }
private static void Shapeshift_OnCommand(CommandEventArgs e) { TeiravonMobile m_Player = (TeiravonMobile)e.Mobile; if (!m_Player.HasFeat(TeiravonMobile.Feats.WildShape)) { m_Player.SendMessage(Teiravon.Colors.FeatMessageColor, Teiravon.Messages.NoAbility); } else if (m_Player.Mounted) { m_Player.SendMessage("You can't do this while mounted."); } else if (m_Player.IsShapeshifter() || m_Player.IsForester()) { m_Player.SendGump(new NewShapeshiftGump(m_Player)); } else { m_Player.SendMessage("Only shapeshifters/foresters can do that. "); } }
public override void OnDoubleClick(Mobile from) { if (!Movable || !from.CanBeginAction(typeof(BasePotion))) { return; } if (from.InRange(this.GetWorldLocation(), 1)) { //STARTMOD: Teiravon if (from is TeiravonMobile) { TeiravonMobile m_Player = (TeiravonMobile)from; if ((m_Player.IsShapeshifter() || m_Player.IsForester()) && (m_Player.Shapeshifted || m_Player.IsShifted())) { m_Player.SendMessage("You cannot use potions while shapeshifted."); return; } } //ENDMOD: Teiravon if (!RequireFreeHand || HasFreeHand(from)) { Drink(from); } else { from.SendLocalizedMessage(502172); // You must have a free hand to drink a potion. } } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public NewShapeshiftGump(TeiravonMobile from) : base(0, 0) { m_Player = from; max = 1 + m_Player.PlayerLevel / (m_Player.IsShapeshifter()? 4 : 7); if (max > 7) { max = 7; } Closable = true; Disposable = true; Dragable = true; Resizable = false; m_Player = (TeiravonMobile)from; m_Player.CloseGump(typeof(NewShapeshiftGump)); this.AddPage(0); AddBackground(312, 10, 30 + (max * 98), 140, 9260); //this.AddImage(328, -5, 30061); //this.AddImage(328, 55 + (max * 82), 30077); //AddLabel(355, 115, 2930, @"Evaluate creature"); AddButton(330, 120, 22153, 22155, (int)Buttons.Information, GumpButtonType.Reply, 0); if (m_Player.IsShifted() && m_Player.Shapeshifted) { //AddLabel(401, 487, 2930, @"Undo transformation"); AddButton(276 + ((30 + (max * 98))), 112, 5052, 5053, (int)Buttons.Cancel, GumpButtonType.Reply, 0); } bool DeleteTime = false; if (m_Player.ShapeshiftSlotDelete <= DateTime.Now) { DeleteTime = true; } switch (max) { case 1: if (FilledSlot(1, m_Player)) { FullSlot((int)Buttons.CTransform1, 1, m_Player); if (DeleteTime) { DeleteButton((int)Buttons.CDelete1, 1); } } else { EmptySlot((int)Buttons.CAdd1, 1); } break; case 2: if (FilledSlot(2, m_Player)) { FullSlot((int)Buttons.CTransform2, 2, m_Player); if (DeleteTime) { DeleteButton((int)Buttons.CDelete2, 2); } } else { EmptySlot((int)Buttons.CAdd2, 2); } goto case 1; case 3: if (FilledSlot(3, m_Player)) { FullSlot((int)Buttons.CTransform3, 3, m_Player); if (DeleteTime) { DeleteButton((int)Buttons.CDelete3, 3); } } else { EmptySlot((int)Buttons.CAdd3, 3); } goto case 2; case 4: if (FilledSlot(4, m_Player)) { FullSlot((int)Buttons.CTransform4, 4, m_Player); if (DeleteTime) { DeleteButton((int)Buttons.CDelete4, 4); } } else { EmptySlot((int)Buttons.CAdd4, 4); } goto case 3; case 5: if (FilledSlot(5, m_Player)) { FullSlot((int)Buttons.CTransform5, 5, m_Player); if (DeleteTime) { DeleteButton((int)Buttons.CDelete5, 5); } } else { EmptySlot((int)Buttons.CAdd5, 5); } goto case 4; case 6: if (FilledSlot(6, m_Player)) { FullSlot((int)Buttons.CTransform6, 6, m_Player); if (DeleteTime) { DeleteButton((int)Buttons.CDelete6, 6); } } else { EmptySlot((int)Buttons.CAdd6, 6); } goto case 5; case 7: if (FilledSlot(7, m_Player)) { FullSlot((int)Buttons.CTransform7, 7, m_Player); if (DeleteTime) { DeleteButton((int)Buttons.CDelete7, 7); } } else { EmptySlot((int)Buttons.CAdd7, 7); } goto case 6; default: break; } }
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); }