[Plugin Help] Detecting Party Aggressives

For everything NOT server specific support. Do NOT ask for connectivity help here!.

Moderator: Moderators

Message
Author
catcity
Noob
Noob
Posts: 18
Joined: 20 Oct 2012, 14:31
Noob?: No

[Plugin Help] Detecting Party Aggressives

#1 Post by catcity »

Okay, if someone could point me in the right direction for this I would appreciate it, as I've given myself a headache trying to figure it out.

What I am trying to do is trigger a skill (Provoke) when a party member is being attacked on screen. To do that I am trying to detect when a party member is being attacked and by what (Monster ID), but what I have tried has not worked so far. Here's my latest attempt:

Code: Select all

sub on_mainLoop {
	foreach (@partyUsersID) {
		my @aggressives = ai_getPlayerAggressives();
		my $aggressives = @aggressives;
		if ($aggressives > 0) {
			message "Never gets this far.";
			}
		}
	}
Falling at the first hurdle here.

In place of @partyUsersID I've also tried swapping in $char->{party} and $char->{party}{users}{$id} but I just seem to have hit a dead end in trying to get what I am trying to achieve. Also, I am sure I don't need to do this on the mainLoop either. I tried hooking into checkPlayerCondition, but that just didn't trigger at all.

Any help appreciated,

Thanks,

cat.
There's two types of people in this world, kid: Those who can, and those who can't; and cats...

[Plugin] Automatic Map Changer