ID:145648
 
Code:mob



mob
verb
Lightsaber_Attack(mob/M in oview(1))
set category = "Skills"
set name = "Lightsaber Attack"
if(M.ko >= 1)
usr<<"That Person Is Already Koed"
else
view()<<"[usr] Draws His/Her Lightsaber and attemps to attack [M]"
random=(1,3)
if(random == 3)
view(7) << "[M] Blocks [usr]'s Saber back at him!"
M.Life -= 0

if(random == 2)
view(7) << "[M] Blocks [usr]'s Saber back at him!"
M.Life -= 0

else
view(7) << "<B><font color = aqua>[usr]:<font color = white> Take this"
M.Life -= usr.punchstrength
M.Die()


Problem description:

The Random wont work it says :Char Moves + Signartues.dm:17:error::invalid expression towards the random = (1,3)
Wrong indendation.
mob
verb
Lightsaber_Attack(mob/M in oview(1))
set category = "Skills"
set name = "Lightsaber Attack"
if(M.ko >= 1) usr<<"[M] is already knocked out." // Just in case M is not a human.
else
view()<<"[usr] attempts to attack [M] with \his lightsaber." // \his is a text macro that, according to the gender variable, displays the corresponding text. If M is male, it would display "his", if M is female, it would display "her", if M is neuter, it would display "its".
if(prob(66)) view()<< "[M] blocks [usr]'s attack." // prob() is much better than rand() in this situation.
else
M.Life -= usr.punchstrength
M.Die(usr) // Now I assume this is a deathcheck type proc, so you've supplied the mob to check - M -, but you didn't supply the mob to be the killer - usr.