Page 1 of 1

party indicator usage or not, post thoughts thanks

Posted: Fri Oct 07, 2011 9:34 am
by lisa
I found an indicator for if in party or not.
Looks like this
in pawn.lua

Code: Select all

	local tmpp = memoryReadRepeat("int", proc, self.Address + addresses.pawnAttackable_offset) or 0;
	if bitAnd(tmpp,0x80000000) then
		self.InParty = true
	else
		self.InParty = false
	end
then basically we can check a pawn for .InParty and know that it is someone who is in our party.

So then we can do a function along the lines of this

Code: Select all

function inparty(_name)
	local objectList = CObjectList();
	objectList:update();
	local objSize = objectList:size()
	for i = 0,objSize do 
		obj = objectList:getObject(i);
		if obj.InParty == true then --pawn in party
			if obj.Name == _name then
				return true
			else
				return false
			end
		end
	end
end
So in pawn.lua this line

Code: Select all

	if( self.TargetPtr == self.Address or tmp.Name == GetPartyMemberName(1) or tmp.Name == GetPartyMemberName(2) or tmp.Name == GetPartyMemberName(3) or tmp.Name == GetPartyMemberName(4) or tmp.Name == GetPartyMemberName(5) ) then
Could be replaced with

Code: Select all

if( self.TargetPtr == self.Address or tmp.InParty == true then 

Code: Select all

(( (pawn.TargetPtr == self.Address or (pawn.TargetPtr == self.PetPtr and self.PetPtr ~= 0) or (_target.Name == GetPartyMemberName(1) )  or (_target.Name == GetPartyMemberName(2) ) or (_target.Name == GetPartyMemberName(3) ) or (_target.Name == GetPartyMemberName(4) ) or (_target.Name == GetPartyMemberName(5) ) ) and
						aggroOnly == true) or aggroOnly == false) ) then
replaced with

Code: Select all

(( (pawn.TargetPtr == self.Address or (pawn.TargetPtr == self.PetPtr and self.PetPtr ~= 0) or _target.InParty == true then

Ok few things to note,
-obviously it will only say if in party or not, doesn't say which position in party.
-Doesn't return any info for party members out of memory range
-uses memory so can be very fast and less load then using sendmacro

If we decided to use this in the bot it would basically mean rewriting all the original partymember code I added in to bot, time consuming and slighty painful lol

On the plus side, it uses an existing address which we find for other things in bot so it would mean we wouldn't need to find the elusive partymember address ever again.

thoughts??

Also haven't tested it in raid yet.

Re: party indicator usage or not, post thoughts thanks

Posted: Fri Oct 07, 2011 9:42 am
by lisa
Good news, it also indicates in Raid aswell regardless of if in same group or not.

So with it we could basically set partydps and partyhealer to work within a raid and normal botting of course.

Re: party indicator usage or not, post thoughts thanks

Posted: Fri Oct 07, 2011 10:37 pm
by lisa
Currently have it so only part of bot that uses the old partymemberName is party bot.

So now it is a matter of rewriting party bot to use this indicator.

So do we do a search of pawns and then fill a table with pawns that have .InParty and then look at healing/buffing them?


Other issue is the follow, since we don't have the names of party members by where they are in party order, RoMScript("FollowUnit('party1');") won't work anymore.
Might be time to start using moveto or moveinrange.
Still would need a way to decide which to follow, maybe a check for party leader and just follow the leader?

Re: party indicator usage or not, post thoughts thanks

Posted: Sat Oct 08, 2011 11:48 am
by jasn
if its possible to do,

Moveto when out of combat and moveinrange when in combat.

Was thinking of that i wouldnt have a squichy caster next to the tank when hitting a boss that needs to be turned away from party.
Ex, the chimera in DoD u want to turn its head from the party before it spews the fire.

Re: party indicator usage or not, post thoughts thanks

Posted: Sun Oct 09, 2011 2:42 am
by lisa
I updated bot using the new indicator for pawn being in party.

revision 655