I tried following the tutorial here and on the CS Wiki and neither seem to work. When i use the book, wether it be in inventory or via a hotkey, the only thing that happens is the book opens, i dont get the menu to choose wether i want to learn it or not. Here is the code.
scn aaaSpellTomeScript
short doonce
short buttonpressed
int button
begin onActivate
if doonce == 0
MessageBox "Would you like to learn the Spell of Frost Damage?", "Yes please", "No way, maybe later"
set doonce to 1
set buttonpressed to 1
else
Message "You have already learned what you can from this Tome"
endif
end
begin GameMode
if buttonpressed == 1
set button to GetButtonPressed
if button == 1
set doonce to 0
set buttonpressed to 0
Message "Ok - Maybe you can learn later"
elseif button == 0
set buttonpressed to 0
player.AddSpell StandardFrostDamageTarget1Novice
Message "Use this knowledge wisely"
endif
endif
end