Jump to content
  • 0

Timer Related Script Error


Question

Posted

Hi guys!

Previously i made a topic that is regarding about the timer issue.

It was solved without any problems.

this worked great to what i need however, i had 1 more problem.

Is it possible for me to slot in another timer?

The current issue is that the script came out with no errors at all. It worked great!

However, it doesn't move automatically and doesn't hide itself once i've added this line in.

Can anyone help? Thanks !

  	 attachnpctimer;
       initnpctimer;
       npctalk "I don't feel so good anymore........";
       end;
       OnTimer2000:
    npctalk "hihi";
    end;
       OnTimer6000:
    npctalk "It's 6 seconds now!";
       next;
       end;
       OnTimer10000:
       npctalk "10 seconds now! ";
       next;
       end;
       OnTimer14000:
       npctalk "14 seconds!";
       end;
       dispbottom "Thank you for your time!";
       close2;
       end; }
OnMon1550:
OnWed0000:
   .unhide = 0;
   disablenpc strnpcinfo(0);
   end;
OnTue2026:
OnTue0000:
   enablenpc strnpcinfo(0);
   .unhide = 1;
   goto L_start;
OnInit:
   if ( gettime(4) != 0 && gettime(4) != 3  && gettime (4) != 4) { // add this...
       disablenpc strnpcinfo(0);
       end;
   }
   else
       .unhide = 1;
L_start:
   .@interval = 2;
   .@step = 5;
   while ( .unhide ) {
       sleep .@interval * 1000;
       getmapxy .@map$, .@x, .@y, 1;
       while ( checkcell( .@map$, .@npc_x = .@x + rand( -.@step, .@step ), .@npc_y = .@y + rand( -.@step, .@step ), cell_chknopass ) );
       npcwalkto .@npc_x, .@npc_y;
       npctalk callfunc( "F_RandMes", 2,
           "Heloo!!!", // 1
           "Goodbye~!" // 2
       );        
   }
   end;
}

1 answer to this question

Recommended Posts

Posted

bump!

sorry! maybe i wasn't clear with the information given above.

well to summarize it up. is it possible to have 2 timers together in 1 script?

1 of it will continuously work all time while the second timer is can be triggered by the player.

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...