Functions for working with mobile's attributes/skills. 03/19/2009 const ATTRIBUTE_LOCK_UP := 0; const ATTRIBUTE_LOCK_DOWN := 1; const ATTRIBUTE_LOCK_LOCKED := 2; const ATTRIBUTE_MAX_BASE := 60000; const ATTRIBUTE_PRECISION_NORMAL := 0; const ATTRIBUTE_PRECISION_TENTHS := 1; CheckSkill( character, skillid_or_attrname, difficulty, points ) NOTE: Calls the Syshook script CheckSkill. If it doesn't exist, always returns false. Return value of CheckSkill syshook. "Invalid parameter" "No such skill" Character AlterAttributeTemporaryMod( character, attrname, delta_tenths ) Changes the temporary modification value for attribute named "attrname". delta_tenths is in tenths, obviously. So "1" would increase the temp mod by 0.1 points. 1 on success or Error "Invalid parameter type" including if attrname was not found as an attribute "New modifier value is out of range" Character attributes.cfg GetAttributeName( alias_name ) Returns the real attribute name from an alias String "Invalid parameter" Character GetAttribute( character, attrname, precision := ATTRIBUTE_PRECISION_NORMAL ) Returns the current effective value for the specified attribute on character. Integer "Effective" attribute value on success (base + temporary mod + intrinsic mod) or Error. Will return the precision in tenths if ATTRIBUTE_PRECISION_TENTHS is specified. "Invalid parameter type" including if attrname was not found as an attribute Character attributes.cfg GetAttributeBaseValue( character, attrname ) Returns the base value for the specified attribute on character. Integer "Base" attribute value on success or Error "Invalid parameter type" including if attrname was not found as an attribute Character attributes.cfg GetAttributeIntrinsicMod( character, attrname ) Returns the intrinsic value for the specified attribute on character. You set intrinsic Mod via exported GetIntrinsicModFunction in attributes.cfg Integer "Intrinsic" attribute value on success or Error "Invalid parameter type" including if attrname was not found as an attribute Character attributes.cfg GetAttributeTemporaryMod( character, attrname ) Returns the temporary modification value for the specified attribute on character. Integer "temporary" attribute value on success or Error "Invalid parameter type" including if attrname was not found as an attribute Character attributes.cfg SetAttributeBaseValue( character, attrname, basevalue_tenths ); // obsoletes SetRawSkill Sets the "base" value of "attrname" on "character" 1 on success "Invalid parameter type" Character attributes.cfg SetAttributeTemporaryMod( character, attrname, tempmod_tenths ); // obsoletes mob.strength_mod etc Sets the "temporary modification" value of "attrname" on "character" 1 on success "Invalid parameter type" including if attrname was not found as an attribute Character attributes.cfg BaseSkillToRawSkill( baseskill ) Converts an old-style "base skill" value to old-style "raw skill" value. Notes: OBSOLETE Raw skill value representation "Invalid parameter type" RawSkillToBaseSkill( rawskill ) Converts an old-style "raw skill" value to old-style "base skill" value. Notes: OBSOLETE Base skill value representation "Invalid parameter type" GetAttributeLock( character, attrname ) Gets the lockstate of given character and attribute name. This works for any attribute. attribute.em constants for return value: const ATTRIBUTE_LOCK_UP := 0; const ATTRIBUTE_LOCK_DOWN := 1; const ATTRIBUTE_LOCK_LOCKED := 2; Integer "Invalid parameter type" Character attributes.cfg SetAttributeLock( character, attrname, lockstate ) Sets the lockstate of given character and attribute name This works for any attribute. attribute.em constants for lockstate: const ATTRIBUTE_LOCK_UP := 0; const ATTRIBUTE_LOCK_DOWN := 1; const ATTRIBUTE_LOCK_LOCKED := 2; 1 on sucess "Invalid parameter type" Character attributes.cfg GetAttributeDefaultCap( attrname ) Gets the default cap value of given attribute name. This works for any attribute. Integer default cap value in tenths "Invalid parameter type" Character attributes.cfg GetAttributeCap( character, attrname ) Gets the current cap value of given attribute name. This works for any attribute. Integer current cap value in tenths "Invalid parameter type" Character attributes.cfg SetAttributeCap( character, attrname, capvalue ) Sets the current cap value of given attribute name. This works for any attribute. attribute.em constants for capvalue: const ATTRIBUTE_MAX_BASE := 60000; 1 on success "Invalid parameter type" Character attributes.cfg