Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit ExportScripts;
- // Global variables
- var NPCList : TStringList;
- // Called when the script starts
- function Initialize : integer;
- begin
- NPCList := TStringList.Create;
- end;
- // Called for each selected record in the TES5Edit tree
- // If an entire plugin is selected then all records in the plugin will be processed
- function Process(e : IInterface) : integer;
- begin
- if Signature(e) <> 'OMOD' then exit;
- NPCList.Add(''+IntToHex(FixedFormID(e), 8) + '|'+GetElementEditValues(e, 'EDID')+'|' + GetElementEditValues(e, 'DATA\Form Type')+'|'+GetElementEditValues(e, 'DESC'));
- end;
- // Called after the script has finished processing every record
- function Finalize : integer;
- var filename : string;
- begin
- filename := ProgramPath + 'Edit Scripts\NPCs.txt';
- AddMessage('Saving NPC list to ' + filename);
- NPCList.SaveToFile(filename);
- NPCList.Free;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement