Example #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            m_ShotType  = (RuneBowShotType)reader.ReadInt();
            m_BuildType = (RuneBowBuildType)reader.ReadInt();
            m_Runes     = (RuneBowRunes)reader.ReadInt();
            m_Title     = reader.ReadString();
        }
Example #2
0
        public RuneBow(RuneBowShotType shot, RuneBowBuildType build, RuneBowRunes runes) : base(0x26C3)
        {
            ShotType  = shot;
            BuildType = build;
            Runes     = runes;

            Name     = "Rune Bow";
            LootType = LootType.Blessed;
            UpdateTitle();

            Weight = 6.0;
            Attributes.SpellDamage = 25;
        }
Example #3
0
		public RuneBow( RuneBowShotType shot, RuneBowBuildType build, RuneBowRunes runes ) : base( 0x26C3 )
		{
			ShotType = shot;
			BuildType = build;
			Runes = runes;

			Name = "Rune Bow";
			LootType = LootType.Blessed;
			UpdateTitle();

			Weight = 6.0;
			Attributes.SpellDamage = 25;
		}
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 0 || sender.Mobile == null || sender.Mobile.Backpack == null)
            {
                return;
            }

            #region ChoiceCheck
            RuneBowShotType  shot  = RuneBowShotType.ForceShot;
            RuneBowBuildType build = RuneBowBuildType.Balanced;
            RuneBowRunes     runes = RuneBowRunes.Draconic;
            int check = 0;

            if (info.IsSwitched((int)Buttons.ForceRadio))
            {
                shot = RuneBowShotType.ForceShot; ++check;
            }
            if (info.IsSwitched((int)Buttons.FireRadio))
            {
                shot = RuneBowShotType.FireBlast; ++check;
            }
            if (info.IsSwitched((int)Buttons.ColdRadio))
            {
                shot = RuneBowShotType.ColdBolts; ++check;
            }
            if (info.IsSwitched((int)Buttons.AcidRadio))
            {
                shot = RuneBowShotType.AcidShot; ++check;
            }
            if (info.IsSwitched((int)Buttons.EnergyRadio))
            {
                shot = RuneBowShotType.EnergyStorm; ++check;
            }

            if (check > 1)
            {
                sender.Mobile.SendMessage("You can only choose one type of rune word.");
                return;
            }

            check = 0;

            if (info.IsSwitched((int)Buttons.AccurateRadio))
            {
                build = RuneBowBuildType.Accurate; ++check;
            }
            if (info.IsSwitched((int)Buttons.BalancedRadio))
            {
                build = RuneBowBuildType.Balanced; ++check;
            }
            if (info.IsSwitched((int)Buttons.PowerfulRadio))
            {
                build = RuneBowBuildType.Powerful; ++check;
            }
            if (info.IsSwitched((int)Buttons.QuickRadio))
            {
                build = RuneBowBuildType.Quick; ++check;
            }

            if (check > 1)
            {
                sender.Mobile.SendMessage("You can only choose one design to build your rune bow.");
                return;
            }

            check = 0;

            if (info.IsSwitched((int)Buttons.DraconicRadio))
            {
                runes = RuneBowRunes.Draconic; ++check;
            }
            if (info.IsSwitched((int)Buttons.ChampionRadio))
            {
                runes = RuneBowRunes.Champion; ++check;
            }
            if (info.IsSwitched((int)Buttons.FaithRadio))
            {
                runes = RuneBowRunes.Faith; ++check;
            }
            if (info.IsSwitched((int)Buttons.ParagonRadio))
            {
                runes = RuneBowRunes.Paragon; ++check;
            }
            if (info.IsSwitched((int)Buttons.PeerlessRadio))
            {
                runes = RuneBowRunes.Peerless; ++check;
            }

            if (check > 1)
            {
                sender.Mobile.SendMessage("You can only choose one type of rune word.");
                return;
            }
            #endregion

            int items = sender.Mobile.Backpack.ConsumeTotal(
                new Type[]
            {
                typeof(Crossbow),
                typeof(HeavyCrossbow),
                typeof(RepeatingCrossbow),
                typeof(ArcaneGem),
                typeof(PowerCrystal),

                typeof(BlackPearl),
                typeof(Bloodmoss),
                typeof(Garlic),
                typeof(Ginseng),
                typeof(MandrakeRoot),
                typeof(Nightshade),
                typeof(SulfurousAsh),
                typeof(SpidersSilk),

                typeof(BatWing),
                typeof(GraveDust),
                typeof(DaemonBlood),
                typeof(NoxCrystal),
                typeof(PigIron),

                typeof(ClockParts),
                typeof(SextantParts),
                typeof(Gears),
                typeof(Springs),
                typeof(IronIngot)
            },
                new int[]
            {
                1, 1, 1, 10, 2,
                200, 200, 200, 200, 200, 200, 200, 200,
                200, 200, 200, 200, 200,
                1, 1, 5, 5, 10
            }
                );

            if (items != -1)
            {
                sender.Mobile.CloseGump(typeof(FailedCraftGump));
                sender.Mobile.SendGump(new FailedCraftGump(m_RequiredMessage));
                return;
            }

            sender.Mobile.SendMessage(1192, "You create a new Rune Bow");
            sender.Mobile.Skills[SkillName.ItemID].Base -= 25.0;
            sender.Mobile.Backpack.DropItem(new RuneBow(shot, build, runes));
        }
Example #5
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			m_ShotType = (RuneBowShotType)reader.ReadInt();
			m_BuildType = (RuneBowBuildType)reader.ReadInt();
			m_Runes = (RuneBowRunes)reader.ReadInt();
			m_Title = reader.ReadString();
		}