here's the script from eathena i want to modify this at the event will at a certain time:
- script KOH#announcer -1,{
OnClock0000:
OnInit:
disablenpc "KingOfHill";
disablenpc "kohfinish";
end;
}
poring_c02,224,217,5 script KingOfHillEvent 56,{
if ($started == 1) donpcevent "KingOfHill::Onregister";
if (getgmlevel()>=50) goto L_GM;
mes "[King Of Hill]";
mes "Only my master can open the race";
L_no:
close;
L_GM:
mes "[King Of Hill]";
mes "Hello master, would you like to start the race?";
menu " - Yes",-,"- No",L_no;
close2;
cleararray $kohplayers[0],0,getarraysize($kohplayers);
announce "King Of Hill Event was started",0;
enablenpc "KingOfHill";
enablenpc "kohfinish";
set $started,1;
sleep2 10000;
announce "Please proceed at the middle of Event Room if you want to participate",0;
sleep 10000;
announce "Participants please enter the warp portal now before it will close",0;
initnpctimer;
close;
OnTimer30000:
announce "King Of Hill event will start in about 30 seconds",0;
sleep2 5000;
announce "Hurry and Join the Race",0;
end;
OnTimer50000:
announce "King Of Hill Portal is closed",0;
end;
OnTimer51000:
donpcevent "KOHannouncer::OnEnable";
stopnpctimer;
disablenpc "KingOfHill";
end;
}
//===========================================================
quiz_02,46,375,5 script KingOfHill 811,{
Onregister:
if ($started == 1) {
mes "Hello would you like to register to join the race?";
next;
menu " -Yes",-," -No",L_no;
next;
mes "Thankyou for registering Mr. " + strcharinfo(0) + ", Have fun!";
if (getarraysize($kohplayers) == 0) setarray $kohplayers[0], getcharid(3);
else setarray $kohplayers[getarraysize($kohplayers)], getcharid(3);
atcommand "@option 255,0,0";
warp "mjolnir_04",77,304;
end;
}
end;
L_no:
close;
end;
}
//===========================================================
- script KOHannouncer -1,{
OnEnable:
mapannounce "mjolnir_04","The one who will reach the end of the bridge found at the top of the Hill will win the event",16;
announce "Get Ready... Countdown will begin at 5",bc_all;
sleep2 1000;
announce "4",bc_all;
sleep2 1000;
announce "3",bc_all;
sleep2 1000;
announce "2",bc_all;
sleep2 1000;
announce "1",bc_all;
sleep2 1000;
donpcevent "freezer::OnEvent";
//areawarp "mjolnir_04",72,307,82,300,"mjolnir_04",77,304;
announce "GO!",bc_all;
end;
}
mjolnir_04,135,208,5 script Finish Line!::kohfinish 111,2,2,{
if ($started == 0) end;
OnTouch:
if (.winner == 1) {
mes "Sorry we have got a winner.";
end;
}
if (.winner == 0) {
mes "You win !!";
set .winner,1;
close2;
}
announce strcharinfo(0)+" is the King of the Hill!!",bc_all;
getitem 7720,1;
set $started,0;
atcommand "@doommap";
atcommand "@kill "+strcharinfo(0);
set .winner,0;
cleararray $kohplayers[0],0,getarraysize($kohplayers);
disablenpc "kohfinish";
end;
}
mjolnir_04,0,0,0 script freezer 111,2,2,{
OnEvent:
for (set .@i, 0; .@i < getarraysize($kohplayers); set .@i, .@i + 1) {
attachrid($kohplayers[.@i]);
atcommand "@option 0 0 0";
}
end;
}