stats.inc Functions |
|
Includes | |
The following inc files are included in stats.inc | |
none | |
AP_GetStat |
|
Parameters | |
(mobile, stat_name) | |
Name | Type |
mobile | Mobile reference to retrieve the points from. |
stat_name | Name of the stat to retrieve the points for. |
Explanation | |
Retrieves the
base value of the stat plus its mod value. |
|
Return Values | |
Returns an integer. | |
AP_GetTrueStat |
|
Parameters | |
(mobile, stat_name) | |
Name | Type |
mobile | Mobile reference to retrieve the points from. |
stat_name | Name of the stat to retrieve the points for. |
Explanation | |
Retrieves the base value of the stat and turns it into a usable number. | |
Return Values | |
Returns a double. | |
AP_GetStatMod |
|
Parameters | |
(mobile, stat_name ) | |
Name | Type |
mobile | Mobile reference to retrieve the points from. |
stat_name | Name of the stat to retrieve the modifier points for. |
Explanation | |
Retrieves the base value of the stat mod and turns it into a usable number. | |
Return Values | |
Returns a double | |
AP_SetTrueStat |
|
Parameters | |
(mobile, stat_name, points) | |
Name | Type |
mobile | Mobile reference to set the points on. |
stat_name | Name of the stat to set the points on. |
points | Number of points to set the stat at. |
Explanation | |
Sets the value of the stat. Example: AP_SetTrueStat(mobile, "strength", 44.5) | |
Return Values | |
Returns a double. | |
AP_SetStatMod |
|
Parameters | |
(mobile, stat_name, points) | |
Name | Type |
mobile | Mobile reference to set the modifier points on. |
stat_name | Name of the stat to set the modifier points on. |
points | Number of points to set the modifier stat at. |
Explanation | |
Sets the modifier value for the stat. Example: AP_SetStatMod(mobile, "strength", -15.3) | |
Return Values | |
Returns a double. | |
AP_ModifyStatMod |
|
Parameters | |
(mobile, stat_name, points) | |
Name | Type |
mobile | Mobile reference to adjust the modifier points on. |
stat_name | Name of the stat to adjust the modifier points on. |
points | Number of points to adjust the modifier by. |
Explanation | |
Modifies the modifier value for the stat. Example: AP_ModifyStatMod(mobile, "strength", -15.3) | |
Return Values | |
Returns the previous value | |
AP_GetStatCap |
|
Parameters | |
(stat_name) | |
Name | Type |
stat_name | Name of the stat to check |
Explanation | |
Gets the number a stat caps at. | |
Return Values | |
Returns a number or error | |
AP_CheckStatCap |
|
Parameters | |
(mobile, stat_name:="") | |
Name | Type |
mobile | Mobile to check the stats on |
stat_name | Optional parameter - name of the stat to check. |
Explanation | |
Checks if a
stat is greater than or equal to its maximum value in
settings.cfg If no stat_name is passed, it will check the totals. |
|
Return Values | |
Returns 1 if the stat is >= to the cap | |