party.lua bugs

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#21 Post by pman » Sun Jul 15, 2012 5:45 am

lisa wrote:So it works sometimes but not all the time?
Some of my chars work most of the time (the 3 "good" ones), but sometimes they bug, after a restart of client they work again.
And i have chars, which never worked until now, tried several times, with and without restart, no chance.

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#22 Post by pman » Sun Jul 15, 2012 6:06 am

2 chars, dist == 0

Code: Select all

(1)
Party member 1 has the name of Char2

(2)
Party member 1 has the name of Char2
1 has name of Char1

(3)
Player has the name of Char1
Party member 1 has name of Char2

(4)
check party 100 is false

(5)
check party 200 is false
names ok, but false
Last edited by pman on Sun Jul 15, 2012 7:44 am, edited 1 time in total.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: party.lua bugs

#23 Post by lisa » Sun Jul 15, 2012 6:59 am

I am at a loss, I can't think of anything to make it work on some chars and not others except for the actual names of them.
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

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#24 Post by pman » Sun Jul 15, 2012 7:03 am

correct me if i am wrong, but (3) looks as it should be and (2) misses 1 char or not?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: party.lua bugs

#25 Post by lisa » Sun Jul 15, 2012 7:19 am

(3) is directly from memory and I suspect it is the actual UI names on the party icons you see on screen as it works when they are also offline. The names remain on screen. So (3) should ALWAYS get all the names of your party members, I also added player name to 3 aswell

Code: Select all

		if keyPressed(key.VK_NUMPAD3) and (os.time() - time > delay ) then
			print("Player has name of "..player.Name)
			for i = 1,5 do
				if GetPartyMemberName(i) ~= nil then
					print("Party member "..i.." has name of "..GetPartyMemberName(i))
				end
			end
			print("")
			time = os.time()
		end
(2) on the other hand works differently.
it uses the object info direct from memory and will only have the info if the objects are actually within memory range. It uses the findnearestnameorid() function and uses the name that (3) would have gotten to find the actual object information.
(2)
Party member 1 has the name of Char2
1 has name of Char1
So this tells me that char2 is the other party member but it can't get the information for char2 directly from memory. "1 has name of" will be the player. So yes the info for Char2 is missing from the function.
So because it isn't getting the object information of Char2 then it has nothing to compare distance to and will always return false.

So we need to work out why Char2 isn't being found using findnearestnameorid()

Ok new WP tester, this time (1) will print all "player" names within memory range, so go somewhere quiet to get less prints =)
Attachments
partytest.xml
(1.93 KiB) Downloaded 351 times
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

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#26 Post by pman » Sun Jul 15, 2012 7:26 am

somewhere a bug in the new file

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: party.lua bugs

#27 Post by lisa » Sun Jul 15, 2012 7:34 am

missed an "end", at work atm so can't test it.
try this
Attachments
partytest.xml
(1.93 KiB) Downloaded 242 times
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

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#28 Post by pman » Sun Jul 15, 2012 7:43 am

same 2 chars as before (dist==0)

Code: Select all

(1)
no output

(2)
Party member 1 has the name of Char2
1 has name of Char1

(3)
Player has the name of Char1
Party member 1 has name of Char2

(4)
check party 100 is false

(5)
check party 200 is false

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: party.lua bugs

#29 Post by lisa » Sun Jul 15, 2012 7:47 am

(1)
no output
(1) should be printing atleast the name of the player.

K added some more prints to (1) so it prints atleast something, if nothing at all printed then the keypress is in cooldown.
Attachments
partytest.xml
(2 KiB) Downloaded 351 times
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

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#30 Post by pman » Sun Jul 15, 2012 7:51 am

Code: Select all

(1)
about 20 times:
Looking for players in range
finished looking

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#31 Post by pman » Sun Jul 15, 2012 7:57 am

maybe the same problem? (but with players)

http://www.solarstrike.net/phpBB3/viewt ... =21&t=3608

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: party.lua bugs

