Page 3 of 3

Re: Teaming & Aggro Issue

Posted: Wed Mar 23, 2011 12:54 am
by lisa
hmm I thought I had changed them all to capital T, must have missed one.
I copy pasted code from your post earlier that had the small t ;)
took me about an hour before I worked out it should have been Capital T lol

Re: Teaming & Aggro Issue

Posted: Wed Mar 23, 2011 1:06 am
by rock5
:) You know me. Always keeping you on your toes.

Re: Teaming & Aggro Issue

Posted: Thu Mar 24, 2011 6:29 am
by lisa
I just want to clarify something.

TargetPtr is the target of target.
PetPtr is the pet's target

Code: Select all

(pawn.TargetPtr == self.PetPtr)
So for this code to be true, target or target is the same target the pet has ?
So if your target is targeting the pet then the pet would need to be targeting itself??

Hmm I think I found the value of pawn to be target.
So now we are talking pawn.TargetPtr is target of target of target which would make more sense.

Re: Teaming & Aggro Issue

Posted: Thu Mar 24, 2011 7:01 am
by rock5
I didn't quite follow all that but pawn.TargetPtr is the address of what the pawn is targeting.

player.PetPtr would be the address of your pet. I believe it only applies to warden pets.

So if pawn.TargetPtr == player.PetPtr then the pawn is targeting your pet. I think that's right.

Re: Teaming & Aggro Issue

Posted: Thu Mar 24, 2011 11:19 am
by lisa
I deff don't understand how to use pawn lol

ok in player.lua approx. line 1500
I am trying to compare the target of target name with party member name but it errors out saying I'm trying to index global 'self' a nil value.

This is the start of the code

Code: Select all

	local target = self:getTarget();
	if (( settings.profile.options.PARTY ) and player.Battling == true ) then
		if ( CPawn(target.TargetPtr).Name == GetPartyMemberName(1) ) then

Now it should have a target as this is inside the

Code: Select all

function evalTargetDefault(address)


Weird part is if I try the same code at line 280 it doesn't give an error.

Re: Teaming & Aggro Issue

Posted: Thu Mar 24, 2011 12:10 pm
by lisa
nvm I got there in the end lol

Re: Teaming & Aggro Issue

Posted: Thu Mar 24, 2011 12:24 pm
by rock5
lisa wrote:This is the start of the code

Code: Select all

	local target = self:getTarget();
	if (( settings.profile.options.PARTY ) and player.Battling == true ) then
		if ( CPawn(target.TargetPtr).Name == GetPartyMemberName(1) ) then
Um... 'self' has no meaning in the eval function. Also isn't 'target' already defined in the eval function? 'target' is already the target being evaluated. So what you want to do is check to see if it has the party member targeted. I think it should go something like this.

Code: Select all

local targettarget = target:getTarget()
if (( settings.profile.options.PARTY ) and player.Battling == true ) then
    if targettarget and targettarget.Name == GetPartyMemberName(1) then