-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#41
Post
by lisa » Wed Mar 23, 2011 12:54 am
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
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#42
Post
by rock5 » Wed Mar 23, 2011 1:06 am

You know me. Always keeping you on your toes.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#43
Post
by lisa » Thu Mar 24, 2011 6:29 am
I just want to clarify something.
TargetPtr is the target of target.
PetPtr is the pet's target
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.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#44
Post
by rock5 » Thu Mar 24, 2011 7:01 am
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.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#45
Post
by lisa » Thu Mar 24, 2011 11:19 am
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.
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#46
Post
by lisa » Thu Mar 24, 2011 12:10 pm
nvm I got there in the end lol
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#47
Post
by rock5 » Thu Mar 24, 2011 12:24 pm
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
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
Who is online
Users browsing this forum: Bing [Bot] and 4 guests