Originally posted by [b]Saithis[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=941
CODE
in_moc_16,21,165,2 script Standby Room#ASNTEST 725,{
end;
OnInit:
disablenpc "Standby Room#ASNTEST";
waitingroom "Standby Room",10,"Standby Room#ASNTEST::OnStartArena",1;
end;
OnStartArena:
set $@SinUsers, getareausers("in_moc_16", 60, 136, 93, 177);
set $@SinUsers, $@SinUsers + getareausers("in_moc_16", 64, 46, 111, 105);
if ($@SinUsers > 0) end; // stops the rest of the script from running if there is somebody taking the test
if ((getwaitingroomstate(33)) == 0) end; // stops the rest of the script from running if there is no one in the waiting room
killmonsterall "in_moc_16";
warpwaitingpc "in_moc_16", 66, 151;
donpcevent "Beholder#ASNTEST::OnEnable";
donpcevent "Keeper of the Door#ASN::OnDisable";
set getvariableofnpc(.DisableTraps,"Beholder#ASNTEST"),0;
end;
}
This waiting room warps everybody in, so you don't need to do the question part
and the NPC under the Chat with the OnTouch label don't trigger, if you stand more than 4 cells away