Yoko
http://forum.yoko.com.ua/

Last target = Attacker (who is attacking you)
http://forum.yoko.com.ua/viewtopic.php?f=17&t=16903
Page 1 of 1

Author:  tEhfO [ 2012-02-17 19:48:39 ]
Post subject:  Last target = Attacker (who is attacking you)

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!

Author:  Nmy [ 2012-02-18 11:24:36 ]
Post subject:  Re: Last target = Attacker (who is attacking you)

Code:
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:
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

Author:  tEhfO [ 2012-02-18 13:58:01 ]
Post subject:  Re: Last target = Attacker (who is attacking you)

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?

Author:  tEhfO [ 2012-02-18 14:38:12 ]
Post subject:  Re: Last target = (who is attacking you) or casting spells

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!

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/