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

help with targeting
http://forum.yoko.com.ua/viewtopic.php?f=1&t=5876
Page 1 of 1

Author:  zombiemoses [ 2006-02-21 15:05:14 ]
Post subject:  help with targeting

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.

Author:  zombiemoses [ 2006-02-21 15:16:19 ]
Post subject: 

something like this

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

or just attack a monster somehow would work

Author:  flake [ 2006-02-21 22:59:34 ]
Post subject: 

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

Author:  zombiemoses [ 2006-02-22 11:53:46 ]
Post subject: 

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.

Author:  flake [ 2006-02-22 15:10:05 ]
Post subject: 

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

Author:  zombiemoses [ 2006-02-22 22:49:47 ]
Post subject: 

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

Author:  flake [ 2006-02-22 23:30:29 ]
Post subject: 

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

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