npc_test_npctimer.txt 578 B

123456789101112131415161718192021222324252627282930313233
  1. prontera,156,183,0 script NPCtimerTest::npctimerX0000 116,{
  2. mes "Timer value" + getnpctimer(0);
  3. mes "State timer" + getnpctimer(1,"npctimerX0000");
  4. mes "Number of events" + getnpctimer(2);
  5. menu "Initialization",L_INIT,"Stop",L_STOP,"Start",L_START,"Settings",L_SET;
  6. close;
  7. L_INIT:
  8. initnpctimer;
  9. close;
  10. L_STOP:
  11. stopnpctimer;
  12. close;
  13. L_START:
  14. startnpctimer;
  15. close;
  16. L_SET:
  17. input @temp;
  18. setnpctimer @temp;
  19. close;
  20. OnTimer1000:
  21. announce "After a second",0;
  22. end;
  23. OnTimer5000:
  24. announce "After 5 seconds",0;
  25. end;
  26. OnTimer10000:
  27. announce "After 10 seconds",0;
  28. end;
  29. }