I have a problem in code. When Player not mounted and Bot enable function setMountSpeed(speed) or MountSpeedoff() then Bot permanent stoped.
Anyone if you have idea halp with this problem.
_sory for my bad english.
Code: Select all
------------setMountSpeed function-- Use setMountSpeed(100.0); to set MountSpeed = 100, normal speed is 82. Use MountSpeedoff(); to DEactivate.
function setMountSpeed(speed)
local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
if playerAddress ~= 0 then
local mount = memoryReadInt(getProc(), playerAddress + addresses.charPtrMounted_offset);
if mount ~= 0 then
memoryWriteFloat(getProc(), mount + 0x40, speed);
printf("MountSpeedhack ACTIVATED!\n");
local MountSpeed = memoryReadFloat(getProc(), mount + 0x40);
print("MountSpeed:", MountSpeed);
else
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cfffff00Userfunction_cheats: Can't set MountSpeed: player not Mounted.|r')")
cprintf(cli.red, "Can't set MountSpeed: player not Mounted");
end
end
end
function MountSpeedoff()
local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
if playerAddress ~= 0 then
local mount = memoryReadInt(getProc(), playerAddress + addresses.charPtrMounted_offset);
if mount ~= 0 then
memoryWriteFloat(getProc(), mount + 0x40, 82);
printf("MountSpeedhack DEactivated.\n");
local MountSpeed = memoryReadFloat(getProc(), mount + 0x40);
print("MountSpeed:", MountSpeed);
else
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cfffff00Userfunction_cheats: Player not Mounted. MountSpeed is normal.|r')")
cprintf(cli.red, "Player not Mounted. MountSpeed is normal.");
end
end
end
function getMountSpeed()
local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
if playerAddress ~= 0 then
local mount = memoryReadInt(getProc(), playerAddress + addresses.charPtrMounted_offset);
if mount ~= 0 then
local MountSpeed = memoryReadFloat(getProc(), mount + 0x40);
print("MountSpeed:", MountSpeed);
return MountSpeed
else
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cfffff00Userfunction_cheats:Can't set MountSpeed: player not Mounted.|r')")
cprintf(cli.red, "Can't set MountSpeed: player not Mounted");
return nil;
end
else
cprintf(cli.red, "Can't set MountSpeed: playerAddress = nil");
return nil;
end
end