Yoko

All sides of Injection
It is currently 2025-12-26 06:16:19

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2008-03-11 10:53:43 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
hello,

i'm making a script where one of my chars will cast magic arrow on my another char. i need my script to STOP casting magic arrow and wait for him to heal up when target's hp reaches lets say 20hp. how do i do that?


Top
   
PostPosted: 2008-03-12 14:50:58 
Offline

Joined: 2007-04-26 23:35:15
Posts: 220
utternoob wrote:
hello,

i'm making a script where one of my chars will cast magic arrow on my another char. i need my script to STOP casting magic arrow and wait for him to heal up when target's hp reaches lets say 20hp. how do i do that?


Try to do something like this:
Code:
sub magicarrow()
  var target = '0x000000' ; serial of the 2nd char
  var mana
  while not uo.dead()
    mana = uo.mana
    uo.cast( 'Magic Arrow', target )
    repeat
      wait( 100 )
    until mana > uo.mana
    if uo.gethp( target ) < 20 then
      while uo.gethp( target ) <> uo.getmaxhp( target )
        wait( 100 )
      wend
    endif
  wend
endsub

Also you can add here reagents and mana check ;)


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 0 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:  
Powered by phpBB® Forum Software © phpBB Limited