Исходник Tickbase Manipulation

Начинающий
Статус
Оффлайн
Регистрация
19 Фев 2019
Сообщения
51
Реакции[?]
25
Поинты[?]
1K
Recently I have been working on rapid fire by manipulating my tickbase using WriteUsercmdDeltaToBuffer hook.
The double tap works but it also lags me on community servers like this -
Пожалуйста, авторизуйтесь для просмотра ссылки.


if i am on local server it works fine without lag.

Is there a way to minimize / remove the lag or is there any information regarding this?

Hook -
[CODE = cpp] bool __fastcall Hooks :: WriteUsercmdDeltaToBuffer_hook (void * ECX, void * EDX, int nSlot, bf_write * buf, int from, int to, bool isNewCmd)
{
static DWORD WriteUsercmdDeltaToBufferReturn = (DWORD) Utils :: FindSignature ("engine.dll", "84 C0 74 04 B0 01 EB 02 32 C0 8B FE 46 3B F3 7E C9 84 C0 0F 84);
static auto sendmovecall = Utils :: FindSignature ("engine.dll", "84 C0 74 04 B0 01 EB 02 32 C0 8B FE 46 3B F3 7E C9 84 C0 0F 84????");
static auto ofunct = g_Hooks.pClientHook-> GetOriginal <WriteUsercmdDeltaToBufferFn> (24);

if (_ReturnAddress ()! = (void *) sendmovecall ||
g :: tickbaseshift <= 0)
{
g :: tickbaseshift = 0;
return ofunct (ECX, nSlot, buf, from, to, isNewCmd);
}
if (from! = -1)
return true;

auto CL_SendMove = [] () {
using CL_SendMove_t = void (__ fastcall *) (void);
static CL_SendMove_t CL_SendMoveF = (CL_SendMove_t) Utils :: FindSignature ("engine.dll", "55 8B EC A1???? 81 EC???? B9???? 53 8B 98");

CL_SendMoveF ();
};

auto WriteUsercmd = [] (bf_write * buf, CUserCmd * in, CUserCmd * out) {
using WriteUsercmd_t = void (__ fastcall *) (bf_write *, CUserCmd *, CUserCmd *);
static WriteUsercmd_t WriteUsercmdF = (WriteUsercmd_t) Utils :: FindSignature ("client_panorama.dll", "55 8B EC 83 E4 F8 51 53 56 8B D9 8B 0D");
WriteUsercmdF (buf, in, out);

};
// number of backup and new commands
int * pNumBackupCommands = (int *) ((std :: uintptr_t) buf - 0x30);
int * pNumNewCommands = (int *) ((std :: uintptr_t) buf - 0x2C);
auto net_channel = * reinterpret_cast <NetChannel * *> (reinterpret_cast <uintptr_t> (g_pClientState) + 0x9C);
int32_t new_commands = * pNumNewCommands;
// Manipulate CLC_Move
auto nextcmdnumber = g_pClientState-> lastoutgoingcommand + g_pClientState-> chokedcommands + 1;
auto totalnewcommands = std :: min (g :: tickbaseshift, 16);
g :: tickbaseshift - = totalnewcommands;
from = -1;
* pNumNewCommands = totalnewcommands;
* pNumBackupCommands = 0;
// generate real cmd's
for (to = nextcmdnumber - new_commands + 1; to <= nextcmdnumber; to ++)
{
if (! ofunct (ECX, nSlot, buf, from, to, true))
return false;

from = to;
}
auto lastrealcmd = g_pInput-> GetUserCmd (nSlot, from);
CUserCmd fromcmd;
if (lastrealcmd)
fromcmd = * lastrealcmd;
CUserCmd tocmd = fromcmd;
tocmd.command_number ++;
tocmd.tick_count + = (TIME_TO_TICKS (0.5f) + nextcmdnumber);
// generate fake cmd's
for (int i = new_commands; i <= totalnewcommands; i ++)
{
WriteUsercmd (buf, & tocmd, & fromcmd);
fromcmd = tocmd;
tocmd.command_number ++;
tocmd.tick_count ++;
}
// send them in all together
CL_SendMove ();
transmit (true); // works without this
return true;
} [/ CODE]
create move -
  1. if (GetAsyncKeyState ('I'))
  2. g :: tickbaseshift = TIME_TO_TICKS (2.0f);
  3. else
  4. g :: tickbaseshift = TIME_TO_TICKS (0.0f);
 
t.me/lnk1181shop
Участник
Статус
Оффлайн
Регистрация
16 Авг 2019
Сообщения
492
Реакции[?]
413
Поинты[?]
1K
Участник
Статус
Оффлайн
Регистрация
27 Дек 2018
Сообщения
1,428
Реакции[?]
376
Поинты[?]
0
BlazeHack Owner
Участник
Статус
Оффлайн
Регистрация
12 Сен 2016
Сообщения
364
Реакции[?]
210
Поинты[?]
0
Ммм, паста с UC (ne reklama) класс хуле xD
Я тебя может удивлю, но это тот же человек что и с юц и он задает вопрос ( ему нужна помощь ) И, да, это рабочая база... И проблема у него не в том что она не работает, а в том что она у него подлагивает...
 
Забаненный
Статус
Оффлайн
Регистрация
24 Ноя 2018
Сообщения
200
Реакции[?]
92
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Я тебя может удивлю, но это тот же человек что и с юц и он задает вопрос ( ему нужна помощь ) И, да, это рабочая база... И проблема у него не в том что она не работает, а в том что она у него подлагивает...
Но она не работает
 
Начинающий
Статус
Оффлайн
Регистрация
19 Фев 2019
Сообщения
51
Реакции[?]
25
Поинты[?]
1K
currently i am shifting tickbase only while shooting which doesn't lag me but it also doesn't doubletap
 
Пользователь
Статус
Оффлайн
Регистрация
18 Янв 2019
Сообщения
328
Реакции[?]
42
Поинты[?]
0
C++:
bool __fastcall Hooks :: WriteUsercmdDeltaToBuffer_hook (void * ECX, void * EDX, int nSlot, bf_write * buf, int from, int to, bool isNewCmd)
{
static DWORD WriteUsercmdDeltaToBufferReturn = (DWORD) Utils :: FindSignature ("engine.dll", "84 C0 74 04 B0 01 EB 02 32 C0 8B FE 46 3B F3 7E C9 84 C0 0F 84);
static auto sendmovecall = Utils :: FindSignature ("engine.dll", "84 C0 74 04 B0 01 EB 02 32 C0 8B FE 46 3B F3 7E C9 84 C0 0F 84????");
static auto ofunct = g_Hooks.pClientHook-> GetOriginal <WriteUsercmdDeltaToBufferFn> (24);

if (_ReturnAddress ()! = (void *) sendmovecall ||
g :: tickbaseshift <= 0)
{
g :: tickbaseshift = 0;
return ofunct (ECX, nSlot, buf, from, to, isNewCmd);
}
if (from! = -1)
return true;

auto CL_SendMove = [] () {
using CL_SendMove_t = void (__ fastcall *) (void);
static CL_SendMove_t CL_SendMoveF = (CL_SendMove_t) Utils :: FindSignature ("engine.dll", "55 8B EC A1???? 81 EC???? B9???? 53 8B 98");

CL_SendMoveF ();
};

auto WriteUsercmd = [] (bf_write * buf, CUserCmd * in, CUserCmd * out) {
using WriteUsercmd_t = void (__ fastcall *) (bf_write *, CUserCmd *, CUserCmd *);
static WriteUsercmd_t WriteUsercmdF = (WriteUsercmd_t) Utils :: FindSignature ("client_panorama.dll", "55 8B EC 83 E4 F8 51 53 56 8B D9 8B 0D");
WriteUsercmdF (buf, in, out);

};
// number of backup and new commands
int * pNumBackupCommands = (int *) ((std :: uintptr_t) buf - 0x30);
int * pNumNewCommands = (int *) ((std :: uintptr_t) buf - 0x2C);
auto net_channel = * reinterpret_cast <NetChannel * *> (reinterpret_cast <uintptr_t> (g_pClientState) + 0x9C);
int32_t new_commands = * pNumNewCommands;
// Manipulate CLC_Move
auto nextcmdnumber = g_pClientState-> lastoutgoingcommand + g_pClientState-> chokedcommands + 1;
auto totalnewcommands = std :: min (g :: tickbaseshift, 16);
g :: tickbaseshift - = totalnewcommands;
from = -1;
* pNumNewCommands = totalnewcommands;
* pNumBackupCommands = 0;
// generate real cmd's
for (to = nextcmdnumber - new_commands + 1; to <= nextcmdnumber; to ++)
{
if (! ofunct (ECX, nSlot, buf, from, to, true))
return false;

from = to;
}
auto lastrealcmd = g_pInput-> GetUserCmd (nSlot, from);
CUserCmd fromcmd;
if (lastrealcmd)
fromcmd = * lastrealcmd;
CUserCmd tocmd = fromcmd;
tocmd.command_number ++;
tocmd.tick_count + = (TIME_TO_TICKS (0.5f) + nextcmdnumber);
// generate fake cmd's
for (int i = new_commands; i <= totalnewcommands; i ++)
{
WriteUsercmd (buf, & tocmd, & fromcmd);
fromcmd = tocmd;
tocmd.command_number ++;
tocmd.tick_count ++;
}
// send them in all together
CL_SendMove ();
transmit (true); // works without this
return true;
}
 
BlazeHack Owner
Участник
Статус
Оффлайн
Регистрация
12 Сен 2016
Сообщения
364
Реакции[?]
210
Поинты[?]
0
Забаненный
Статус
Оффлайн
Регистрация
9 Янв 2019
Сообщения
701
Реакции[?]
295
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
in truth, knowing the contingent of this forum, it’s unlikely that you will be helped here, it’s better to talk about this and asks for help in European forums
?

On-topic: in cm-hook u probably shfit every tick, all these ticks will be added to buffer, which will cause its overflow, so u won't be more able to shift ticks as u want, bcoz ur buffer is already overflowed and adding more ticks to it may cause lags / game freezes
have a good day
 
Начинающий
Статус
Оффлайн
Регистрация
19 Фев 2019
Сообщения
51
Реакции[?]
25
Поинты[?]
1K
[QUOTE = "spearmint, post: 1120523, member: 128642"]
?

On-topic: in cm-hook u probably shfit every tick, all these ticks will be added to buffer, which will cause its overflow, so u won't be more able to shift ticks as u want, bcoz ur buffer is already overflowed and adding more ticks to it may cause lags / game freezes
have a good day
[/ QUOTE]
thankyou for informing about this , i didnt know this can happen
 
Сверху Снизу