Attach timer to player

simplynice

New member
Messages
52
Points
0
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.

 
Try this : 


Code:
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;}
 
Last edited by a moderator:
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;
}

 
Try this : 


Code:
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;}
 
Back
Top