simplynice 1 Posted July 26, 2013 I'd like to attach a timer to a player. Example: I will talk to NPC and after talking to NPC . the NPC will block the player to talk into that NPC for 1 week. It's an account based attachment of time. The purpose of the 1 week time is it cannot talk to the NPC even if he goes offline and online again. I just need an idea easy enough to understand. Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted July 26, 2013 (edited) Try this : prontera,150,150,0 script Sample 100,{ .@npc$ = strnpcinfo(1); .@block_time = 7; // 7 days if ( gettimetick(2) < #timer ) { mes .@npc$; mes "You can only talk to me once a week"; .@time_left = ( ( #timer - gettimetick(2) ) / 60 ); mes "Time left : " +.@time_left+ " minutes"; close; } mes .npc$; mes "Talk to me again after " +.@block_time+ " days."; #timer = gettimetick(2) + ( .@block_time * 24 * 60 * 60 ); close;} Edited July 26, 2013 by Patskie Quote Share this post Link to post Share on other sites
0 * Blaze * 6 Posted July 26, 2013 if need some idea try this prontera.gat,151,184,5 script Awesome Guy 100,{ if(#ticker<gettimetick(2)) { mes "I think you're really awesome."; next; mes "Now you have to wait a week before you can hear that again."; set #ticker, gettimetick(2)+60*60*24*7; } else { mes "Come back next week for your complement."; } close;} Quote Share this post Link to post Share on other sites
0 * Blaze * 6 Posted July 26, 2013 Try this : prontera,150,150,0 script Sample 100,{ .@npc$ = strnpcinfo(1); .@block_time = 7; // 7 days if ( gettimetick(2) < #timer ) { mes .@npc$; mes "You can only talk to me once a week"; .@time_left = ( ( #timer - gettimetick(2) ) / 60 ); mes "Time left : " +.@time_left+ " minutes"; close; } mes .npc$; mes "Talk to me again after " +.@block_time+ " days."; #timer = gettimetick(2) + ( .@block_time * 24 * 60 * 60 ); close;} Quote Share this post Link to post Share on other sites
I'd like to attach a timer to a player.
Example:
I will talk to NPC and after talking to NPC . the NPC will block the player to talk into that NPC for 1 week.
It's an account based attachment of time.
The purpose of the 1 week time is it cannot talk to the NPC even if he goes offline and online again.
I just need an idea easy enough to understand.
Share this post
Link to post
Share on other sites