ID:264496
 
Code:
mob/var/Cdamage=0
mob
verb/Attack(mob/M in oview(1))
set category = null
set hidden=1
var/damage = src.Cdamage
if(M.client)
if(C==0)
src.combo1=1
src.C++
src.Cdamage+=rand(15,20)
icon_state="Attack"
sleep(4)
icon_state=""
M.hp-=Cdamage
M.DeathCheck()
if(C==1)
if(src.combo1==1)
src.combo2=1
src.C++
src.Cdamage+=rand(20,30)
icon_state="Attack 2"
sleep(1)
icon_state=""
M.hp-=Cdamage
M.DeathCheck()
if(C==2)
if(src.combo2==1)
src.combo3=1
src.C++
src.Cdamage+=rand(30,40)
icon_state="Attack 3"
sleep(1)
icon_state=""
M.hp-=Cdamage
M.DeathCheck()
if(C==3)
if(src.combo3==1)
src.combo4=1
src.Cdamage+=rand(40,50)
src.C++
icon_state="Attack 4"
sleep(1)
icon_state=""
M.hp-=Cdamage
M.DeathCheck()
if(C==4)
if(src.combo4==1)
src.combo5=1
src.Cdamage+=rand(50,60)
src.C++
icon_state="Attack 5"
sleep(10)
icon_state=""
M.hp-=Cdamage
M.DeathCheck()
if(M.blocking == 1)
M<< "You Blocked The [src]'s attack!"
M.hp-=0

else
M.hp -= damage
src <<"You attack [M] for [Cdamage] hp!"
M <<"You are hit by [src] for [Cdamage] hp!"
var/random = rand(1,3)
if(random == 1)
src.exporbs += 5
if(random == 2)
src.exporbs += 25
if(random == 3)
src.exporbs += 40
src.level_up()
M.DeathCheck(src)


Problem description:
the code only preforms the first attack. and help would be appreciated
Diagnosis time.

Add world<<"[C], [combo1], [combo2], [combo3], [combo4],[combo5]" to the line right below if(M.client). Attack a few times, see what happens.
Those if() statements are not exclusive. You hit one, and it then fulfills the conditions for the second, so it hits that one, fulfilling the conditions for the third, and so on.
In response to Garthor
so what would you recomend i do to remedy that use a few else's in there?
In response to B-mut
B-mut wrote:
so what would you recomend i do to remedy that use a few else's in there?

Two options.

1:
if(N==1) world<<"woot"
else if(N==2) world<<"woot 2"
else if(N==3) world<<"woot 3"
else world<<"Fail"


2:
switch(C)
if(1) world<<"PWN"
if(2) world<<"etc"
In response to AJX
thanks AJX that did the trick
In response to B-mut
B-mut wrote:
thanks AJX that did the trick

lol NP, but Garthor was the one who answered the question.
In response to AJX
yeah just noticed that lol ,thanks Garthor XD!!!