protected override void OnTarget(Mobile from, object target) { if (m_Deed.Deleted) { return; } if (!m_Deed.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (target is BaseCreature) { BaseCreature pet = (BaseCreature)target; if (pet.ControlMaster != from) { from.SendMessage("That's not your pet!"); } else if (pet.IsBonded) { from.SendMessage("That is already bonded!"); } else { m_Deed.Consume(); pet.IsBonded = true; from.SendLocalizedMessage(1049666); // Your pet has bonded with you! } } else { from.SendMessage("That's not your pet!"); } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Deed.IsChildOf(m_From.Backpack)) { if (targeted is Mobile) { if (targeted is BaseCreature) { BaseCreature creature = (BaseCreature)targeted; if (!creature.Tamable) { from.SendMessage("This animal is not tamed."); } else if (!creature.Controlled || creature.ControlMaster != from) { from.SendMessage("You do not own this animal."); } else if (creature.IsDeadPet) { from.SendMessage("This animal is dead."); } else if (creature.Summoned) { from.SendMessage("This creature is summoned."); } else if (creature.Body.IsHuman) { from.SendMessage("You cannot bond a person!"); } else { if (creature.IsBonded == true) { from.SendMessage("The animal is bonded."); } else { if (from.Skills[SkillName.AnimalTaming].Base < creature.MinTameSkill) { from.SendMessage("You do not have enough taming to bond this creature."); } else if (from.Skills[SkillName.AnimalLore].Base < creature.MinTameSkill) { from.SendMessage("You do not have enough animal lore bond this creature."); } else { try{ creature.IsBonded = true; from.SendMessage("{0} bonded successfully ", creature.Name); m_Deed.Delete(); } catch { from.SendMessage("There was a problem bonding you pet. Please contact staff."); } } } } } else { from.SendMessage("Você pode bondar somente animais"); } } else { from.SendMessage("Você pode bondar somente animais"); } } else { from.SendMessage("É necessário estar em sua mochila."); } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Deed.IsChildOf(m_From.Backpack)) { if (targeted is Mobile) { if (targeted is BaseCreature) { BaseCreature creature = (BaseCreature)targeted; if (!creature.Tamable) { from.SendMessage("Este animal não esta domado"); } else if (!creature.Controlled || creature.ControlMaster != from) { from.SendMessage("Este animal não é seu"); } else if (creature.IsDeadPet) { from.SendMessage("Este animal esta morto"); } else if (creature.Summoned) { from.SendMessage("Impossível de bondar um summon"); } else if (creature.Body.IsHuman) { from.SendMessage("Impossível de bondar uma pessoa"); } else { if (creature.IsBonded == true) { from.SendMessage("Este animal ja esta bonded"); } else { if (from.Skills[SkillName.AnimalTaming].Base < creature.MinTameSkill) { from.SendMessage("Você não possuiu tamer suficiente para bonda-lo"); } else if (from.Skills[SkillName.AnimalLore].Base < creature.MinTameSkill) { from.SendMessage("Você não possuiu animal lore suficiente para bonda-lo"); } else { try{ creature.IsBonded = true; from.SendMessage("{0} foi bondado com sucesso", creature.Name); m_Deed.Delete(); } catch { from.SendMessage("Ocorreu um problema ao bondar seu animal. Contacte a Staff"); } } } } } else { from.SendMessage("Você pode bondar somente animais"); } } else { from.SendMessage("Você pode bondar somente animais"); } } else { from.SendMessage("É necessário estar em sua mochila."); } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Deed.IsChildOf(m_From.Backpack)) { if (targeted is Mobile) { if (targeted is BaseCreature) { BaseCreature creature = (BaseCreature)targeted; if (!creature.Tamable) { //from.SendMessage("Este animal não esta domado"); from.SendLocalizedMessage(1042946); //This animal appears to have never been tamed. } else if (!creature.Controlled || creature.ControlMaster != from) { //from.SendMessage("Este animal não é seu"); from.SendMessage("This is not a pet."); } else if (creature.IsDeadPet) { from.SendMessage("Este animal esta morto"); from.SendLocalizedMessage(1049667); //Your pet is dead and will not respond to that command. } else if (creature.Summoned) { //from.SendMessage("Impossível de bondar um summon"); from.SendMessage("You may not bond a summoned creature."); } else if (creature.Body.IsHuman) { //from.SendMessage("Impossível de bondar uma pessoa"); from.SendMessage("You may not bond another person."); } else { if (creature.IsBonded == true) { //from.SendMessage("Este animal ja esta bonded"); from.SendLocalizedMessage(1049666); //Your pet has bonded with you! } else { if (from.Skills[SkillName.AnimalTaming].Base < creature.MinTameSkill) { //from.SendMessage("Você não possuiu tamer suficiente para bonda-lo"); from.SendLocalizedMessage(10752680); //Your pet cannot form a bond with you until your animal taming ability has risen. } else if (from.Skills[SkillName.AnimalLore].Base < creature.MinTameSkill) { //from.SendMessage("Você não possuiu animal lore suficiente para bonda-lo"); from.SendMessage("Your pet cannot form a bond with you until your animal taming ability has risen."); } else { try { creature.IsBonded = true; from.SendMessage("{0} foi bondado com sucesso", creature.Name); from.SendLocalizedMessage(1049666); //Your pet has bonded with you! m_Deed.Delete(); } catch { //from.SendMessage("Ocorreu um problema ao bondar seu animal. Contacte a Staff"); from.SendLocalizedMessage(503380); //Please contact a gamemaster and let them know there is a bug here. } } } } } else { //from.SendMessage("Você pode bondar somente animais"); from.SendMessage("You can only bond animals."); } } else { //from.SendMessage("Você pode bondar somente animais"); from.SendMessage("You can only bond animals."); } } else { //from.SendMessage("É necessário estar em sua mochila."); from.SendLocalizedMessage(1060640); // The item must be in your backpack to use it. } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Deed.IsChildOf(m_From.Backpack)) { if (targeted is Mobile) { if (targeted is BaseCreature) { BaseCreature creature = (BaseCreature)targeted; if (!creature.Tamable) { from.SendMessage("That creature is not tameable."); } else if (!creature.Controlled || creature.ControlMaster != from) { from.SendMessage("That creature is not controlled by you."); } else if (creature.IsDeadPet) { from.SendMessage("That pet is dead..."); } else if (creature.Summoned) { from.SendMessage("Cannot bond summoned creatures."); } else if (creature.Body.IsHuman) { from.SendMessage("Cannot bond humanoids."); } else { if (creature.IsBonded == true) { from.SendMessage("Your animal is already bonded."); } else { if (from.Skills[SkillName.AnimalTaming].Base < creature.MinTameSkill) { from.SendMessage("You need to increase your taming skill."); } else if (from.Skills[SkillName.AnimalLore].Base < creature.MinTameSkill) { from.SendMessage("You need to increase your animal lore skill."); } else { try{ creature.IsBonded = true; from.SendMessage("{0} has been bonded to you.", creature.Name); m_Deed.Delete(); } catch { from.SendMessage("There seems to be a problem with this animal. Contact Staff"); } } } } } else { from.SendMessage("Target must be an creature."); } } else { from.SendMessage("Target must not be an item."); } } else { from.SendMessage("Bonding Deed must be in your backpack."); } }