Advertisement
dAb74

dAb - SetItemsAndNPCLevelto1.pas

Aug 10th, 2018
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.85 KB | None | 0 0
  1. {
  2.   dAb - SetItemsAndNPCLevelto1.pas
  3.    
  4.   Does what its name says. This script is meant to be used on the entire ESP.
  5. }
  6.  
  7. unit userscript;
  8.  
  9. function Initialize: integer;
  10. begin
  11.   Result := 0;
  12. end;
  13.  
  14. var
  15.   i: integer;
  16.   ent, entries: IInterface;
  17.  
  18. function Process(e: IInterface): integer;
  19. begin
  20.   Result := 0;
  21.  
  22.   if (Signature(e) <> 'LVLN') and (Signature(e) <> 'LVLI') then // apply to both NPC and items
  23.   Exit;
  24.  
  25.   AddMessage('Processing: ' + FullPath(e));
  26.  
  27. if not ElementExists(e, 'LLCT') then  // skip empty lists
  28.         Exit;
  29.  
  30.   entries := ElementByName(e, 'Leveled List Entries');
  31.  
  32.   for i := 0 to ElementCount(entries) - 1 do begin
  33.     ent := ElementByIndex(entries, i);
  34.     SetElementEditValues(ent, 'LVLO\Level', 1); // set every NPC and item level to 1
  35.   end;
  36. end;
  37.  
  38. function Finalize: integer;
  39. begin
  40.   Result := 0;
  41. end;
  42.  
  43. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement