当前位置: 首页>>代码示例>>C#>>正文


C# Items.Runebook类代码示例

本文整理汇总了C#中Server.Items.Runebook的典型用法代码示例。如果您正苦于以下问题:C# Runebook类的具体用法?C# Runebook怎么用?C# Runebook使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Runebook类属于Server.Items命名空间,在下文中一共展示了Runebook类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GateTravelSpell

 public GateTravelSpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book)
     : base(caster, scroll, m_Info)
 {
     m_Entry = entry;
     m_Book = book;
     m_Scroll = scroll;
 }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:7,代码来源:GateTravel.cs

示例2: RunebookSellingGump

        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;
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:42,代码来源:RunebookSellingGump.cs

示例3: RunebookGump

        public RunebookGump( Mobile from, Runebook book )
            : base(150, 200)
        {
            m_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 );
            }
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:21,代码来源:RunebookGump.cs

示例4: Dupe

        public override Item Dupe( int amount )
        {
            Runebook book = new Runebook();

            book.m_Level = m_Level;
            book.m_CurCharges = m_CurCharges;
            book.m_MaxCharges = m_MaxCharges;
            book.m_DefaultIndex = m_DefaultIndex;
            book.m_Description = m_Description;
            book.m_Level = m_Level;
            book.LootType = this.LootType;

            for( int i = 0; i < m_Entries.Count; i++ )
            {
                RunebookEntry entry = m_Entries[i] as RunebookEntry;

                book.m_Entries.Add( new RunebookEntry( entry.Location, entry.Map, entry.Description, entry.House ) );
            }

            return base.Dupe( book, amount );
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:21,代码来源:Runebook.cs

示例5: RecallSpell

		public RecallSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book ) : base( caster, scroll, m_Info )
		{
			m_Entry = entry;
			m_Book = book;
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:5,代码来源:Recall.cs

示例6: DisplayBookLocations

		private void DisplayBookLocations(Runebook runebook)
		{

			if (runebook == null)
				return;

			for (int i = 0; i < runebook.Entries.Count; i++)
			{
				RunebookEntry entry = runebook.Entries[i] as RunebookEntry;
				string locationtext = entry.Description;
				if (locationtext == null || locationtext.Length < 1)
					locationtext = String.Format("({0}, {1}, {2})", entry.Location.X, entry.Location.Y, entry.Location.Z);
				string[] keywordargs = ParseString(locationtext, 15, ":");
				//Console.WriteLine("Args={0}", keywordargs.Length);
				string runesecurity = null;
				if (keywordargs != null && keywordargs.Length > 1)
				{
					locationtext = keywordargs[0];
					runesecurity = keywordargs[1];
				}
				if (locationtext.Length > 25)
					locationtext = locationtext.Substring(0, 25);
				if (AccessAllowed(runesecurity, m_Mobile))
				{
					AddRadio(210, 35 + (i * 25), 210, 211, false, m_selected * 1000 + i);
					AddLabel(235, 35 + (i * 25), MapHues[entry.Map.MapIndex], locationtext);
				}
				else
					AddLabel(235, 35 + (i * 25), 0, "--Not Accessable--");
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:31,代码来源:MoongateLibrary.cs

示例7: SacredJourneySpell

 public SacredJourneySpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book)
     : base(caster, scroll, m_Info)
 {
     this.m_Entry = entry;
     this.m_Book = book;
 }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:6,代码来源:SacredJourney.cs

示例8: FillBankbox

        private static void FillBankbox( Mobile m )
        {
            BankBox bank = m.BankBox;

            if ( bank == null )
                return;

            bank.MaxItems = int.MaxValue;

            // The new AOS bankboxes don't have powerscrolls, they are automatically 'applied':

            for ( int i = 0; i < PowerScroll.Skills.Length; ++i )
                m.Skills[PowerScroll.Skills[i]].Cap = 120.0;

            m.StatCap = 250;

            Container cont;
            Container cont2;

            // Begin box of money
            cont = new WoodenBox();
            cont.ItemID = 0xE7D;
            cont.Hue = 0x489;

            PlaceItemIn( cont, 17, 52, new BankCheck( 1000000 ) );
            PlaceItemIn( cont, 28, 52, new BankCheck( 1000000 ) );

            PlaceItemIn( cont, 17, 91, new Factions.Silver( 9000 ) );
            PlaceItemIn( cont, 34, 91, new Gold( 60000 ) );

            PlaceItemIn( bank, 38, 142, cont );
            // End box of money

            // Begin box of Magery Items
            cont = new WoodenBox();
            cont.ItemID = 0xE7D;
            cont.Name = "Magery Items";
            cont.Hue = 1195;

            // Begin bag of spell casting stuff
            cont2 = new Backpack();
            cont2.Hue = 0x480;
            cont2.Name = "Spell Casting Stuff";

            PlaceItemIn( cont2, 45, 107, new Spellbook( UInt64.MaxValue ) );
            PlaceItemIn( cont2, 64, 107, new NecromancerSpellbook( (UInt64) 0xFFFF ) );
            PlaceItemIn( cont2, 83, 107, new BookOfChivalry( (UInt64) 0x3FF ) );
            PlaceItemIn( cont2, 102, 107, new BookOfBushido() ); //Default ctor = full
            PlaceItemIn( cont2, 121, 107, new BookOfNinjitsu() ); //Default ctor = full
            PlaceItemIn( cont2, 102, 149, new SpellweavingSpellbook( (UInt64) 0xFFFF ) );
            PlaceItemIn( cont2, 121, 149, new MysticismSpellbook( (UInt64) 0xFFFF ) );

            Runebook runebook = new Runebook( 20 );
            runebook.CurCharges = runebook.MaxCharges;
            PlaceItemIn( cont2, 141, 107, runebook );

            Item toHue = new BagOfReagents( 5000 );
            toHue.Hue = 0x2D;
            PlaceItemIn( cont2, 45, 128, toHue );

            toHue = new BagOfNecroReagents( 3000 );
            toHue.Hue = 0x488;
            PlaceItemIn( cont2, 64, 128, toHue );

            toHue = new BagOfMysticReagents( 3000 );
            toHue.Hue = 0x48F;
            PlaceItemIn( cont2, 141, 128, toHue );

            for ( int i = 0; i < 6; ++i )
                PlaceItemIn( cont2, 45 + ( i * 10 ), 74, new RecallRune() );

            PlaceItemIn( cont, 47, 91, cont2 );
            // End bag of spell casting stuff

            // Begin bag of potion kegs
            cont2 = new Backpack();
            cont2.Name = "Various Potion Kegs";

            PlaceItemIn( cont2, 45, 149, MakePotionKeg( PotionEffect.CureGreater, 0x2D ) );
            PlaceItemIn( cont2, 69, 149, MakePotionKeg( PotionEffect.HealGreater, 0x499 ) );
            PlaceItemIn( cont2, 93, 149, MakePotionKeg( PotionEffect.PoisonDeadly, 0x46 ) );
            PlaceItemIn( cont2, 117, 149, MakePotionKeg( PotionEffect.RefreshGreater, 0x21 ) );
            PlaceItemIn( cont2, 141, 149, MakePotionKeg( PotionEffect.ExplosionGreater, 0x74 ) );

            PlaceItemIn( cont2, 93, 82, new Bottle( 1000 ) );

            PlaceItemIn( cont, 78, 91, cont2 );
            // End bag of potion kegs

            GoldRing ring = new GoldRing();
            ring.Name = "Ring Of Arcane Tactics";
            ring.Attributes.CastRecovery = 3;
            ring.Attributes.CastSpeed = 1;
            PlaceItemIn( cont, 109, 90, ring );

            GoldBracelet bracelet = new GoldBracelet();
            bracelet.Name = "Farmer's Band Of Mastery";
            bracelet.Attributes.CastRecovery = 3;
            bracelet.Attributes.CastSpeed = 1;
            PlaceItemIn( cont, 139, 95, bracelet );
//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:TestCenter.cs

示例9: FillBankAOS


//.........这里部分代码省略.........
            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 RecallRune(10) );
            //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 BagOfReagents(50);
            toHue.Hue = 0x2D;
            PlaceItemIn(cont, 45, 150, toHue);

            toHue = new BagOfNecroReagents(50);
            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);

        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:101,代码来源:CharacterCreation.cs

示例10: AddRunebook

		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;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:44,代码来源:RuneCodex.cs

示例11: RangerPhoenixFlightSpell

 public RangerPhoenixFlightSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book )
     : base(caster, scroll, m_Info)
 {
     m_Entry = entry;
     m_Book = book;
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:6,代码来源:PhoenixFlightSpell.cs

示例12: AddRunebook

		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(
				(e, x, y) =>
				{
					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;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:69,代码来源:RuneCodexCategory.cs

示例13: UndeadTravelByPoisonSpell

 public UndeadTravelByPoisonSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book )
     : base(caster, scroll, m_Info)
 {
     m_Entry = entry;
     m_Book = book;
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:6,代码来源:TravelByPoison.cs

示例14: InternalTimer

            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;
            }
开发者ID:zerodowned,项目名称:angelisland,代码行数:10,代码来源:Recall.cs

示例15: StarterBagMageGargoyle

        public StarterBagMageGargoyle()
        {
            Container cont;
            this.Name = "Starter Bag - Mage";

            cont = new Bag();
            cont.Name = "PowerScrolls Bag";
            // Power Scrolls
            PlaceItemIn(cont, 30, 35, new PowerScroll(SkillName.Meditation, 105));
            PlaceItemIn(cont, 60, 35, new PowerScroll(SkillName.Magery, 105));
            PlaceItemIn(cont, 90, 35, new PowerScroll(SkillName.EvalInt, 105));
            PlaceItemIn(cont, 30, 68, new PowerScroll(SkillName.Necromancy, 105));
            PlaceItemIn(cont, 45, 68, new PowerScroll(SkillName.SpiritSpeak, 105));
            PlaceItemIn(this, 0, 0, cont);
            for (int i = 0; i < cont.Items.Count; i++)
            {
                cont.Items[i].LootType = LootType.Blessed;
            }

            cont = new Bag();
            cont.Name = "Gear Bag";
            // Armor
            PlaceItemIn(cont, 30, 35, new GargishLeatherArms());
            PlaceItemIn(cont, 30, 68, new GargishLeatherChest());
            PlaceItemIn(cont, 45, 68, new GargishLeatherKilt());
            PlaceItemIn(cont, 45, 68, new GargishPlateWingArmor());
            PlaceItemIn(cont, 45, 68, new GargishRobe());
            // Jewelry
            PlaceItemIn(cont, 90, 68, new GargishNecklace());
            PlaceItemIn(cont, 30, 118, new GargishEarrings());
            PlaceItemIn(cont, 60, 118, new GargishRing());
            PlaceItemIn(cont, 90, 100, new GargishBracelet());
            PlaceItemIn(this, 50, 0, cont);
            for (int i = 0; i < cont.Items.Count; i++)
            {
                BaseArmor armor = cont.Items[i] as BaseArmor;
                BaseJewel jewel = cont.Items[i] as BaseJewel;
                BaseClothing clothes = cont.Items[i] as BaseClothing;
                if (armor != null)
                {
                    armor.Attributes.LowerRegCost = 12;
                    armor.Hue = 1154;
                    armor.Insured = false;
                    armor.TimesImbued = 50;
                    armor.LootType = LootType.Blessed;
                    armor.Weight = 0;             
                }
                else if (jewel != null)
                {
                    jewel.Attributes.LowerRegCost = 12;
                    jewel.Attributes.RegenMana = 1;
                    jewel.Hue = 1152;
                    jewel.Insured = false;
                    jewel.TimesImbued = 50;
                    jewel.LootType = LootType.Blessed;
                }
                else if (clothes != null)
                {
                    clothes.Attributes.LowerRegCost = 12;
                    clothes.LootType = LootType.Blessed;
                    clothes.TimesImbued = 50;
                }
            }

            cont = new Bag();
            cont.Name = "Book Bag";
            PlaceItemIn(cont, 30, 35, new Spellbook());
            PlaceItemIn(cont, 60, 35, new NecromancerSpellbook());
            Runebook runebook = new Runebook(5);
            runebook.CurCharges = runebook.MaxCharges;
            PlaceItemIn(cont, 90, 35, runebook);
            for (int i = 0; i < 3; ++i)
                PlaceItemIn(cont, 45 + (i * 10), 75, new RecallRune());
            PlaceItemIn(this, 100, 0, cont);
            for (int i = 0; i < cont.Items.Count; i++)
            {
                Spellbook spellBook = cont.Items[i] as Spellbook;

                if (spellBook != null)
                {
                    spellBook.SkillBonuses.SetValues(0, SkillName.Meditation, 100);
                    spellBook.Attributes.CastSpeed = 1;
                    spellBook.Hue = 1152;
                }
            }
        }
开发者ID:Jascen,项目名称:UOSmart,代码行数:86,代码来源:StarterBagMageGargoyle.cs


注:本文中的Server.Items.Runebook类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。