Auryn Posted August 11, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 147 Reputation: 1 Joined: 01/26/12 Last Seen: April 27, 2018 Share Posted August 11, 2012 How to put a timer between those two ones ? mes "[Rain]"; mes "Please come back later, I need to concentrate."; mes "[Rain]"; mes "Ah, c'est toi !"; next; mes "[Rain]"; mes "Oh, it's you. Here it is."; getitem 6090,1; close; If someone know a good way, I would like to learn about it, cause it's being hard to find out. Quote Link to comment Share on other sites More sharing options...
Ryuuzaki Posted August 11, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 87 Reputation: 13 Joined: 02/15/12 Last Seen: September 11, 2024 Share Posted August 11, 2012 (edited) I would suggest you to just create a new quest inside the database and then let it check if the timer has run out. You could also use the gettimetick(2) script command. First you set the current time with when the "timer" should ~start. set q_timer, gettimetick(2); close; set .@timer, gettimetick(2)-q_timer; set .@wait, 600-.@timer; if(.@timer < 600) { mes "[Rain]"; mes "Please come back in "+.@wait+" seconds, I need to concentrate."; close; } else{ mes "[Rain]"; mes "Ah, c'est toi !"; next; mes "[Rain]"; mes "Oh, it's you. Here it is."; getitem 6090,1; close; } q_timer = time when the variable was set if(.@timer < 600) = if *current time* minus time when variable was set, is smaller than 600 seconds execute code below else = if it's bigger than 600 seconds or more have passed To change the time which is needed before you get the item. edit the 600 to whatever number you want. set .@wait, 600-.@timer; if(.@timer < 600) Edited August 11, 2012 by shadowseph 1 Quote Link to comment Share on other sites More sharing options...
Euphy Posted August 12, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted August 12, 2012 @shadowseph: That could be simplified by setting the permanent variable as: gettimetick(2) + <delay, in seconds> Then, if (gettimetick(2) < q_timer) { mes "You must wait a little longer~"; close; } 1 Quote Link to comment Share on other sites More sharing options...
Ryuuzaki Posted August 12, 2012 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 87 Reputation: 13 Joined: 02/15/12 Last Seen: September 11, 2024 Share Posted August 12, 2012 You are right Euphy, it was late last night and i can't think properly when i'm sleepy. Quote Link to comment Share on other sites More sharing options...
Question
Auryn
How to put a timer between those two ones ?
If someone know a good way, I would like to learn about it, cause it's being hard to find out.
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.