Leveling a spell

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
Is there any way to level a spell ingame? so far I am using this:
Code:
;Skill Leveler
[@LevelSKill()]
#ACT
Mov N0 %ARG(1)
Mov N1 %ARG(2)
FormatStr "FLD_CHARACTER='%s'" %USERID
FormatStr "FLD_MAGICID='%s'" %N0
   ReadValueSql  "TBL_MAGIC"  %A9  "FLD_CHARACTER,FLD_MAGICID,FLD_LEVEL" [@DOLEVEL]

[@DOLEVEL()]
#IF
#ACT
FormatStr "FLD_CHARACTER='%s'" %USERID
FormatStr "FLD_MAGICID='%s'" %N0
Mov   A6       %A9
FormatStr "FLD_LEVEL='%s'" %N1
UPDATEVALUESQL "TBL_MAGIC" %A6 %A9
goto @main_finished

But the problem is, when you log out, the game writes your current spell level OVER the level that has just been set using the NPC.