daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. unit KeConst;
  2.  
  3. interface
  4.  
  5. Const
  6.  
  7.   //string constants
  8.   AikaWindowClass  = 'AikaClient Window';
  9.   AikaWindowName   = 'AikaClient';
  10.  
  11.   //pointer constants
  12.  
  13.   PtrBaseData   = $00B445C0;
  14.   PtrBaseAction = $00B445BC;
  15.   PtrBasePanel  = $00B45478;
  16.  
  17.   //ordinary offsets from BaseData
  18.   OffsetName    = $34F4C;
  19.   OffsetLevel   = $34FF0;
  20.   OffsetMaxHp   = $34f70;
  21.   OffsetHp      = $34f74;
  22.   OffsetMaxMP   = $34F78;
  23.   OffsetMp      = $34F7c;
  24.   OffstCamera   = $41050;
  25.   OffsetWeapDur = $350E2;
  26.  
  27.   //Ordinary offsets from BaseAction
  28.   OffsetChar    = $dc;
  29.   OffsetTarget  = $68;
  30.   OffsetCoord   = $14c;
  31.   OffsetTname   = $16b0;
  32.   OffsetAction  = $1a9;
  33.   OffsetTLevel  = $1b4;
  34.   OffsetTarHP   = $414;
  35.   OffsetTarMaxHp= $418;
  36.   OffsetTarMp   = $41c;
  37.   OffsetTarMaxMp= $420;
  38.   OffsetDist    = $404;
  39.   OffsetPvpFlag = $40d;
  40.   OffsetPvpSign = $3f7;
  41.  
  42.   //Come get some
  43.   MonsterSize   = $31a4;
  44.  
  45.  
  46. implementation
  47. //junk code
  48.  
  49. {
  50. function ReadCameraAngle:single;
  51. var
  52. tmp2:dword;
  53. begin
  54. ReadProcessMemory(ProcHandle,ptr(BaseData+CameraOff),@tmp2,4,BytesRead);
  55. ReadProcessMemory(ProcHandle,ptr(tmp2+$8),@Result,4,bytesRead);
  56. end;
  57. }
  58.  
  59.  
  60. {
  61. Function ReadCellDelay(SkillOff:tSkillOff):single;
  62. var tm:dword;
  63. Begin
  64. //read pointer to panel
  65. ReadProcessMemory(ProcHandle,ptr(BaseAction+CellOff1+SkillOff.pan*4),@tm,4,BytesRead);
  66. //read pointer to cell
  67. ReadProcessMemory(ProcHandle,ptr(tm+CellOff2+SkillOff.cell*4),@tm,4,BytesRead);
  68. //Read delay
  69. ReadProcessMemory(ProcHandle,ptr(tm+CellOff3),@Result,4,BytesRead);
  70. End;
  71. }
  72.  
  73.  
  74. {
  75.  OpenProcessToken( GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES
  76.   or TOKEN_QUERY, hToken );
  77.  LookupPrivilegeValue( nil, 'SeDebugPrivilege', SeDebugNameValue );
  78.  tkp.PrivilegeCount:= 1;
  79.  tkp.Privileges[0].Luid := SeDebugNameValue;
  80.  tkp.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
  81.  AdjustTokenPrivileges(hToken,false,tkp,SizeOf(tkp),tkp,ReturnLength);
  82.  
  83.  EnableDebugPrivilege(True);
  84. }
  85.  
  86. {
  87. function EnableDebugPrivilege(const Value: Boolean): Boolean;
  88. var
  89. TokenHandle: Cardinal;
  90. TokenPrivileges: TTokenPrivileges;
  91. ReturnLength: Cardinal;
  92. hQuery: Cardinal;
  93.  
  94. begin
  95.  
  96.   Result := False;
  97.   if Windows.OpenProcessToken(GetCurrentProcess, TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY, TokenHandle) then
  98.   begin
  99.     try
  100.     LookupPrivilegeValueW(nil, 'SeDebugPrivilege', TokenPrivileges.Privileges[0].Luid);
  101.     TokenPrivileges.PrivilegeCount := 1;
  102.     TokenPrivileges.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
  103.   if AdjustTokenPrivileges(TokenHandle, False, TokenPrivileges, 0, nil, ReturnLength)
  104.     then Result := True;
  105.  
  106.   finally
  107.     CloseHandle(TokenHandle);
  108.     end;
  109.   end;
  110.  
  111. end;
  112. }
  113.  
  114.  
  115. {
  116. function Tabbing(Client:pClient;mob:pAnyCharacter):boolean;
  117. var
  118. i,j:integer;
  119. dejavu:boolean;
  120. TidArray: Array [0..20] of dword;
  121. begin
  122.   result:=false;
  123.   dejavu:=false;
  124.   i:=0;
  125.   for i:=0 to 20 do TidArray[i]:=High(Dword)-1;
  126. while mob.id=0 do
  127. begin
  128. PostMessage(Client.WinHandle,Wm_KeyDown,9, 0);
  129. sleep(10);
  130. allocconsole;
  131.   writeln(mob.id);
  132. for j:=0 to 20 do if mob.id=TidArray[j] then begin dejavu:=true; break; end;
  133. if not DejaVu then TidArray[i]:=mob.id else begin for i:=0 to 20 do TidArray[i]:=High(Dword)-1; i:=-1; rotation(@Aika,Hero.CameraAngle)  end;
  134. inc(i);
  135. sleep(50);
  136. end;
  137. end;
  138. }
  139. end.
RAW Paste Data
Top