public CheckBalanceEntry( Banker banker ) : this( banker, true ) { }
public CheckBalanceEntry( Banker banker, bool criminal ) : base( 6124, 12 ) { m_Banker = banker; m_Criminal = criminal; }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; from.Frozen = false; switch (info.ButtonID) { case -1: { // You decide against paying the Veterinarian, and the ghost of your pet looks at you sadly... from.SendLocalizedMessage(1113197); break; } case 1: { for (int i = 0; i < m_Pets.Length; i++) { BaseCreature pet = m_Pets[i]; if (info.IsSwitched(i)) { int fee = Veterinarian.GetResurrectionFee(pet); if (!pet.IsDeadBondedPet) { from.SendLocalizedMessage(501041); // Target is not dead. } else if (!from.CanSee(pet) || !from.InLOS(pet)) { from.SendLocalizedMessage(503376); // Target cannot be seen. } else if (!from.InRange(pet, 12)) { from.SendLocalizedMessage(500643); // Target is too far away. } else if (pet.ControlMaster != from) { from.SendLocalizedMessage(1113200); // You must be the owner of that pet to have it resurrected. } else if (pet.Corpse != null && !pet.Corpse.Deleted) { from.SendLocalizedMessage(1113279); // That creature's spirit lacks cohesion. Try again in a few minutes. } else if (Banker.Withdraw(from, fee)) { pet.PlaySound(0x214); pet.ResurrectPet(); for (int j = 0; j < pet.Skills.Length; ++j) // Decrease all skills on pet. { pet.Skills[j].Base -= 0.2; } if (pet.Map == Map.Internal) { pet.MoveToWorld(from.Location, from.Map); } from.SendLocalizedMessage(1060398, fee.ToString()); // ~1_AMOUNT~ gold has been withdrawn from your bank box. from.SendLocalizedMessage(1060022, Banker.GetBalance(from).ToString(), 0x16); // You have ~1_AMOUNT~ gold in cash remaining in your bank box. } else { from.SendLocalizedMessage(1060020); // Unfortunately, you do not have enough cash in your bank to cover the cost of the healing. } break; } } break; } } }
public void EndStable(Mobile from, BaseCreature pet) { if (Deleted || !from.CheckAlive()) { return; } if (pet.Body.IsHuman) { SayTo(from, 502672); // HA HA HA! Sorry, I am not an inn. } else if (!pet.Controlled) { SayTo(from, 1048053); // You can't stable that! } else if (pet.ControlMaster != from) { SayTo(from, 1042562); // You do not own that pet! } else if (pet.IsDeadPet) { SayTo(from, 1049668); // Living pets only, please. } else if (pet.Summoned) { SayTo(from, 502673); // I can not stable summoned creatures. } else if (pet.Allured) { SayTo(from, 1048053); // You can't stable that! } else if ((pet is PackLlama || pet is PackHorse || pet is Beetle) && (pet.Backpack != null && pet.Backpack.Items.Count > 0)) { SayTo(from, 1042563); // You need to unload your pet. } else if (pet.Combatant != null && pet.InRange(pet.Combatant, 12) && pet.Map == pet.Combatant.Map) { SayTo(from, 1042564); // I'm sorry. Your pet seems to be busy. } else if (from.Stabled.Count >= GetMaxStabled(from)) { SayTo(from, 1042565); // You have too many pets in the stables! } else if ((from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Gold), 30)) || Banker.Withdraw(from, 30)) { pet.ControlTarget = null; pet.ControlOrder = OrderType.Stay; pet.Internalize(); pet.SetControlMaster(null); pet.SummonMaster = null; pet.IsStabled = true; pet.StabledBy = from; if (Core.SE) { pet.Loyalty = MaxLoyalty; // Wonderfully happy } from.Stabled.Add(pet); SayTo(from, Core.AOS ? 1049677 : 502679); // [AOS: Your pet has been stabled.] Very well, thy pet is stabled. // Thou mayst recover it by saying 'claim' to me. In one real world week, // I shall sell it off if it is not claimed! } else { SayTo(from, 502677); // But thou hast not the funds in thy bank account! } }
public void BeginStable(Mobile from) { if (Deleted || !from.CheckAlive()) { return; } if ((from.Backpack == null || from.Backpack.GetAmount(typeof(Gold)) < 30) && Banker.GetBalance(from) < 30) { SayTo(from, 1042556); // Thou dost not have enough gold, not even in thy bank account. return; } /* * I charge 30 gold per pet for a real week's stable time. * I will withdraw it from thy bank account. * Which animal wouldst thou like to stable here? */ from.SendLocalizedMessage(1042558); from.Target = new StableTarget(this); }
public override void OnResponse(NetState sender, RelayInfo info) { if (m_FacialHair && (m_From.Female || m_From.Body.IsFemale)) { return; } if (m_From.Race == Race.Elf) { m_From.SendMessage("This isn't implemented for elves yet. Sorry!"); return; } if (info.ButtonID == 1) { int[] switches = info.Switches; if (switches.Length > 0) { int index = switches[0]; if (index >= 0 && index < m_Entries.Length) { ChangeHairstyleEntry entry = m_Entries[index]; if (m_From is PlayerMobile) { ((PlayerMobile)m_From).SetHairMods(-1, -1); } int hairID = m_From.HairItemID; int facialHairID = m_From.FacialHairItemID; if (entry.ItemID == 0) { if (m_FacialHair ? (facialHairID == 0) : (hairID == 0)) { return; } if (Banker.Withdraw(m_From, m_Price)) { if (m_FacialHair) { m_From.FacialHairItemID = 0; } else { m_From.HairItemID = 0; } } else { m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293, m_From.NetState); // You cannot afford my services for that style. } } else { if (m_FacialHair) { if (facialHairID > 0 && facialHairID == entry.ItemID) { return; } } else { if (hairID > 0 && hairID == entry.ItemID) { return; } } if (Banker.Withdraw(m_From, m_Price)) { if (m_FacialHair) { m_From.FacialHairItemID = entry.ItemID; } else { m_From.HairItemID = entry.ItemID; } } else { m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293, m_From.NetState); // You cannot afford my services for that style. } } } } else { // You decide not to change your hairstyle. m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState); } } else { // You decide not to change your hairstyle. m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState); } }
public static void GetMyCorpse(Mobile from) { if (!from.Alive) { from.SendMessage("But you are dead sire, I cannot help thee"); return; } Map map = from.Map; if (map == null) { return; } int distchk = 0; int distpck = 0; ArrayList bodies = new ArrayList(); ArrayList empty = new ArrayList(); //ArrayList mice = new ArrayList(); foreach (Item body in World.Items.Values) // change so it check sall facets... remove Inrange? { if (body is Corpse) { Corpse cadaver = (Corpse)body; int carrying = body.GetTotal(TotalType.Items); if (cadaver.Owner == from && carrying > 0) { distchk++; bodies.Add(body); //if ( GhostHelper.HowFar( from.X, from.Y, mSp.X, mSp.Y ) < TheClosest ){ TheClosest = GhostHelper.HowFar( from.X, from.Y, mSp.X, mSp.Y ); IsClosest = distchk; } } else if (cadaver.Owner == from && carrying < 1) { empty.Add(body); //mice.Add( mSp ); } } } for (int u = 0; u < empty.Count; ++u) { Item theEmpty = (Item)empty[u]; theEmpty.Delete(); } //for ( int m = 0; m < mice.Count; ++m ){ Mobile theMouse = ( Mobile )mice[ m ]; theMouse.Delete(); } if (distchk == 0) { from.SendMessage("You have no nearby corpse in this area!"); } else { int i_Bank; i_Bank = Banker.GetBalance(from); Container bank = from.FindBankNoCreate(); if ((from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Gold), 30000)) || (bank != null && bank.ConsumeTotal(typeof(Gold), 30000))) { for (int h = 0; h < bodies.Count; ++h) { distpck++; //if ( distpck == IsClosest ) //{ Corpse theBody = (Corpse)bodies[h]; theBody.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map); //} } } else { from.SendMessage("I only work for gold, Sire."); from.SendMessage("Make sure you have 30,000 gold (coins) in your pack or bank."); } } }