Page 1 of 1

last attack script..

Posted: 2007-06-02 15:28:58
by motxu
imagine im attacking someone. Then he paralizes me and i have to explode a explosion potion in my pack to desparalize. Then i want to attack again last target...

sub sb()
VAR oppo
uo.addobject ('oppo','lasttarget')
UO.exec ("waittargettype 0x0F0D")
UO.cast ("Magic Arrow")
uo.exec ("waittargetobject 'oppo'")
end sub

Why doesnt that work? :D any help is welcome thanks.

Posted: 2007-06-02 19:09:15
by Rivory

Code: Select all

sub sb() 
var mana
UO.exec ("waittargettype 0x0F0D")  ##lock the target
mana = uo.mana
UO.cast ("Magic Arrow")     ##cast spell on target
repeat
  wait(50)          ##wait for end of cast
until mana > uo.mana
uo.attack('lasttarget')  ##attack enemy
end sub

Posted: 2007-06-02 21:53:40
by motxu
nope, u havent understood.
Im attacking someone, imagine its called Asgaroth.
Then i want to explode a exposion potion from my pack using Magic Arrow.
But then i wanna continue casting spells to Asgaroth, get his target again.
I need a macro that doesnt miss Asgaroth's target and also exploses a bomb. Thanks ;:)

Posted: 2007-06-03 08:49:20
by Rivory

Code: Select all

sub sb() 
var mana,enemy=uo.getserial('lasttarget')
UO.exec ("waittargettype 0x0F0D")  ##lock the target
mana = uo.mana
UO.cast ("Magic Arrow")     ##cast spell on target
repeat
  wait(50)          ##wait for end of cast
until mana > uo.mana
uo.cast('Magic Arrow',enemy)  ##attack enemy
end sub

Posted: 2007-06-07 15:23:24
by Mihail
hotkey:

Code: Select all

attack "lastattack"