ID:138953
 
mob/var/tmp/Attacking = 0


mob
verb
Attack()
if(usr.Attacking == 0)
if(istype(usr,/mob/human))
var/ans=pick(1,2)
r=ans
if(ans==1)
spawn()flick("PunchA-1",src)
if(ans==2)
spawn()flick("PunchA-2",src)
for(var/mob/M in get_step(src,usr.dir))
var/damage = Strength * 2
M.hp -= damage
usr<<"You attack [M] for [damage] damage!"
M<<"[usr] attacks you for [damage] damage!"
usr.Attacking = 1
spawn(7)
usr.Attacking = 0

Problem description:
Okay it started out okay with not been able to spam attack with marco. Now that i added flick it just been spammble. Anyone know what problem is, i would love for the help. Please and thank you.

Your <code>Attacking</code> variable isn't really doing anything other then changing it's value, and checking if the player isn't attacking..

You're going to want to check if the player is attacking, not isn't.

mob/var/attaking=0
mob/verb/Attack()
if(usr.attaking) return // If your attacking, you can't attack until the attaking var is changed to 0.
usr.attaking=1
//attacking stuff here
spawn(7) usr.attaking=0