Granting special abilities through .bcs
smyth25
Member Posts: 219
Hey, I'm trying to write a script for a custom NPC that will add an innate ability when particular quests are completed, but can't make it work. There are no reported errors when I compile the .bcs file, so I must be formatting the file correctly, perhaps though I am using the wrong .ids triggers/actions or something similar. I have attached an example for when the party saves Nalia's keep, I can post any other necessary files.
0
Comments
AddSpecialAbility("GWPist1")
Replace GWPist1 with your spell file.
C:GetGlobal("NaliaKeepPlot","GLOBAL")
Sorry if I am asking obvious questions, I am just trying to narrow down the error.If that returns 1 like you expect it to, you could try adding DisplayStringHead(Myself,1) to the script block to see if it is running. That scripting action should display "No, I'm sorry, none of them sound familiar." above the NPC's head and in the combat log.
Other than simple errors such as the CRE not being assigned the script to begin with, or the "Dott" local already being set, I am unsure what could be preventing the spell from being granted.
Gwendolyne is correct that the AddSpecialAbility() scripting action should be used to grant the ability, so make sure you are using that.
Edit: I just thought of something - If a higher-priority script is calling NoAction() your check could be being skipped.
Override script (offset 0x248) => None
Class script (offset 0x250) => None
Race script (offset 0x258) => None
General script (offset 0x260) => None
Default script (offset 0x268) => None
God I'm such an idiot, Thanks for all your help mate. Take 300 gold pieces.