Exemplo n.º 1
0
        public override void InitialAnimation()
        {
            Caster.RevealingAction();
            (Caster as IKhaerosMobile).Fizzled = false;

            if (!Caster.Mounted)
                Caster.Animate(17, 5, 1, true, false, 0);

            Caster.PlaySound(0x24A);

            if (!String.IsNullOrEmpty(m_Emote))
                Caster.DoSpeech("*" + m_Emote + "*", new int[] { -1 }, MessageType.Emote, Caster.EmoteHue);

            if (!String.IsNullOrEmpty(m_Speech))
                Caster.DoSpeech(m_Speech, new int[] { -1 }, MessageType.Regular, Caster.SpeechHue);

            if ((Caster as IKhaerosMobile).StunnedTimer == null)
            {
                XmlFreeze freeze = new XmlFreeze(1.0);
                freeze.Name = "icast";
                XmlAttach.AttachTo(Caster, freeze);
            }
        }
Exemplo n.º 2
0
        public void FinishPray(Mobile from)
        {
            from.Mana -= ManaCost;
            IKhaerosMobile caster = from as IKhaerosMobile;
            caster.NextFeatUse = DateTime.Now + TimeSpan.FromSeconds(Math.Max(2, Convert.ToInt32((60 - caster.Level) * 0.2)));

            if (caster.StunnedTimer == null)
            {
                XmlFreeze freeze = new XmlFreeze(1.0);
                freeze.Name = "fcast";
                XmlAttach.AttachTo(from, freeze);
            }

            if (Caster.AccessLevel < AccessLevel.GameMaster && caster is PlayerMobile)
                ((PlayerMobile)Caster).SpeedHack = false;
        }
Exemplo n.º 3
0
        public virtual void InitialAnimation()
        {
            if( BadCasting )
                return;

            PlayerMobile pm = m_Caster as PlayerMobile;
            IKhaerosMobile caster = m_Caster as IKhaerosMobile;
            m_Caster.RevealingAction();
            caster.Fizzled = false;

            if (pm.CanBeMage == true && pm.RawInt >=100 && IsMageSpell)
                return;

            if( !m_Caster.Mounted && IsMageSpell )
                m_Caster.Animate( 16, 7, 1, true, false, 0 );

            else if( !m_Caster.Mounted )
                m_Caster.Animate( 17, 5, 1, true, false, 0 );

            else if( IsMageSpell )
                m_Caster.Emote( "*starts casting a spell*" );

            else
                m_Caster.Emote( "*starts casting a spell*" );

            if( caster.StunnedTimer == null )
            {
                XmlFreeze freeze = new XmlFreeze( 1.0 );
                freeze.Name = "icast";
                XmlAttach.AttachTo( m_Caster, freeze );
            }
        }
			public static XmlAttachment NEWATTACHMENT(TriggerObject trigObj, string attachmenttype, string name)
			{
				attachmenttype = attachmenttype.ToLower().Trim();

				XmlAttachment attachment = null;

				switch (attachmenttype)
				{
					case "xmlvalue":
						attachment = new XmlValue("", 0);
						break;
					case "xmllocalvariable":
						attachment = new XmlLocalVariable("");
						break;
					case "xmlscript":
						attachment = new XmlScript();
						break;
					case "xmlteam":
						attachment = new XmlTeam();
						break;
					case "xmldouble":
						attachment = new XmlDouble("", 0.0);
						break;
					case "xmlgroup":
						attachment = new XmlGroup();
						break;
					case "xmlslayer":
						attachment = new XmlSlayer("orcslaying", name);
						break;
					case "xmldate":
						attachment = new XmlDate("");
						break;
					case "xmlcorpseaction":
						attachment = new XmlCorpseAction();
						break;
					case "xmldeathaction":
						attachment = new XmlDeathAction();
						break;
					case "xmluse":
						attachment = new XmlUse();
						break;
					case "xmlonhit":
						attachment = new XmlOnHit();
						break;
					case "xmladdfame":
						attachment = new XmlAddFame(0);
						break;
					case "xmladdkarma":
						attachment = new XmlAddKarma(0);
						break;
					case "xmldex":
						attachment = new XmlDex();
						break;
					case "xmldialog":
						attachment = new XmlDialog();
						break;
					case "xmlenemymastery":
						attachment = new XmlEnemyMastery("");
						break;
					case "xmlfire":
						attachment = new XmlFire(1);
						break;
					case "xmlfreeze":
						attachment = new XmlFreeze();
						break;
					case "xmlhue":
						attachment = new XmlHue(0);
						break;
					case "xmllifedrain":
						attachment = new XmlLifeDrain(1);
						break;
					case "xmllightning":
						attachment = new XmlLightning(1);
						break;
					case "xmlmagicword":
						attachment = new XmlMagicWord();
						break;
					case "xmlmanadrain":
						attachment = new XmlManaDrain(1);
						break;
					case "xmlmessage":
						attachment = new XmlMessage("");
						break;
					case "xmlsaveitem":
						attachment = new XmlSaveItem();
						break;
					case "xmlskill":
						attachment = new XmlSkill("", "wrestling");
						break;
					case "xmlsound":
						attachment = new XmlSound();
						break;
					case "xmlstamdrain":
						attachment = new XmlStamDrain(1);
						break;
					case "xmlstr":
						attachment = new XmlStr();
						break;
					case "xmlint":
						attachment = new XmlInt();
						break;
				}

				if (attachment == null)
				{
					throw new UberScriptException("NEWATTACHMENT error: " + attachmenttype + " is not an available xmlattachment!");
				}

				if (attachment.Name == "" && name == null) // those attachments that require a name
				{
					return attachment;
				}

				attachment.Name = name;

				return attachment;
			}
Exemplo n.º 5
0
        public virtual void FinishCasting()
        {
            if( BadCasting )
                return;

            IKhaerosMobile caster = m_Caster as IKhaerosMobile;
            caster.NextFeatUse = DateTime.Now + TimeSpan.FromSeconds( Math.Max( 2, Convert.ToInt32( ( 60 - caster.Level ) * 0.2 ) ) );

            if( caster.StunnedTimer == null )
            {
                XmlFreeze freeze = new XmlFreeze( 1.0 );
                freeze.Name = "fcast";
                XmlAttach.AttachTo( m_Caster, freeze );
            }

            if( !Success )
                Fizzled();

            if( Caster.AccessLevel < AccessLevel.GameMaster && caster is PlayerMobile )
                ( (PlayerMobile)Caster ).SpeedHack = false;
        }