Yoko

All sides of Injection
It is currently 2024-03-29 14:40:41

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2012-02-17 19:48:39 
Offline

Joined: 2012-02-17 19:44:59
Posts: 7
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!


Last edited by tEhfO on 2012-02-18 14:33:48, edited 1 time in total.

Top
   
PostPosted: 2012-02-18 11:24:36 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
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

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
PostPosted: 2012-02-18 13:58:01 
Offline

Joined: 2012-02-17 19:44:59
Posts: 7
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?


Top
   
PostPosted: 2012-02-18 14:38:12 
Offline

Joined: 2012-02-17 19:44:59
Posts: 7
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!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited