verb
Attack(mob/M in oview(1))
set category = "Fighting"
switch(input("Attack Or Flee?","What would you like to do!",text) in list ("Attack","Flee"))
if("Attack")
if(M.npc == 0)
var/dam = rand(5,usr.str)
dam -= rand(1,M.def)
if (dam > 0)
M.hp -= dam
view(6) << "[usr] attacks [M] for [dam] health!"
else
view(6) << "[usr] attacks [M] but MISSES!"
if (M.hp <= 0)
die(M)
else
usr << "You can't hit npc's!"
return
ID:148223
![]() May 19 2003, 4:35 pm
|
|
Wut this is supposed to do is when i click Attack close to a npc then it attacks but for ome reason after the list comes up and i lick attack it stops it dosent call back up the list
|
Attack(mob/M in oview(1))
set category = "Fighting"
var/a = input("What is your battle tactic?")in list("Attack","Flee?")
if(a=="Attack")
if(M.npc == 0)
var/dam = rand(5,usr.str)
dam -= rand(1,M.def)
if (dam > 0)
M.hp -= dam
view(6) << "[usr] attacks [M] for [dam] health!"
else
view(6) << "[usr] attacks [M] but MISSES!"
if (M.hp <= 0)
die(M)
else
usr << "You can't hit npc's!"
return
ah yes, and for the Flee, just put, if(a=="Flee")