mob
{
verb
Challenge(mob/M in world)
set name = "Arena Challenge"
if(M.npc==1)
usr << "You cannot challenge a NPC!"
return
if(M == usr)
usr<<"You can not challenge yourself."
return
if(arenainuse)
usr<<"Arena in use."
return
if(M.AFK)
usr<<"Not while afk."
return
if(usr.AFK)
usr<<"Not while your afk."
return
if(usr.level<=2000)
usr<<"To weak to use the challange arena.(Must be level 2000+)"
return
if(M.level<=2000)
usr<<"[M] is weak to use the challange arena.(Must be level 2000+)"
return
if(M.inarena&&usr.inarena)
usr<<"Your allredy in the arena."
return
if(usr.injail==1&&M.injail==1)
usr<<"Not while your jailed."
return
else
world << "<b><font size =2>Arena News:</b></i></u>[M] has been challenged by [usr]!"
M.time()//may be reason
switch(input(M,"You have been challenged by [src]",text) in list ("Accept","Decline"))
if("Accept")
if(M.timeout)
M<<"This challenge has expired."
M.timeout=0
return
else
M.loc = locate(226,116,2)
usr.loc = locate(252,116,2)
arenainuse=1
usr.inarena=1
M.inarena=1
M.timeout=0
world << "<b><font size =2>Arena News:</b></i></u>[M] and the challanger [usr] has entered the Arena!"
if("Decline")
usr.inarena=0
M.inarena=0
M.timeout=0
world << "<b><font size =2>Arena News:</b></i></u>[M] had declined the challange!"
}
var/arenainuse
mob/var/inarena
mob/var/tmp/timeout
mob
proc
time(mob/M)
usr<<"Countown 30 seconds for your opponent to answer."
sleep(350)
if(M.inarena) return
usr<<"Failed to respond..."
M.timeout=1
return
Problem description:
The verb works great(i made it from scratch yesterday), but the timeout function doesnt work. I am just trying to make a sample arena system, but I am trying to do a system so say some one is afk, they dont answer to decline or accept, i want it so after 30 seconds or so if u answer u wont be taken to the challenge arena. and it would say M<<"This challenge has expired.", so in case some one is busy some where else and forgot about the challenge, 2 hours later they in arena and they could have been in the middle of something important. So please give assistance, i tried using the continue proc but it didnt work. Help me please.