#32 Post by lisa » Sun Jul 15, 2012 8:16 am

Slaps forehead, I had
if obj.Type == "PT_PLAYER" then
when it should be
if obj.Type == PT_PLAYER then

tested and works fine now.

Maybe your client is all messed up, did you ever try a fresh install?
Attachments
partytest.xml
(1.99 KiB) Downloaded 348 times
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

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#33 Post by pman » Sun Jul 15, 2012 8:20 am

Code: Select all

(1)
about 20 times:
Looking for players in range
Char2 found
Char1 found
Char1 found
finished looking
the rest is the same, check is false

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#34 Post by pman » Sun Jul 15, 2012 8:22 am

tried it with a char with umlauts now, to address this problem too, with (1) the name was fine, with (2) and (3) the umlauts got scrambled.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: party.lua bugs

#35 Post by lisa » Sun Jul 15, 2012 8:23 am

Then it seems to me that the "name" from (UI) memory isn't matching the "name" from object memory.

I am back to thinking it is a language (character) issue.

Do the MM prints match what you see when you look at the names in game?
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

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#36 Post by pman » Sun Jul 15, 2012 8:36 am

(1) looked like in game
(2)(3) scrambled

Update: furthermore (2)(3) somehow stores the old values, i changed char2 (with umlauts) in another char2 (without umlauts), (1) worked fine, (2)(3) looked like a much more scrambled version of the char2 name with umlauts, and not the new char2 name without umlauts.

pman
Posts: 59
Joined: Thu Jul 28, 2011 10:44 am

Re: party.lua bugs

#37 Post by pman » Sun Jul 15, 2012 8:56 am

restarted all clients

2 chars with english names:

Code: Select all

(1)
about 20 times:
Looking for players in range
Char1 found
Char2 found
finished looking

(2)
Party member 1 has the name of (totally scrambled text)
1 has name of Char1

(3)
Player has the name of Char1
Party member 1 has name of (totally scrambled text, same as with (2))

(4)
check party 100 is false

(5)
check party 200 is false

CNKTHoward
Posts: 32
Joined: Thu Jul 12, 2012 8:31 am

Re: party.lua bugs

#38 Post by CNKTHoward » Sun Jul 15, 2012 9:26 am

Why does the checkparty have to use adresses anyway? Can't one check if a partymember is in range with

Code: Select all

TargetUnit("party#");
If you get a target, the partymember is there - then clear the target with

Code: Select all

TargetUnit(nil);
and check for the next one.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: party.lua bugs

#39 Post by lisa » Sun Jul 15, 2012 9:43 am

That would work if you only wanted to check if party members were within 450 yards. We want it to work within a set distance.

It is food for thought though on another way to handle it but I don't have any issues with the current code, so trying to determine if it's a language issue or a specific issue with pman's client.

--=== Edit ===--
You can do the same with just keypresses F1 F2 F3 F4 F5 F6

Also the current checkparty code works for an entire Raid, so 50 chars (seige) or 36 normal raid.
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: party.lua bugs

#40 Post by lisa » Sun Jul 15, 2012 10:26 am

pman wrote:(1) looked like in game
(2)(3) scrambled

Update: furthermore (2)(3) somehow stores the old values, i changed char2 (with umlauts) in another char2 (without umlauts), (1) worked fine, (2)(3) looked like a much more scrambled version of the char2 name with umlauts, and not the new char2 name without umlauts.
(2) calls partytable which "clears" the table at the start
partymemberpawn={}
local partymemberName={}
local partymemberObj={}
I really don't see how it could have old info in it.

Do you hold down the keys or just do a quick press?
I noticed with (1) if I hold the key down it spams the code constantly, was still accurate for me though.


Actually
(2)
Party member 1 has the name of (totally scrambled text)
That name should have been gotten directly from the Memory I suspect as the UI, try removing all addons except for the ingamefunctions and start up client again. It is possible an addon is messing with it.
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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests