Jump to content
  • 0

how to change the time interval in auto event npc


Question

3 answers to this question

Recommended Posts

Posted

if you'd like to make it run on every (times)3 hours, like 03.00, 06.00, 09.00, 12.00, 15.00, 18.00, 21.00 and 00.00 (24.00), then you can use this:

OnHour00:
OnHour03:
OnHour06:
OnHour09:
OnHour12:
OnHour15:
OnHour18:
OnHour21:
// event begins

If you want to be floating, like 3 hrs after the event is done, then this should do the trick:

OnInit:
startnpctimer;
end;

OnTimer7200000:
    if(!.@a) {
        setnpctimer -3600000;
        set .@a, 1;
        end;
    }
    
    //event script

 

upon NPC done, add this on before end;

stopnpctimer;
initnpctimer;
set .@a, 0;

IDK if there is OnTimer10800000 or not, as I know, they don't have it. so, it will subtract the timer by 1 hour on the 2nd hour, then on the next 2nd hour (which will be the 3rd hour), it will do the event script.

 

not tested

Posted

if you'd like to make it run on every (times)3 hours, like 03.00, 06.00, 09.00, 12.00, 15.00, 18.00, 21.00 and 00.00 (24.00), then you can use this:

OnHour00:
OnHour03:
OnHour06:
OnHour09:
OnHour12:
OnHour15:
OnHour18:
OnHour21:
// event begins

If you want to be floating, like 3 hrs after the event is done, then this should do the trick:

OnInit:
startnpctimer;
end;

OnTimer7200000:
    if(!.@a) {
        setnpctimer -3600000;
        set .@a, 1;
        end;
    }
    
    //event script

upon NPC done, add this on before end;

stopnpctimer;
initnpctimer;
set .@a, 0;

IDK if there is OnTimer10800000 or not, as I know, they don't have it. so, it will subtract the timer by 1 hour on the 2nd hour, then on the next 2nd hour (which will be the 3rd hour), it will do the event script.

 

not tested

  THNX alot i try this..

PS: haha how can i check if the NPC running the event every after 3hrs

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...