ID:178911
 
I got a response for my other posts
Now the MUD!

My MUD battle system has 3 commands. Attack,Dodge, and Jump Attack, But no matter which I select, It does attack! Heres the code:

mob
proc
DeathCheck()
if(usr.YourHp == 0)
usr<<"You die.."
alert("Continue?",,"Yes","No")
if("Yes")
usr.locname = "Ground Zero"
usr.locinfo = "Not much.."
usr.YourHp = 10
var
HisHp = 4
YourHp = 10
dodge = 0
Half = 0
Dungeon
verb
Battle()
sleep(4)
usr<<"\icon[usr][usr]:Who's there?!"
sleep(2)
usr<<"??:Ahahahahahaa!!"
sleep(2)
usr<<"\icon[usr][usr]:Who are you??!"
sleep(2)
usr<<"Man from Hades,Hamaka"
sleep(4)
usr<<"Info Box:Hamaka is pretty strong! Beware of his attacks and plan ahead! Unlike Hamaka!"
Battle1
if(HisHp == 0)
usr<<"Hamaka:NOO!"
else
input("Select a command!")in list("Attack","Dodge","JumpAttack")
if("Attack")
usr.HisHp -= 1
usr<<"Hamaka:Graaaaal!"
usr.YourHp -= rand(1,3)
usr<<"[usr.YourHp] health left!"
usr:DeathCheck()
if(usr.YourHp <= 0)
usr<<"Too Bad!"
else
goto Battle1
if("Dodge")
usr<<"You Dodge!"
goto Battle1
if("JumpAttack")
usr<<"You pounce on Hamaka's Head!"
usr.Half += 1
usr.YourHp -= 1
usr<<"[usr.YourHp] health left!"
usr:DeathCheck()
if(usr.Half == 2)
usr.Half = 0
usr.HisHp -= 1
if(usr.YourHp <= 0)
usr<<"Too Bad!"
else
goto Battle1

Can someone please help me?
You're using a series of "if" statements as if they were part of a "switch" statement, which they are not in this case.

Read up on switch in the Reference.
Again, I strongly suggest you stop using goto here--and close your HTML tags. Goto is a useful language construct but not in this situation--you need a while() loop you can break out of. It will save you space and it makes your code a little easier to follow.

Lummox JR