Full Version : XmlSkill
xmlspawner >>XMLSpawner - Attachments >>XmlSkill
<< Prev | Next >>
Datguy- 02-11-2008
What is the syntax to add xmlskill attachment, the script is
public XmlSkill(string name, string skill, int value)
[addatt xmlskill noideawhatnameis swords 150
adds the skill to a player but not the attachment, what's the name thing for, I'm guessing it's for the att name but no matter what I put in there it's not working
ArteGordon- 02-11-2008
when you add the attachment to a mob or player, a standard skill mod is applied for the specified duration (30 mins default) and the attachment is immediately removed. Because it uses the standard skill mod, the attachment is no longer needed after it is applied. It will still last the specified duration.
If you apply it to a weapon or armor, the attachment stays on the item.
If you want to specify the duration use this form
public XmlSkill(string name, string skill, int value, double duration)
where the duration is in minutes.
The name doesnt matter when you apply it to mobs, only to armor or weapons.
from xmlspawner2.txt

QUOTE
XmlSkill - When applied to a mob, allows the specified skill to be temporarily modified. A word can also be specified which is required to activate the modification. If applied to a weapon or armor, the item must be equipped when the word is spoken to activate the skill mod. The skill, value, triggering word, and duration can be specified.

Datguy- 05-04-2008
Another along same lines
Im adding xmlskills attachments on food, or want to add a bit of flare to cooking. What I find is that xmkskills stack

CODE
public override void OnDoubleClick(Mobile from) { if (Eat(from)) { if (this.SkillVal > 0)
{
if (this.SkillTime == 0)
this.SkillTime = this.FillFactor * 15;//If the timer is not set then set based on Fillfactor to 15 minutes
XmlAttach.AttachTo(from, new XmlSkill(Name, Skill, SkillVal, SkillTime)); //+10 int for 900 seconds (15 minutes)
}
from.FixedEffect(0x375A, 10, 15);
from.PlaySound(0x1E7);
}
}

It works great but if they eat a piece & they're not full, they can eat another & gain another +skill of the same one, so in effect they could add loads to 1 skill unless I set the fillfactor to 20 or something.
With xmldex & other statmods, it does not stack, they can eat eat & they just get 1 increase till timer runs out(what I want)
Idea's