Page 1 of 1

Need CodeLine for detection if my follower have aggro !

Posted: Thu Jun 11, 2009 6:55 am
by kumpel100
i need a code line to Detect if my following Priest had aggro from a Mob while my Main Bot account not assist my priest, something like this:

Code: Select all

if( self.Battling and self.TargetPtr ~= 0 ) then 
	cprintf(cli.green, "Priest had Aggro ??\n");
	end

better seems that:

if( self.Battling and target.HP <= 1 ) then
cprintf(cli.green, "Priest had Aggro ??\n");
	end
im rly new in lua

self.Battling = im fight or im not fight but my grp mate is in battle?
self.TargetPtr ~= 0 = i didnt have a target right?

Re: Need CodeLine for detection if my follower have aggro !

Posted: Thu Jun 11, 2009 1:18 pm
by kumpel100
this is a first step:

Code: Select all

 if( self.Battling and target.HP <= 1 ) then 
	cprintf(cli.red, "Priest hat Aggro ??\n");
	keyboardHold(settings.hotkeys.MOVE_BACKWARD.key);
					yrest(2000);
					keyboardRelease(settings.hotkeys.MOVE_BACKWARD.key);
					yrest(100);
	keyboardPress(settings.hotkeys.TARGET.key);
			if(settings.hotkeys.TARGET.modifier) then
				keyboardRelease(settings.hotkeys.TARGET.modifier);
				end
	end;
does very basic what i want..

Re: Need CodeLine for detection if my follower have aggro !

Posted: Thu Jun 11, 2009 3:23 pm
by Administrator
Try pressing F2 and then assist (which I believe is F). That should target whatever is attacking your priest.