Page 1 of 1
GetPartyMemberName changes
Posted: Mon Nov 12, 2012 8:21 pm
by lisa
seems the memory has changed in regards to memory names for party.
functions.lua line 1356
Code: Select all
-- Check if that number exists
if memoryReadRepeat("byte", getProc(), memberAddress) ~= 1 then
return nil
end
this check is no longer working as that address is 0 even if there is a party member now. If I comment out that part it prints the names and also returns "" if no party member.
That function might need a small rewrite to work with the changed memory.
Re: GetPartyMemberName changes
Posted: Mon Nov 12, 2012 8:24 pm
by lisa
for backward compatability I am testing this atm
Code: Select all
function GetPartyMemberName(_number)
if type(_number) ~= "number" or _number < 1 then
print("GetPartyMemberName(number): incorrect value for 'number'.")
return
end
local listAddress = memoryReadRepeat("int", getProc(), addresses.partyMemberList_address ) + addresses.partyMemberList_offset
local memberAddress = listAddress + (_number - 1) * 0x60
-- Check if that number exists
--[[if memoryReadRepeat("byte", getProc(), memberAddress) ~= 1 then
return nil
end]]
if memoryReadRepeat("byte", getProc(), memberAddress + 0x1C) == 31 then
memberAddress = memoryReadRepeat("int", getProc(), memberAddress + 8 )
local name = memoryReadString(getProc(), memberAddress)
if( bot.ClientLanguage == "RU" ) then
name = utf82oem_russian(name);
else
name = utf8ToAscii_umlauts(name); -- only convert umlauts
end
if name == "" then name = nil end
return name
else
local name = memoryReadString(getProc(), memberAddress + 8)
if( bot.ClientLanguage == "RU" ) then
name = utf82oem_russian(name);
else
name = utf8ToAscii_umlauts(name); -- only convert umlauts
end
if name == "" then name = nil end
return name
end
end
So if the name is "" it changes it to return nil instead
Re: GetPartyMemberName changes
Posted: Tue Nov 13, 2012 12:13 am
by rock5
Still works for me. Your problem might be because you've changed versions of the game. Rev 740 only works with 5.0.4. RoM4U is still on 5.0.3. The update in the RC is backward compatible though.
Re: GetPartyMemberName changes
Posted: Tue Nov 13, 2012 1:08 am
by lisa
playing official server atm, no idea what version it is running.
rev 740 rombot, needed to change it as it was always returning the party names as nil.
RC1 I haven't changed anything and is working fine.
Re: GetPartyMemberName changes
Posted: Tue Nov 13, 2012 1:47 am
by rock5
This is what I did.
Reverted the ingamefunctions to the 740 version in addons.
Reverted any changes I made to my 740 version of the bot.
Started 2 clients and partied them. These are 5.0.4 clients.
Ran commandline.
printed the name of the party member.
Ran "740/update".
Repeated the print and it still worked.