Yeah. 
I wrote a new function for this, and so far it's working perfectly. I'm alching well over 1k/hour (I checked the actual amount with the script amount), which is quite a bit of magic experience. I'm working on fixing the random detection issue with the alcher, so once I solve that I'll commit both fixes. Here's the function if anyone is curious:
Progress Report:
(*
MSI_CastsDone
~~~~~~~~~~~~~
.. code-block:: pascal
procedure MSI_CastsDone();
Calculates the amount of casts the player has done for each spell and adds the
difference from the previous amount to the progress report/stats variables.
.. note::
| Author: Coh3n
| Last Updated: 04 June 2011 by Coh3n
Example:
.. code-block:: pascal
MSI_CastsDone();
*)
procedure MSI_CastsDone();
var
i, j, castsDone, castsDiff: integer;
castsLeft: TIntegerArray;
begin
if (not loggedIn) then
exit;
castsLeft := MSI_CalculateCasts();
for i := 0 to high(castsLeft) do
with MSI_Players[currentPlayer].Scripts[currentScript] do
begin
if (castsLeft[i] <= 0) then
continue;
castsDone := (maxCasts[i] - castsLeft[i]);
MSI_SubDebug('Number of casts[' + intToStr(i) + ']: ' + intToStr(castsDone));
with MSI_Players[currentPlayer].ReportInfo do
begin
castsDiff := (castsDone - Casts[currentScript][MSI_CurrentSpell]);
incEx(Casts[currentScript][MSI_CurrentSpell], castsDiff);
MSI_AddToProggy(PROG_ADD_CASTS, -1, -1, castsDiff);
stats_IncVariable(MSI_Spells[Spells[MSI_CurrentSpell]].StatsName, castsDiff);
end;
MSI_AddToProggy(PROG_ADD_EXP, -1, -1, (Round(MSI_Spells[Spells[MSI_CurrentSpell]].Experience * castsDiff)));
MSI_SubDebug('Casts left[' + intToStr(i) + ']: ' + intToStr(castsLeft[i]));
end;
end;