I wrote this very quickly, forgive any errors. It's pretty straight forward, see what you can do with it
quiz_02,347,387,4 script Trivia Control 123,{
[email protected]$ = "[^0000FFTrivial Controller^000000]";
mes
[email protected]$;
mes "Hello " + strcharinfo(0);
if(getgmlevel() < .minGM) close;
switch(.active) {
case 1:
mes "Players are still entering. Please wait.";
close;
case 2:
switch(select("Ask Question:End Event")) {
case 1:
mes "Please input your question.";
input
[email protected]$;
mes "Is it true or false?";
[email protected] = select("True:False");
next;
mes
[email protected]$;
mes "Please verify your question:";
mes
[email protected]$;
mes (
[email protected] == 1 ? "True" : "False");
select("Proceed");
close2;
announce "Question time!",bc_map;
sleep2 2000;
announce "True or False?",bc_map;
announce
[email protected]$,bc_map;
donpcevent "TrueWarp::OnActive";
donpcevent "FalseWarp::OnActive";
sleep2 25000;
announce "5 seconds!",bc_map;
sleep2 5000;
donpcevent "TrueWarp::OnClose";
donpcevent "FalseWarp::OnClose";
announce "The answer is...",bc_map;
sleep2 5000;
announce (
[email protected] == 1 ? "TRUE!!" : "FALSE!!"),bc_map;
callsub OnReveal,
[email protected];
end;
case 2:
mes "Event Ended.";
announce "[Trivia Event] : The event has been ended by a GM",bc_all;
.active = 0;
close;
}
break;
default:
select("Activate Event");
.active = 1;
announce "[Trivia Event] : The event has been activated. Come to Prontera and warp to the event to participate!",bc_all;
donpcevent "Trivia Warp::OnActivate";
mes "Come talk to me when you're ready to proceed!";
close2;
sleep2 30000;
announce "[Trivia Event] : You have 30 more seconds to join the event. Come to Prontera to participate!",bc_all;
sleep2 30000;
announce "[Trivia Event] : The event has started and the warp has been closed.",bc_all;
.active = 2;
announce "[Trivia Event] : Welcome to the trivia event!",bc_map;
sleep2 3000;
announce "[Trivia Event] : You will have 30 seconds to select True or False after the question is displayed.",bc_map;
sleep2 3000;
announce "[Trivia Event] : Simply warp to the corresponding answer. O = TRUE X = FALSE",bc_map;
end;
}
OnInit:
.minGM = 1;
.active = 0;
end;
OnReveal:
if(getarg(0) == 1) {
areawarp "quiz_02",324,334,347,357,"quiz_02",350,371;
areawarp "quiz_02",352,334,352,357,"prontera",156,191;
} else {
areawarp "quiz_02",352,334,352,357,"quiz_02",350,371;
areawarp "quiz_02",324,334,347,357,"prontera",156,191;
}
return;
}
quiz_02,337,365,0 script TrueWarp 45,2,2,{
warp "quiz_02",335,345;
end;
OnActive:
enablenpc strnpcinfo(0);
waitingroom "TRUE",0;
end;
OnClose:
OnInit:
disablenpc strnpcinfo(0);
end;
}
quiz_02,362,365,0 script FalseWarp 45,2,2,{
warp "quiz_02",364,346;
end;
OnActive:
enablenpc strnpcinfo(0);
waitingroom "FALSE",0;
end;
OnClose:
OnInit:
disablenpc strnpcinfo(0);
end;
}
prontera,150,191,0 script Trivia Warp 45,2,2,{
if(getvariableofnpc(.active,"Trivia Control")) warp "quiz_02",350,371;
end;
OnActivate:
enablenpc strnpcinfo(0);
waitingroom "Trivia Event",0;
initnpctimer;
end;
OnTimer60000:
stopnpctimer;
OnInit:
disablenpc strnpcinfo(0);
end;
}