public GateTravelSpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book) : base(caster, scroll, m_Info) { m_Entry = entry; m_Book = book; m_Scroll = scroll; }
public RunebookGump(Mobile from, Runebook book) : base(150, 200) { m_From = from; Book = book; AddBackground(); AddIndex(); for (int page = 0; page < 8; ++page) { AddPage(2 + page); AddButton(125, 14, 2205, 2205, 0, GumpButtonType.Page, 1 + page); if (page < 7) { AddButton(393, 14, 2206, 2206, 0, GumpButtonType.Page, 3 + page); } for (int half = 0; half < 2; ++half) { AddDetails((page * 2) + half, half); } } }
public RunebookGump(Mobile from, Runebook book) : base(150, 200) { TypeID = 0x59; m_Book = book; PrecompileStringTable(); AddBackground(); AddIndex(); if (m_Book.Entries.Count != 0) { for (int page = 0; page < 8; ++page) { AddPage(2 + page); AddButton(125, 14, 2205, 2205, 0, GumpButtonType.Page, 1 + page); if (page < 7) { AddButton(393, 14, 2206, 2206, 0, GumpButtonType.Page, 3 + page); } for (int half = 0; half < 2; ++half) { AddDetails((page * 2) + half, half); } } } }
public OverlandTreasureHunter() { SpeechHue = Utility.RandomDyedHue(); Title = "the treasure hunter"; SetStr(96, 115); SetDex(86, 105); SetInt(51, 65); SetDamage(23, 27); SetSkill(SkillName.Anatomy, 60.0, 82.5); SetSkill(SkillName.Wrestling, 88.5, 100.0); SetSkill(SkillName.MagicResist, 88.5, 100.0); SetSkill(SkillName.Tactics, 60.0, 82.5); Fame = 2500; Karma = -2500; // Configure our treasuremap TreasureMap map = new TreasureMap(5, Map.Felucca); map.LootType = LootType.Newbied; map.Themed = true; map.Theme = TreasureTheme.RandomOverlandTheme(); map.Decoder = this; PackItem(map); // configure our distination (to the chest) Destination = new Point3D(map.ChestLocation, 0).ToString(); Shovel shovel = new Shovel(); shovel.LootType = LootType.Newbied; PackItem(shovel); Runebook book = new Runebook(); book.LootType = LootType.Newbied; book.Name = "Fromm's treasure hunting guide"; AddItem(book); Item light = null; if (Utility.RandomBool()) { light = new Lantern(); } else { light = new Torch(); } PackItem(light); // select a gem for payment m_GemIndex = Utility.Random(TreasureMapChest.m_GemTypes.Length); m_GemsRequired = 50 * (2 + Utility.Random(9)); // 100-500 PackItem(new Bandage(Utility.RandomMinMax(1, 15))); }
public RunebookGump(Mobile from, Runebook book) : base(50, 50) { m_Book = book; AddBackground(); AddIndex(); for (int page = 0; page < 9; ++page) { AddPage(2 + page); m_Page = 2 + page; AddNavigation(); AddButton(53, 16, 1055, 1055, 0, GumpButtonType.Page, 1 + page); if (page < 8) { AddButton(586, 16, 1056, 1056, 0, GumpButtonType.Page, 3 + page); } if (page < 8) { for (int half = 0; half < 2; ++half) { AddDetails((page * 2) + half, half); } } else if (page > 7) { AddInstructions(); } } }
public static void DeleteRunes_OnCommand(CommandEventArgs e) { ArrayList items = new ArrayList(World.Items.Values); foreach (Item item in items) { if (item is RecallRune) { RecallRune rune = (RecallRune)item; if (rune.Marked && rune.TargetMap != null && IsBad(rune.Target, rune.TargetMap)) { object root = item.RootParent; if (root is Mobile) { if (((Mobile)root).AccessLevel < AccessLevel.GameMaster) { item.Delete(); e.Mobile.SendMessage("Rune: '{4}' {0} [{1}]: {2} ({3})", item.GetWorldLocation(), item.Map, root.GetType().Name, ((Mobile)root).Name, rune.Description); } } else { item.Delete(); e.Mobile.SendMessage("Rune: '{3}' {0} [{1}]: {2}", item.GetWorldLocation(), item.Map, root == null ? "(null)" : root.GetType().Name, rune.Description); } } } else if (item is Runebook) { Runebook book = (Runebook)item; List <RunebookEntry> entries = book.Entries; for (int i = 0; i < entries.Count; ++i) { RunebookEntry entry = entries[i]; if (entry.Map != null && IsBad(entry.Location, entry.Map)) { object root = item.RootParent; if (root is Mobile) { if (((Mobile)root).AccessLevel < AccessLevel.GameMaster) { entries.RemoveAt(i); e.Mobile.SendMessage("Runebook: '{6}' {0} [{1}]: {2} ({3}) ({4}:{5})", item.GetWorldLocation(), item.Map, root.GetType().Name, ((Mobile)root).Name, i, entry.Description, book.Description); } } else { entries.RemoveAt(i); e.Mobile.SendMessage("Runebook: '{5}' {0} [{1}]: {2} ({3}:{4})", item.GetWorldLocation(), item.Map, root == null ? "(null)" : root.GetType().Name, i, entry.Description, book.Description); } } } } } }
public static void RunebookSetup() { MessageBox.Show(@"Select your Runebook"); var config = Config(); Runebook = new Runebook(new Serial(Getitem()), Config(), (uint)Enums.RunebookGump.EVO); Runebook.Parse(); }
public RecallSpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book, RuneTomeRuneEntry recallRuneEntry, RuneTome runeTome) : base(caster, scroll, m_Info) { m_Entry = entry; m_Book = book; m_RunebookRuneEntry = recallRuneEntry; m_RuneTome = runeTome; }
public virtual bool AddRunebook(Mobile m, Runebook book, RuneCodexCategory cat, bool message) { if (m == null || m.Deleted || book == null || book.Deleted || !book.IsAccessibleTo(m)) { return(false); } if (cat == null) { var pm = m as PlayerMobile; if (pm != null) { var ui = Users.FirstOrDefault(uic => uic.User == pm); if (ui != null) { cat = ui.Category ?? Categories[ui.CategoryPoint.X, ui.CategoryPoint.Y]; } else { cat = Categories[0, 0]; } } else { cat = Categories[0, 0]; } } if (book.Entries == null || book.Entries.Count == 0) { if (message) { m.SendMessage("That rune book is empty."); } return(false); } if (Categories.Count >= Categories.Capacity) { if (message) { m.SendMessage("This rune codex can't hold more categories."); } return(false); } if (cat != null && cat.AddRunebook(m, book, message)) { InvalidateProperties(); return(true); } return(false); }
public RecallSpell(Mobile caster, RunebookEntry entry = null, Runebook book = null, Item scroll = null) : base( caster, scroll, m_Info ) { m_Entry = entry; m_Book = book; }
public static void RemoveRunebook_Callback(Mobile from, bool okay, MasterRunebook master, InternalRunebook book, int id) { if (okay) { Container pack = from.Backpack; if (pack == null || pack.Deleted) { from.SendMessage("Unable to find a backpack in which to place a new Runebook."); return; } int count = book.Entries.Count; if (count > 0) { if (from.AccessLevel < AccessLevel.GameMaster) { if (from.Backpack.ConsumeTotal(new Type[] { typeof(BlankScroll), typeof(RecallScroll), typeof(GateTravelScroll) }, new int[] { 10, 1, 1 }) >= 0) { from.SendMessage("You do not have the materials needed to create the runebook."); return; } if (from.CheckSkill(SkillName.Inscribe, 100, 120)) { from.SendMessage("You failed to extract the book. Some materials were lost."); return; } } Runebook runebook = new Runebook(book.MaxCharges); for (int x = 0; x < count; x++) { RunebookEntry rbe = new RunebookEntry( ((RunebookEntry)book.Entries[0]).Location, ((RunebookEntry)book.Entries[0]).Map, ((RunebookEntry)book.Entries[0]).Description, ((RunebookEntry)book.Entries[0]).House); runebook.Entries.Add(rbe); book.Entries.RemoveAt(0); } runebook.CurCharges = book.CurCharges; runebook.Name = book.Name; book.Name = string.Format("Book #{0}", ((int)(id + 1)).ToString()); pack.DropItem(runebook); from.SendMessage("Runebook extracted. Some materials were used."); } else { from.SendMessage("You cannot remove an empty Runebook."); } from.CloseGump(typeof(InternalRunebookGump)); from.SendGump(new InternalRunebookGump(from, book, master, id)); } else { from.CloseGump(typeof(InternalRunebookGump)); from.SendGump(new InternalRunebookGump(from, book, master, id)); } }
public InternalTimer(Spell spell, Mobile caster, Point3D location, Runebook book) : base(TimeSpan.FromSeconds(0.75)) { m_Spell = spell; m_Caster = caster; m_Location = location; m_Book = book; Priority = TimerPriority.FiftyMS; }
private static void DeleteBuccaneerRunes_OnCommand(CommandEventArgs e) { int count1 = 0, count2 = 0; foreach (Item i in World.Items.Values) { // Si c'est une rune, on la rend vierge if (i is RecallRune) { RecallRune rune = (RecallRune)i; Console.Write("\nRune found : " + rune.Description); if (Region.Find(rune.Target, rune.Map) is NoRecallRegion) { Console.Write(" [cleared]"); rune.Target = new Point3D(0, 0, 0); rune.TargetMap = null; rune.Marked = false; rune.House = null; rune.Description = null; count1++; } } // Si c'est une runebook on doit rentrer dans le livre chercher les entrées else if (i is Runebook) { Runebook book = (Runebook)i; // On cherche les entrées vers une zone no recall List <RunebookEntry> entries = new List <RunebookEntry>(); foreach (RunebookEntry entry in book.Entries) { if (entry == null) { continue; } Console.Write("\nEntry found : " + entry.Description); if (Region.Find(entry.Location, entry.Map) is NoRecallRegion) { Console.Write(" [deleted]"); entries.Add(entry); } } // On supprime les entrées vers les zones no recall foreach (RunebookEntry entry in entries) { book.Entries.Remove(entry); count2++; } } } Console.WriteLine(); e.Mobile.SendMessage(String.Format("{0} runes effacées et {1} entrées de runebook retirées.", count1, count2)); }
public RunebookSellingGump(Runebook book) : base(0, 0) { this.Dragable = false; this.Closable = true; if (book == null) { return; } AddPage(0); this.AddBackground(0, 0, 520, 420, 5170); int penY = 25; int penX = 125; int textHeight = 20; AddLabel(penX, penY, 38, "Runes in this Runebook"); penY += textHeight + 5; penX = 30; if (book.Entries == null || book.Entries.Count == 0) { AddLabel(penX, penY, 0, "This is an empty runebook..."); return; } AddLabel(penX, penY, 38, " Map Region Coordinates Description"); penY += textHeight; foreach (RunebookEntry entry in book.Entries) { if (entry.Map == null) { continue; } Region region = Region.Find(entry.Location, entry.Map); AddLabel(penX, penY, 0, entry.Map.Name); penX = 95; if (region != null) { AddLabel(penX, penY, 0, region.Name); } penX = 200; AddLabel(penX, penY, 0, UberScriptFunctions.Methods.SEXTANTCOORDS(null, entry.Location, entry.Map)); penX = 340; AddLabel(penX, penY, 0, entry.Description); penY += textHeight; penX = 30; } }
public override void InitOutfit() { AddItem(new LongPants(0x322)); AddItem(new Shoes(GetRandomHue())); AddItem(new FancyShirt(0x47E)); AddItem(new GoldRing()); AddItem(new FloppyHat(GetRandomHue())); Runebook runebook = new Runebook(); runebook.Hue = 0x47E; runebook.Name = "Fight Book"; AddItem(runebook); }
/// <summary> Recall using Runebook.cs Class </summary> /// <param name="bookspot"></param> /// <param name="recalltype"></param> /// <param name="runebookserial"></param> /// <returns>True if no longer in same location</returns> public static bool Travel(Item runebookserial, int bookspot, string recalltype) { var OSIconfig = new RuneBookConfig() { ScrollOffset = 10, DropOffset = 200, DefaultOffset = 300, RecallOffset = 50, GateOffset = 100, SacredOffset = 75, Jumper = 1 }; Runebook MyRunebook = new Runebook(runebookserial.Serial, OSIconfig); MyRunebook.Recall(); runebookserial.DoubleClick(); var loc1 = PlayerMobile.GetPlayer().Location; // LOC before recall runebookserial.DoubleClick(); // Open Runebook StealthAPI.Stealth.Client.Wait(1000); Gump g; g = Gump.GetGump((uint)OSIGumpIDs.Runebook); //OSI if (g == null) { StealthAPI.Stealth.Client.AddToSystemJournal("Gump is Null"); return(false); } else { foreach (var e in g.Buttons) { if (!e.PacketValue.Equals(OSIconfig.RecallOffset + bookspot - 1) && !e.Graphic.Released.Equals(2103) && !e.Graphic.Pressed.Equals(2104)) { continue; } if (recalltype == "Recall") { GumpButton recallButton = g.Buttons.First(i => i.PacketValue.Equals(OSIconfig.RecallOffset + (bookspot - 1))); recallButton.Click(); break; } } } StealthAPI.Stealth.Client.Wait(false ? 2000 : 3500); var loc2 = PlayerMobile.GetPlayer().Location; // LOC after recall return(loc1 != loc2); // Compare Locs to see if you moved. }
public virtual bool AddRunebook(Mobile m, Runebook book, RuneCodexCategory cat, bool message) { if (m == null || m.Deleted || book == null || book.Deleted || !book.IsAccessibleTo(m)) { return(false); } if (cat == null) { PlayerMobile pm = m as PlayerMobile; cat = pm != null && Users.ContainsKey(pm) ? (Users[pm].Category ?? Categories[Users[pm].CategoryPoint.X, Users[pm].CategoryPoint.Y]) : Categories[0, 0]; } if (book.Entries == null || book.Entries.Count == 0) { if (message) { m.SendMessage("That rune book is empty."); } return(false); } if (Categories.Count >= Categories.Capacity) { if (message) { m.SendMessage("This rune codex can't hold more categories."); } return(false); } if (cat != null && cat.AddRunebook(m, book, message)) { InvalidateProperties(); return(true); } return(false); }
public override void InitOutfit() { WipeLayers(); int Valorite = 0x8AB; EmoteHue = Utility.RandomYellowHue(); ChainChest chest = new ChainChest(); chest.Resource = CraftResource.Valorite; chest.LootType = LootType.Newbied; AddItem(chest); ChainLegs legs = new ChainLegs(); legs.Resource = CraftResource.Valorite; legs.LootType = LootType.Newbied; AddItem(legs); FeatheredHat hat = new FeatheredHat(); hat.Hue = Valorite; hat.LootType = LootType.Regular; AddItem(hat); AddItem(new Boots(Utility.RandomNeutralHue())); AddItem(new PageboyHair(Utility.RandomHairHue())); Runebook runebook = new Runebook(); runebook.Hue = Utility.RandomMetalHue(); runebook.Name = "Collections"; runebook.LootType = LootType.Newbied; AddItem(runebook); AddItem(new GoldRing()); PackItem(new Bandage(Utility.RandomMinMax(VirtualArmor, VirtualArmor * 2))); PackStrongPotions(6, 12); PackItem(new Pouch()); PackGold(50, 60); }
public SallosRunebook(Runebook book) : base(0x02, ((book.Entries.Count - 2) * 6) + 13) { m_Stream.Write((int)book.Serial); m_Stream.Write(false); m_Stream.Write((byte)0); m_Stream.Write((byte)0); m_Stream.Write((byte)0); m_Stream.Write((byte)book.Entries.Count); foreach (var entry in book.Entries) { m_Stream.Write(false); m_Stream.Write((Int16)entry.Location.X); m_Stream.Write((Int16)entry.Location.Y); m_Stream.Write((byte)entry.Map.MapIndex); } m_Stream.Write((int)0); }
// Use this for initialization void Start() { player = this.gameObject; trans = player.transform; //head = GameObject.Find("Head").transform; rigbody = GetComponent <Rigidbody>(); rigbody.useGravity = false; rigbody.freezeRotation = true; cam = Camera.main; wM = GameObject.Find("WorldManager").GetComponent <WorldManager>(); aW = wM.activeWorld; trans.position = aW.tiles[spawnTile].hexagon.center; origin = new Vector3(aW.origin.x, aW.origin.y, aW.origin.z); animator = player.GetComponent <Animator>(); animator.enabled = true; animator.Play("Idle"); //runebook test byte[] b = new byte[32]; for (int i = 0; i < 32; i++) { b[i] = (byte)Random.Range(0, 256); } runeBook = new Runebook(b); GameObject runebook = Instantiate(runeBook.RunebookGO()); /* * Transform runebookTrans = runebook.transform; * runebookTrans.parent = cam.transform; * runebookTrans.position = cam.transform.position + cam.transform.forward; * runebookTrans.LookAt(cam.transform); */ /* * foreach(Rune r in runeBook.runes) * { * Instantiate(r.RuneGO()); * } */ }
public bool AddRunebook(Mobile m, Runebook book, bool message) { if (m == null || m.Deleted || book == null || book.Deleted) { return(false); } bool mrb = Insensitive.Equals(book.GetType().Name, "InternalRunebook"); if (book.Entries.Count == 0) { if (!mrb && message) { m.SendMessage("That rune book is empty."); } return(false); } if (Entries.Count >= Entries.Capacity) { if (!mrb && message) { m.SendMessage("The category \"{0}\" can't hold more runes.", _Name); } return(false); } if (Entries.Count + book.Entries.Count > Entries.Capacity) { if (!mrb && message) { m.SendMessage("That rune book won't fit in the category \"{0}\".", _Name); } return(false); } var bEntries = new Queue <RunebookEntry>(book.Entries); Entries.ForEach( (x, y, e) => { if (e != null || bEntries.Count <= 0) { return; } var be = bEntries.Dequeue(); Entries.SetContent(x, y, new RuneCodexEntry(book.Name, be.Description, be.Location.ToMapPoint(be.Map))); }); if (mrb) { book.Entries.Clear(); return(true); } book.Delete(); if (message) { m.SendMessage("You add the rune book to the category \"{0}\".", _Name); } return(true); }
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; Container cont; // Begin box of money cont = new WoodenBox(); cont.ItemID = 0xE7D; cont.Hue = 0x489; PlaceItemIn(cont, 16, 51, new BankCheck(500000)); PlaceItemIn(cont, 28, 51, new BankCheck(250000)); PlaceItemIn(cont, 40, 51, new BankCheck(100000)); PlaceItemIn(cont, 52, 51, new BankCheck(100000)); PlaceItemIn(cont, 64, 51, new BankCheck(50000)); PlaceItemIn(cont, 34, 115, new Gold(60000)); PlaceItemIn(bank, 18, 169, cont); // End box of money // Begin bag of potion kegs cont = new Backpack(); cont.Name = "Various Potion Kegs"; PlaceItemIn(cont, 45, 149, MakePotionKeg(PotionEffect.CureGreater, 0x2D)); PlaceItemIn(cont, 69, 149, MakePotionKeg(PotionEffect.HealGreater, 0x499)); PlaceItemIn(cont, 93, 149, MakePotionKeg(PotionEffect.PoisonDeadly, 0x46)); PlaceItemIn(cont, 117, 149, MakePotionKeg(PotionEffect.RefreshTotal, 0x21)); PlaceItemIn(cont, 141, 149, MakePotionKeg(PotionEffect.ExplosionGreater, 0x74)); PlaceItemIn(cont, 93, 82, new Bottle(1000)); PlaceItemIn(bank, 53, 169, cont); // End bag of potion kegs // Begin bag of tools cont = new Bag(); cont.Name = "Tool Bag"; PlaceItemIn(cont, 30, 35, new TinkerTools(1000)); PlaceItemIn(cont, 60, 35, new HousePlacementTool()); PlaceItemIn(cont, 90, 35, new DovetailSaw(1000)); PlaceItemIn(cont, 30, 68, new Scissors()); PlaceItemIn(cont, 45, 68, new MortarPestle(1000)); PlaceItemIn(cont, 75, 68, new ScribesPen(1000)); PlaceItemIn(cont, 90, 68, new SmithHammer(1000)); PlaceItemIn(cont, 30, 118, new TwoHandedAxe()); PlaceItemIn(cont, 60, 118, new FletcherTools(1000)); PlaceItemIn(cont, 90, 118, new SewingKit(1000)); PlaceItemIn(cont, 36, 51, new RunicHammer(CraftResource.DullCopper, 1000)); PlaceItemIn(cont, 42, 51, new RunicHammer(CraftResource.ShadowIron, 1000)); PlaceItemIn(cont, 48, 51, new RunicHammer(CraftResource.Copper, 1000)); PlaceItemIn(cont, 54, 51, new RunicHammer(CraftResource.Bronze, 1000)); PlaceItemIn(cont, 61, 51, new RunicHammer(CraftResource.Gold, 1000)); PlaceItemIn(cont, 67, 51, new RunicHammer(CraftResource.Agapite, 1000)); PlaceItemIn(cont, 73, 51, new RunicHammer(CraftResource.Verite, 1000)); PlaceItemIn(cont, 79, 51, new RunicHammer(CraftResource.Valorite, 1000)); PlaceItemIn(cont, 36, 55, new RunicSewingKit(CraftResource.SpinedLeather, 1000)); PlaceItemIn(cont, 42, 55, new RunicSewingKit(CraftResource.HornedLeather, 1000)); PlaceItemIn(cont, 48, 55, new RunicSewingKit(CraftResource.BarbedLeather, 1000)); PlaceItemIn(bank, 118, 169, cont); // End bag of tools // Begin bag of archery ammo cont = new Bag(); cont.Name = "Bag Of Archery Ammo"; PlaceItemIn(cont, 48, 76, new Arrow(5000)); PlaceItemIn(cont, 72, 76, new Bolt(5000)); PlaceItemIn(bank, 118, 124, cont); // End bag of archery ammo // Begin bag of treasure maps cont = new Bag(); cont.Name = "Bag Of Treasure Maps"; PlaceItemIn(cont, 30, 35, new TreasureMap(1, Map.Trammel)); PlaceItemIn(cont, 45, 35, new TreasureMap(2, Map.Trammel)); PlaceItemIn(cont, 60, 35, new TreasureMap(3, Map.Trammel)); PlaceItemIn(cont, 75, 35, new TreasureMap(4, Map.Trammel)); PlaceItemIn(cont, 90, 35, new TreasureMap(5, Map.Trammel)); PlaceItemIn(cont, 90, 35, new TreasureMap(6, Map.Trammel)); PlaceItemIn(cont, 30, 50, new TreasureMap(1, Map.Trammel)); PlaceItemIn(cont, 45, 50, new TreasureMap(2, Map.Trammel)); PlaceItemIn(cont, 60, 50, new TreasureMap(3, Map.Trammel)); PlaceItemIn(cont, 75, 50, new TreasureMap(4, Map.Trammel)); PlaceItemIn(cont, 90, 50, new TreasureMap(5, Map.Trammel)); PlaceItemIn(cont, 90, 50, new TreasureMap(6, Map.Trammel)); PlaceItemIn(cont, 55, 100, new Lockpick(30)); PlaceItemIn(cont, 60, 100, new Pickaxe()); PlaceItemIn(bank, 98, 124, cont); // End bag of treasure maps // Begin bag of raw materials cont = new Bag(); cont.Hue = 0x835; cont.Name = "Raw Materials Bag"; PlaceItemIn(cont, 92, 60, new BarbedLeather(5000)); PlaceItemIn(cont, 92, 68, new HornedLeather(5000)); PlaceItemIn(cont, 92, 76, new SpinedLeather(5000)); PlaceItemIn(cont, 92, 84, new Leather(5000)); PlaceItemIn(cont, 30, 118, new Cloth(5000)); PlaceItemIn(cont, 30, 84, new Board(5000)); PlaceItemIn(cont, 57, 80, new BlankScroll(500)); PlaceItemIn(cont, 30, 35, new DullCopperIngot(5000)); PlaceItemIn(cont, 37, 35, new ShadowIronIngot(5000)); PlaceItemIn(cont, 44, 35, new CopperIngot(5000)); PlaceItemIn(cont, 51, 35, new BronzeIngot(5000)); PlaceItemIn(cont, 58, 35, new GoldIngot(5000)); PlaceItemIn(cont, 65, 35, new AgapiteIngot(5000)); PlaceItemIn(cont, 72, 35, new VeriteIngot(5000)); PlaceItemIn(cont, 79, 35, new ValoriteIngot(5000)); PlaceItemIn(cont, 86, 35, new IronIngot(5000)); PlaceItemIn(cont, 30, 59, new RedScales(5000)); PlaceItemIn(cont, 36, 59, new YellowScales(5000)); PlaceItemIn(cont, 42, 59, new BlackScales(5000)); PlaceItemIn(cont, 48, 59, new GreenScales(5000)); PlaceItemIn(cont, 54, 59, new WhiteScales(5000)); PlaceItemIn(cont, 60, 59, new BlueScales(5000)); PlaceItemIn(bank, 98, 169, cont); // End bag of raw materials // Begin bag of spell casting stuff cont = new Backpack(); cont.Hue = 0x480; cont.Name = "Spell Casting Stuff"; PlaceItemIn(cont, 45, 105, new Spellbook(UInt64.MaxValue)); PlaceItemIn(cont, 65, 105, new NecromancerSpellbook((UInt64)0xFFFF)); PlaceItemIn(cont, 85, 105, new BookOfChivalry((UInt64)0x3FF)); PlaceItemIn(cont, 105, 105, new BookOfBushido()); //Default ctor = full PlaceItemIn(cont, 125, 105, new BookOfNinjitsu()); //Default ctor = full Runebook runebook = new Runebook(10); runebook.CurCharges = runebook.MaxCharges; PlaceItemIn(cont, 145, 105, runebook); Item toHue = new BagOfAllReagents(150); toHue.Hue = 0x2D; PlaceItemIn(cont, 45, 150, toHue); toHue = new BagOfNecroReagents(150); toHue.Hue = 0x488; PlaceItemIn(cont, 65, 150, toHue); PlaceItemIn(cont, 140, 150, new BagOfAllReagents(500)); for (int i = 0; i < 9; ++i) { PlaceItemIn(cont, 45 + (i * 10), 75, new RecallRune()); } PlaceItemIn(cont, 141, 74, new FireHorn()); PlaceItemIn(bank, 78, 169, cont); // End bag of spell casting stuff // Begin bag of ethereals cont = new Backpack(); cont.Hue = 0x490; cont.Name = "Bag Of Ethy's!"; PlaceItemIn(cont, 45, 66, new EtherealHorse()); PlaceItemIn(cont, 69, 82, new EtherealOstard()); PlaceItemIn(cont, 93, 99, new EtherealLlama()); PlaceItemIn(cont, 117, 115, new EtherealKirin()); PlaceItemIn(cont, 45, 132, new EtherealUnicorn()); PlaceItemIn(cont, 69, 66, new EtherealRidgeback()); PlaceItemIn(cont, 93, 82, new EtherealSwampDragon()); PlaceItemIn(cont, 117, 99, new EtherealBeetle()); PlaceItemIn(bank, 38, 124, cont); // End bag of ethereals // Begin first bag of artifacts cont = new Backpack(); cont.Hue = 0x48F; cont.Name = "Bag of Artifacts"; PlaceItemIn(cont, 45, 66, new TitansHammer()); PlaceItemIn(cont, 69, 82, new InquisitorsResolution()); PlaceItemIn(cont, 93, 99, new BladeOfTheRighteous()); PlaceItemIn(cont, 117, 115, new ZyronicClaw()); PlaceItemIn(bank, 58, 124, cont); // End first bag of artifacts // Begin second bag of artifacts cont = new Backpack(); cont.Hue = 0x48F; cont.Name = "Bag of Artifacts"; PlaceItemIn(cont, 45, 66, new GauntletsOfNobility()); PlaceItemIn(cont, 69, 82, new MidnightBracers()); PlaceItemIn(cont, 93, 99, new VoiceOfTheFallenKing()); PlaceItemIn(cont, 117, 115, new OrnateCrownOfTheHarrower()); PlaceItemIn(cont, 45, 132, new HelmOfInsight()); PlaceItemIn(cont, 69, 66, new HolyKnightsBreastplate()); PlaceItemIn(cont, 93, 82, new ArmorOfFortune()); PlaceItemIn(cont, 117, 99, new TunicOfFire()); PlaceItemIn(cont, 45, 115, new LeggingsOfBane()); PlaceItemIn(cont, 69, 132, new ArcaneShield()); PlaceItemIn(cont, 93, 66, new Aegis()); PlaceItemIn(cont, 117, 82, new RingOfTheVile()); PlaceItemIn(cont, 45, 99, new BraceletOfHealth()); PlaceItemIn(cont, 69, 115, new RingOfTheElements()); PlaceItemIn(cont, 93, 132, new OrnamentOfTheMagician()); PlaceItemIn(cont, 117, 66, new DivineCountenance()); PlaceItemIn(cont, 45, 82, new JackalsCollar()); PlaceItemIn(cont, 69, 99, new HuntersHeaddress()); PlaceItemIn(cont, 93, 115, new HatOfTheMagi()); PlaceItemIn(cont, 117, 132, new ShadowDancerLeggings()); PlaceItemIn(cont, 45, 66, new SpiritOfTheTotem()); PlaceItemIn(cont, 69, 82, new BladeOfInsanity()); PlaceItemIn(cont, 93, 99, new AxeOfTheHeavens()); PlaceItemIn(cont, 117, 115, new TheBeserkersMaul()); PlaceItemIn(cont, 45, 132, new Frostbringer()); PlaceItemIn(cont, 69, 66, new BreathOfTheDead()); PlaceItemIn(cont, 93, 82, new TheDragonSlayer()); PlaceItemIn(cont, 117, 99, new BoneCrusher()); PlaceItemIn(cont, 45, 115, new StaffOfTheMagi()); PlaceItemIn(cont, 69, 132, new SerpentsFang()); PlaceItemIn(cont, 93, 66, new LegacyOfTheDreadLord()); PlaceItemIn(cont, 117, 82, new TheTaskmaster()); PlaceItemIn(cont, 45, 99, new TheDryadBow()); PlaceItemIn(bank, 78, 124, cont); // End second bag of artifacts // Begin bag of minor artifacts cont = new Backpack(); cont.Hue = 0x48F; cont.Name = "Bag of Minor Artifacts"; PlaceItemIn(cont, 45, 66, new LunaLance()); PlaceItemIn(cont, 69, 82, new VioletCourage()); PlaceItemIn(cont, 93, 99, new CavortingClub()); PlaceItemIn(cont, 117, 115, new CaptainQuacklebushsCutlass()); PlaceItemIn(cont, 45, 132, new NightsKiss()); PlaceItemIn(cont, 69, 66, new ShipModelOfTheHMSCape()); PlaceItemIn(cont, 93, 82, new AdmiralsHeartyRum()); PlaceItemIn(cont, 117, 99, new CandelabraOfSouls()); PlaceItemIn(cont, 45, 115, new IolosLute()); PlaceItemIn(cont, 69, 132, new GwennosHarp()); PlaceItemIn(cont, 93, 66, new ArcticDeathDealer()); PlaceItemIn(cont, 117, 82, new EnchantedTitanLegBone()); PlaceItemIn(cont, 45, 99, new NoxRangersHeavyCrossbow()); PlaceItemIn(cont, 69, 115, new BlazeOfDeath()); PlaceItemIn(cont, 93, 132, new DreadPirateHat()); PlaceItemIn(cont, 117, 66, new BurglarsBandana()); PlaceItemIn(cont, 45, 82, new GoldBricks()); PlaceItemIn(cont, 69, 99, new AlchemistsBauble()); PlaceItemIn(cont, 93, 115, new PhillipsWoodenSteed()); PlaceItemIn(cont, 117, 132, new PolarBearMask()); PlaceItemIn(cont, 45, 66, new BowOfTheJukaKing()); PlaceItemIn(cont, 69, 82, new GlovesOfThePugilist()); PlaceItemIn(cont, 93, 99, new OrcishVisage()); PlaceItemIn(cont, 117, 115, new StaffOfPower()); PlaceItemIn(cont, 45, 132, new ShieldOfInvulnerability()); PlaceItemIn(cont, 69, 66, new HeartOfTheLion()); PlaceItemIn(cont, 93, 82, new ColdBlood()); PlaceItemIn(cont, 117, 99, new GhostShipAnchor()); PlaceItemIn(cont, 45, 115, new SeahorseStatuette()); PlaceItemIn(cont, 69, 132, new WrathOfTheDryad()); PlaceItemIn(cont, 93, 66, new PixieSwatter()); for (int i = 0; i < 10; i++) { PlaceItemIn(cont, 117, 128, new MessageInABottle(Utility.RandomBool() ? Map.Trammel : Map.Felucca, 4)); } PlaceItemIn(bank, 18, 124, cont); cont = new Bag(); cont.Hue = 0x501; cont.Name = "Tokuno Minor Artifacts"; PlaceItemIn(cont, 42, 70, new Exiler()); PlaceItemIn(cont, 38, 53, new HanzosBow()); PlaceItemIn(cont, 45, 40, new TheDestroyer()); PlaceItemIn(cont, 92, 80, new DragonNunchaku()); PlaceItemIn(cont, 42, 56, new PeasantsBokuto()); PlaceItemIn(cont, 44, 71, new TomeOfEnlightenment()); PlaceItemIn(cont, 35, 35, new ChestOfHeirlooms()); PlaceItemIn(cont, 29, 0, new HonorableSwords()); PlaceItemIn(cont, 49, 85, new AncientUrn()); PlaceItemIn(cont, 51, 58, new FluteOfRenewal()); PlaceItemIn(cont, 70, 51, new PigmentsOfTokuno()); PlaceItemIn(cont, 40, 79, new AncientSamuraiDo()); PlaceItemIn(cont, 51, 61, new LegsOfStability()); PlaceItemIn(cont, 88, 78, new GlovesOfTheSun()); PlaceItemIn(cont, 55, 62, new AncientFarmersKasa()); PlaceItemIn(cont, 55, 83, new ArmsOfTacticalExcellence()); PlaceItemIn(cont, 50, 85, new DaimyosHelm()); PlaceItemIn(cont, 52, 78, new BlackLotusHood()); PlaceItemIn(cont, 52, 79, new DemonForks()); PlaceItemIn(cont, 33, 49, new PilferedDancerFans()); PlaceItemIn(bank, 58, 124, cont); cont = new Bag(); cont.Name = "Bag of Bows"; PlaceItemIn(cont, 31, 84, new Bow()); PlaceItemIn(cont, 78, 74, new CompositeBow()); PlaceItemIn(cont, 53, 71, new Crossbow()); PlaceItemIn(cont, 56, 39, new HeavyCrossbow()); PlaceItemIn(cont, 82, 72, new RepeatingCrossbow()); PlaceItemIn(cont, 49, 45, new Yumi()); for (int i = 0; i < cont.Items.Count; i++) { BaseRanged bow = cont.Items[i] as BaseRanged; if (bow != null) { bow.Attributes.WeaponSpeed = 35; bow.Attributes.WeaponDamage = 35; } } PlaceItemIn(bank, 108, 135, cont); }
public SacredJourneySpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book) : base(caster, scroll, m_Info) { m_Entry = entry; m_Book = book; }
public InternalPrompt(Runebook book) { m_Book = book; }
public RecallSpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book) : base(caster, scroll, m_Info) { this.m_Entry = entry; this.m_Book = book; }
// adam: not called for production servers private static void FillBankbox(Mobile m) { BankBox bank = m.BankBox; if (bank == null) { return; } Container cont; // Begin box of money cont = new WoodenBox(); cont.ItemID = 0xE7D; cont.Hue = 0x489; PlaceItemIn(cont, 16, 51, new BankCheck(1000000)); //edited by sam PlaceItemIn(cont, 28, 51, new BankCheck(250000)); //edited by sam PlaceItemIn(cont, 40, 51, new BankCheck(125000)); //edited by sam PlaceItemIn(cont, 52, 51, new BankCheck(75000)); //edited by sam PlaceItemIn(cont, 64, 51, new BankCheck(32500)); //edited by sam PlaceItemIn(cont, 34, 115, MakeNewbie(new Gold(60000))); PlaceItemIn(bank, 18, 169, cont); // End box of money // Begin bag of potion kegs cont = new Backpack(); cont.Name = "Various Potion Kegs"; PlaceItemIn(cont, 45, 149, MakePotionKeg(PotionEffect.CureGreater, 0x2D)); PlaceItemIn(cont, 69, 149, MakePotionKeg(PotionEffect.HealGreater, 0x499)); PlaceItemIn(cont, 93, 149, MakePotionKeg(PotionEffect.PoisonDeadly, 0x46)); PlaceItemIn(cont, 117, 149, MakePotionKeg(PotionEffect.RefreshTotal, 0x21)); PlaceItemIn(cont, 141, 149, MakePotionKeg(PotionEffect.ExplosionGreater, 0x74)); PlaceItemIn(cont, 93, 82, MakeNewbie(new Bottle(1000))); PlaceItemIn(bank, 53, 169, cont); // End bag of potion kegs // Begin bag of tools cont = new Bag(); cont.Name = "Tool Bag"; PlaceItemIn(cont, 30, 35, MakeNewbie(new TinkerTools(60000))); PlaceItemIn(cont, 90, 35, MakeNewbie(new DovetailSaw(60000))); PlaceItemIn(cont, 30, 68, MakeNewbie(new Scissors())); PlaceItemIn(cont, 45, 68, MakeNewbie(new MortarPestle(60000))); PlaceItemIn(cont, 75, 68, MakeNewbie(new ScribesPen(60000))); PlaceItemIn(cont, 90, 68, MakeNewbie(new SmithHammer(60000))); PlaceItemIn(cont, 30, 118, MakeNewbie(new TwoHandedAxe())); PlaceItemIn(cont, 90, 118, MakeNewbie(new SewingKit(60000))); PlaceItemIn(bank, 118, 169, cont); // End bag of tools // Begin bag of archery ammo cont = new Bag(); cont.Name = "Bag Of Archery Ammo"; PlaceItemIn(cont, 48, 76, MakeNewbie(new Arrow(60000))); PlaceItemIn(cont, 72, 76, MakeNewbie(new Bolt(60000))); PlaceItemIn(bank, 118, 124, cont); // End bag of archery ammo // Begin bag of treasure maps cont = new Bag(); cont.Name = "Bag Of Treasure Maps"; PlaceItemIn(cont, 30, 35, MakeNewbie(new TreasureMap(1, Map.Felucca))); PlaceItemIn(cont, 45, 35, MakeNewbie(new TreasureMap(2, Map.Felucca))); PlaceItemIn(cont, 60, 35, MakeNewbie(new TreasureMap(3, Map.Felucca))); PlaceItemIn(cont, 75, 35, MakeNewbie(new TreasureMap(4, Map.Felucca))); PlaceItemIn(cont, 90, 35, MakeNewbie(new TreasureMap(5, Map.Felucca))); PlaceItemIn(cont, 30, 50, MakeNewbie(new TreasureMap(1, Map.Felucca))); PlaceItemIn(cont, 45, 50, MakeNewbie(new TreasureMap(2, Map.Felucca))); PlaceItemIn(cont, 60, 50, MakeNewbie(new TreasureMap(3, Map.Felucca))); PlaceItemIn(cont, 75, 50, MakeNewbie(new TreasureMap(4, Map.Felucca))); PlaceItemIn(cont, 90, 50, MakeNewbie(new TreasureMap(5, Map.Felucca))); PlaceItemIn(cont, 55, 100, MakeNewbie(new Lockpick(60000))); PlaceItemIn(cont, 60, 100, MakeNewbie(new Pickaxe())); PlaceItemIn(bank, 98, 124, cont); // End bag of treasure maps // Begin bag of raw materials cont = new Bag(); cont.Hue = 0x835; cont.Name = "Raw Materials Bag"; PlaceItemIn(cont, 30, 35, MakeNewbie(new DullCopperIngot(60000))); PlaceItemIn(cont, 37, 35, MakeNewbie(new ShadowIronIngot(60000))); PlaceItemIn(cont, 44, 35, MakeNewbie(new CopperIngot(60000))); PlaceItemIn(cont, 51, 35, MakeNewbie(new BronzeIngot(60000))); PlaceItemIn(cont, 58, 35, MakeNewbie(new GoldIngot(60000))); PlaceItemIn(cont, 65, 35, MakeNewbie(new AgapiteIngot(60000))); PlaceItemIn(cont, 72, 35, MakeNewbie(new VeriteIngot(60000))); PlaceItemIn(cont, 79, 35, MakeNewbie(new ValoriteIngot(60000))); PlaceItemIn(cont, 86, 35, MakeNewbie(new IronIngot(60000))); PlaceItemIn(cont, 29, 55, MakeNewbie(new Leather(60000))); PlaceItemIn(cont, 44, 55, MakeNewbie(new SpinedLeather(60000))); PlaceItemIn(cont, 59, 55, MakeNewbie(new HornedLeather(60000))); PlaceItemIn(cont, 74, 55, MakeNewbie(new BarbedLeather(60000))); PlaceItemIn(cont, 35, 100, MakeNewbie(new Cloth(60000))); PlaceItemIn(cont, 67, 89, MakeNewbie(new Board(60000))); PlaceItemIn(cont, 88, 91, MakeNewbie(new BlankScroll(60000))); PlaceItemIn(bank, 98, 169, cont); // End bag of raw materials // Begin bag of spell casting stuff cont = new Backpack(); cont.Hue = 0x480; cont.Name = "Spell Casting Stuff"; PlaceItemIn(cont, 45, 105, new Spellbook(UInt64.MaxValue)); Runebook runebook = new Runebook(10); runebook.CurCharges = runebook.MaxCharges; PlaceItemIn(cont, 105, 105, runebook); Item toHue = new BagOfReagents(65000); toHue.Hue = 0x2D; PlaceItemIn(cont, 45, 150, toHue); for (int i = 0; i < 9; ++i) { PlaceItemIn(cont, 45 + (i * 10), 75, MakeNewbie(new RecallRune())); } PlaceItemIn(bank, 78, 169, cont); // End bag of spell casting stuff }
public RangerPhoenixFlightSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book ) : base( caster, scroll, m_Info ) { m_Entry = entry; m_Book = book; }
public RecallSpell(Mobile caster, Item spellItem, RunebookEntry entry = null, Runebook book = null) : base(caster, spellItem) { m_Entry = entry; m_Book = book; }
public bool Drop(Mobile m, RuneCodexCategory cat, bool message) { if (m == null || m.Deleted || cat == null) { return(false); } if (cat.Entries == null || cat.Entries.Count == 0) { if (message) { m.SendMessage("The category \"{0}\" is empty.", cat.Name); } return(false); } var cost = CloneEntryChargeCost * cat.Entries.Count; if (!ConsumeCharges(cost)) { if (message) { m.SendMessage("This action requires {0:#,0} charge{1}.", cost, cost != 1 ? "s" : String.Empty); } return(false); } var entries = new Queue <RuneCodexEntry>(cat.Entries.Not(e => e == null)); var book = new Runebook(); var count = 1; while (entries.Count > 0) { var entry = entries.Dequeue(); if (entry == null) { continue; } book.Entries.Add( new RunebookEntry( entry.Location, entry.Location, entry.Name, BaseHouse.FindHouseAt(entry.Location, entry.Location, 16))); if (book.Entries.Count < 16 && entries.Count > 0) { continue; } m.AddToBackpack(book); if (entries.Count == 0) { continue; } book = new Runebook(); ++count; } if (message) { m.SendMessage( "You created {0:#,0} rune book{1} and consumed {2:#,0} charge{3} from the codex.", count, count != 1 ? "s" : String.Empty, cost, cost != 1 ? "s" : String.Empty); } return(true); }
public static void RetargetRunes_OnCommand(CommandEventArgs e) { ArrayList regionList = new ArrayList(); if (HaveRegions(e, regionList)) { try { LogHelper Logger = new LogHelper("retarget.log", e.Mobile, true); foreach (Item item in World.Items.Values) { if (item is RecallRune) { RecallRune rune = (RecallRune)item; for (int ix = 0; ix < regionList.Count; ix++) { if (rune.Marked && rune.TargetMap != null && (regionList[ix] as Region).Contains(rune.Target)) { object root = item.RootParent; if (root is Mobile) { if (((Mobile)root).AccessLevel < AccessLevel.GameMaster) { Logger.Log(LogType.Item, rune, rune.Description); rune.Target = new Point3D(0, 0, 0); } } else { Logger.Log(LogType.Item, rune, rune.Description); rune.Target = new Point3D(0, 0, 0); } } } } else if (item is Moonstone) { Moonstone stone = (Moonstone)item; for (int ix = 0; ix < regionList.Count; ix++) { if (stone.Marked && (regionList[ix] as Region).Contains(stone.Destination)) { object root = item.RootParent; if (root is Mobile) { if (((Mobile)root).AccessLevel < AccessLevel.GameMaster) { Logger.Log(LogType.Item, stone, stone.Description); stone.Destination = new Point3D(0, 0, 0); } } else { Logger.Log(LogType.Item, stone, stone.Description); stone.Destination = new Point3D(0, 0, 0); } } } } else if (item is Runebook) { Runebook book = (Runebook)item; for (int ix = 0; ix < regionList.Count; ix++) { for (int i = 0; i < book.Entries.Count; ++i) { RunebookEntry entry = (RunebookEntry)book.Entries[i]; if (entry.Map != null && (regionList[ix] as Region).Contains(entry.Location)) { object root = item.RootParent; if (root is Mobile) { if (((Mobile)root).AccessLevel < AccessLevel.GameMaster) { Logger.Log(LogType.Item, item, string.Format("{0}:{1}:{2}", i, entry.Description, book.Description)); entry.Location = new Point3D(0, 0, 0); } } else { Logger.Log(LogType.Item, item, string.Format("{0}:{1}:{2}", i, entry.Description, book.Description)); entry.Location = new Point3D(0, 0, 0); } } } } } } Logger.Finish(); e.Mobile.SendMessage("DONE search for runes."); return; } catch (Exception exc) { LogHelper.LogException(exc); e.Mobile.SendMessage("Exception in [Retarget -- see console."); System.Console.WriteLine("Exception in [Retarget: {0}", exc.Message); System.Console.WriteLine(exc.StackTrace); return; } } else { e.Mobile.SendMessage("Usage: [Retarget <-regionName|-type|-point|-RegionUID> <name|type|point|uid>"); } }