last attack script..

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

last attack script..

Post 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.
Rivory
Posts: 205
Joined: 2005-01-06 11:49:28

Post 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
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Post 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 ;:)
Rivory
Posts: 205
Joined: 2005-01-06 11:49:28

Post 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
Mihail
Expert!
Posts: 548
Joined: 2005-05-20 20:30:10
Contact:

Post by Mihail »

hotkey:

Code: Select all

attack "lastattack"
Post Reply