Jump to content

Simple script


Recommended Posts

I made a target spell which has this script effect:

 

scn SlaveSpellEffect

 

ref self

 

begin ScriptEffectStart

 

set self to GetSelf

self.additem aaaFriendToken 1

 

end

 

 

It doesn't work. I have no idea what I am doing :P First I tried just "additem xxx" but it said i need an actor reference. Bah...im lost

Link to comment
Share on other sites

The script is supposed to add the "Friend Ring" from Companion Share Recruit to the target NPC so they can be shared with/recruited etc.

 

I can't believe no one has made this spell and put it on the Nexus yet. Doesn't it bug anyone that you can't recruit/share with half the NPC's in the game?!

 

Anyway thanks...I will try using Form ID but I doubt it will work :( the form ID changes based on what plugins you have loaded anyway right??

Link to comment
Share on other sites

How do you know it doesn't work? I don't know much about Companion Share and Recruit, but I see no reason why that script wouldn't work as it should. In fact, the "self' variable shouldn't even be necessary at all, but if you're getting errors I guess it is. Here's an alternative you could try for bugtesting purposes.

 

scn SlaveSpellEffect

ref self

begin ScriptEffectStart

set self to GetSelf
if (self.GetItemCount aaaFriendToken == 0)
  self.additem aaaFriendToken 1
  message "Adding friend token"
else
  message "Target already has a friend token"
endif
end

 

What happens if you cast it a couple of times on a target?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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