daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const
  2. obsidian_knife = 9642;  
  3. skin_body = [9599];      
  4.  
  5. function searchIntArray(id:integer): boolean;
  6. var
  7. i: integer;
  8. begin
  9. result := false;
  10. for i := low(skin_body) to high(skin_body) do begin
  11. if skin_body[i] = id then result := true;
  12. end;
  13. end;
  14.  
  15. function GetItemFromOpenBackpack(ID: integer): TItem;
  16. var
  17. y: integer;
  18. begin
  19. Result := nil;
  20. for x := 0 to Self.Containers.Count - 1 do
  21. begin
  22. if x >= Self.Containers.Count then Break;
  23. for y := 0 to Self.Containers.Container[x].Count - 1 do
  24. begin
  25. if y >= Self.Containers.Container[x].Count then Break;
  26. if Self.Containers.Container[x].Item[y].ID = ID then
  27. begin
  28. Result := Self.Containers.Container[x].Item[y];
  29. Exit;
  30. end;
  31. end;
  32. end;
  33. end;
  34.  
  35. function SkinBodies(id:integer): Boolean;
  36. var
  37. x, y: integer;
  38. knife: TItem;
  39. t: integer;
  40. begin
  41. UpdateWorld;
  42. knife := GetItemFromOpenBackpack(obsidian_knife);
  43. if knife = nil then
  44. begin
  45. Self.DisplayText('An Obsidian Knife could not be found, please open a container with it.');
  46. exit;
  47. end;
  48. t := -1;
  49. for x := -1 to 1 do begin
  50. for y := -1 to 1 do begin
  51. // if Screen.Tile[7+x, 5+y].Count >= 3 then begin
  52. // t := -2
  53. // end else t := -1;
  54. if searchIntArray(Screen.Tile[7+x, 5+y].Item[Screen.Tile[7+x, 5+y].Count+t].ID) = true then begin
  55. UpdateWorld;
  56. knife := GetItemFromOpenBackpack(obsidian_knife);
  57. if knife <> nil then begin
  58. knife.UseWithGround(Self.X+X, Self.Y+Y, Self.Z);
  59. Self.DisplayText('Attempted to skin a creature with the ID ' + IntToStr(Screen.Tile[7+x, 5+y].Item[Screen.Tile[7+x, 5+y].Count-1].ID) + '.');
  60. Sleep(100);
  61. UpdateWorld;
  62. end;
  63. end;
  64. end;
  65. end;
  66. end;
  67.  
  68. begin
  69. while not terminated do begin
  70. UpdateWorld;
  71. SkinBodies(skin_body);
  72. Sleep(2000);
  73. end;
  74. end;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top