public override bool OnDragDrop(Mobile from, Item dropped) { if (dropped is JokeBook) { if (from.Blessed) { string sSay = "I cannot deal with you while you are in that state."; this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sSay, from.NetState); return(false); } else if (DifficultyLevel.GetMyEnemies(from, this, false) == true) { string sSay = "I don't think I should accept that from you."; this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sSay, from.NetState); return(false); } else { if (Utility.RandomBool()) { GiftJesterHat hat = new GiftJesterHat(); hat.Name = "Magical Jester Hat"; hat.Hue = 0; hat.m_Owner = from; hat.m_Gifter = "Chuckles the Jester"; hat.m_How = "Given to"; hat.m_Points = Utility.RandomMinMax(80, 100); from.AddToBackpack(hat); from.SendMessage("Chuckles gave you one of his hats!"); } else { GiftFancyDress coat = new GiftFancyDress(); coat.Name = "Magical Jester Suit"; coat.Hue = 0; coat.ItemID = Utility.RandomList(0x2B6B, 0x3162); coat.m_Owner = from; coat.m_Gifter = "Chuckles the Jester"; coat.m_How = "Given to"; coat.m_Points = Utility.RandomMinMax(80, 100); from.AddToBackpack(coat); from.SendMessage("Chuckles gave you one of his suits!"); } this.Say("Thank you, " + from.Name + "! I am always looking for some new jokes."); from.SendSound(0x3D); dropped.Delete(); return(true); from.SendMessage("Single click on it to customize it."); } } return(base.OnDragDrop(from, dropped)); }
public override bool IsEnemy(Mobile m) { if (DifficultyLevel.GetMyEnemies(m, this, true) == false) { return(false); } if (m.Region != this.Region && !(m is PlayerMobile)) { return(false); } m.Criminal = true; return(true); }
public override bool OnDragDrop(Mobile from, Item dropped) { if (dropped is Head && !from.Blessed) { if (DifficultyLevel.GetMyEnemies(from, this, false) == true) { string sSay = "You shouldn't be carrying that around with you."; this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sSay, from.NetState); } else { Head head = (Head)dropped; int karma = 0; int gold = 0; string sMessage = ""; string sReward = "Here is " + gold.ToString() + " for you."; if (head.m_Job == "Thief") { karma = Utility.RandomMinMax(40, 60); gold = Utility.RandomMinMax(80, 120); } else if (head.m_Job == "Bandit") { karma = Utility.RandomMinMax(20, 30); gold = Utility.RandomMinMax(30, 40); } else if (head.m_Job == "Brigand") { karma = Utility.RandomMinMax(30, 40); gold = Utility.RandomMinMax(50, 80); } else if (head.m_Job == "Pirate") { karma = Utility.RandomMinMax(90, 110); gold = Utility.RandomMinMax(120, 160); } else if (head.m_Job == "Assassin") { karma = Utility.RandomMinMax(60, 80); gold = Utility.RandomMinMax(100, 140); } switch (Utility.RandomMinMax(0, 9)) { case 0: sReward = "Here is " + gold.ToString() + " gold for you."; break; case 1: sReward = "Take this " + gold.ToString() + " gold for your trouble."; break; case 2: sReward = "The reward is " + gold.ToString() + " gold."; break; case 3: sReward = "Here is " + gold.ToString() + " gold for the bounty."; break; case 4: sReward = "The bounty is " + gold.ToString() + " gold for this one."; break; case 5: sReward = "Here is your reward of " + gold.ToString() + " gold"; break; case 6: sReward = "You can have this " + gold.ToString() + " gold for the bounty."; break; case 7: sReward = "There is a reward of " + gold.ToString() + " gold for this one."; break; case 8: sReward = "This one was worth " + gold.ToString() + " gold for their crimes."; break; case 9: sReward = "Their crimes called for a bounty of " + gold.ToString() + " gold."; break; } if (head.m_Job == "Thief" || head.m_Job == "Bandit" || head.m_Job == "Brigand") { Titles.AwardKarma(from, karma, true); from.SendSound(0x2E6); from.AddToBackpack(new Gold(gold)); switch (Utility.RandomMinMax(0, 9)) { case 0: sMessage = "We have been looking for this rogue. " + sReward; break; case 1: sMessage = "I have heard of this thief before. " + sReward; break; case 2: sMessage = "I never thought I would see this bandit brought to justice. " + sReward; break; case 3: sMessage = "This rouge will steal no more. " + sReward; break; case 4: sMessage = "Our gold purses are safer now. " + sReward; break; case 5: sMessage = "The land is safer because of you. " + sReward; break; case 6: sMessage = "The others at the guard house will not believe this. " + sReward; break; case 7: sMessage = "I have only heard stories about this rogue. " + sReward; break; case 8: sMessage = "How did you come across this thief? " + sReward; break; case 9: sMessage = "Where did you find this sneak? " + sReward; break; } this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState); dropped.Delete(); return(true); } else if (head.m_Job == "Pirate") { Titles.AwardKarma(from, karma, true); from.SendSound(0x2E6); from.AddToBackpack(new Gold(gold)); switch (Utility.RandomMinMax(0, 9)) { case 0: sMessage = "We have been looking for this pirate. " + sReward; break; case 1: sMessage = "I have heard of this pirate before. " + sReward; break; case 2: sMessage = "I never thought I would see this pirate brought to justice. " + sReward; break; case 3: sMessage = "This pirate will plunder no more. " + sReward; break; case 4: sMessage = "Our galleons are safer now. " + sReward; break; case 5: sMessage = "The sea is safer because of you. " + sReward; break; case 6: sMessage = "The sailors at the docks will not believe this. " + sReward; break; case 7: sMessage = "I have only heard stories about this pirate. " + sReward; break; case 8: sMessage = "How did you come across this pirate? " + sReward; break; case 9: sMessage = "Where did you find this pirate? " + sReward; break; } this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState); dropped.Delete(); return(true); } else if (head.m_Job == "Assassin") { Titles.AwardKarma(from, karma, true); from.SendSound(0x2E6); from.AddToBackpack(new Gold(gold)); switch (Utility.RandomMinMax(0, 9)) { case 0: sMessage = "We have been living in fear of this one. " + sReward; break; case 1: sMessage = "I have heard others speak of this assassin. " + sReward; break; case 2: sMessage = "I never thought this assassin existed. " + sReward; break; case 3: sMessage = "This assassin will kill no more. " + sReward; break; case 4: sMessage = "Our nobles are safer now. " + sReward; break; case 5: sMessage = "The shadows are less feared because of you. " + sReward; break; case 6: sMessage = "Those in the tavern will not believe this. " + sReward; break; case 7: sMessage = "I have only heard rumors about this assassin. " + sReward; break; case 8: sMessage = "It is good to see this assassin did not best you. " + sReward; break; case 9: sMessage = "How did you survive this assassin? " + sReward; break; } this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState); dropped.Delete(); return(true); } else { this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I assume they done you harm. Let me rid you of this thing.", from.NetState); dropped.Delete(); return(true); } } } return(base.OnDragDrop(from, dropped)); }