party indicator usage or not, post thoughts thanks
Posted: Fri Oct 07, 2011 9:34 am
I found an indicator for if in party or not.
Looks like this
in pawn.lua
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
So in pawn.lua this line
Could be replaced with
replaced with
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.
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
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
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) ) thenCode: 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
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.