public void ItemTarget(Item hench, Mobile from, RodOfResurrection rod) { if (hench is HenchmanFighterItem) { HenchmanFighterItem friend = (HenchmanFighterItem)hench; if (friend.HenchDead > 0) { friend.Name = "fighter henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); from.PlaySound(0x214); ConsumeCharge(rod, from); } else { from.SendMessage("They are not dead."); } } else if (hench is HenchmanWizardItem) { HenchmanWizardItem friend = (HenchmanWizardItem)hench; if (friend.HenchDead > 0) { friend.Name = "wizard henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); from.PlaySound(0x214); ConsumeCharge(rod, from); } else { from.SendMessage("They are not dead."); } } else if (hench is HenchmanArcherItem) { HenchmanArcherItem friend = (HenchmanArcherItem)hench; if (friend.HenchDead > 0) { friend.Name = "archer henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); from.PlaySound(0x214); ConsumeCharge(rod, from); } else { from.SendMessage("They are not dead."); } } else if (hench is HenchmanMonsterItem) { HenchmanMonsterItem friend = (HenchmanMonsterItem)hench; if (friend.HenchDead > 0) { friend.Name = "creature henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); from.PlaySound(0x214); ConsumeCharge(rod, from); } else { from.SendMessage("They are not dead."); } } else { from.SendMessage("This spell didn't seem to work."); } }
public static void ResurrectHenchman(Mobile from) { if (from is PlayerMobile && from.Alive) { bool giveMessage = false; foreach (Item i in from.Backpack.Items) { if (i is HenchmanFighterItem) { HenchmanFighterItem friend = (HenchmanFighterItem)i; if (friend.HenchDead > 0) { friend.Name = "fighter henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); giveMessage = true; } } else if (i is HenchmanWizardItem) { HenchmanWizardItem friend = (HenchmanWizardItem)i; if (friend.HenchDead > 0) { friend.Name = "wizard henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); giveMessage = true; } } else if (i is HenchmanArcherItem) { HenchmanArcherItem friend = (HenchmanArcherItem)i; if (friend.HenchDead > 0) { friend.Name = "archer henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); giveMessage = true; } } else if (i is HenchmanMonsterItem) { HenchmanMonsterItem friend = (HenchmanMonsterItem)i; if (friend.HenchDead > 0) { friend.Name = "creature henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); giveMessage = true; } } } if (giveMessage) { from.SendMessage("Your henchmen have been resurrected."); from.PlaySound(0x214); from.FixedEffect(0x376A, 10, 16); } } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Bandage.Deleted) { return; } if (targeted is Mobile) { if (from.InRange(m_Bandage.GetWorldLocation(), Bandage.Range)) { if (BandageContext.BeginHeal(from, (Mobile)targeted) != null) { m_Bandage.Consume(); Server.Gumps.QuickBar.RefreshQuickBar(from); } } else { from.SendLocalizedMessage(500295); // You are too far away to do that. } } else if (targeted is HenchmanFighterItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80) { HenchmanFighterItem friend = (HenchmanFighterItem)targeted; if (friend.HenchDead > 0) { friend.Name = "fighter henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); m_Bandage.Consume(); } else { from.SendMessage("They are not dead."); } } else if (targeted is HenchmanWizardItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80) { HenchmanWizardItem friend = (HenchmanWizardItem)targeted; if (friend.HenchDead > 0) { friend.Name = "wizard henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); m_Bandage.Consume(); } else { from.SendMessage("They are not dead."); } } else if (targeted is HenchmanArcherItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80) { HenchmanArcherItem friend = (HenchmanArcherItem)targeted; if (friend.HenchDead > 0) { friend.Name = "archer henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); m_Bandage.Consume(); } else { from.SendMessage("They are not dead."); } } else if (targeted is HenchmanMonsterItem && from.Skills[SkillName.Anatomy].Value >= 80 && from.Skills[SkillName.Healing].Value >= 80) { HenchmanMonsterItem friend = (HenchmanMonsterItem)targeted; if (friend.HenchDead > 0) { friend.Name = "creature henchman"; friend.HenchDead = 0; friend.InvalidateProperties(); m_Bandage.Consume(); } else { from.SendMessage("They are not dead."); } } else { from.SendLocalizedMessage(500970); // Bandages can not be used on that. } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; if (info.ButtonID == 1) { from.AddToBackpack(new Gold(m_Jail.PrisonerReward)); from.SendSound(0x0EF); from.SendMessage("You free " + m_Jail.PrisonerName + " from their prison."); LoggingFunctions.LogStandard(from, "has freed " + m_Jail.PrisonerName + " " + m_Jail.PrisonerTitle + "."); Titles.AwardFame(from, ((int)((m_Jail.PrisonerReward) / 100)), true); if (((PlayerMobile)from).KarmaLocked == true) { Titles.AwardKarma(from, -((int)((m_Jail.PrisonerReward) / 100)), true); } else { Titles.AwardKarma(from, ((int)((m_Jail.PrisonerReward) / 100)), true); } m_Jail.Delete(); } else if (info.ButtonID == 2) { int gold = from.TotalGold; int join = m_Jail.PrisonerJoin; bool begging = false; if (Server.Mobiles.BaseVendor.BeggingPose(from) > 0) // LET US SEE IF THEY ARE BEGGING { int cut = (int)(from.Skills[SkillName.Begging].Value * 25); if (cut > 3000) { cut = 3000; } join = join - cut; begging = true; } if (gold >= join) { Container cont = from.Backpack; cont.ConsumeTotal(typeof(Gold), join); from.SendSound(0x0EF); if (begging) { from.SendMessage("You beg " + m_Jail.PrisonerName + " to join you as a henchman for only " + join + " gold."); } else { from.SendMessage("" + m_Jail.PrisonerName + " has joined you as a henchman."); } if (m_Jail.PrisonerType == 97) { HenchmanFighterItem fighter = new HenchmanFighterItem(); fighter.HenchName = m_Jail.PrisonerName; fighter.HenchTitle = m_Jail.PrisonerTitle; fighter.HenchBody = m_Jail.PrisonerBody; from.AddToBackpack(fighter); } else if (m_Jail.PrisonerType == 98) { HenchmanArcherItem archer = new HenchmanArcherItem(); archer.HenchName = m_Jail.PrisonerName; archer.HenchTitle = m_Jail.PrisonerTitle; archer.HenchBody = m_Jail.PrisonerBody; from.AddToBackpack(archer); } else if (m_Jail.PrisonerType == 99) { HenchmanWizardItem wizard = new HenchmanWizardItem(); wizard.HenchName = m_Jail.PrisonerName; wizard.HenchTitle = m_Jail.PrisonerTitle; wizard.HenchBody = m_Jail.PrisonerBody; from.AddToBackpack(wizard); } else { HenchmanMonsterItem item = new HenchmanMonsterItem(); item.HenchTimer = 300; item.HenchWeaponID = m_Jail.PrisonerType; item.HenchShieldID = m_Jail.PrisonerSound; item.HenchHelmID = 0; item.HenchArmorType = 0; item.HenchWeaponType = 0; item.HenchCloakColor = 0; item.HenchCloak = 0; item.HenchRobe = 0; item.HenchHatColor = 0; item.HenchGloves = 0; item.HenchSpeech = Utility.RandomDyedHue(); item.HenchDead = 0; item.HenchBody = m_Jail.PrisonerBody; item.HenchHue = 0; item.HenchHair = 0; item.HenchHairHue = 0; item.HenchGearColor = 0; item.HenchName = m_Jail.PrisonerName; item.HenchTitle = m_Jail.PrisonerTitle; item.HenchBandages = 0; from.AddToBackpack(item); } m_Jail.Delete(); } else { from.SendMessage("You do not have enough gold to convince them to join you."); } } else if (info.ButtonID == 3) { switch (Utility.RandomMinMax(0, 4)) { case 0: from.Say("I will leave you to your fate, " + m_Jail.PrisonerName + "!"); break; case 1: from.Say("" + m_Jail.PrisonerName + ", stay here and rot!"); break; case 2: from.Say("" + m_Jail.PrisonerName + ", the world is better with you in here!"); break; case 3: from.Say("You are not the sort I wish to free, " + m_Jail.PrisonerName + "."); break; case 4: from.Say("You must be here for a reason, " + m_Jail.PrisonerName + "."); break; } } }