Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- Generates lists of console commands in the form
- player.additem <formID> <editorID>
- to be executed by the player ingame.
- Usage:
- 1. Select the items you want to have put into the list.
- 2. Apply the script.
- 3. Enter the filename you want to use for the output file.
- 4. Ingame enter the command bat <filename>, with filename
- being the name of the file you created.
- }
- unit UserScript;
- uses mteFunctions;
- const
- pre = 'player.additem';
- var
- filename, quantity: string;
- output: TStringList;
- function Initialize: integer;
- begin
- filename := InputBox('Enter filename', 'Enter the name you want to use for the output file, excluding file extension.', 'test');
- quantity := InputBox('Enter quantity', 'Enter an integer value for the quantity you want to be added to your inventory.', '1');
- output := TStringList.Create;
- end;
- function Process(e: IInterface): integer;
- begin
- if filename = '' then exit;
- output.add(pre + ' ' + HexFormID(e) + ' ' + quantity + ' ' + geev(e, 'EDID'));
- end;
- function Finalize: integer;
- var
- path: string;
- begin
- if filename = '' then exit;
- path := StringReplace(DataPath, 'Data\', '', [rfReplaceAll]);
- output.SaveToFile(path + filename + '.txt');
- output.Free;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment