Code: Select all
Drücke MACRO: RoMScript ausführen "LeaveBattleGround_and_CloseFrames()".
Spieleradresse geändert: 0x33F81E00
Code: Select all
Drücke MACRO: RoMScript ausführen "LeaveBattleGround_and_CloseFrames()".
Spieleradresse geändert: 0x33F81E00
Code: Select all
function CPlayer:update()
local addressChanged = false
-- Ensure that our address hasn't changed. If it has, fix it.
-- Read the address
local tmpAddress = memoryReadRepeat("uintptr", getProc(), addresses.staticbase_char, addresses.charPtr_offset) or 0;
-- Bad read, return
if tmpAddress == 0 then
return
end
-- Check that it's a valid address by checking the id
local tmpId = memoryReadRepeat("uint", getProc(), tmpAddress + addresses.pawnId_offset) or 0
if not tmpId or tmpId < PLAYERID_MIN or tmpId > PLAYERID_MAX then
-- invalid address
return
end
-- Else address good. If changed, update.
if( tmpAddress ~= self.Address) then
self.Address = tmpAddress;
cprintf(cli.green, language[40], self.Address);
addressChanged = true
if self.Class1 == CLASS_WARDEN then
setpetautoattacks()
end
end;
local oldClass1 = self.Class1
local oldClass2 = self.Class2
CPawn.update(self); -- run base function
local classChanged = self.Class1 ~= oldClass1 or self.Class2 ~= oldClass2
local newLoad = settings.profile.skills == nil
-- Check if we need to load the skill set.
if next(settings.profile.skillsData) ~= nil then -- The skills are ready to be loaded
if addressChanged or classChanged or newLoad then
settings.loadSkillSet(self.Class1)
if newLoad then
-- Reset editbox false flag on start up
if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) == 0 then
RoMCode("z = GetKeyboardFocus(); if z then z:ClearFocus() end")
end
end
if classChanged and self.TargetPtr ~= 0 then
self:clearTarget()
end
addressChanged = false
end
end
I mean logically the one in player.lua every time the address of the player gets updated it is what's running, so I would start there searching for the problem.Ego95 wrote:In which player:update() ? I thought a little bit about my problem and it has nothing to do with the arcanium arena, but with changing classes generally. When doing arcanium arena, your char changes into duelist and at the end back to your class. Had the same problem when changing class at housemaids with the bot. Player adress gets updated and then nothing happens.
Code: Select all
-- Bad read, return
if tmpAddress == 0 then
return
end
Originally I meant every codeblock but at first glance there is a very good chance that is it but only when you don't see a print where the address change in your MM.Ego95 wrote:Okay, this is the part I put a print too. I will look what happens
Code: Select all
-- Bad read, return
if tmpAddress == 0 then
cprintf(cli.red, "Error 1");
return
end
-- Check that it's a valid address by checking the id
local tmpId = memoryReadRepeat("uint", getProc(), tmpAddress + addresses.pawnId_offset) or 0
if not tmpId or tmpId < PLAYERID_MIN or tmpId > PLAYERID_MAX then
-- invalid address
cprintf(cli.red, "Error 2");
return
end
-- Else address good. If changed, update.
if( tmpAddress ~= self.Address) then
self.Address = tmpAddress;
cprintf(cli.green, language[40], self.Address);
addressChanged = true
if self.Class1 == CLASS_WARDEN then
setpetautoattacks()
end
end;
Is your char a warden ? Then maybe it stucks in setpetautoattacks(). Even when the char isn't I would make a print there to see if it goes in there.Ego95 wrote:So I dont get any of those two prints, but that doesnt help me because it gets stuck after the "cprintf(cli.green, language[40], self.Address);" Well, otherwise it wouln't help me either, because I don't understand the bot's basics. I dont do much with lua, so its nothing I could fix.Code: Select all
-- Bad read, return if tmpAddress == 0 then cprintf(cli.red, "Error 1"); return end -- Check that it's a valid address by checking the id local tmpId = memoryReadRepeat("uint", getProc(), tmpAddress + addresses.pawnId_offset) or 0 if not tmpId or tmpId < PLAYERID_MIN or tmpId > PLAYERID_MAX then -- invalid address cprintf(cli.red, "Error 2"); return end -- Else address good. If changed, update. if( tmpAddress ~= self.Address) then self.Address = tmpAddress; cprintf(cli.green, language[40], self.Address); addressChanged = true if self.Class1 == CLASS_WARDEN then setpetautoattacks() end end;
Code: Select all
CPawn.update(self); -- run base function
Users browsing this forum: No registered users and 0 guests