Server Totals
Ferrell - (7)
M'Chek - (1)
Visimontium - (0)
Wilderness - (0)
Elysia - (0)
Le'Or - (0)
Deglos - (0)
Underdark - (0)
Mikona - (0)
Total players: 8
Gallery

Links Menu

How to get the item the spell was cast with

Moderators: Nighthawk4, Dungeon Masters

How to get the item the spell was cast with

PostAuthor: _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
User avatar
_LuCkY_
Scholar of Fools
 
Posts: 478
Joined: Tue Apr 29, 2003 10:25 am
Location: Netherlands

PostAuthor: 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

Brannor
Scholar
 
Posts: 1435
Joined: Tue Nov 19, 2002 7:12 am
Location: Bavaria / Germany

PostAuthor: _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.
User avatar
_LuCkY_
Scholar of Fools
 
Posts: 478
Joined: Tue Apr 29, 2003 10:25 am
Location: Netherlands


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], galen_macbyrne, Google [Bot], Gorgon, Tel