Currently Posted April 22, 2013 Group: Members Topic Count: 162 Topics Per Day: 0.03 Content Count: 313 Reputation: 1 Joined: 01/22/12 Last Seen: November 17, 2023 Share Posted April 22, 2013 How to put time interval before player can talk to the NPC? Quote Link to comment Share on other sites More sharing options...
Jarek Posted April 23, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 143 Reputation: 30 Joined: 12/23/11 Last Seen: March 9 Share Posted April 23, 2013 Example 1: <NPC Header> { // We need to use attachnpctimer because the mes command below needs RID attach attachnpctimer; initnpctimer; npctalk "I cant talk right now, give me 10 seconds"; end; OnTimer5000: npctalk "Ok 5 seconds more"; end; OnTimer6000: npctalk "4"; end; OnTimer7000: npctalk "3"; end; OnTimer8000: npctalk "2"; end; OnTimer9000: npctalk "1"; end; OnTimer10000: stopnpctimer; mes "[Man]"; mes "Ok we can talk now"; detachnpctimer; // and remember attachnpctimer and detachnpctimer can only use while the NPC timer is not running ! } 1 Quote Link to comment Share on other sites More sharing options...
Capuche Posted April 23, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted April 23, 2013 Try sleep2 after the header or gettimetick prontera,150,150,5 script truc 58,{ sleep2 2000; // 2 secs delay npctalk "hono hono hono"; end; } prontera,150,150,5 script truc 2 58,{ if( @time_tick - gettimetick(2) > 2 ) end; @time_tick = gettimetick(2) + 2; // current time in secs since.. long ago +2 secs npctalk "hono hono hono"; end; } There are others commands but these are the usual 1 Quote Link to comment Share on other sites More sharing options...
-SkittleNugget- Posted April 23, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 318 Reputation: 54 Joined: 12/23/12 Last Seen: July 1, 2017 Share Posted April 23, 2013 (edited) *sleep2 {<milliseconds>}; 1000 milliseconds in one Second. mes "[Marky]"; mes "Please wait for 5 seconds.."; sleep2 5000; mes "Ok, All done"; Edited April 23, 2013 by Metamorphic 1 Quote Link to comment Share on other sites More sharing options...
Question
Currently
How to put time interval before player can talk to the NPC?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.