PDA

View Full Version : Checking for prepared spell



Woden
06-25-2008, 08:01 AM
Is there a way to determine if the user currently has a spell prepared?

What I'm after is a way to guarantee I won't blow the user's nerves in the following way: my script checks for sufficient mana, the user passes the check, the script releases the user's prepared spell (thus dipping the user below the sufficient-mana point), then the script casts the spell it's trying to cast.

Thanks for any help. : )

Shaelun
06-27-2008, 06:30 PM
Is there a way to determine if the user currently has a spell prepared?


checkprep will return the current spell prepped, though I can't remember the details of the return value offhand... I think it's nil if there's no spell prepped, so that you can do something like if checkprep then fput("release") end, etc., but don't quote me on it.

Woden
06-27-2008, 07:22 PM
Excellent, thanks, Shaelun.