Here's a copy of the function:
Code: Select all
function StatIncrease ( character, attribute )
case ( attribute )
ALCHEMY:
ANATOMY:
DETECTHIDDEN:
LEADERSHIP:
INVOCATION:
MAGERY:
MAGICRESISTANCE:
MEDITATION:
NECROMANCY:
TACTICS:
TRACKING:
VETERINARY:
var currentInt := GetObjProperty ( character, "int" );
var rawCurrentInt := BaseToRaw ( currentInt * 10 );
rawCurrentInt := ( rawCurrentInt + 1 );
var newCurrentInt := RawToBase ( rawCurrentInt );
newCurrentInt := ( newCurrentInt / 10 );
SetObjProperty ( character, "int", newCurrentInt );
var unmod_Int := CInt ( GetAttributeBaseValue ( character, "Intelligence" ) / 10 );
if ( ( CInt ( newCurrentInt ) ) > unmod_Int )
SetAttributeBaseValue ( character, "Intelligence", unmod_Int * 10 + 10 );
RecalcVitals ( character );
endif
ARCHERY:
FENCING:
LOCKPICKING:
STEALING:
STEALTH:
PARRY:
TINKERING:
TAILORING:
CARTOGRAPHY:
HIDING:
MUSICIANSHIP:
POISONING:
INSCRIPTION:
var currentDex := GetObjProperty ( character, "dex" );
var rawCurrentDex := BaseToRaw ( currentDex * 10 );
rawCurrentDex := ( rawCurrentDex + 1 );
var newCurrentDex := RawToBase ( rawCurrentDex );
newCurrentDex := ( newCurrentDex / 10 );
SetObjProperty ( character, "dex", newCurrentDex );
var unmod_Dex := CInt ( GetAttributeBaseValue ( character, "Dexterity" ) / 10 );
if ( ( CInt ( newCurrentDex ) ) > unmod_Dex )
SetAttributeBaseValue ( character, "Dexterity", unmod_Dex * 10 + 10 );
RecalcVitals ( character );
endif
LUMBERJACKING:
MINING:
WRESTLING:
BLACKSMITHY:
CARPENTRY:
FISHING:
MACEFIGHTING:
SWORDSMANSHIP:
CAMPING:
DRUIDRY:
var currentStr := GetObjProperty ( character, "str" );
var rawCurrentStr := BaseToRaw ( currentStr * 10 );
rawCurrentStr := ( rawCurrentStr + 1 );
var newCurrentStr := RawToBase ( rawCurrentStr );
newCurrentStr := ( newCurrentStr / 10 );
SetObjProperty ( character, "str", newCurrentStr );
var unmod_Str := CInt ( GetAttributeBaseValue ( character, "Strength" ) / 10 );
if ( ( CInt ( newCurrentStr ) ) > unmod_Str )
SetAttributeBaseValue ( character, "Strength", unmod_Str * 10 + 10 );
RecalcVitals ( character );
endif
default:
DohEth ( character );
endcaseThanks.