Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. unit ExportScripts;
  2.  
  3. // Global variables
  4. var NPCList : TStringList;
  5.  
  6. // Called when the script starts
  7. function Initialize : integer;
  8. begin
  9. NPCList := TStringList.Create;
  10. end;
  11.  
  12. // Called for each selected record in the TES5Edit tree
  13. // If an entire plugin is selected then all records in the plugin will be processed
  14. function Process(e : IInterface) : integer;
  15. begin
  16. if Signature(e) <> 'OMOD' then exit;
  17. NPCList.Add(''+IntToHex(FixedFormID(e), 8) + '|'+GetElementEditValues(e, 'EDID')+'|' + GetElementEditValues(e, 'DATA\Form Type')+'|'+GetElementEditValues(e, 'DESC'));
  18. end;
  19.  
  20. // Called after the script has finished processing every record
  21. function Finalize : integer;
  22. var filename : string;
  23. begin
  24. filename := ProgramPath + 'Edit Scripts\NPCs.txt';
  25. AddMessage('Saving NPC list to ' + filename);
  26. NPCList.SaveToFile(filename);
  27. NPCList.Free;
  28. end;
  29.  
  30. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement