lord_corellon Posted May 11, 2009 Share Posted May 11, 2009 I made a target spell which has this script effect: scn SlaveSpellEffect ref self begin ScriptEffectStart set self to GetSelfself.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 More sharing options...
AzirAphale001 Posted May 11, 2009 Share Posted May 11, 2009 Who is the item getting added to? Scripting isn't my strong point... Link to comment Share on other sites More sharing options...
Vagrant0 Posted May 11, 2009 Share Posted May 11, 2009 Try using the form ID 8 numbers, not the editor ID. Link to comment Share on other sites More sharing options...
lord_corellon Posted May 12, 2009 Author Share Posted May 12, 2009 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 More sharing options...
LoginToDownload Posted May 12, 2009 Share Posted May 12, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.