then write number 100 instead of 500i want CHANGE INTERVAL(addevent) from 500ms to 100ms.
then write number 100 instead of 500
for test = 100, 1000, 100 do
addEvent(doCreatureSay, i, cid, "hello",19)
end
well now its 100. if you did what I just said.AddEvent was supposed to be at each 100ms, but it's coming at each 500ms instead
#define SCHEDULER_MINTICKS 50
inline SchedulerTask* createSchedulerTask(uint32_t delay, const boost::function<void (void)>& f)
{
if(delay < SCHEDULER_MINTICKS)
delay = SCHEDULER_MINTICKS;
return new SchedulerTask(delay, f);
}
event.eventId = Scheduler::getInstance().addEvent(createSchedulerTask(std::max((int64_t)SCHEDULER_MINTICKS, popNumber(L)),
I'll assume this is for 8.6 server?
SCHEDULER_MINTICKS is defined in scheduler.h on line 23
Code:#define SCHEDULER_MINTICKS 50
And then on line 44 of scheduler.h delay is limited to SCHEDULER_MINTICKS value
Code:inline SchedulerTask* createSchedulerTask(uint32_t delay, const boost::function<void (void)>& f) { if(delay < SCHEDULER_MINTICKS) delay = SCHEDULER_MINTICKS; return new SchedulerTask(delay, f); }
Which is passed to createSchedulerTask which is passed to addEvent in luascript.cpp on line 8481
Code:event.eventId = Scheduler::getInstance().addEvent(createSchedulerTask(std::max((int64_t)SCHEDULER_MINTICKS, popNumber(L)),