Currently Posted April 22, 2013 Posted April 22, 2013 How to put time interval before player can talk to the NPC? Quote
Jarek Posted April 23, 2013 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
Capuche Posted April 23, 2013 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
-SkittleNugget- Posted April 23, 2013 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
Question
Currently
How to put time interval before player can talk to the NPC?
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.