QUOTE |
STEP 5: (recommended but not required) -------------------------------------- To take advantage of spawner triggering on skill use you must change 4 lines in Scripts/Misc/SkillCheck.cs (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the SkillTriggering features simply wont do anything). Near the beginning of the file at line 73 change these lines. public static void Initialize() { Mobile.SkillCheckLocationHandler = new SkillCheckLocationHandler( Mobile_SkillCheckLocation ); Mobile.SkillCheckDirectLocationHandler = new SkillCheckDirectLocationHandler( Mobile_SkillCheckDirectLocation ); Mobile.SkillCheckTargetHandler = new SkillCheckTargetHandler( Mobile_SkillCheckTarget ); Mobile.SkillCheckDirectTargetHandler = new SkillCheckDirectTargetHandler( Mobile_SkillCheckDirectTarget ); } to this public static void Initialize() { // Begin mod to enable XmlSpawner skill triggering Mobile.SkillCheckLocationHandler = new SkillCheckLocationHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckLocation ); Mobile.SkillCheckDirectLocationHandler = new SkillCheckDirectLocationHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckDirectLocation ); Mobile.SkillCheckTargetHandler = new SkillCheckTargetHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckTarget ); Mobile.SkillCheckDirectTargetHandler = new SkillCheckDirectTargetHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckDirectTarget ); // End mod to enable XmlSpawner skill triggering } |
QUOTE |
- added spawner triggering on skill use. By setting the SkillTrigger property to a string of the form "skillname[+/-][,minval,maxval]" the spawner can trigger when the named skill is used and optionally when the skill value falls within the specified range and is either successful (+) or unsuccessful (-). If +/- is omitted then it will trigger on either success or failure - simply using the skill is enough. For example, specifying a SkillTrigger string of "Hiding" would trigger the spawner whenever the hiding skill was used within the specified ProximityRange of the spawner, regardless of skill level or whether or not it was successful. Using "Hiding,+" would trigger whenever the skill was successfully used. "Hiding,50,100" whenever the skill was used and the user had a skill level between 50 and 100 (inclusive). "Hiding,-,50,100" whenever the skill failed and the user had a skill level between 50 and 100. Note, the skill names are case sensitive. Several examples of skill triggering are given in xmlextras (skilltrigger1-4.xml). Skilltrigger3.xml gives an example of how to spawn mobs or give special drops on mining based on skill level. Skilltrigger4.xml demonstrates triggering on failed hiding. Skilltrigger1 and 2 trigger on musicianship. (Thanks to MarkC777 and Nix4 for the suggestion). - added the property keyword "TRIGSKILL,name|value|base|cap" that returns information on the triggered skill for use in property testing and property value assignment. See examples of this in the skilltrigger xml files. |
QUOTE |
- added new xml examples skilltrigger5.xml and equipper.xml demonstrating the new features. Equipper.xml spawns a ratman, gives him a random male name, and equips him with a random level 5 magical weapon with a random female name, and a hitfireball 100% weaponattribute which you will notice if you fight him. Skilltrigger5.xml shows how the TRIGSKILL keyword can be used with string substitution or to assign other properties based upon skill base, value, cap, or name. It is triggered by using the Musicianship skill within the trigger range of the spawner and sends a message displaying skill information using string substitution, and spawns gold in an amount based on the skill value using property assignment. |