ID:262630
 
Code:
mob/proc
examtime()
if(src.rank == "Academy Student")
spawn(33000)
usr <<"<b>Exam in 5 mins</b>"
teston=1
spawn(3000)
usr << "You may take the test now."
teston=0
examtime()


Problem description:Thats my proc for the exam i basically want it to tell everyone with the rank academy student every 55 mins it will warn u that theres a test soon and every hour it will say the test has began

If this is something that will be happening pretty much all of the time you may aswell do it as a single loop rather than having a number of them running for different people.

world/New()      //when the world starts start the exam() proc
..()
spawn()exam()

proc/exam()
while(1) //we want the loop to go continuously...
sleep(33000)
for(var/mob/M in world) //loop through the mobs in the world
if(M.rank == "Academy Student") //if their rank is "Academy Student" do the below:
M<<"<b>Exam in 5 mins</b>"
M.teston=1
sleep(3000)
for(var/mob/M in world) // loop through again, doing the below if rank is "Academy Student"
if(M.rank == "Academy Student")
M<<"You may take the test now."
M.teston=0