Page 1 of 1
help with targeting
Posted: 2006-02-21 15:05:14
by zombiemoses
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.
Posted: 2006-02-21 15:16:19
by zombiemoses
something like this
UO.Exec("cast 'Magic Arrow' ????")
or just attack a monster somehow would work
Posted: 2006-02-21 22:59:34
by flake
If you know the type of the ants it is no problem.
Code: Select all
uo.findtype( 'type_here', '-1', 'ground' )
if uo.findcount() then
uo.warmode(1)
uo.attack('finditem')
endif
Posted: 2006-02-22 11:53:46
by zombiemoses
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.
Posted: 2006-02-22 15:10:05
by flake
Code: Select all
uo.findtype( 'type_here', '-1', 'ground' )
if uo.findcount() then
uo.warmode(1)
uo.cast('Magic Arrow', 'finditem')
endif
Posted: 2006-02-22 22:49:47
by zombiemoses
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
Posted: 2006-02-22 23:30:29
by flake
It will now wait till the ent is dead. You can also insert some healing functions.
Code: Select all
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