ID:178516
 
How would I make it so that when you attack something you can't hold down the macro and it zooms by. This is my Attack Proc can you show me what I add in to slow down?

mob
proc
PlayerAttack()
if (usr.Huma1==1)
flick("Barbarianattack",usr)
usr<<"<B><font color=blue>You attack [monster] for <font color=green>[damage]<font color=blue> damage!"
src.Life-=usr.damage

Thanks

-SG15



mob
proc
PlayerAttack()
if (usr.Huma1==1)
if(usr.hittime==1)
usr<<"Slow down there bucko"
else
usr.hittime=1
flick("Barbarianattack",usr)
usr<<"<font color=blue>You attack [monster] for <font color=green>[damage]<font color=blue> damage!"
src.Life-=usr.damage
sleep(20)
usr.hittime=0
try something like that
In response to Scoobert
Hmmm....I tried that and it worked the first time then it just stoped sending the your attacking it message.This is what my code looks like....

mob
proc
PlayerAttack()
if (usr.Huma1==1)
if (usr.hittime==1)

else

usr.hittime=1
flick("Barbarianattack",usr)
usr<<"<B><font color=blue>You attack [monster] for <font color=green>[damage]<font color=blue> damage!"
src.Life-=usr.damage
sleep(attackdelay)
usr.hittime=0


-SG15

In response to SuperGoku15
Hee Hee, Silly, I can tell you the problem...

proc
PlayerAttack(mob/Huma1,mob/monster)
if (usr.Huma1==1)
if (Huma1.hittime==1)
else
Huma1.hittime=1
flick("Barbarianattack",Huma1)
usr<<"<font color=blue>You attack Monster] for <font color=green>[damage]<font color=blue> damage!"
monster.Life -= Huma1.damage
sleep(Huma1.attackdelay)
Huma1.hittime=0

This is of course assuming Huma1 is the player in question to use the proc... And so if he/she is, just have your attack verb look like this

mob
verb
Attack(mob/monster in oview(1))
PlayerAttack(usr,monster)