PDA

View Full Version : Auto attack script need improvement


Chanslös
30-09-2006, 01:21 PM
Hi i got to scripts and can any one improve them for me plz
Thees scripts have 2 purposes.
1.Turning off/on Auto Attack
2.Turning off/on Defend your self

This script i for searching for enemy and turning on auto attack.

/script p="player";t="target";z="targettarget";if UnitHealth(t)>0 then if UnitHealth(z)>0 then if UnitIsFriend(p, t) and UnitIsEnemy(p,z) then AssistUnit(t);AttackTarget();end;end; else TargetNearestEnemy();end; AttackTarget();
/dy on

Can any one modify it to turn on auto attack when target is in melee range. For reckoning....
-------------------------

I got this script for turning off the auto attack Flexbar code.
flexmacro id=13 texture='Interface\icons\Spell_Holy_BlessingOfStrength.tga' name='DyPanic15' macro='/dy off'
runscript script='ClearTarget(); TargetLastEnemy()' on='leftbuttonclick' target='13'

Can any one modify it to. If i got no target i do not gene a target like this.
IF player got target then
.ClearTarget
.if UnitHealth(LastEnemy)>0 then
..TargetLastEnemy
.End
Else
.ClearTarget
End

Hope any one understand my poor English...