public void PayBuyIn(PlayerMobile pm, int teamid) { if (Handeling.BuyIn <= 0) { return; } int playercount = 0; int sharecount = 0; IEnumerator key = Handeling.Teams.Keys.GetEnumerator(); for (int i = 0; i < Handeling.Teams.Count; ++i) { key.MoveNext(); Field_Team d_team = (Field_Team)Handeling.Teams[(int)key.Current]; for (int i2 = 0; i2 < d_team.Players.Count; ++i2) { object o = (object)d_team.Players[i2]; if (o != "@null") { playercount += 1; } if ((int)key.Current == teamid && o != "@null") { sharecount += 1; } } } int goldshare = (playercount * Handeling.BuyIn) / sharecount; BankBox box = (BankBox)pm.BankBox; if (goldshare >= 5000) { BankCheck check = new BankCheck(goldshare); box.DropItem(check); } else { Gold gold = new Gold(goldshare); box.DropItem(gold); } pm.SendMessage(String.Format("Congragulations! you have won {0}gp.", goldshare.ToString())); }
public void SetBuyIn(PlayerMobile pm, int amount) { Item i = CheckForGoldSources(pm, amount); if (i is Gold) { i.Amount -= amount; Handeling.BuyIn += amount; } else { BankCheck check = (BankCheck)i; check.Worth -= amount; Handeling.BuyIn += amount; } if (i.Amount <= 0) { i.Delete(); return; } if (i is BankCheck) { BankCheck check = (BankCheck)i; if (check.Worth > 0) { if (check.Worth < 5000) { if (check.Parent is BankBox) { BankBox box = (BankBox)check.Parent; Gold g = new Gold(check.Worth); box.DropItem(g); check.Delete(); } if (check.Parent is Backpack) { Backpack pack = (Backpack)check.Parent; Gold g = new Gold(check.Worth); pack.DropItem(g); check.Delete(); } } } else { check.Delete(); } } pm.SendMessage("The funds have been gathered."); }
public void RefundBuyIn(PlayerMobile pm, int amount) { BankBox box = (BankBox)pm.BankBox; if (amount >= 5000) { BankCheck check = new BankCheck(amount); box.DropItem(check); } else { Gold gold = new Gold(amount); box.DropItem(gold); } Handeling.BuyIn = 0; pm.SendMessage("The buy in has been refunded."); }
public void RefundBuyIn(PlayerMobile pm) { if (BuyIn <= 0) { return; } BankBox box = (BankBox)pm.BankBox; if (BuyIn >= 5000) { BankCheck check = new BankCheck(BuyIn); box.DropItem(check); } else { Gold gold = new Gold(BuyIn); box.DropItem(gold); } pm.SendMessage("Your buy in has been refunded, check your bank."); }
private static void AddPowerScrolls(BankBox bank) { Bag bag = new Bag(); for (int i = 0; i < PowerScroll.Skills.Length; ++i) { bag.DropItem(new PowerScroll(PowerScroll.Skills[i], 120.0)); } bag.DropItem(new StatCapScroll(250)); bank.DropItem(bag); }
public override void Cancel() { base.Cancel(); QuestObjective obj = FindObjective(typeof(CollectBonesObjective)); if (obj != null && obj.CurProgress > 0) { BankBox box = From.BankBox; if (box != null) { box.DropItem(new DaemonBone(obj.CurProgress)); } From.SendLocalizedMessage(1050030); // The Daemon bones that you have thus far given to Victoria have been returned to you. } }
public override void Cancel() { base.Cancel(); QuestObjective obj = FindObjective(typeof(CollectFragmentsObjective)); QuestObjective objtwo = FindObjective(typeof(VanquishMinibossObjective)); if (obj != null && obj.CurProgress > 0 && objtwo == null && !obj.Completed) { BankBox box = From.BankBox; if (box != null) { IdolQuester quester = m_IdolQuester; QuestType type = quester.Type; switch (type) { case QuestType.Shame: m_Frag = new FragmentCrystal(QuestType.Shame, obj.CurProgress); break; case QuestType.Deceit: m_Frag = new FragmentCrystal(QuestType.Deceit, obj.CurProgress); break; case QuestType.Destard: m_Frag = new FragmentCrystal(QuestType.Destard, obj.CurProgress); break; case QuestType.Hythloth: m_Frag = new FragmentCrystal(QuestType.Hythloth, obj.CurProgress); break; case QuestType.Despise: m_Frag = new FragmentCrystal(QuestType.Despise, obj.CurProgress); break; case QuestType.Covetous: m_Frag = new FragmentCrystal(QuestType.Covetous, obj.CurProgress); break; case QuestType.Wrong: m_Frag = new FragmentCrystal(QuestType.Wrong, obj.CurProgress); break; } box.DropItem(m_Frag); From.SendMessage("The dungeon fragments you have offered up have been returned to you."); } } }
private static void FillBankbox(Mobile m) { BankBox bank = m.BankBox; // Full spellbook Spellbook book = new Spellbook(); book.Content = ulong.MaxValue; bank.DropItem(book); // Bag containing 50 of each reagent for (int i = 0; i < 5; ++i) { bank.DropItem(new BagOfReagents(50)); } // Craft tools bank.DropItem(MakeNewbie(new Scissors())); bank.DropItem(MakeNewbie(new SewingKit(1000))); bank.DropItem(MakeNewbie(new SmithHammer(1000))); bank.DropItem(MakeNewbie(new FletcherTools(1000))); bank.DropItem(MakeNewbie(new DovetailSaw(1000))); bank.DropItem(MakeNewbie(new MortarPestle(1000))); bank.DropItem(MakeNewbie(new ScribesPen(1000))); bank.DropItem(MakeNewbie(new TinkerTools(1000))); // A few dye tubs bank.DropItem(new Dyes()); bank.DropItem(new DyeTub()); bank.DropItem(new DyeTub()); bank.DropItem(new BlackDyeTub()); DyeTub darkRedTub = new DyeTub(); darkRedTub.DyedHue = 0x485; darkRedTub.Redyable = false; bank.DropItem(darkRedTub); // Some food bank.DropItem(MakeNewbie(new Apple(1000))); // Resources bank.DropItem(MakeNewbie(new Feather(1000))); bank.DropItem(MakeNewbie(new BoltOfCloth(1000))); bank.DropItem(MakeNewbie(new BlankScroll(1000))); bank.DropItem(MakeNewbie(new Hide(1000))); bank.DropItem(MakeNewbie(new Bandage(1000))); bank.DropItem(MakeNewbie(new Bottle(1000))); bank.DropItem(MakeNewbie(new Log(1000))); bank.DropItem(MakeNewbie(new IronIngot(5000))); bank.DropItem(MakeNewbie(new SpikeIngot(5000))); bank.DropItem(MakeNewbie(new FruityIngot(5000))); bank.DropItem(MakeNewbie(new BronzeIngot(5000))); bank.DropItem(MakeNewbie(new IceRockIngot(5000))); bank.DropItem(MakeNewbie(new BlackDwarfIngot(5000))); bank.DropItem(MakeNewbie(new DullCopperIngot(5000))); bank.DropItem(MakeNewbie(new PlatinumIngot(5000))); bank.DropItem(MakeNewbie(new SilverRockIngot(5000))); bank.DropItem(MakeNewbie(new DarkPaganIngot(5000))); bank.DropItem(MakeNewbie(new CopperIngot(5000))); bank.DropItem(MakeNewbie(new MysticIngot(5000))); bank.DropItem(MakeNewbie(new SpectralIngot(5000))); bank.DropItem(MakeNewbie(new OldBritainIngot(5000))); bank.DropItem(MakeNewbie(new OnyxIngot(5000))); bank.DropItem(MakeNewbie(new RedElvenIngot(5000))); bank.DropItem(MakeNewbie(new UndeadIngot(5000))); bank.DropItem(MakeNewbie(new PyriteIngot(5000))); bank.DropItem(MakeNewbie(new VirginityIngot(5000))); bank.DropItem(MakeNewbie(new MalachiteIngot(5000))); bank.DropItem(MakeNewbie(new LavarockIngot(5000))); bank.DropItem(MakeNewbie(new AzuriteIngot(5000))); bank.DropItem(MakeNewbie(new DripstoneIngot(5000))); bank.DropItem(MakeNewbie(new ExecutorIngot(5000))); bank.DropItem(MakeNewbie(new PeachblueIngot(5000))); bank.DropItem(MakeNewbie(new DestructionIngot(5000))); bank.DropItem(MakeNewbie(new AnraIngot(5000))); bank.DropItem(MakeNewbie(new CrystalIngot(5000))); bank.DropItem(MakeNewbie(new DoomIngot(5000))); bank.DropItem(MakeNewbie(new GoddessIngot(5000))); bank.DropItem(MakeNewbie(new NewZuluIngot(5000))); bank.DropItem(MakeNewbie(new DarkSableRubyIngot(5000))); bank.DropItem(MakeNewbie(new EbonTwilightSapphireIngot(5000))); bank.DropItem(MakeNewbie(new RadiantNimbusDiamondIngot(5000))); // Some extra starting gold bank.DropItem(MakeNewbie(new Gold(9000))); // 5 blank recall runes for (int i = 0; i < 5; ++i) { bank.DropItem(MakeNewbie(new RecallRune())); } }
private static void EventSink_CharacterCreated(CharacterCreatedEventArgs args) { if (!VerifyProfession(args.Profession)) { args.Profession = 0; } NetState state = args.State; Account acct = args.Account as Account; Mobile newChar = CreateMobile(acct); if (newChar == null) { Console.WriteLine("Login: {0}: Character creation failed, account full", args.State); return; } args.Mobile = newChar; m_Mobile = newChar; newChar.Player = true; newChar.AccessLevel = args.Account.AccessLevel; newChar.Female = args.Female; //newChar.Body = newChar.Female ? 0x191 : 0x190; if (Core.Expansion >= args.Race.RequiredExpansion) { newChar.Race = args.Race; //Sets body } else { newChar.Race = Race.DefaultRace; } //newChar.Hue = Utility.ClipSkinHue( args.Hue & 0x3FFF ) | 0x8000; newChar.Hue = newChar.Race.ClipSkinHue(args.Hue & 0x3FFF) | 0x8000; newChar.Hunger = 20; newChar.Thirst = 20; bool young = false; if (newChar is PlayerMobile) { PlayerMobile pm = (PlayerMobile)newChar; pm.Profession = args.Profession; if (pm.AccessLevel == AccessLevel.Player && ((Account)pm.Account).Young) { young = pm.Young = true; } } /*NameResultMessage result =*/ SetName(newChar, args.Name); AddBackpack(newChar); SetStats(newChar, state, args.Str, args.Dex, args.Int); SetSkills(newChar, args.Skills, args.Profession); Race race = newChar.Race; if (race.ValidateHair(newChar, args.HairID)) { newChar.HairItemID = args.HairID; newChar.HairHue = race.ClipHairHue(args.HairHue & 0x3FFF); } if (race.ValidateFacialHair(newChar, args.BeardID)) { newChar.FacialHairItemID = args.BeardID; newChar.FacialHairHue = race.ClipHairHue(args.BeardHue & 0x3FFF); } if (args.Profession <= 3) { AddShirt(newChar, args.ShirtHue); AddPants(newChar, args.PantsHue); AddShoes(newChar); } BankBox bank = newChar.BankBox; bool needstartpack = acct != null && String.IsNullOrEmpty(acct.GetTag("startpack")); if (needstartpack /*|| TestCenter.Enabled*/) { Container startpack = new StarterPack(); bank.DropItem(startpack); /* * if ( needstartpack ) * { * Item housedeed = new SmallBrickHouseDeed(); * housedeed.Name = "a beta tester's small brick house deed"; * startpack.DropItem( housedeed ); * housedeed.X = 23; * housedeed.Y = 53; * * Item startercheck = new BankCheck( 10000 ); * startpack.DropItem( startercheck ); * startercheck.X = 52; * startercheck.Y = 36; * } */ acct.SetTag("startpack", "true"); } if (young) { NewPlayerTicket ticket = new NewPlayerTicket(); ticket.Owner = newChar; bank.DropItem(ticket); } CityInfo city = GetStartLocation(args, young); //CityInfo city = new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Felucca ); newChar.MoveToWorld(city.Location, city.Map); Console.WriteLine("Login: {0}: New character being created (account={1})", args.State, args.Account.Username); Console.WriteLine(" - Character: {0} (serial={1})", newChar.Name, newChar.Serial); Console.WriteLine(" - Started: {0} {1} in {2}", city.City, city.Location, city.Map.ToString()); new WelcomeTimer(newChar).Start(); //if ( result != NameResultMessage.Allowed ) // newChar.SendGump( new NameChangeGump( newChar, result, args.Name ) ); }
public virtual void AwardRankTrophy(PlayerMobile pm, int rank) { switch (rank) { case 0: { pm.SendMessage(54, "You took first place in the {0}.", Name); pm.PublicOverheadMessage(MessageType.Label, 54, true, "FIRST PLACE!"); BankBox bank = pm.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - First Place", TrophyType.First) { Owner = pm }); pm.SendMessage(54, "A trophy has been placed in your bankbox."); } } break; case 1: { pm.SendMessage(54, "You took second place in the {0}.", Name); pm.PublicOverheadMessage(MessageType.Label, 54, true, "SECOND PLACE!"); BankBox bank = pm.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Second Place", TrophyType.Second) { Owner = pm }); pm.SendMessage(54, "A trophy has been placed in your bankbox."); } } break; case 2: { pm.SendMessage(54, "You took third place in the {0}.", Name); pm.PublicOverheadMessage(MessageType.Label, 54, true, "THIRD PLACE!"); BankBox bank = pm.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Third Place", TrophyType.Third) { Owner = pm }); pm.SendMessage(54, "A trophy has been placed in your bankbox."); } } break; } }
public virtual void AwardTrophies() { PlayerMobile topkiller = null; long topkills = 0; PlayerMobile topdamager = null; long topdamage = 0; PlayerMobile tophealer = null; long topheals = 0; foreach (KeyValuePair <PlayerMobile, PvPProfileHistoryEntry> kv in StatisticsCache) { if (kv.Value.Kills > topkills) { topkills = kv.Value.Kills; topkiller = kv.Key; } if (kv.Value.DamageDone > topdamage) { topdamage = kv.Value.DamageDone; topdamager = kv.Key; } if (kv.Value.HealingDone > topheals) { topheals = kv.Value.HealingDone; tophealer = kv.Key; } } if (topkiller != null) { topkiller.SendMessage(54, "You had the top kills in the {0}.", Name); topkiller.PublicOverheadMessage(MessageType.Label, 54, true, topkiller.Name + ": Top Kills!"); BankBox bank = topkiller.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Top Kills: " + topkills, TrophyType.Kills) { Owner = topkiller }); topkiller.SendMessage(54, "A trophy has been placed in your bankbox."); } } if (topdamager != null) { topdamager.SendMessage(54, "You had the top damage done in the {0}.", Name); topdamager.PublicOverheadMessage(MessageType.Label, 54, true, topdamager.Name + ": Top Damage!"); BankBox bank = topdamager.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Top Damage: " + topdamage, TrophyType.Damage) { Owner = topdamager }); topdamager.SendMessage(54, "A trophy has been placed in your bankbox."); } } if (tophealer != null) { tophealer.SendMessage(54, "You had the top healing done in the {0}.", Name); tophealer.PublicOverheadMessage(MessageType.Label, 54, true, tophealer.Name + ": Top Healing!"); BankBox bank = tophealer.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Top Heals: " + topheals, TrophyType.Healing) { Owner = tophealer }); tophealer.SendMessage(54, "A trophy has been placed in your bankbox."); } } }
public static void FillBank(Mobile m) { BankBox bank = m.BankBox; for (int i = 0; i < PowerScroll.Skills.Count; ++i) { m.Skills[PowerScroll.Skills[i]].Cap = 120.0; } m.StatCap = 250; var book = new Runebook(9999); book.CurCharges = book.MaxCharges; book.Entries.Add(new RunebookEntry(new Point3D(1438, 1695, 0), Map.Trammel, "Britain Bank", null)); book.Entries.Add(new RunebookEntry(new Point3D(1821, 2821, 0), Map.Trammel, "Trinsic Bank", null)); book.Entries.Add(new RunebookEntry(new Point3D(1492, 1628, 13), Map.Trammel, "Britain Sweet Dreams", null)); book.Entries.Add(new RunebookEntry(new Point3D(1388, 1507, 10), Map.Trammel, "Britain Graveyard", null)); book.Entries.Add(new RunebookEntry(new Point3D(1300, 1080, 0), Map.Trammel, "Dungeon Despise", null)); book.Entries.Add(new RunebookEntry(new Point3D(1171, 2639, 0), Map.Trammel, "Dungeon Destard", null)); book.Entries.Add(new RunebookEntry(new Point3D(1260, 2296, 0), Map.Trammel, "Hedge Maze", null)); m.AddToBackpack(book); #region Gold var account = m.Account as Account; if (account != null && account.GetTag("TCGold") == null) { account.AddTag("TCGold", "Gold Given"); Banker.Deposit(m, 30000000, false); } #endregion #region Bank Level Items bank.DropItem(new Robe(443)); bank.DropItem(new Dagger()); bank.DropItem(new Candle()); bank.DropItem(new FireworksWand() { Name = "Mininova Fireworks Wand" }); #endregion Container cont; #region TMaps cont = new Bag(); cont.Name = "Bag of Treasure Maps"; for (int i = 0; i < 10; i++) { PlaceItemIn(cont, 30 + (i * 6), 35, new TreasureMap(Utility.Random(3), Map.Trammel)); } for (int i = 0; i < 10; i++) { PlaceItemIn(cont, 30 + (i * 6), 51, new TreasureMap(Utility.Random(3), Map.Trammel)); } for (int i = 0; i < 20; i++) { PlaceItemIn(cont, 76, 91, new MessageInABottle()); } PlaceItemIn(cont, 22, 77, new Shovel(30000)); PlaceItemIn(cont, 57, 97, new Lockpick(3)); PlaceItemIn(bank, 98, 124, cont); #endregion #region Trans Powder cont = new Bag(); PlaceItemIn(cont, 117, 147, new PowderOfTranslocation(100)); PlaceItemIn(bank, 117, 147, cont); #endregion #region Magery Items cont = new WoodenBox(); cont.Hue = 1195; cont.Name = "Magery Items"; PlaceItemIn(cont, 78, 88, new CrimsonCincture() { Hue = 232 }); PlaceItemIn(cont, 102, 90, new CrystallineRing()); var brac = new GoldBracelet(); brac.Name = "Farmer's Bank of Mastery"; brac.Attributes.CastRecovery = 3; brac.Attributes.CastSpeed = 1; PlaceItemIn(cont, 139, 30, brac); Container bag = new Backpack(); bag.Hue = 1152; bag.Name = "Spell Casting Stuff"; PlaceItemIn(bag, 45, 107, new Spellbook(UInt64.MaxValue)); PlaceItemIn(bag, 65, 107, new NecromancerSpellbook((UInt64)0xFFFF)); PlaceItemIn(bag, 85, 107, new BookOfChivalry((UInt64)0x3FF)); PlaceItemIn(bag, 105, 107, new BookOfBushido()); //Default ctor = full PlaceItemIn(bag, 125, 107, new BookOfNinjitsu()); //Default ctor = full PlaceItemIn(bag, 102, 122, new SpellweavingBook((1ul << 16) - 1)); PlaceItemIn(bag, 122, 122, new MysticBook((1ul << 16) - 1)); Runebook runebook = new Runebook(20); runebook.CurCharges = runebook.MaxCharges; PlaceItemIn(bag, 145, 105, runebook); Item toHue = new BagOfReagents(5000); toHue.Hue = 0x2D; PlaceItemIn(bag, 45, 128, toHue); toHue = new BagOfNecroReagents(3000); toHue.Hue = 0x488; PlaceItemIn(bag, 64, 125, toHue); toHue = new BagOfMysticReagents(3000); toHue.Hue = 1167; PlaceItemIn(bag, 141, 128, toHue); for (int i = 0; i < 9; ++i) { PlaceItemIn(bag, 45 + (i * 10), 74, new RecallRune()); } PlaceItemIn(cont, 47, 91, bag); bag = new Backpack(); bag.Name = "Various Potion Kegs"; PlaceItemIn(bag, 45, 149, MakePotionKeg(PotionEffect.CureGreater, 0x2D)); PlaceItemIn(bag, 69, 149, MakePotionKeg(PotionEffect.HealGreater, 0x499)); PlaceItemIn(bag, 93, 149, MakePotionKeg(PotionEffect.PoisonDeadly, 0x46)); PlaceItemIn(bag, 117, 149, MakePotionKeg(PotionEffect.RefreshTotal, 0x21)); PlaceItemIn(bag, 141, 149, MakePotionKeg(PotionEffect.ExplosionGreater, 0x74)); PlaceItemIn(bag, 93, 82, new Bottle(1000)); PlaceItemIn(cont, 53, 169, bag); PlaceItemIn(bank, 63, 142, cont); #endregion #region Silver - No Mas Silver /*cont = new WoodenBox(); * cont.Hue = 1161; * * PlaceItemIn(cont, 47, 91, new Silver(9000)); * PlaceItemIn(bank, 38, 142, cont);*/ #endregion #region Ethys cont = new Backpack(); cont.Hue = 0x490; cont.Name = "Bag Of Ethy's!"; PlaceItemIn(cont, 45, 66, new EtherealHorse()); PlaceItemIn(cont, 93, 99, new EtherealLlama()); PlaceItemIn(cont, 45, 132, new EtherealUnicorn()); PlaceItemIn(cont, 117, 99, new EtherealBeetle()); PlaceItemIn(bank, 38, 124, cont); #endregion }
public override void OnSpeech(SpeechEventArgs e) { if (!e.Handled && e.Mobile.InRange(this.Location, 12)) { for (int i = 0; i < e.Keywords.Length; ++i) { int keyword = e.Keywords[i]; switch (keyword) { case 0x0000: // *withdraw* { //e.Handled = true; //if( e.Mobile.Criminal ) //{ // this.Say( 500389 ); // I will not do business with a criminal! // break; //} //string[] split = e.Speech.Split( ' ' ); //if( split.Length >= 2 ) //{ // int amount; // try // { // amount = Convert.ToInt32( split[1] ); // } // catch // { // break; // } // if( amount > 5000 ) // { // this.Say( 500381 ); // Thou canst not withdraw so much at one time! // } // else if( amount > 0 ) // { // BankBox box = e.Mobile.FindBankNoCreate(); // if( box == null || !box.ConsumeTotal( typeof( Gold ), amount ) ) // { // this.Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold! // } // else // { // e.Mobile.AddToBackpack( new Gold( amount ) ); // this.Say( 1010005 ); // Thou hast withdrawn gold from thy account. // } // } //} break; } case 0x0001: // *balance* { e.Handled = true; if (e.Mobile.Criminal) { this.Say(500389); // I will not do business with a criminal! break; } BankBox box = e.Mobile.FindBankNoCreate(); //if( box != null ) // this.Say( 1042759, box.TotalGold.ToString() ); // Thy current bank balance is ~1_AMOUNT~ gold. //else // this.Say( 1042759, "0" ); // Thy current bank balance is ~1_AMOUNT~ gold. if (box != null) { Item[] coins = box.FindItemsByType(new Type[] { CurrencySystem.typeofGold, CurrencySystem.typeofVerite, CurrencySystem.typeofValorite }); int valorite = 0, verite = 0, gold = 0; for (int c = 0; c < coins.Length; c++) { if (coins[c].GetType() == CurrencySystem.typeofGold) { gold += coins[c].Amount; } else if (coins[c].GetType() == CurrencySystem.typeofVerite) { verite += coins[c].Amount; } else if (coins[c].GetType() == CurrencySystem.typeofValorite) { valorite += coins[c].Amount; } } Say(String.Format("Thy current bank balance is {0} valorite, {1} verite, and {2} gold.", valorite, verite, gold)); } else { Say("Thy bank box doth not have any coins."); } break; } case 0x0002: // *bank* { e.Handled = true; if (e.Mobile.Criminal) { this.Say(500378); // Thou art a criminal and cannot access thy bank box. break; } e.Mobile.BankBox.Open(); break; } case 0x0003: // *check* { //e.Handled = true; //if( e.Mobile.Criminal ) //{ // this.Say( 500389 ); // I will not do business with a criminal! // break; //} //string[] split = e.Speech.Split( ' ' ); //if( split.Length >= 2 ) //{ // int amount; // try // { // amount = Convert.ToInt32( split[1] ); // } // catch // { // break; // } // if( amount < 5000 ) // { // this.Say( 1010006 ); // We cannot create checks for such a paltry amount of gold! // } // else if( amount > 1000000 ) // { // this.Say( 1010007 ); // Our policies prevent us from creating checks worth that much! // } // else // { // BankCheck check = new BankCheck( amount ); // BankBox box = e.Mobile.BankBox; // if( !box.TryDropItem( e.Mobile, check, false ) ) // { // this.Say( 500386 ); // There's not enough room in your bankbox for the check! // check.Delete(); // } // else if( !box.ConsumeTotal( typeof( Gold ), amount ) ) // { // this.Say( 500384 ); // Ah, art thou trying to fool me? Thou hast not so much gold! // check.Delete(); // } // else // { // this.Say( 1042673, AffixType.Append, amount.ToString(), "" ); // Into your bank box I have placed a check in the amount of: // } // } //} break; } } } if (e.Speech.ToLower().IndexOf("exchange") > -1) { BankBox box = e.Mobile.FindBankNoCreate(); if (box != null) { int cc = 0, sc = 0, gc = 0; Point3D ccLoc = Point3D.Zero, scLoc = Point3D.Zero, gcLoc = Point3D.Zero; List <BaseCoin> coins = box.FindItemsByType <BaseCoin>(); coins.ForEach( delegate(BaseCoin coin) { if (coin.GetType() == CurrencySystem.typeofGold) { cc += coin.Amount; ccLoc = coin.Location; } else if (coin.GetType() == CurrencySystem.typeofVerite) { sc += coin.Amount; scLoc = coin.Location; } else if (coin.GetType() == CurrencySystem.typeofValorite) { gc += coin.Amount; gcLoc = coin.Location; } coin.Delete(); }); int[] newAmts = CurrencySystem.Compress(cc, sc, gc); if (newAmts[0] > 0) { Gold gold = new Gold(newAmts[0]); box.AddItem(gold); gold.Location = ccLoc; } if (newAmts[1] > 0) { Verite silver = new Verite(newAmts[1]); box.DropItem(silver); silver.Location = scLoc; } if (newAmts[2] > 0) { Valorite gold = new Valorite(newAmts[2]); box.DropItem(gold); gold.Location = gcLoc; } } } } base.OnSpeech(e); }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; try { if (info.ButtonID >= 300) { int pr = m_Set[info.ButtonID - 300].Price; int amnt = 0; List <Item> dd = new List <Item>(); for (int i = 0; i < from.BankBox.Items.Count; i++) { if (from.BankBox.Items[i] is DonationCoin) { amnt += from.BankBox.Items[i].Amount; dd.Add(from.BankBox.Items[i]); } } if (dd.Count == 0) { from.SendMessage("You don't have any Donation Coins!"); } else if (dd.Count > 0) { if (pr > amnt) { from.SendMessage("You cannot afford that!"); } else { for (int i = 0; i < dd.Count; i++) { if (dd[i].Amount < pr) { pr -= dd[i].Amount; dd[i].Consume(dd[i].Amount); } else { dd[i].Consume(pr); pr = 0; } } Item d = Activator.CreateInstance(m_Set[info.ButtonID - 300].Type) as Item; if (d is Spellbook) { d.LootType = LootType.Newbied; } else if (!(d is BaseContainer)) { d.LootType = LootType.Blessed; } BankBox bank = from.BankBox; from.SendMessage("The item has been placed in your bank and the Donation Coins was deducted from your bank account."); bank.DropItem(d); } } } } catch (Exception e) { from.SendMessage("Invalid Option Selected."); LoggingCustom.Log("ERROR_DonationVendor", "Error with donation vendor: " + e.Message + "\n" + e.StackTrace); } }
public override void AwardTrophies() { base.AwardTrophies(); PlayerMobile topwaller = null; long topwalls = 0; PlayerMobile topassaulter = null; long topassaults = 0; PlayerMobile topholder = null; long topheld = 0; PlayerMobile carrierkiller = null; long topcarrierkills = 0; foreach (KeyValuePair <PlayerMobile, PvPProfileHistoryEntry> kv in StatisticsCache) { if (kv.Value["Walls Cast"] > topwalls) { topwalls = kv.Value["Walls Cast"]; topwaller = kv.Key; } if (kv.Value["Crystal Points"] > topheld) { topheld = kv.Value["Crystal Points"]; topholder = kv.Key; } if (kv.Value["Crystal Steals"] > topassaults) { topassaults = kv.Value["Crystal Steals"]; topassaulter = kv.Key; } if (kv.Value["Crystal Carrier Kills"] > topcarrierkills) { topcarrierkills = kv.Value["Crystal Carrier Kills"]; carrierkiller = kv.Key; } } if (topwaller != null) { topwaller.SendMessage(54, "You had the top walls cast in the {0}.", Name); topwaller.PublicOverheadMessage(MessageType.Label, 54, true, topwaller.Name + ": Top Walls Cast!"); BankBox bank = topwaller.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Top Walls Cast: " + topwalls, TrophyType.Walls) { Owner = topwaller }); topwaller.SendMessage(54, "A trophy has been placed in your bankbox."); } } if (topholder != null) { topholder.SendMessage(54, "You had the top crystal points in the {0}.", Name); topholder.PublicOverheadMessage(MessageType.Label, 54, true, topholder.Name + ": Top Crystal Points!"); BankBox bank = topholder.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Top Crystal Points: " + topheld, TrophyType.CrystalTime) { Owner = topholder }); topholder.SendMessage(54, "A trophy has been placed in your bankbox."); } } if (topassaulter != null) { topassaulter.SendMessage(54, "You had the most crystal assaults in the {0}.", Name); topassaulter.PublicOverheadMessage(MessageType.Label, 54, true, topassaulter.Name + ": Top Crystal Assaults!"); BankBox bank = topassaulter.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Top Crystals Assaulted: " + topassaults, TrophyType.FlagAssaults) { Owner = topassaulter }); topassaulter.SendMessage(54, "A trophy has been placed in your bankbox."); } } if (carrierkiller != null) { carrierkiller.SendMessage(54, "You had the top carrier kills in the {0}.", Name); carrierkiller.PublicOverheadMessage(MessageType.Label, 54, true, carrierkiller.Name + ": Top Carrier Kills!"); BankBox bank = carrierkiller.FindBank(Map.Expansion); if (bank != null) { bank.DropItem( new BattlesTrophy(Name + " - Top Crystal Carrier Kills: " + topcarrierkills, TrophyType.FlagCaps) { Owner = carrierkiller }); carrierkiller.SendMessage(54, "A trophy has been placed in your bankbox."); } } }
private void OnAccept() { Type cType = Head.Expansion == Expansion.T2A ? typeof(Silver) : typeof(Gold); if (Head == null || Head.Deleted) { _Victim.SendMessage( "Your head was turned over to the authorities by {0} during negotations.", User.RawName); User.SendMessage("You turned over {0}'s to the authorities during negotations and cannot accept this offer.", User.RawName); return; } if (Head.RootParentEntity != User) { _Victim.SendMessage( "Your head does not appear to be possessed by {0} any longer.", User.RawName); User.SendMessage("You must retain the head in your pack or bank to engage in negotations for {0}'s head.", User.RawName); return; } if (!Banker.Withdraw(_Victim, cType, _Offer)) { User.SendMessage("{0} could not afford this price. Please make another offer later.", _Victim.RawName); _Victim.SendMessage( "You could not afford to pay the counteroffer you made. The amount of {0} in your bank has declined since you made the counteroffer.", cType.Name); LoggingCustom.Log( "MurdererNegotiate.txt", String.Format( "[Killer -> Victim][FAILED][{0}]:\t[{1} -> {2}]\t[{3}]\t[{4:#,0} {5}]\t\"{6}\"", ServerTime.ShortDateTimeNow, User, _Victim, Head, _Offer, cType.Name, _Message)); return; } _Victim.SendMessage( "{0:#,0} {1} has been withdrawn from your bank and paid to {2}.", _Offer, cType.Name, User.RawName); User.SendMessage("{0:#,0} {1} has been paid and added to your bank box by {2}.", _Offer, cType.Name, _Victim.RawName); Banker.Deposit(User, cType, _Offer); BankBox bank = _Victim.FindBank(Head.Expansion) ?? _Victim.BankBox; if (bank != null) { bank.DropItem(Head); } if (Head is Head2) { Head2.AllHeads.Remove((Head2)Head); } foreach (var g in GetInstances <HeadNegotiateGump>(_Victim, true).Where(g => g.Head == Head)) { g.Close(true); } _Victim.SendMessage("Your severed head has been deposited into your bank box."); LoggingCustom.Log( "MurdererNegotiate.txt", String.Format( "[Killer -> Victim][ACCEPTED][{0}]:\t[{1} -> {2}]\t[{3}]\t[{4:#,0} {5}]\t\"{6}\"", ServerTime.ShortDateTimeNow, User, _Victim, Head, _Offer, cType.Name, _Message)); }
public static void PrepareFighter(Mobile from, Duel duel) { if (!from.Alive) { from.Resurrect(); } Container pack = from.Backpack; BankBox bank = from.BankBox; Item holding = from.Holding; if (holding != null && pack != null) { pack.DropItem(holding); } from.CurePoison(from); from.StatMods.Clear(); from.Hits = from.HitsMax; from.Mana = from.ManaMax; from.Stam = from.StamMax; Targeting.Target.Cancel(from); from.MagicDamageAbsorb = 0; from.MeleeDamageAbsorb = 0; Spells.Second.ProtectionSpell.Registry.Remove(from); DefensiveSpell.Nullify(from); from.Combatant = null; from.Delta(MobileDelta.Noto); //Update notoriety List <Item> items = new List <Item>(); if (pack != null) { if (!duel.MagicWeapons) { for (int i = 0; i < EquipmentLayers.Length; ++i) { Item item = from.FindItemOnLayer(EquipmentLayers[i]); if (item != null && item is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)item; if (weapon.AccuracyLevel > 0 || weapon.DamageLevel > 0 || weapon.DurabilityLevel > 0) { items.Add(item); } } } } if (!duel.MagicArmor) { for (int i = 0; i < EquipmentLayers.Length; ++i) { Item item = from.FindItemOnLayer(EquipmentLayers[i]); if (item != null && item is BaseArmor) { BaseArmor armor = (BaseArmor)item; if (armor.Durability > 0 || armor.ProtectionLevel > 0) { items.Add(item); } } } } for (int i = 0; i < pack.Items.Count; ++i) { Item item = pack.Items[i]; if (item != null) { if (!duel.MagicWeapons && item is BaseWeapon) { BaseWeapon weapon = (BaseWeapon)item; if (weapon.AccuracyLevel > 0 || weapon.DamageLevel > 0 || weapon.DurabilityLevel > 0) { items.Add(item); } } else if (!duel.MagicArmor && item is BaseArmor) { BaseArmor armor = (BaseArmor)item; if (armor.Durability > 0 || armor.ProtectionLevel > 0) { items.Add(item); } } //else if ( !duel.Potions && item is BasePotion ) //items.Add( item ); else if (!duel.Bandages && item is Bandage) { items.Add(item); } } } } if (!duel.Mounts) { if (from.Mount != null) { IMount mount = from.Mount; mount.Rider = null; if (mount is BaseCreature) { ((BaseCreature)mount).ControlOrder = OrderType.Stay; } } } if (items.Count > 0) { foreach (Item item in items) { bank.DropItem(item); } from.SendMessage("Some equipment has been moved to your bankbox due to restrictions on this duel."); } }
public static bool DepositUniqueCurrency(Mobile from, Type currencyType, int amount) { BankBox bankBox = from.FindBankNoCreate(); if (bankBox == null) { return(false); } int amountRemaining = amount; Item[] currencyItems = bankBox.FindItemsByType(currencyType); foreach (Item currencyItem in currencyItems) { if (amountRemaining <= 0) { break; } //TEST: FIX PLAYERCLASS BINDING FOR CURRENCIES if ((currencyItem.Amount + amountRemaining) <= 60000) { currencyItem.Amount += amountRemaining; amountRemaining = 0; break; } else { int incrementAmount = 60000 - currencyItem.Amount; currencyItem.Amount += incrementAmount; amountRemaining -= incrementAmount; } } if (amountRemaining > 0) { int currencyStacks = (int)(Math.Floor((double)amountRemaining / 60000)) + 1; int currencyToDeposit = amountRemaining % 60000; bool unableToDropDoubloons = false; for (int a = 0; a < currencyStacks; a++) { Item currencyItem = (Item)Activator.CreateInstance(currencyType); if (currencyStacks <= 1) { currencyItem.Amount = amountRemaining; } else { if (a < (currencyStacks - 1)) { currencyItem.Amount = 60000; } else { currencyItem.Amount = currencyToDeposit; } } if (bankBox.Items.Count < bankBox.MaxItems) { bankBox.DropItem(currencyItem); } else { currencyItem.Delete(); from.SendMessage("Your bank box was too full to receive some of the currency to be deposited!"); return(false); } } } return(true); }
private static void FillBankbox(Mobile m) { BankBox bank = m.BankBox; if (bank != null) { // Full spellbook Spellbook book = new Spellbook(); book.Content = ulong.MaxValue; bank.DropItem(book); // Some food bank.DropItem(MakeNewbie(new Apple(100))); // Reagents bank.DropItem(new BlackPearl(100)); bank.DropItem(new Bloodmoss(100)); bank.DropItem(new Garlic(100)); bank.DropItem(new Ginseng(100)); bank.DropItem(new MandrakeRoot(100)); bank.DropItem(new Nightshade(100)); bank.DropItem(new SulfurousAsh(100)); bank.DropItem(new SpidersSilk(100)); bank.DropItem(new BankCheck(5000)); // 5 blank recall runes for (int i = 0; i < 5; ++i) { bank.DropItem(MakeNewbie(new RecallRune())); } } }
private void ReadyPlayer(Mobile m) { if (!m_ScoreTable.ContainsKey(m.Serial)) { m_ScoreTable.Add(m.Serial, new ScoreKeeper(m)); } if (!m_UseSphereRules) { #region DistroCode bool MagicWeapons = MagicWeaponRule == pMagicWeaponRule.Allowed; bool MagicArmor = MagicArmorRule == pMagicArmorRule.Allowed; bool Potions = PotionRule == pPotionRule.Allowed; bool Bandages = BandageRule == pBandaidRule.Allowed; bool Pets = PetRule == pPetRule.Allowed; bool Mounts = MountRule == pMountRule.Allowed; if (!m.Alive) { m.Resurrect(); } Container bp = m.Backpack; Container bag = new Bag(); bag.Hue = 38; BankBox bank = m.BankBox; Item oncurs = m.Holding; if (oncurs != null) { bp.DropItem(oncurs); } m.CurePoison(m); m.Hits = m.HitsMax; m.Mana = m.ManaMax; m.Stam = m.StamMax; m.StatMods.Clear(); List <Item> items = new List <Item>(); foreach (Layer layer in PvpCore.EquipmentLayers) { Item item = m.FindItemOnLayer(layer); if (item != null) { if (item is BaseWeapon && !MagicWeapons) { BaseWeapon weapon = (BaseWeapon)item; if (weapon.AccuracyLevel != WeaponAccuracyLevel.Regular) { items.Add(weapon); } else if (weapon.DamageLevel != WeaponDamageLevel.Regular) { items.Add(weapon); } else if (weapon.DurabilityLevel != WeaponDurabilityLevel.Regular) { items.Add(weapon); } } else if (item is BaseArmor && !MagicArmor) { BaseArmor armor = (BaseArmor)item; if (armor.Durability != ArmorDurabilityLevel.Regular) { items.Add(armor); } else if (armor.ProtectionLevel != ArmorProtectionLevel.Regular) { items.Add(armor); } } } } if (m.Backpack != null) { foreach (Item item in m.Backpack.Items) { if (item != null) { if (item is BaseWeapon && !MagicWeapons) { BaseWeapon weapon = (BaseWeapon)item; if (weapon.AccuracyLevel != WeaponAccuracyLevel.Regular) { items.Add(weapon); } else if (weapon.DamageLevel != WeaponDamageLevel.Regular) { items.Add(weapon); } else if (weapon.DurabilityLevel != WeaponDurabilityLevel.Regular) { items.Add(weapon); } } else if (item is BaseArmor && !MagicArmor) { BaseArmor armor = (BaseArmor)item; if (armor.Durability != ArmorDurabilityLevel.Regular) { items.Add(armor); } else if (armor.ProtectionLevel != ArmorProtectionLevel.Regular) { items.Add(armor); } } else if (item is BasePotion && !Potions) { items.Add(item); } else if (item is EtherealMount && !Mounts) { items.Add(item); } else if (item is Bandage && !Bandages) { items.Add(item); } } } } if (!Mounts) { if (m.Mount != null) { IMount mount = m.Mount; mount.Rider = null; if (mount is BaseMount) { if (mount is BaseCreature) { BaseCreature bc = (BaseCreature)mount; bc.ControlTarget = null; bc.ControlOrder = OrderType.Stay; bc.Internalize(); bc.SetControlMaster(null); bc.SummonMaster = null; bc.IsStabled = true; m.Stabled.Add(bc); MountCollection.Add(m.Serial, bc); m.SendMessage(38, "Your mount has been moved to the your stables"); } } } } if (items.Count > 0) { m.SendMessage(38, "You had items that did not meet the requirements for the deathmatch and were thus moved to your bank."); } foreach (Item item in items) { bag.AddItem(item); } if (bag.Items.Count > 0) { bank.DropItem(bag); } else { bag.Delete(); } #endregion } if (m_EventSupplier != null) { m_EventSupplier.OnMoveOver(m); } Contestants.Add(m); SpawnMobile(m); if (m_GiveHorses) { DMHorse.TryGiveHorse(m); } if (m.NetState != null) { m.SendMessage(38, "You have joined a deathmatch"); m.SendMessage(38, "You can check the score with \".DMScore\""); } }
private static void AddSkillItems(SkillName skill) { switch (skill) { case SkillName.Alchemy: { BankBox bank = m_Mobile.BankBox; bank.DropItem(new Bottle(50)); PackItem(new Bottle(4)); PackItem(new MortarPestle()); break; } case SkillName.Anatomy: { PackItem(new Bandage(3)); break; } case SkillName.AnimalLore: { EquipItem(new ShepherdsCrook()); break; } case SkillName.Archery: { BankBox bank = m_Mobile.BankBox; bank.DropItem(new Arrow(550)); PackItem(new Arrow(25)); EquipItem(new Bow()); break; } case SkillName.ArmsLore: { switch (Utility.Random(3)) { case 0: EquipItem(new Kryss()); break; case 1: EquipItem(new Katana()); break; case 2: EquipItem(new Club()); break; } break; } case SkillName.Begging: { EquipItem(new GnarledStaff()); break; } case SkillName.Blacksmith: { PackItem(new Tongs()); PackItem(new Pickaxe()); PackItem(new Pickaxe()); PackItem(new IronIngot(50)); EquipItem(new HalfApron(Utility.RandomYellowHue())); break; } case SkillName.Fletching: { PackItem(new Board(14)); PackItem(new Feather(5)); PackItem(new Shaft(5)); break; } case SkillName.Camping: { PackItem(new Bedroll()); PackItem(new Kindling(5)); break; } case SkillName.Carpentry: { PackItem(new Board(10)); PackItem(new Saw()); EquipItem(new HalfApron(Utility.RandomYellowHue())); break; } case SkillName.Cartography: { PackItem(new BlankMap()); PackItem(new BlankMap()); PackItem(new BlankMap()); PackItem(new BlankMap()); PackItem(new Sextant()); break; } case SkillName.Cooking: { PackItem(new Kindling(5)); PackItem(new RawLambLeg(5)); PackItem(new RawChickenLeg(5)); PackItem(new RawFishSteak(5)); PackItem(new SackFlour(2)); PackItem(new Pitcher(BeverageType.Water)); break; } case SkillName.DetectHidden: { EquipItem(new Cloak(0x455)); break; } case SkillName.Discordance: { PackInstrument(); break; } case SkillName.Fencing: { EquipItem(new Kryss()); break; } case SkillName.Fishing: { EquipItem(new FishingPole()); EquipItem(new FloppyHat(Utility.RandomYellowHue())); break; } case SkillName.Healing: { BankBox bank = m_Mobile.BankBox; bank.DropItem(new Bandage(500)); PackItem(new Bandage(50)); PackItem(new Scissors()); break; } case SkillName.Herding: { EquipItem(new ShepherdsCrook()); break; } case SkillName.Hiding: { EquipItem(new Cloak(0x455)); break; } case SkillName.Inscribe: { BankBox bank = m_Mobile.BankBox; bank.DropItem(new BlankScroll(250)); PackItem(new BlankScroll(2)); PackItem(new BlueBook(2)); break; } case SkillName.ItemID: { EquipItem(new GnarledStaff()); break; } case SkillName.Lockpicking: { BankBox bank = m_Mobile.BankBox; bank.DropItem(new Lockpick(150)); PackItem(new Lockpick(20)); break; } case SkillName.Lumberjacking: { EquipItem(new Hatchet()); break; } case SkillName.Macing: { EquipItem(new Club()); break; } case SkillName.Magery: { BankBox bank = m_Mobile.BankBox; bank.DropItem(new BagOfReagents(550)); bank.DropItem(new RecallRune()); bank.DropItem(new RecallRune()); bank.DropItem(new RecallRune()); bank.DropItem(new RecallRune()); BagOfReagents regs = new BagOfReagents(50); if (!Core.AOS) { foreach (Item item in regs.Items) { item.LootType = LootType.Newbied; } } PackItem(regs); regs.LootType = LootType.Regular; PackScroll(0); PackScroll(1); PackScroll(2); Spellbook book = new Spellbook((ulong)0xFFFFFFFFFFFFFFFF); EquipItem(book); book.LootType = LootType.Blessed; EquipItem(new Robe(Utility.RandomBlueHue())); EquipItem(new WizardsHat()); break; } case SkillName.Mining: { PackItem(new Pickaxe()); break; } case SkillName.Musicianship: { PackInstrument(); break; } case SkillName.Parry: { EquipItem(new WoodenShield()); break; } case SkillName.Peacemaking: { PackInstrument(); break; } case SkillName.Poisoning: { PackItem(new LesserPoisonPotion()); PackItem(new LesserPoisonPotion()); break; } case SkillName.Provocation: { PackInstrument(); break; } case SkillName.Snooping: { PackItem(new Lockpick(20)); break; } case SkillName.SpiritSpeak: { EquipItem(new Cloak(0x455)); break; } case SkillName.Stealing: { PackItem(new Lockpick(20)); break; } case SkillName.Swords: { EquipItem(new Katana()); break; } case SkillName.Tactics: { EquipItem(new Katana()); break; } case SkillName.Tailoring: { PackItem(new BoltOfCloth()); PackItem(new SewingKit()); break; } case SkillName.Tracking: { if (m_Mobile != null) { Item shoes = m_Mobile.FindItemOnLayer(Layer.Shoes); if (shoes != null) { shoes.Delete(); } } EquipItem(new Boots(Utility.RandomYellowHue())); EquipItem(new SkinningKnife()); break; } case SkillName.Veterinary: { PackItem(new Bandage(5)); PackItem(new Scissors()); break; } case SkillName.Wrestling: { EquipItem(new LeatherGloves()); break; } } }
private static void FillBankbox(Mobile m) { if (Core.AOS) { FillBankAOS(m); return; } BankBox bank = m.BankBox; if (bank != null) { bank.DropItem(new BankCheck(1000000)); // Full spellbook Spellbook book = new Spellbook(); book.Content = ulong.MaxValue; bank.DropItem(book); Bag bag = new Bag(); for (int i = 0; i < 5; ++i) { bag.DropItem(new Moonstone(MoonstoneType.Felucca)); } // Felucca moonstones bank.DropItem(bag); bag = new Bag(); for (int i = 0; i < 5; ++i) { bag.DropItem(new Moonstone(MoonstoneType.Trammel)); } // Trammel moonstones bank.DropItem(bag); // Treasure maps bank.DropItem(new TreasureMap(1, Map.Trammel)); bank.DropItem(new TreasureMap(2, Map.Trammel)); bank.DropItem(new TreasureMap(3, Map.Trammel)); bank.DropItem(new TreasureMap(4, Map.Trammel)); bank.DropItem(new TreasureMap(5, Map.Trammel)); // Bag containing 50 of each reagent bank.DropItem(new BagOfReagents(50)); // Craft tools bank.DropItem(MakeNewbie(new Scissors())); bank.DropItem(MakeNewbie(new SewingKit(1000))); bank.DropItem(MakeNewbie(new SmithHammer(1000))); bank.DropItem(MakeNewbie(new FletcherTools(1000))); bank.DropItem(MakeNewbie(new DovetailSaw(1000))); bank.DropItem(MakeNewbie(new MortarPestle(1000))); bank.DropItem(MakeNewbie(new ScribesPen(1000))); bank.DropItem(MakeNewbie(new TinkerTools(1000))); // A few dye tubs bank.DropItem(new Dyes()); bank.DropItem(new DyeTub()); bank.DropItem(new DyeTub()); bank.DropItem(new BlackDyeTub()); DyeTub darkRedTub = new DyeTub(); darkRedTub.DyedHue = 0x485; darkRedTub.Redyable = false; bank.DropItem(darkRedTub); // Some food bank.DropItem(MakeNewbie(new Apple(1000))); // Resources bank.DropItem(MakeNewbie(new Feather(1000))); bank.DropItem(MakeNewbie(new BoltOfCloth(1000))); bank.DropItem(MakeNewbie(new BlankScroll(1000))); bank.DropItem(MakeNewbie(new Hides(1000))); bank.DropItem(MakeNewbie(new Bandage(1000))); bank.DropItem(MakeNewbie(new Bottle(1000))); bank.DropItem(MakeNewbie(new Log(1000))); bank.DropItem(MakeNewbie(new IronIngot(5000))); bank.DropItem(MakeNewbie(new DullCopperIngot(5000))); bank.DropItem(MakeNewbie(new ShadowIronIngot(5000))); bank.DropItem(MakeNewbie(new CopperIngot(5000))); bank.DropItem(MakeNewbie(new BronzeIngot(5000))); bank.DropItem(MakeNewbie(new GoldIngot(5000))); bank.DropItem(MakeNewbie(new AgapiteIngot(5000))); bank.DropItem(MakeNewbie(new VeriteIngot(5000))); bank.DropItem(MakeNewbie(new ValoriteIngot(5000))); // Reagents bank.DropItem(MakeNewbie(new BlackPearl(1000))); bank.DropItem(MakeNewbie(new Bloodmoss(1000))); bank.DropItem(MakeNewbie(new Garlic(1000))); bank.DropItem(MakeNewbie(new Ginseng(1000))); bank.DropItem(MakeNewbie(new MandrakeRoot(1000))); bank.DropItem(MakeNewbie(new Nightshade(1000))); bank.DropItem(MakeNewbie(new SulfurousAsh(1000))); bank.DropItem(MakeNewbie(new SpidersSilk(1000))); // Some extra starting gold bank.DropItem(MakeNewbie(new Gold(9000))); // 5 blank recall runes for (int i = 0; i < 5; ++i) { bank.DropItem(MakeNewbie(new RecallRune())); } AddPowerScrolls(bank); } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; if (info.ButtonID == 0) // Close { } if (info.ButtonID == 100) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 50, true)) { BankBox bank = from.BankBox; bank.DropItem(new SkillCapToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 50, true)) { BankBox bank = from.BankBox; bank.DropItem(new SkillCapToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 101) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 250, true)) { BankBox bank = from.BankBox; bank.DropItem(new FollowerCapToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 250, true)) { BankBox bank = from.BankBox; bank.DropItem(new FollowerCapToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 102) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 100, true)) { BankBox bank = from.BankBox; bank.DropItem(new HouseSlotToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 50, true)) { BankBox bank = from.BankBox; bank.DropItem(new HouseSlotToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 103) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 100, true)) { BankBox bank = from.BankBox; bank.DropItem(new CharacterSlotToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 100, true)) { BankBox bank = from.BankBox; bank.DropItem(new CharacterSlotToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 104) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 100, true)) { BankBox bank = from.BankBox; bank.DropItem(new StorageToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 100, true)) { BankBox bank = from.BankBox; bank.DropItem(new StorageToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 105) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 10, true)) { BankBox bank = from.BankBox; bank.DropItem(new RenameToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 10, true)) { BankBox bank = from.BankBox; bank.DropItem(new RenameToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 106) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 10, true)) { BankBox bank = from.BankBox; bank.DropItem(new SexChangeToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 10, true)) { BankBox bank = from.BankBox; bank.DropItem(new SexChangeToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 107) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 30, true)) { BankBox bank = from.BankBox; bank.DropItem(new HeritageToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 30, true)) { BankBox bank = from.BankBox; bank.DropItem(new HeritageToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 108) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 30, true)) { BankBox bank = from.BankBox; bank.DropItem(new PersonalAttendantToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 30, true)) { BankBox bank = from.BankBox; bank.DropItem(new PersonalAttendantToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 109) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 30, true)) { BankBox bank = from.BankBox; bank.DropItem(new SoulstoneFragmentToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 30, true)) { BankBox bank = from.BankBox; bank.DropItem(new SoulstoneFragmentToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 110) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 100, true)) { BankBox bank = from.BankBox; bank.DropItem(new ChargerOfTheFallenToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 30, true)) { BankBox bank = from.BankBox; bank.DropItem(new ChargerOfTheFallenToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 111) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 150, true)) { BankBox bank = from.BankBox; bank.DropItem(new BlueSoulstoneToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 150, true)) { BankBox bank = from.BankBox; bank.DropItem(new BlueSoulstoneToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 112) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 150, true)) { BankBox bank = from.BankBox; bank.DropItem(new RedSoulstoneToken()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 150, true)) { BankBox bank = from.BankBox; bank.DropItem(new RedSoulstoneToken()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 500) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 50, true)) { BankBox bank = from.BankBox; bank.DropItem(new ReagentRing()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 50, true)) { BankBox bank = from.BankBox; bank.DropItem(new ReagentRing()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } if (info.ButtonID == 501) { if (from.Backpack.ConsumeTotal(typeof(Platinum), 50, true)) { BankBox bank = from.BankBox; bank.DropItem(new ManaBracelet()); from.SendMessage("Your item has been placed in your bankbox."); } else if (from.BankBox.ConsumeTotal(typeof(Platinum), 50, true)) { BankBox bank = from.BankBox; bank.DropItem(new ManaBracelet()); from.SendMessage("Your item has been placed in your bankbox."); } else { from.SendMessage("You do not have enough platinum for this item."); } } }
public override void OnResponse(NetState sender, RelayInfo info) { PlayerMobile from = (PlayerMobile)sender.Mobile; Handeling.AddTimer.Stop(); switch (info.ButtonID) { case 0: { Handeling.Caller.SendMessage(String.Format("{0} has declined the duel.", from.Name)); Handeling.Caller.SendGump(new FieldSetup_ParticipantSetup(Handeling, TeamID)); break; } case 1: { if (Handeling.BuyIn > 0) { if (!HasGold(from, Handeling.BuyIn)) { from.SendMessage("You do not have enough money to buy into this duel."); from.SendGump(new FieldSetup_AddParticipant(Handeling, TeamID, Index)); return; } else { Item i = CheckForGoldSources(from, Handeling.BuyIn); if (i is Gold) { i.Amount -= Handeling.BuyIn; } else { BankCheck check = (BankCheck)i; check.Worth -= Handeling.BuyIn; } if (i.Amount <= 0) { i.Delete(); return; } if (i is BankCheck) { BankCheck check = (BankCheck)i; if (check.Worth > 0) { if (check.Worth < 5000) { if (check.Parent is BankBox) { BankBox box = (BankBox)check.Parent; Gold g = new Gold(check.Worth); box.DropItem(g); check.Delete(); } if (check.Parent is Backpack) { Backpack pack = (Backpack)check.Parent; Gold g = new Gold(check.Worth); pack.DropItem(g); check.Delete(); } } } else { check.Delete(); } } from.SendMessage("The buy in funds for the duel have been paid."); } } Handeling.Caller.SendMessage(String.Format("{0} has accepted the duel.", from.Name)); Handeling.Teams[TeamID].Players[Index] = from; Handeling.Teams[TeamID].Accepted.Add((PlayerMobile)from, false); Handeling.Caller.SendGump(new FieldSetup_ParticipantSetup(Handeling, TeamID)); break; } case 2: { Handeling.Caller.SendMessage(String.Format("{0} has declined the duel.", from.Name)); Handeling.Caller.SendGump(new FieldSetup_ParticipantSetup(Handeling, TeamID)); break; } } }
private static void DoLaunchLimbs(Mobile killed, PlayerMobile from, Point3D OurLoc, Point3D StartLoc, Map map) { if (killed.Player && (killed.BodyValue == 0x190 || killed.BodyValue == 0x191)) { if (killed.Mounted == true) { IMount mount = killed.Mount; if (mount != null) { mount.Rider = null; } } Backpack bag = new Backpack(); Container pack = killed.Backpack; BankBox box = killed.BankBox; ArrayList equipitems = new ArrayList(killed.Items); ArrayList bagitems = new ArrayList(pack.Items); foreach (Item item in equipitems) { if ((item.Layer != Layer.Bank) && (item.Layer != Layer.Backpack) && (item.Layer != Layer.Hair) && (item.Layer != Layer.FacialHair)) { pack.DropItem(item); } } Container pouch = killed.Backpack; ArrayList finalitems = new ArrayList(pouch.Items); foreach (Item items in finalitems) { bag.DropItem(items); } box.DropItem(bag); killed.Kill(); int effecthue = killed.Hue; if (effecthue >= 30000) { effecthue = 0; } //BEGIN HEAD// Point3D endHeadLoc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endHeadLoc, map), 0x1CE1, 5, effecthue, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishHeadLaunch), new object[] { from, endHeadLoc, map, killed }); //END HEAD// //BEGIN TORSO// Point3D endTorsoLoc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endTorsoLoc, map), 0x1DAD, 5, effecthue, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishTorsoLaunch), new object[] { from, endTorsoLoc, map, killed }); //END TORSO// //LEFT LEG// Point3D endLLLoc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endLLLoc, map), 0x1DB2, 5, effecthue, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishLLLaunch), new object[] { from, endLLLoc, map, killed }); //END LEFT LEG// //RIGHT LEG// Point3D endRLLoc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endRLLoc, map), 0x1DA4, 5, effecthue, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishRLLaunch), new object[] { from, endRLLoc, map, killed }); //END RIGHT LEG// //LEFT ARM// Point3D endLALoc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endLALoc, map), 0x1DA1, 5, effecthue, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishLALaunch), new object[] { from, endLALoc, map, killed }); //END LEFT ARM// //RIGHT ARM// Point3D endRALoc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endRALoc, map), 0x1DAF, 5, effecthue, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishRALaunch), new object[] { from, endRALoc, map, killed }); //END RIGHT ARM// //BLOOD// Point3D endBlood1Loc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endBlood1Loc, map), 0x122B, 5, 0, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishBlood1Launch), new object[] { from, endBlood1Loc, map, killed }); Point3D endBlood2Loc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endBlood2Loc, map), 0x122B, 5, 0, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishBlood2Launch), new object[] { from, endBlood2Loc, map, killed }); Point3D endBlood3Loc = new Point3D(StartLoc.X + Utility.RandomMinMax(-6, 6), StartLoc.Y + Utility.RandomMinMax(-6, 6), StartLoc.Z); Effects.SendMovingEffect(new Entity(Serial.Zero, StartLoc, map), new Entity(Serial.Zero, endBlood3Loc, map), 0x122B, 5, 0, false, false); Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(FinishBlood3Launch), new object[] { from, endBlood3Loc, map, killed }); //END BLOOD// } else { killed.Kill(); } if (killed.Corpse != null) { killed.Corpse.Delete(); } }
public override bool OnDragDrop(Mobile m, Item item) { if (item is Head) // He said head... { this.Say(500670); // Ah, a head! Let me check to see if there is a bounty on this. this.Say("There was no bounty on this person."); item.Delete(); return(false); } else if (item is BountyHead) { this.Say(500670); // Ah, a head! Let me check to see if there is a bounty on this. BountyHead bh = (BountyHead)item; Mobile owner = bh.Owner; Mobile killer = bh.Killer; DateTime tod = bh.TimeOfDeath; FSBountySystem.Bounty b = FSBountySystem.FindBounty(owner); if (b != null) { if (owner != null && killer != null) { if (m == owner) { this.Say("Ha Ha Ha, You think i am going to give you a reward for your own head?"); item.Delete(); return(false); } else if (m != killer) { this.Say(500543); // I had heard this scum was taken care of...but not by you item.Delete(); return(false); } else if (tod < b.Expires - TimeSpan.FromDays(30.0)) { this.Say("This head is to badly decayed to make a positive id."); item.Delete(); return(false); } else if (owner.Guild != null && killer.Guild != null && owner.Guild == killer.Guild) { this.Say("You cannot claim a reward on one of your guildmates."); item.Delete(); return(false); } else if (b.Expires < DateTime.Now) { this.Say("It looks like this bounty has expired."); item.Delete(); FSBountySystem.ClearBounty(b, owner); return(false); } else { BankBox box = m.BankBox; if (box != null) { box.DropItem(new BankCheck(b.Reward)); FSBountySystem.ClearBounty(b, owner); this.Say("There was a bounty for {0}, For the sum of {1} gold.", owner.Name, b.Reward); m.SendMessage("A bankcheck for {0} gold has been depoisted into your bank.", b.Reward); this.Say("I have added the bounty reward to your bank."); item.Delete(); return(true); } else { item.Delete(); return(false); } } } else { this.Say("I found a bounty for this person, However the bounty was invalid."); m.SendMessage("The person this head belongs to no longer exists on the server, Contact a gamemaster for more details."); FSBountySystem.ClearBounty(b, owner); item.Delete(); return(false); } } else { if (owner != null) { this.Say(1042854, owner.Name); // There was no bounty on ~1_PLAYER_NAME~. item.Delete(); return(false); } else { this.Say("There was no bounty on this person."); item.Delete(); return(false); } } } else { this.Say("I dont want that."); return(false); } }
public static void CheckTournament(Mobile from, Mobile fisher, Item dropped) { if (!isRunning) { // Only giving a extra reward for 10+ fish from.SendMessage("A reward has been placed in your bank box."); Bag bag = new Bag(); bag.DropItem(new BankCheck(250 * dropped.Amount)); bag.DropItem(new Harpoon(Utility.RandomMinMax(2, 5))); switch (Utility.Random(2)) { case 0: bag.DropItem(new SpecialFishingNet()); break; case 1: bag.DropItem(new MessageInABottle()); break; } if (dropped.Amount > 19) { fisher.Say("Wow! You caught {0}. You should have placed in the tournament! Better luck next time!", dropped.Amount.ToString()); bag.DropItem(new PowerScroll(SkillName.Fishing, 105)); } else if (dropped.Amount > 18) { fisher.Say("Wow! You caught 19. You were so close! Better luck next time!"); bag.DropItem(new FabledFishingNet()); } else if (dropped.Amount > 17) { fisher.Say("Wow! You caught 18. You did amazing. Better luck next time!"); FloppyHat fh = new FloppyHat(); fh.Hue = Utility.RandomMinMax(2498, 2640); fh.Name = "a designer fishing hat"; fh.LootType = LootType.Blessed; bag.DropItem(fh); } else if (dropped.Amount > 16) { fisher.Say("Wow! You caught 17. Almost... Maybe next time!"); Sandals s = new Sandals(); s.Hue = Utility.RandomMinMax(1910, 2040); s.Name = "a designer fishing sandals"; s.LootType = LootType.Blessed; bag.DropItem(s); } else if (dropped.Amount > 15) { fisher.Say("You caught 16. Thats not bad but you could have done better! Maybe next time!"); FishingPole fp = new FishingPole(); fp.Hue = Utility.RandomMinMax(1150, 1175); fp.Name = "a painted fishing pole"; bag.DropItem(fp); } else if (dropped.Amount > 14) { fisher.Say("You caught 15. Bad luck! Maybe next time!"); Item junk = new Item(Utility.RandomList(17784, 17785)); junk.Name = "a sea horse statue"; bag.DropItem(junk); } else if (dropped.Amount > 13) { fisher.Say("You caught 14. Maybe try different waters next time!"); Item junk = new Item(Utility.RandomList(17786, 17787)); junk.Name = "a mermaid statue"; bag.DropItem(junk); } else if (dropped.Amount > 12) { fisher.Say("You caught 13. Did you bring ale? You have to bring ale!"); Spellbook sb = new Spellbook(); sb.Name = "Fishing For Dummies"; sb.Hue = 52; bag.DropItem(sb); } else if (dropped.Amount > 11) { fisher.Say("You caught 12. Try different bait next time!"); Item junk = new Item(Utility.RandomList(0x1EA3, 0x1EA4, 0x1EA5, 0x1EA6)); junk.Name = "a worn fishing net"; bag.DropItem(junk); } else if (dropped.Amount > 10) { fisher.Say("You caught 11..."); Item junk = new Item(0x154D); junk.Name = "a barrel of fish (Not for shooting)"; bag.DropItem(junk); } else if (dropped.Amount > 9) { fisher.Say("You only caught 10. Half way... is still to far!"); } else if (dropped.Amount > 8) { fisher.Say("You only caught 9. Half way... is still to far!"); } else if (dropped.Amount > 7) { fisher.Say("You only caught 8... How long did you say you have been fishing?"); } else if (dropped.Amount > 6) { fisher.Say("You only caught 7... Find a lot of shoes do you?"); } else if (dropped.Amount > 5) { fisher.Say("You only caught 6... Ever consider taking up something more productivy like bird watching?"); } else if (dropped.Amount > 4) { fisher.Say("You only caught 5... Ever consider taking up something more exciting like... baskit weaving?"); } else if (dropped.Amount > 3) { fisher.Say("You caught 4!?! Was your cat on fire?"); } else if (dropped.Amount > 2) { fisher.Say("You caught 3!?! Were you sleeping all this time?"); } else if (dropped.Amount > 1) { fisher.Say("Two fish? Maybe you should keep them in a tank and hope they multiply!"); } else if (dropped.Amount > 0) { fisher.Say("One... One fish? Did someone hand this to you? Did you find this flopping around town? Tell me you didn't fish and catch this one lonely fish?"); } BankBox box = from.BankBox; box.DropItem(bag); dropped.Delete(); } else if (isRunning) { if (DateTime.UtcNow.DayOfWeek == TournyOne) { BankBox box = from.BankBox; if (from.Backpack.ConsumeTotal(typeof(ToxicTrout), 20) && firstPlace == null) { firstPlace = from.Name; World.Broadcast(0x35, true, "{0} has came in first in todays fishing tournament!", firstPlace); fisher.Say("Congrats! You are the first person to catch twenty toxic trout! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 1)); } else if (from.Backpack.ConsumeTotal(typeof(ToxicTrout), 20) && secondPlace == null) { secondPlace = from.Name; World.Broadcast(0x35, true, "{0} has placed 2nd in todays fishing tournament!", firstPlace); fisher.Say("Congrats! You are the second person to catch twenty toxic trout! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 2)); } else if (from.Backpack.ConsumeTotal(typeof(ToxicTrout), 20) && thirdPlace == null) { isRunning = false; thirdPlace = from.Name; World.Broadcast(0x35, true, "{0} has placed 3rd in todays fishing tournament!", firstPlace); World.Broadcast(0x35, true, "The tournament is now over! Congratulations to todays winners!", firstPlace); World.Broadcast(0x35, true, "If you didnt win today bring what fish you gathered and drop them on a tournament master to claim a consolation prize!", firstPlace); fisher.Say("Congrats! You are the third person to catch twenty toxic trout! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 3)); } else { fisher.Say("You need to catch and bring me twenty toxic trout before anyone else to win this tournament!"); fisher.Say("Why are you standing around here! Go fish!!!"); } } else if (DateTime.UtcNow.DayOfWeek == TournyTwo) { BankBox box = from.BankBox; if (from.Backpack.ConsumeTotal(typeof(CottonCandySwordfish), 20) && firstPlace == null) { firstPlace = from.Name; World.Broadcast(0x35, true, "{0} has came in first in todays fishing tournament!", firstPlace); fisher.Say("Congrats! You are the first person to catch twenty cotton candy swordfish! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 1)); } else if (from.Backpack.ConsumeTotal(typeof(CottonCandySwordfish), 20) && secondPlace == null) { secondPlace = from.Name; World.Broadcast(0x35, true, "{0} has placed 2nd in todays fishing tournament!", firstPlace); fisher.Say("Congrats! You are the second person to catch twenty cotton candy swordfish! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 2)); } else if (from.Backpack.ConsumeTotal(typeof(CottonCandySwordfish), 20) && thirdPlace == null) { isRunning = false; thirdPlace = from.Name; World.Broadcast(0x35, true, "{0} has placed 3rd in todays fishing tournament!", firstPlace); World.Broadcast(0x35, true, "The tournament is now over! Congratulations to todays winners!", firstPlace); World.Broadcast(0x35, true, "If you didnt win today bring what fish you gathered and drop them on a tournament master to claim a consolation prize!", firstPlace); fisher.Say("Congrats! You are the third person to catch twenty cotton candy swordfish! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 3)); } else { fisher.Say("You need to catch and bring me twenty cotton candy swordfish before anyone else to win this tournament!"); fisher.Say("Why are you standing around here! Go fish!!!"); } } else if (DateTime.UtcNow.DayOfWeek == TournyThree) { BankBox box = from.BankBox; if (from.Backpack.ConsumeTotal(typeof(MalasMoonfish), 20) && firstPlace == null) { firstPlace = from.Name; World.Broadcast(0x35, true, "{0} has came in first in todays fishing tournament!", firstPlace); fisher.Say("Congrats! You are the first person to catch twenty malas moonfish! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 1)); } else if (from.Backpack.ConsumeTotal(typeof(MalasMoonfish), 20) && secondPlace == null) { secondPlace = from.Name; World.Broadcast(0x35, true, "{0} has placed 2nd in todays fishing tournament!", firstPlace); fisher.Say("Congrats! You are the second person to catch twenty malas moonfish! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 2)); } else if (from.Backpack.ConsumeTotal(typeof(MalasMoonfish), 20) && thirdPlace == null) { isRunning = false; thirdPlace = from.Name; World.Broadcast(0x35, true, "{0} has placed 3rd in todays fishing tournament!", firstPlace); World.Broadcast(0x35, true, "The tournament is now over! Congratulations to todays winners!", firstPlace); World.Broadcast(0x35, true, "If you didnt win today bring what fish you gathered and drop them on a tournament master to claim a consolation prize!", firstPlace); fisher.Say("Congrats! You are the third person to catch twenty malas moonfish! Well done!"); from.SendMessage("Your reward has been placed into your bank box!"); box.DropItem(GiveReward(from, 3)); } else { fisher.Say("You need to catch and bring me twenty malas moonfish before anyone else to win this tournament!"); fisher.Say("Why are you standing around here! Go fish!!!"); } } else // Why? Because thats the kinda world we live in... { fisher.Say("I am sorry, I musta got my days mixxed up!"); isRunning = false; } } else { if (firstPlace != null && secondPlace != null && thirdPlace != null) { fisher.Say("Todays tournament has ended! Todays winners are {0}, {1), and {2}!", firstPlace, secondPlace, thirdPlace); } else { fisher.Say("Todays tournament has ended!"); } } }