I've found that there is no absolute speed value that is to high and does a pull back. But there is a relative value.
On my client it is 115%. I can speed up to 115% of original value (this means 15% buff to speed) and there won't be any pull backs.
I wanted to have that 15% buff speed permanently.
I wanted it to be dynamic and change my speed whenever i get a speed (de)buff.
So I've wrote this function, based on Lisa's speedhack addon.
Code: Select all
function SpeedUpByProcent(procent)
--[[
1. Takes a number,
2. Increases speed value in rom client memory by given procent, unless the speed was already increased,
3. Returnes bool. True if succeded, otherwise false.
]]--
if procent == nil then
procent = 14
end
if type(procent) ~= "number" then
printf("Incorrect usage of function SpeedUpByProcent().\n")
return false
end
local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
local mount = memoryReadInt(getProc(), playerAddress + addresses.charPtrMounted_offset);
if playerAddress ~= 0 then
current_speed=memoryReadFloat(getProc(), playerAddress + 0x40);
if mount ~= 0 then
current_speed=memoryReadFloat(getProc(), mount + 0x40);
end
if math.floor((current_speed-math.floor(current_speed))*10000)==1234 then --memo last written by this func
return false
end
else
printf("Memo read error. Speed was not changed.\n")
return false
end
new_speed = math.floor(current_speed*(1+procent/100.0))+0.1234567
-- this last fraction is sort of mark that speed was written by this func, not by rom client
if mount == 0 then
memoryWriteFloat(getProc(), playerAddress + 0x40, new_speed);
else
memoryWriteFloat(getProc(), mount + 0x40, new_speed);
end
printf("Speed changed from: "..tostring((current_speed)).." to: "..tostring((new_speed))..".\n")
return true
end
You can call this func in bot via timer or make a separate waypoint with function call and yrest inside infinite loop.