How to make this script to automated event?
- Event will run everyday 2x at 10:00 and 16:00
no need to whisper the NPC. here's the script
thank you for those who help ?
- script HHE -1,{
end;
OnWhisperGlobal:
if(getgmlevel()<.Access) end;
if(@whispervar0$ == "Start"){
if(.Event == 1){
dispbottom "Event already started";
end;
} else {
dispbottom "Input New Base Rate";
input .@BaseExp;
dispbottom "Input New Job Rate";
input .@JobExp;
setbattleflag "base_exp_rate",.@BaseExp*100;
setbattleflag "job_exp_rate",.@JobExp*100;
dispbottom "Event has been started.";
initnpctimer;
set .Event,1;
announce "Happy Hour EXP: Floating rates event started. New rates: Base - "+.@BaseExp+"x, Job - "+.@JobExp+"x",0;
}
end;
}
if(@whispervar0$ == "Stop"){
if(.Event == 1) goto L_STOP;
else dispbottom "Event not started.";
end;
}
end;
OnInit:
set .DefaultBaseRates,getbattleflag("base_exp_rate");
set .DefaultJobRates,getbattleflag("job_exp_rate");
set .Access,80; // GM access lvl
end;
OnTimer3600000: // After 1 hour
L_STOP:
set .Event,0;
stopnpctimer;
setbattleflag "base_exp_rate",.DefaultBaseRates;
setbattleflag "job_exp_rate",.DefaultJobRates;
announce "Happy Hour EXP: The floating rates event have been ended. Rates back to the normal.",0;
end;
}