How to get the item the spell was cast with

Moderator: Event DM

Post Reply
User avatar
_LuCkY_
Scholar of Fools
Posts: 476
Joined: Tue Apr 29, 2003 10:25 am
Location: Netherlands

How to get the item the spell was cast with

Post by _LuCkY_ » Sat Jul 19, 2003 3:18 pm

Hi,

I need to know what item a spell was cast with. So is it cast from a scroll or wand, etc. or is it cast from your spellbook? The script gets called from the OnSpellCastAt event. I've tried using the GetSpellCastItem, but that one only works if the script gets called by the item itself.

If you have any ideas, give me a hand
Brannor
Scholar
Posts: 1435
Joined: Tue Nov 19, 2002 7:12 am
Location: Bavaria / Germany
Contact:

Post by Brannor » Fri Aug 01, 2003 3:12 pm

I don't get what you mean.

I use this:
(but not sure if it works 100%)

object castItem = GetSpellCastItem();
if (GetIsObjectValid(castItem) == TRUE )
{
...// is using an item to cast.
}
All posts are made as a player unless otherwise noted or in the team boards.
-------------------------------------------------------
Roses are 0xFF0000
Violetts are 0x0000FF
all my base
are belong to you
User avatar
_LuCkY_
Scholar of Fools
Posts: 476
Joined: Tue Apr 29, 2003 10:25 am
Location: Netherlands

Post by _LuCkY_ » Sun Aug 03, 2003 8:43 am

Well thats exactly what I mean. I just want to know if the spell is cast with a scroll or from your memory. GetSpellCastItem doesn't work on the OnSpellCastAt event unfortunateally.
Post Reply