Exemple #1
0
 public XmlUseTarget(int range, object objectused, XmlUse xa)
     : base(range, true, TargetFlags.None)
 {
     m_objectused = objectused;
     m_xa         = xa;
     CheckLOS     = false;
 }
Exemple #2
0
        private void TryToTarget(Mobile from, object target, XmlUse xa)
        {
            if (from == null)
            {
                return;
            }

            ExecuteActions(from, target, TargetingAction);

            if (xa != null)
            {
                from.Target = new XmlUseTarget(xa.MaxTargetRange, target, xa);
            }
        }
Exemple #3
0
 public XmlUseTarget(int range, object objectused, XmlUse xa)
     : base(range, true, TargetFlags.None)
 {
     this.m_objectused = objectused;
     this.m_xa = xa;
     this.CheckLOS = false;
 }
Exemple #4
0
        private void TryToTarget(Mobile from, object target, XmlUse xa)
        {
            if (from == null)
                return;

            this.ExecuteActions(from, target, this.TargetingAction);

            if (xa != null)
            {
                from.Target = new XmlUseTarget(xa.MaxTargetRange, target, xa);
            }
        }
			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;
			}
Exemple #6
0
        private void TryToTarget(Mobile from, object target, XmlUse xa)
        {
            if (from == null) return;

            ExecuteActions(from, target, TargetingAction);

            from.Target = new XmlUseTarget(target, xa);
        }
Exemple #7
0
 public XmlUseTarget(object objectused, XmlUse xa)
     : base(30, true, TargetFlags.None)
 {
     m_objectused = objectused;
     m_xa = xa;
     CheckLOS = false;
 }