Page 1 of 1

Corpse check !

Posted: November 16th, 2007, 2:56 pm
by kumpel100
looking for a way to check if my current target is a corpse !
i want make my loot routine more accurate.

so thx for any examples :)

Posted: November 16th, 2007, 6:28 pm
by wyvernx
should be able to call target.hp and if the hp is 0?

Posted: November 16th, 2007, 6:33 pm
by beergeek
just use a macro with the following:

/targetnextcorpse
/lootall

Posted: November 17th, 2007, 12:55 am
by kumpel100
beergeek wrote:just use a macro with the following:

/targetnextcorpse
/lootall
the point is i want to harvest my death mob.. so normal macro is
/targetnextnode
/autoattack

is now a Node close to my mob is possible my macro try to harvest the Node not the mob.


ok i try the target.hp thing.
if there is a death mob corpse and a plant remains both show with 0% or sometimes with 100% hp... so seems me not the perfect way.
need a save way that my current target is the death corpse from mob and not a remains from plant.

Edit:
i try this:
if (getTargetLevel > 2) then

Plants always lvl 1
and mobs mostly above

so i know my current target must be a death mob.

Posted: November 17th, 2007, 8:19 am
by beergeek
Since plant nodes have a limited set of names... you could just use something like

if (InStr(getTargetName, "Firegrass") <= 0) AND _
(InStr(getTargetName, "Silkbloom") <= 0) Then
....harvest...
end if

Posted: November 22nd, 2007, 11:17 am
by kumpel100
beergeek wrote:Since plant nodes have a limited set of names... you could just use something like

if (InStr(getTargetName, "Firegrass") <= 0) AND _
(InStr(getTargetName, "Silkbloom") <= 0) Then
....harvest...
end if
ahhh that was my missing Part thx alot :)