Page 2 of 2

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 8:29 am
by doct
solucionado muxas gracias por la ayuda

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 11:14 am
by Alkaiser
The only problem I've discovered is player.Mounted is always false, even when mounted.

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 11:39 am
by rock5
I've checked 'Mounted', it works. Anything unusual about your setup?

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 12:33 pm
by Alkaiser
rock5 wrote:I've checked 'Mounted', it works. Anything unusual about your setup?
Interesting... No, nothing special that I know of... I guess I'll have to look into it more.

EDIT: Ooops, actually player.Mounted seems to always be true.

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 1:56 pm
by Alkaiser
This worked pre-patch:

Code: Select all

		repeat
			player:dismount()
			yrest(2000)
			player:update()
			printf("Player Mounted: "..tostring(player.Mounted).."\n")
		until not player.Mounted
But now it gets caught in a summon mount/cancel mount loop. And since there is no player.mount() in this loop, I'm a bit confused as to why it is summoning the mount at all.

I'm running the rom4u.com client, though it should be the same as the official one.

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 2:22 pm
by rock5
Works fine for me.

If not mounted

Code: Select all

Already dismounted.
Player Mounted: false
If mounted but player:update() not run yet

Code: Select all

Already dismounted.
Player Mounted: true
Player Mounted: false
If mounted and player:update() is run beforehand.

Code: Select all

Player Mounted: false
In each case it ends in it being dismounted and the output is what is to be expected.

The reason it mounts even though you don't have a player:mount() in the loop is because one of the ways it dismounts is to use the mount.

I use the rom4u client too so that's ok.

Maybe it has something to do with the mount you use or some unexpected buff you have that is confusing it.

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 2:34 pm
by Alkaiser
OK, I figured out what was causing it (but not how). player.Mounted stops working correctly when in a party. I leave the party and it starts working again.

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 2:51 pm
by MinMax
The same problem. But only i take priest. Rouge, knight,scout, mage, warden are working fine.

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 3:02 pm
by rock5
Now we're getting closer.

Looking at the actual value it reads from memory, it looks like only 1 bit indicates if it's mounted.

Try this. Change line 274 of pawn.lua

Code: Select all

	self.Mounted = memoryReadRepeat("byte", proc, self.Address + addresses.pawnMount_offset) ~= 1;
to

Code: Select all

	self.Mounted = bitAnd(memoryReadRepeat("byte", proc, self.Address + addresses.pawnMount_offset), 0x10);
Seeing as different bits seem to mean different things at this offset, I just realised that it is part of the pawnAttackable_offset which holds other flags. I'll probably have to fix it to use that offset.

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 3:26 pm
by rock5
I committed a fix in rev 717.

If you made the change I suggested above, you will probably get a conflict when updating so make sure you do an svn/revert on pawn.lua.

Re: Patch 4.011.2531

Posted: Wed May 23, 2012 9:19 pm
by Alkaiser
Yep! Working great now. Thanks.