mob
verb
Challenge(mob/M in world)
set category = "Misc"
switch(input("Are you sure you wish to challenge [M.name]?","Challenge")in list("Yes","No"))
if("No")
usr << "You decided not to challenge [M.name]."
if("Yes")
switch(input(M,"[usr.name] has challenged you to a fight. Will you accept?","Challenge")in list("Yes","No"))
if("No")
M << "You declined the challenge."
if("Yes")
M << "You have accepted [usr.name]'s challenge!"
usr << "[M.name] has accepted your challenge!"
//here i would call the battle proc
I need to know how to make it so you cannot challenge yourself to a fight. Also, when i tested it sometimes it didn't work right. You would challenge the other guy but you would get every message. Any tips would be greatly appreciated :)
if(M.name == usr.name)
usr << "You cannot challenge yourself."
Of course, in my challenge code, I have it set so that you challenge the person directly in front of you, but I don't know how your game is set up. As far getting every message, I don't know. The code looks okay to me.