Jump to content

Any way to make NPC cast a spell depending on player's inventory?


Vidatu

Recommended Posts

Hey all, just a quick question.

 

Can I set a spell to check the content of the player''s inventory when an NPC casts it? As in, can I set it so that a caster will attack the player, and if the player has (as an example) any gold in his inventory the spell will affect him, and if not it will not? And if so, can I set it to see if any element of a list is present, so I don't have to do it for every item?

 

I figured out how to set it so that the spell hits if the player is wielding a weapon included in a list, but I can't figure out how to do it for in the inventory.

 

Regards.

Link to comment
Share on other sites

Hey all, just a quick question.

 

Can I set a spell to check the content of the player''s inventory when an NPC casts it? As in, can I set it so that a caster will attack the player, and if the player has (as an example) any gold in his inventory the spell will affect him, and if not it will not? And if so, can I set it to see if any element of a list is present, so I don't have to do it for every item?

 

I figured out how to set it so that the spell hits if the player is wielding a weapon included in a list, but I can't figure out how to do it for in the inventory.

 

Regards.

Presumably, if you've managed to get everything working as you've described, you've done the bulk of the work. The NPC has the spell and casts it on the player conditional on if they're wielding a weapon. As such, I would think that all you need to do is change the conditions for them to cast it. Perhaps something along the lines of:

 

GetItemCount Gold001 >= 1 on Target.

Link to comment
Share on other sites

Hum. Well, I can't figure out how to make it work with GetItemCount, but it seems to when I use GetEquipped. Which is probably better; I guess I don't want it punishing players for what's in their inventory.

 

Side note; is gold not in the inventory any more? I'd have sworn it was before I took a hiatus, but it doesn't look like it is anymore.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...