Yoko

All sides of Injection
It is currently 2025-11-12 20:50:23

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: help with targeting
PostPosted: 2006-02-21 15:05:14 
Offline

Joined: 2006-02-04 22:59:40
Posts: 13
is there a command that will target a monster randomly on the screen to cast a spell on. im lumber jacking and tree ents spawn every once in awhile and i want to cast a spell on them to get them to attack me right away.


Top
   
 Post subject:
PostPosted: 2006-02-21 15:16:19 
Offline

Joined: 2006-02-04 22:59:40
Posts: 13
something like this

UO.Exec("cast 'Magic Arrow' ????")

or just attack a monster somehow would work


Top
   
 Post subject:
PostPosted: 2006-02-21 22:59:34 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
If you know the type of the ants it is no problem.

Code:
uo.findtype( 'type_here', '-1', 'ground' )
    if uo.findcount() then
      uo.warmode(1)
      uo.attack('finditem')
   endif


Top
   
 Post subject:
PostPosted: 2006-02-22 11:53:46 
Offline

Joined: 2006-02-04 22:59:40
Posts: 13
is there no way to target it with a spell? im running a lumber jacking srcipt and i want the ent to attack ME and it has a slow agro so i figure the best way would be to hit it with a spell like magic arrow. i tried the one you gave me but sometimes it moves out of the line of site so it ends up not attacking me and my script just sits there waiting for the next commands to set it off wich is the death of the ent.


Top
   
 Post subject:
PostPosted: 2006-02-22 15:10:05 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Code:
uo.findtype( 'type_here', '-1', 'ground' ) 
    if uo.findcount() then
      uo.warmode(1)
      uo.cast('Magic Arrow', 'finditem')
   endif


Top
   
 Post subject:
PostPosted: 2006-02-22 22:49:47 
Offline

Joined: 2006-02-04 22:59:40
Posts: 13
it sorta works...when the ent appears it casts the spell and all but it does it over and over and doesnt stop, and it does it so fast that it fizzles before the spell could get off. i just want to do it once the ent will attack me then just melee it do death


Top
   
 Post subject:
PostPosted: 2006-02-22 23:30:29 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
It will now wait till the ent is dead. You can also insert some healing functions.

Code:
uo.findtype( 'type_here', '-1', 'ground' ) 
    if uo.findcount() then
      uo.warmode(1)
      uo.cast('Magic Arrow', 'finditem')
        repeat
           wait(500)
       until uo.dead('finditem')
    endif


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 9 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