GetPartyMemberName changes

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

GetPartyMemberName changes

#1 Post 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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: GetPartyMemberName changes

#2 Post 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
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: GetPartyMemberName changes

#3 Post 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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: GetPartyMemberName changes

#4 Post 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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: GetPartyMemberName changes

#5 Post 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.

Code: Select all

print(GetPartyMemberName(1))
printed the name of the party member.
Ran "740/update".
Repeated the print and it still worked.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Post Reply