If you will check number of magic point you have before using the spell and after player says he uses it, try to set a magic point's integer (a general integer or a spell's specific integer) and in the script for using the spell, write something as :
Specific spell function:
if (player.magicpointsSpell1 > 0) {
FunctionWithSpell1Effects
}
else {
msg("You can't do that !")
}
OR
General spell function ( add a required variable named SpellName)
if (player.globalMagicPoints > 0) {
ConsultListOfSpells(SpellName) }
else {
msg("You can't do that !") }
and a ConsultListOfSpells (with SpellName required)
switch (SpellName) {
case ("Spell1") { /* Here insert spell1 effects */
}
case ("Spell2") {/* Here insert spell1 effects */
}
/* etc. */
}
Now, I hope you have a beginning of solution, (you can consult quest documentation here :http://docs.textadventures.co.uk/quest/ ).
PS: and next way, you can post here :
viewforum.php?f=10 because this forum is "for core library, C#, VB.NET, ASP.NET or JavaScript developers contributing to the Quest open source project "