Page 1 of 1
Last target = Attacker (who is attacking you)
Posted: 2012-02-17 19:48:39
by tEhfO
Hi, someone has a macro to set the Last Target as the Person who is attacking you?
Example, X is attacking me, automatically my lasttarget will be him.
And I need that the person who is casting spells at you is the lasttarget too. Or attacker or the one who is casting spells at you.
Thanks!
Re: Last target = Attacker (who is attacking you)
Posted: 2012-02-18 11:24:36
by Nmy
Code: Select all
sub attack()
var enemy=uo.journalserial(uo.injournal('is attacking you')-1)
if enemy<>'0x00000000' then
if uo.getnotoriety(enemy)<>1 then
uo.set('lasttarget',enemy)
uo.print(uo.getname(enemy))
endif
endif
uo.deletejournal()
endsub
or
Code: Select all
sub attack()
var enemy=uo.journalserial(uo.injournal('is attacking you')-1)
if enemy<>'0x00000000' then
uo.set('lasttarget',enemy)
uo.print(uo.getname(enemy))
endif
uo.deletejournal()
endsub
This needs to be tested. I'm not sure
Re: Last target = Attacker (who is attacking you)
Posted: 2012-02-18 13:58:01
by tEhfO
Thanks man, i'll test it and than i'll reply to you! The server is offline now for maintance.
But sometimes people only start to cast spells at me, so, the macro will not get the enemy because the warning of "is attacking you" is not at the journal...
Is that right?
Re: Last target = (who is attacking you) or casting spells
Posted: 2012-02-18 14:38:12
by tEhfO
Hey man, it worked, thanks!
But how can I do to mark the lasttarget as the person who is casting spells at me?
Maybe using the .detail ON...
XXX hit you at the back!
For example...
Or whithout the detail on...
Thanks!